我正在编写一些包含数学内容的网页(使用 MathJax),并且我正在寻找一种方法来进行与 LaTeX 定理引用等效的操作,如下例所示:
\begin{theorem} \label{thm:commute}
a+b=b+a
\end{theorem}
According to Theorem (\ref{thm:commute}), $2+3=3+2$.
我使用以下 CSS/HTML 代码来生成自动定理编号:
.theorem:before {
font-style: normal;
font-weight: bold;
content: "Theorem " counter(chap)"."counter(sect)"."counter(thm)" ";
}
.theorem {
counter-increment: theorem ;
}
<div class="theorem">
\(a+b=b+a\)
</div>
我需要相当于 LaTeX 的东西\label
, and \ref
命令为定理指定名称,以便稍后可以在网页上引用,并且将显示counter(chap)"."counter(sect)"."counter(thm)
.
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)