Skip to content

Math input error when mixing MathML and a HTML hyperlink #3593

Description

@samimaattaCelia

Issue Summary

MathJax 4 produces a math input error when rendering a MathML equation that also has other HTML elements in it.

OS: Windows 11
Browser: Mozilla Firefox 153.0

Expected output (using Firefox's native rendering):

Triangle inequality with a superscipt linking to the Wikipedia page.

Steps to Reproduce:

Render the MathML equation in question:

<math xmlns="http://www.w3.org/1998/Math/MathML">
        <mo>|</mo>
        <mi>x</mi>
        <mo>+</mo>
        <mi>y</mi>
        <mo>|</mo>
        <mo>&lt;</mo>
        <mo>|</mo>
        <mi>x</mi>
        <mo>|</mo>
        <mo>+</mo>
        <mo>|</mo>
        <mi>y</mi>
        <mo>|</mo>
        <mtext>
        <sup>
            <a href="https://en.wikipedia.org/wiki/Triangle_inequality">Triangle inequality (Wikipedia)</a>
        </sup>
        </mtext>
      </math>

It is a bug, since it should be possible to have HTML markup inside MathML markup as per MathML Core 2.2.1 HTML and SVG.

Technical details:

  • MathJax Version: 4
  • OS: Windows 11
  • Browser: Mozilla Firefox 153.0

I am using the following the default MathJax configuration.

Loading MathJax via:

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js" defer></script>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code ExampleContains an illustrative code example, solution, or work-aroundExpected BehaviorThis is how MathJax worksv4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions