Cla*_*lay 4 latex r mathjax rstudio r-markdown
通过在 Rmd 文档的开头添加以下语句,我可以在 RStudio 中的 R markdown 文档中自动编号 mathjax 方程:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "all",
formatNumber: function (n) {return '9.'+n}
}
}
});
</script>
Run Code Online (Sandbox Code Playgroud)
以下也适用,但不适用于 $$..$$ 方程,只有用 \begin{equation}..\end{equation} 括起来的方程。
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "AMS",
formatNumber: function (n) {return '9.'+n}
}
}
});
</script>
Run Code Online (Sandbox Code Playgroud)
我可以将编号更改为\tag{mylabel}
$$..$$ 内的静态标签,并且自动编号将跳过该等式。
不幸的是,在没有标签的情况下跳过添加\tag{}
结果仍然用 () 标记的等式。
有谁知道如何摆脱空括号?
有没有人知道一个简单的语句可以添加到 mathjax 脚本语句或 Rmd 文档中的 $$..$$ 方程中,它将自动编号的节号添加到方程编号?
这里的大部分信息:http : //mathjax.readthedocs.org/en/latest/tex.html#automatic-equation-numbering
谢谢
您可以在表达式上使用\notag
或\nonumber
来防止对其应用自动标记。所以如果你正在使用autoNuber: "all"
,你可以做
$$E=mc^2\nonumber$$
Run Code Online (Sandbox Code Playgroud)
得到没有数字的方程。
归档时间: |
|
查看次数: |
4706 次 |
最近记录: |