显示问题:
![](https://i-blog.csdnimg.cn/blog_migrate/a59b3debf06ff2a50310cc221877ba29.png)
添加代码:
<script type="text/javascript" async src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?
config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
showProcessingMessages: false, //关闭js加载过程信息
messageStyle: "none", //不显示信息
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ], //行内公式选择$
displayMath: [ ['$$','$$'], ["\\[","\\]"] ], //段内公式选择$$
processEscapes: true
},
TeX: {extensions: ["AMSmath.js","AMSsymbols.js","extpfeil.js","mhchem.js"]},
"HTML-CSS": {
availableFonts: ["STIX","TeX"], //可选字体
showMathMenu: false //关闭右击菜单显示
}
});
</script>
注意:上述的两段代码缺一不可
正常显示:
![](https://i-blog.csdnimg.cn/blog_migrate/54cd2c6c3121341f391bc456a0d0257a.png)