【发布时间】:2020-07-23 07:57:42
【问题描述】:
我想使用 AsciiMath 在我的页面上呈现数学公式。 我按照 AsciiMath 入门并将脚本放在 head 标签中:
<script>
MathJax = {
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}
};
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=AM_CHTML">
</script>
<script src="/statics/js/libs/ASCIIMathML.js"></script>
这是我的段落:
<p>some sample text `sqrt{3x-1}+(1+x)^2` some sample text $\sqrt{3x-1}+(1+x)^2$ some sample text</p>
它只呈现用反引号括起来的 sqrt{3x-1}+(1+x)^2 部分,尽管我将 MathJax 配置更改为使用 $ 作为分隔符。
我不确定我在这里缺少什么。
【问题讨论】:
标签: javascript html math mathjax asciimath