我正在HTML
页面内的一段脚本中配置MathJax,
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js' async></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
jax: ["input/TeX","output/CommonHTML"],
extensions: ["tex2jax.js"],
tex2jax: {
inlineMath: [ ['$','$'] ],
processEscapes: true
},
minScaleAdjust: 90
});
</script>
我想将此配置放入config.js
文件中。所以我做了:
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js' async></script>
<script src="scripts/config.js" type="text/x-mathjax-config"></script>
并在scripts/config.js
文件中:
MathJax.Hub.Config({
jax: ["input/TeX","output/CommonHTML"],
extensions: ["tex2jax.js"],
tex2jax: {
inlineMath: [ ['$','$'] ],
processEscapes: true
},
minScaleAdjust: 90
});
但是,热潮!,没有任何工作了,tex表达式不再显示了。
我必须准确地说我是Javascript的新手,这可能是一个愚蠢的新手错误:)