Skip to content

Commit

Permalink
fix(#16): Solved that mathjax is not working properly
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Sep 16, 2019
1 parent e287b3b commit 74188c6
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions layout/_third-party/math/mathjax.pug
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
script(type="text/x-mathjax-config").
var mathjaxMhchem = '';
var mathJaxTex = {
equationNumbers: {
autoNumber: "AMS"
}
};

if (!{ theme.math.mathjax.mhchem.enable }) {
mathjaxMhchem = '!{ theme.math.mathjax.mhchem.mhchem_js }';
MathJax.Ajax.config.path['mhchem'] = mathjaxMhchem;

mathJaxTex.extensions = [mathjaxMhchem];
} else {
mathJaxTex.extensions = ["AMSmath.js","AMSsymbols.js"];
}

MathJax.Hub.Config({
menuSettings: {
zoom: "None"
},
showMathMenu: false,
jax: ["input/TeX","output/CommonHTML"],
extensions: ["tex2jax.js"],
TeX: mathJaxTex,
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
},
TeX: {
extensions: [mathjaxMhchem],
equationNumbers: {
autoNumber: 'AMS'
}
}
});

Expand Down

0 comments on commit 74188c6

Please sign in to comment.