mathjax / MathJax-node

MathJax for Node
Apache License 2.0
615 stars 97 forks source link

<munderover> with unicode symbol #x2211 not being rendered correctly in SVG #197

Closed corinnaSchultz closed 8 years ago

corinnaSchultz commented 8 years ago

x2211 is a sigma, and with munderover I expect the sub and superscript numbers to be aligned vertically. The SVG output has them aligned as "normal" subscripts and superscripts. In contrast, when I use the integral symbol, #x222B, the alignment is correct.

sigma integral

Sample mathML:

 <math xmlns="http://www.w3.org/2010/Math/MathML"><semantics><mstyle scriptsizemultiplier="0.715"><munderover><mo>&#x2211;</mo><mn>0</mn><mn>100</mn></munderover></mstyle><annotation encoding="text/plain"/></semantics></math>
dpvc commented 8 years ago

This is correct behavior. According to the MathML operator dictionary, the summation sign (&#x2211;) has the movablelimits property, which means that when rendered where displaystyle="false", the limits are moved from above-and-below the symbol to the right-hand side, as in your image. In contrast, the integral &#x222B; does not have movablelimits, so the limits remain above.

You either need to set displaystyle="true" via an <mstyle> element surrounding the <munderover>, or via display="block" on the <math> element itself. Alternatively, you can set movablelimits="false" explicitly on the <mo>&#x2211;</mo>.

In any case, MathJax is rendering the MathML correctly.

corinnaSchultz commented 8 years ago

Thank you for looking into this (and the other issues I've reported). I'm glad mathJax is following the standards, and this is apparently a bug in our math creation tool.