Using Sublime Text 3, I'm writing a Markdown document that includes math. The Markdown Preview package enables real-time rendering of the document in the browser (Chrome). So as I write, the changes are visible. The following is my markdown text.
$a = \sin^{2}(\Delta \phi/2) + \cos(\phi_{1})\cos(\phi_{2})\sin^{2}(\Delta \lambda/2)$
$c = 2 \arcsin(\sqrt{a})$
$d = rc$
MarkdownPreview manual says something like "When enable_mathjax
is true
", but I cannot figure it out where it is. For completeness, The Sublime console does not display any error message. I'm using Windows 7 and the lastest MathJax fetched from Git. MathJax itself works fine when I displayed some sample test html.
As of now, neither of the above answers is working anymore. I finally found a solution in a Github issue which provides an updated version of the code snippet that needs to be added to the MarkdownPreview user settings:
Providing MarkdownPreview is installed correctly, one can find option
enable_mathjax
this way:Hope this helps.
The MarkDown Preview 2.x branch won't work with the method in @VividD answer.
My User Settings, which enables MathJaX is as following:
Also, using PackageResourceViewer I edited the
math_config.js
in thejs
folder of MarkDown Preview to make the Display Math aligned to center:Pay attention to
displayAlign
. At default it isdisplayAlign: "left"
.You can customize MathJaX farther according to MathJaX Options.