Skip to content

latex2mathml converter generates non-standard menclose tags #507

@arnoudbuzing

Description

@arnoudbuzing

https://developer.mozilla.org/en-US/docs/Web/MathML/Element/menclose

This:

import latex2mathml.converter

latex_input = "\\boxed{\\dfrac{-7 + \\sqrt{61}}{2}} and \\boxed{\\dfrac{-7 - \\sqrt{61}}{2}}"
mathml_output = latex2mathml.converter.convert(latex_input)

mathml_output

generates output with the non-standard tag:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><menclose notation="box"><mrow><mstyle displaystyle="true" scriptlevel="0"><mfrac><mrow><mo>&#x02212;</mo><mn>7</mn><mo>&#x0002B;</mo><msqrt><mrow><mn>61</mn></mrow></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></mstyle></mrow></menclose><mi>a</mi><mi>n</mi><mi>d</mi><menclose notation="box"><mrow><mstyle displaystyle="true" scriptlevel="0"><mfrac><mrow><mo>&#x02212;</mo><mn>7</mn><mo>&#x02212;</mo><msqrt><mrow><mn>61</mn></mrow></msqrt></mrow><mrow><mn>2</mn></mrow></mfrac></mstyle></mrow></menclose></mrow></math>

Is there a way around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions