0

我想在这样的网页上呈现两个数字:

    123
  + 456
 ______

我找到了这个例子:

<mstack>
  <mn>496</mn>
  <msrow> <mo>+</mo> <none/> <mn>28</mn> </msrow>
  <msline/>
</mstack>

MathJax 不支持 mstack、msrow 和 msline 元素。我尝试使用 mtable

<body>
    <math xmlns="http://www.w3.org/1998/Math/MathML">
        <mtable id="test" columnalign="right">
            <mtr><mtd></mtd><mtd><mn>12321</mn></mtd></mtr>
            <mtr><mtd><mo>+</mo></mtd><mtd><mn>45665445</mn></mtd></mtr>
       </mtable>
    </math>
</body>

使用这个 CSS:

 <style type="text/css">
       #test
       {
           border-bottom:1px solid black;
       }
    </style>

但底部边框与较低的数字重叠。有没有办法用 MathJax/MathML 实现这种布局?

4

1 回答 1

1

您可以在 MathML 规范中查看此类布局的示例,网址为

http://www.w3.org/Math/draft-spec/mathml.html#chapter3_presm.elemmath.examples

如果在加载文档后,您选择“使用 MathJax 转换和显示”按钮,则 MathML3 mstack 标记将转换为 MathJax 可以理解的一些 MathML2。相关的 javascript 都可以从该页面链接。

同样相关的是我和 MathJax 开发人员之间的讨论

https://groups.google.com/forum/#!msg/mathjax-users/wa85p5TAIe4/hgUoLEXrweoJ

于 2012-10-22T13:48:07.640 回答