Skip to content

Parsing katex-generated mathml #13

@MMesch

Description

@MMesch

I am trying to parse some katex generated html:

<span class="katex-mathml">
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<semantics><mrow><msup><mi>e</mi><mi>x</mi></msup><mo>=</mo><munder><mrow><mi>lim</mi><mo>⁡</mo></mrow><mrow><mi>n</mi><mo>→</mo><mi mathvariant="normal">∞</mi></mrow></munder><mo stretchy="false">(</mo><mn>1</mn><mo>+</mo><mfrac><mi>x</mi><mi>n</mi></mfrac><msup><mo stretchy="false">)</mo><mi>n</mi></msup>
<mspace width="2em"/>
<mtext>(1)</mtext></mrow><annotation encoding="application/x-tex">
e^{x} = \lim_{n \rightarrow \infty} (1 + \frac{x}{n})^n \qquad \text{(1)}
</annotation></semantics></math></span>

It seems it currently fails here:

<mspace width="2em"/>

and it works with this:

<mspace width="2em"></mspace>

My use case is to precompile markdown files with math and then render them.

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