LaTeX 公式嵌套
LaTeX formula nesting
我使用 latex to store the math formula, and use mathjax 在网页中呈现数学公式。
<script type="text/javascript" src="http://cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$', '$']]},
messageStyle: "none"
});
</script>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
我从其他网站抓取了一些数学公式,他们不使用 LaTeX。例如 x<sup>2</sup>
是一个公式的一部分,我尝试将 x<sup>2</sup>
保存在 LaTeX 公式中,但 LaTeX 公式不支持它。
<script type="text/javascript" src="http://cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$', '$']]},
messageStyle: "none"
});
</script>
$$x = {-b \pm \sqrt{b<sup>2</sup>-4ac} \over 2a}.$$
我也尝试过嵌套公式,但还是不行。
<script type="text/javascript" src="http://cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$', '$']]},
messageStyle: "none"
});
</script>
$$x = {-b \pm \sqrt{$$b^2$$-4ac} \over 2a}.$$
那么如何使用 LaTeX 嵌套数学公式?
不能以这种方式嵌套公式。并且您不能在 LaTeX 代码中混合用于格式化的 HTML 标签。只需使用 LaTeX 语法。
如果您不知道某些方程式或结构的正确 LaTeX 语法,请在 https://tex.stackexchange.com/ 询问。
我使用 latex to store the math formula, and use mathjax 在网页中呈现数学公式。
<script type="text/javascript" src="http://cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$', '$']]},
messageStyle: "none"
});
</script>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
我从其他网站抓取了一些数学公式,他们不使用 LaTeX。例如 x<sup>2</sup>
是一个公式的一部分,我尝试将 x<sup>2</sup>
保存在 LaTeX 公式中,但 LaTeX 公式不支持它。
<script type="text/javascript" src="http://cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$', '$']]},
messageStyle: "none"
});
</script>
$$x = {-b \pm \sqrt{b<sup>2</sup>-4ac} \over 2a}.$$
我也尝试过嵌套公式,但还是不行。
<script type="text/javascript" src="http://cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$', '$']]},
messageStyle: "none"
});
</script>
$$x = {-b \pm \sqrt{$$b^2$$-4ac} \over 2a}.$$
那么如何使用 LaTeX 嵌套数学公式?
不能以这种方式嵌套公式。并且您不能在 LaTeX 代码中混合用于格式化的 HTML 标签。只需使用 LaTeX 语法。
如果您不知道某些方程式或结构的正确 LaTeX 语法,请在 https://tex.stackexchange.com/ 询问。