How to Enable MathJax Rendering in Sublime Text Markdown Preview

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:

"js": [
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js",
        "res://MarkdownPreview/js/math_config.js",
],
"markdown_extensions": {
    "pymdownx.arithmatex": {
        "generic": true
    }
}

Providing MarkdownPreview is installed correctly, one can find option enable_mathjax this way:

enter image description here

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:

{
    "enable_mathjax": true,
    "js": [
    "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js",
            "res://MarkdownPreview/js/math_config.js",
    ],
}

Also, using Package​Resource​Viewer I edited the math_config.js in the js folder of MarkDown Preview to make the Display Math aligned to center:

MathJax.Hub.Config({
  config: ["MMLorHTML.js"],
  extensions: ["tex2jax.js"],
  jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"],
  tex2jax: {
    inlineMath: [ ['$','$'], ["\\(","\\)"] ],
    displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
    processEscapes: true
  },
  TeX: {
    extensions: ["AMSmath.js", "AMSsymbols.js"],
    TagSide: "right",
    TagIndent: ".8em",
    MultLineWidth: "85%",
    equationNumbers: {
      autoNumber: "AMS",
    },
    unicode: {
      fonts: "STIXGeneral,'Arial Unicode MS'"
    }
  },
  displayAlign: "center",
  showProcessingMessages: false,
  messageStyle: 'none'
});

Pay attention to displayAlign. At default it is displayAlign: "left".
You can customize MathJaX farther according to MathJaX Options.