MathJax-a11y icon indicating copy to clipboard operation
MathJax-a11y copied to clipboard

Empty braces confuse \overbrace enrichment

Open dpvc opened this issue 8 years ago • 1 comments

The example

\overbrace{{}+2}

produces the incorrect enriched MathML:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow class="MJX-TeXAtom-OP MJX-fixedlimits">
    <munder>
      <mrow type="overscore" role="addition" id="4" children="2,3">
        <mrow class="MJX-TeXAtom-ORD">

        </mrow>
        <mrow type="prefixop" role="addition" id="2" children="1" content="0" parent="4">
          <mo type="operator" role="addition" id="0" parent="2" operator="prefixop,+">+</mo>
          <mn type="number" role="integer" font="normal" id="1" parent="2">2</mn>
        </mrow>
        <mo accent="true" type="fence" role="overaccent" id="3" parent="4">&#x23DE;</mo>
      </mrow>
    </munder>
  </mrow>
</math>

(Here, the brace has been added to the base, and there is no second element to the <munder>.)

This comes from this forum post.

dpvc avatar Mar 14 '17 15:03 dpvc

Note that \overbrace{1+2} works as expected, so the empty braces seem to be the issue.

dpvc avatar Mar 14 '17 15:03 dpvc