Brett on 04 Aug, 2018 03:05 PM
Almost all macOS applications with web views use the same rendering
engine as Safari (Apple's Webkit). There's really no alternative to
this. I can definitely see how having to export to Chrome to get proper
output is a huge inconvenience, but I'm not sure I can do anything about
it within Marked.
I see, I was expecting something along that line, but thanks for confirming.
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.
Please don't worry, it's not a Marked 2 problem in the first place.
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?