javascript - 嵌套在 html 中时,MathJax 不呈现乳胶
问题描述
我有这种类型的公式嵌套在 html 中:
<div><p>$$</p></div>
<div><p> a, b \in \mathbb{R}, then applies (a+b)^{2} = a^{2} + ab + b^{2} </p></div>
<div><p>$$</p></div>
这不会渲染。但是,当它全部放在一条线上时,它会这样做,如下所示:
<div><p>$$ a, b \in \mathbb{R}, then applies (a+b)^{2} = a^{2} + ab + b^{2} $$ </p></div>
我的配置如下所示:
<script type="text/javaScript">
window.MathJax = {
tex2jax: {
inlineMath: [ ['$','$'], ["\[","\]"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEnvironments: true,
processEscapes: true
},
MathML: {
extensions: ['content-mathml.js']
},
// Center justify equations in code and markdown cells. Elsewhere
// we use CSS to left justify single line equations in code cells.
displayAlign: 'center',
"HTML-CSS": {
availableFonts: [],
imageFont: null,
preferredFont: null,
webFont: "STIX-Web",
styles: {'.MathJax_Display': {"margin": 0}},
linebreaks: { automatic: true }
},
};
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full,Safe">
</script>
任何关于为什么这可能不起作用的建议都非常受欢迎。感谢您的关注
解决方案
推荐阅读
- flutter - 可以根据孩子大小调整的小部件?
- r - 为什么函数定义中接受符号字符?
- python - Python:如何比较从 .txt 读取的两个列表(用户名和密码)与用户输入
- excel - 查找可用数据的第一行和最后一行
- vim - 让 Vim 在启动时在特定文件中运行命令
- python - 如何使用 VLAN 层读取数据包
- ruby - elelasticsearch 在 EC2 cent os instalce instalce in production with Nginx 中无法与 Rails 一起使用
- javascript - 如何使用完整日历和 Vue js 在我的日历中显示数据?
- javascript - 单元测试 express.js 路由
- angular - 如何在我的 PWA 上触发 beforeinstallprompt 事件?