【问题标题】:long division is not properly displayed in Mathjax长除法在 Mathjax 中未正确显示
【发布时间】:2021-11-28 04:55:32
【问题描述】:
<math xmlns="http://www.w3.org/1998/Math/MathML">
    <mlongdiv charalign="center" charspacing="0px" stackalign="left">
        <mn>8</mn>
        <mrow>
            <none></none>
            <mn>3</mn>
        </mrow>
        <msgroup>
            <mn>251</mn>
            <msrow>
                <menclose notation="bottom">
                    <mn>2</mn>
                </menclose>
                <menclose notation="bottom">
                    <mn>4</mn>
                </menclose>
            </msrow>
            <msrow>
                <none></none>
                <mn>1</mn>
            </msrow>
        </msgroup>
    </mlongdiv>
</math>

这是它当前的显示方式(https://jsbin.com/gobojih/edit?html,output)

这是它在 wiris Mathtype 演示页面中的显示方式(https://demo.wiris.com/mathtype/en/developers.php)

【问题讨论】:

    标签: mathjax


    【解决方案1】:

    MML3 扩展是实验性的,可能无法实现所有可能的初等数学表达式,或处理所有可能的属性值。此外,输出并不总是最优的。

    在您的情况下,最外面的 &lt;msgroup&gt; 引起了问题,因为扩展似乎无法正确读取它。如果您将&lt;mn&gt;251&lt;/mn&gt; 移到msgroup 之外,这将使输出呈现更好的效果。

    MML3 扩展不处理 &lt;none&gt; 元素,但将包含它的 nrow 更改为 &lt;mn&gt;3&amp;#xA0;&lt;/mn&gt; 允许它以您指定的方式呈现。所以

    <math xmlns="http://www.w3.org/1998/Math/MathML">
        <mlongdiv charalign="center" charspacing="0px" stackalign="left">
            <mn>8</mn>
            <mn>3&#xA0;</mn>
            <mn>251</mn>
            <msgroup position="1">
                <msrow>
                    <menclose notation="bottom">
                        <mn>2</mn>
                    </menclose>
                    <menclose notation="bottom">
                        <mn>4</mn>
                    </menclose>
                </msrow>
                <mn>1</mn>
            </msgroup>
        </mlongdiv>
    </math>
    

    呈现为

    这可能足以满足您的需求。很抱歉,这确实意味着您需要编辑 MathType 输出。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-02-01
      • 1970-01-01
      • 2018-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-31
      相关资源
      最近更新 更多