Search code examples
mathjaxmathml

MathJax MathML3 gives mlongdiv and mstack error


I have a problem with MathML equation rendering. Mlongdiv and mstack gives the error Unknownnode type:mstack .. All other mathml functions work My sample code is

<script src="MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML" ></script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> 

<h1><center>Math Equation Demo</h1></center>

</p>
<p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
    <mfrac>
        <mn>1</mn>
        <mn>2</mn>
    </mfrac>
</math>
</p>

<p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
    <mfenced>
        <mfrac><mrow><mn>123</mn><mo>*</mo><mn>234</mn></mrow><mn>51</mn></mfrac>
    </mfenced>
</math>
</p>
<p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstack charalign="center" stackalign="right"><mn>10</mn><msrow><mo>+</mo><mn>15</mn></msrow><msline/><mn>25</mn>
    </mstack>
</math>
</p>
<p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
    <mlongdiv charalign="center" charspacing="0px" stackalign="left">
        <mstack charalign="center" stackalign="right"><mn>2</mn></mstack><mn>50</mn><msgroup><mn>100</mn></msgroup>
    </mlongdiv>
</math>
</p> 

The output is:

output of the code


Solution

  • MathJax offers only experimental support for the so-called elementary math section of the MathML spec via its mml3.js extension. For more information see http://docs.mathjax.org/en/latest/mathml.html#supported-mathml-commands, http://docs.mathjax.org/en/latest/options/MML3.html