Skip to content

LaTeXML generates invalid content MML #928

@AndreG-P

Description

@AndreG-P

Just as an example: \mbox{x} + y will generate the following MML tree:

<math xmlns="http://www.w3.org/1998/Math/MathML" id="p1.1.m1.1" class="ltx_Math" alttext="\mbox{x}+y" display="inline">
  <semantics id="p1.1.m1.1a">
    <mrow id="p1.1.m1.1.4" xref="p1.1.m1.1.4.cmml">
      <mtext id="p1.1.m1.1.1" xref="p1.1.m1.1.1.cmml">x</mtext>
      <mo id="p1.1.m1.1.2" xref="p1.1.m1.1.2.cmml">+</mo>
      <mi id="p1.1.m1.1.3" xref="p1.1.m1.1.3.cmml">y</mi>
    </mrow>
    <annotation-xml encoding="MathML-Content" id="p1.1.m1.1b">
      <apply id="p1.1.m1.1.4.cmml" xref="p1.1.m1.1.4">
        <plus id="p1.1.m1.1.2.cmml" xref="p1.1.m1.1.2"/>
        <mtext id="p1.1.m1.1.1.cmml" xref="p1.1.m1.1.1">x</mtext>
        <ci id="p1.1.m1.1.3.cmml" xref="p1.1.m1.1.3">𝑦</ci>
      </apply>
    </annotation-xml>
    <annotation encoding="application/x-tex" id="p1.1.m1.1c">\mbox{x}+y</annotation>
  </semantics>
</math>

However, the mtext tag is considered as invalid for the apply element in mathml documents by
https://www.w3.org/Math/DTD/mathml3/mathml3.dtd

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions