Closed corinnaSchultz closed 8 years ago
The MathML is incorrect. The <semantics>
element is supposed to have its first child be the MathML that is rendered, and all the other elements are supposed to be <annotation>
or <annotation-xml>
nodes. Your first example has <mn>4</mn>
as the first child, so that is all that is rendered. When you put the number and fraction inside an <mstyle>
or an <mrow>
, then that container becomes the first child, and its contents is rendered. Without this, the <semantics>
element is invalid, since the second child is an <mfrac>
rather than an <annotation>
or <annotation-xml>
node.
So this is expected behavior and consistent with the spec.
-If I put a number before the fraction, only the number will be rendered. If the number is wrapped in its own mstyle tag, or if I remove the mstyle tag altogether, I get the same result, too. I expect this to be valid mathML, and to render as expected. (Is this somehow not valid markup?)
SVG:
-If I have mathML that is simply a beveled fraction, it will render correctly.
mathml:
SVG:
-If the number is a child of the same mstyle tag, then it renders correctly.
-If I wrap both parts of the expression (the number and the fraction) in an mrow tag then it also renders correctly.