【问题标题】:Unable to render vertically lay out addition of two numbers with MathJax and MathML无法使用 MathJax 和 MathML 垂直渲染两个数字的加法
【发布时间】:2012-10-04 20:28:08
【问题描述】:

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

    123
  + 456
 ______

我找到了这个例子:

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

但是MathJax doesn't support mstack, msrow and msline elements.我尝试使用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 实现这种布局?

【问题讨论】:

    标签: mathjax mathml


    【解决方案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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-03-20
      • 1970-01-01
      • 2021-12-07
      • 1970-01-01
      • 2021-12-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多