Reputation: 3965
I'm using having problem rendering maths equations in Chrome with its Markdown Viewer
plugin.
Sublime Text 3 v3.2.1 build 3207
Plugin: Markdown Preview 2.2.4
Ubuntu 18.06
Chrome Version 75.0.3770.142 (Official Build) (64-bit)
My normal setups are:
This was working fine until maybe a month or so, I can't remember the exact dates..
Here's is what I see now below. Any pointers would be much appreciated!
Upvotes: 2
Views: 1508
Reputation: 633
I stumbled upon this problem as well. This link helped me. In case it won't be available in the future here are the steps:
Edit MarkdownPreview config
Add following config to user config of Markdown Preview: Preferences -> Package Settings -> Markdown Preview -> Settings
{
"enable_mathjax": true,
"js": [
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js",
"res://MarkdownPreview/js/math_config.js",
],
}
Install PackageResourceViewer
Package Contol: Install Package -> PackageResourceViewer.
Edit math_config.js
PackageResourceViewer -> Open Resource -> MarkdownPreview -> js -> math_config.js
Replace the contents with:
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'
});
Try it. Did the job for me.
Upvotes: 5