tag:support.markedapp.com,2011-09-11:/discussions/problems/148394-mathjax-rendering-problemMarked: Discussion 2018-08-06T20:43:24Ztag:support.markedapp.com,2011-09-11:Comment/458390732018-08-03T23:57:59Z2018-08-06T20:39:07ZMathJax rendering problem<div><p>// Please enter a detailed description of the issue // Description of the issue:</p>
<p>I have a very simple equation that I'd like to render with MathJax, but the position of the overhead arrow and the overhead wedge is at the wrong place (see the attached image of "Marked_preview"). Now, this isn't really a Marked problem nor MathJax problem, but seems to be a bug in Safari (see <a href="https://github.com/mathjax/MathJax/issues/1766">https://github.com/mathjax/MathJax/issues/1766</a>). I've sort of verified that Safari has the problem, by exporting the html from Marked, adding a line to load MathJax with the same configuration as I use in Marked, and opening the html in Safari and Chrome. You can see in the picture (named "Safari" and "Chrome") that Chrome renders it correctly, while Safari doesn't. So my question is, is Marked using Safari in the preview? Is it possible to use Chrome in the preview instead? (I'm not very tech-savvy, sorry if the question doesn't make any sense.) Right now the only workaround I've found is to export the html, add the MathJax line by hand, open in Chrome and print to pdf, which is quite cumbersome.</p>
<p>// Please enter a list of steps required to reproduce the issue // Steps to reproduce:</p>
<ol>
<li>open the attached example.md file in Marked 2<br></li>
<li>turn on MathJax in Marked 2, with configuration TeX-MML-AM_HTMLorMML-full<br></li>
</ol>
<p>// If applicable please attach a sample document that causes the issue for you.</p>
<p>// Configuration (do not edit) Marked 2 953 (Direct)</p>
<h2><a name="macos-version-10-13-6-" class="anchor" href="#macos-version-10-13-6-"></a>macOS Version: 10.13.6</h2>
<p>additionalMathJaxConfig: tex2jax: {<br>
inlineMath: [["$","$"],["\(","\)"]], displayMath: [["$$","$$"],["\[","\]"]], processEscapes: true }, allowPageBreakInCode: TRUE<br>
bookTxtIsLeanpub: TRUE<br>
summaryMdIsGitBook: TRUE<br>
codeIsPoetry: TRUE<br>
codeCanWrap: TRUE<br>
collapsibleHeadlines: TRUE<br>
convertGithubCheckboxes: TRUE<br>
convertYAMLToMMD: TRUE<br>
defaultMathJaxConfig: TeX-MML-AM_HTMLorMML-full<br>
defaultPreviewStyle: 4<br>
defaultProcessor: MultiMarkdown<br>
enableMiniMap: TRUE<br>
excludeBlockQuotesFromCounts: TRUE<br>
excludeFootnotesFromCounts: TRUE<br>
excludeVerbatimFromCounts: TRUE<br>
excludeCaptionsFromCounts: TRUE<br>
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml<br>
githubNewlines: TRUE<br>
h1IsPageBreak: TRUE<br>
h2IsPageBreak: TRUE<br>
hrIsPageBreak: TRUE<br>
includeMathJax: TRUE<br>
limitTextWidth: TRUE<br>
minimalJavaScript: TRUE<br>
outlineModeExtensions:<br>
permissionGranted: TRUE<br>
printHeaderBottomLeft:<br>
printHeaderBottomRight:<br>
printHeaderFirstPage: TRUE<br>
printFooterFirstPage: TRUE<br>
printHeaderTopLeft:<br>
printHeaderTopRight:<br>
processHTMLFiles: TRUE<br>
removeMetadataForPreview: TRUE<br>
removeYAMLHeaders: TRUE<br>
scrollToEdit: TRUE<br>
shouldDetectCritic: TRUE<br>
shouldHighlightMarkupErrors: TRUE<br>
shouldLoadCritic: TRUE<br>
syntaxHighlight: TRUE</p></div>fiona.alpha137tag:support.markedapp.com,2011-09-11:Comment/458390732018-08-04T15:05:56Z2018-08-04T15:05:56ZMathJax rendering problem<div><p>Hi Fiona,</p>
<p>Almost all macOS applications with web views use the same rendering<br>
engine as Safari (Apple's Webkit). There's really no alternative to<br>
this. I can definitely see how having to export to Chrome to get proper<br>
output is a huge inconvenience, but I'm not sure I can do anything about<br>
it within Marked.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/458390732018-08-04T15:13:20Z2018-08-04T15:13:20ZMathJax rendering problem<div><p>I did just test changing the MathJax configuration in the dropdown to TeX-MML-AM_SVG-full and it seems to correct the issue. Is that an acceptable solution for you?</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/458390732018-08-05T19:39:44Z2018-08-06T20:39:07ZMathJax rendering problem<div><p>Hi Brett,</p>
<p>Thanks for the prompt reply.</p>
<p>I see, I was expecting something along that line, but thanks for confirming.</p>
<p>So with SVG I have a different problem that the exported pdf has all equations looking bold, although it looks very nice in the Marked preview; please see the attached image, left is preview in Marked, right is the exported pdf. I've also attached a snippet of the Markdown file used to generate the text. For this both Chrome and Safari act the same way: it looks very nice in the browser, but gets bold when exported/printed to pdf.</p>
<p>-Fiona</p></div>fiona.alpha137tag:support.markedapp.com,2011-09-11:Comment/458390732018-08-06T13:11:40Z2018-08-06T13:11:40ZMathJax rendering problem<div><p>I'm afraid I have no idea how to work around that. I'm sincerely sorry I<br>
can't be of more help on this.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/458390732018-08-06T15:21:04Z2018-08-06T20:39:07ZMathJax rendering problem<div><p>Please don't worry, it's not a Marked 2 problem in the first place.</p>
<p>After a bit more googling though, I found that the MathJax team has already hacked a workaround to the Safari problem in one of the later 2.7 release. Indeed the hat and the arrow are not displaced anymore in Safari if I load the latest 2.7.5 Mathjax (please see the attached html code, MathJax is loaded at the very top.) I think Marked is using MathJax 2.7.0 from what I see in the exported html with MathJax code included? Is it possible for you to change the default to the latest MathJax?</p>
<p>-Fiona</p></div>fiona.alpha137tag:support.markedapp.com,2011-09-11:Comment/458390732018-08-06T15:35:01Z2018-08-06T15:35:01ZMathJax rendering problem<div><p>That I can do. I'll update for the next release.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/458390732018-08-06T17:41:08Z2018-08-06T20:39:08ZMathJax rendering problem<div><p>Great, thank you!</p>
<p>By the way, Marked 2 (and nvALT!) really is a superb app; my life became so much better once I got Marked 2 and made my workflow revolve around it. Thank you for making such a great product!</p>
<p>-Fiona</p></div>fiona.alpha137tag:support.markedapp.com,2011-09-11:Comment/458390732018-08-06T18:00:19Z2018-08-06T18:00:19ZMathJax rendering problem<div><p>Thanks for the kind words!</p></div>Brett