Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #487
Closed
Open
Issue created May 29, 2013 by Administrator@rootContributor

Improve how MathJax handles foreign content in MathML

Created by: fred-wang

It's not clear exactly what MathJax can do with foreign objects (SVG, HTML), but I see that Jacques Distler's SVG testcase works: https://bugs.webkit.org/show_bug.cgi?id=100626. There are basically two methods to include foreign objects in MathML:

The nonstandard way: using an annotation-xml as a first child of a semantics. This is invalid but some people have used that, because of Gecko's original implementation of semantics:

    <math>
      <semantics>
        <annotation-xml encoding="application/xhtml+xml">
          <button>annotation-xml</button>
        </annotation-xml>
     </semantics>
   </math>

The standard way (proposed by HTML5 folks): use some inline elements inside an mtext.

   <math><mtext><button>mtext</button></math>

Both methods work correctly in Firefox and Webkit. Opera hides the annotation-xml but displays the second test case correctly.

MathJax seems to display the content of the first test case as normal text (I suspect it is an issue with XHTML vs HTML parsing) and raises an error "Unknown node type: button" for the second one. This happens in the SVG/HTML-CSS output modes, but even when the MathML output mode is used, the final content is not transmitted correctly to native MathML engines and so they can not handle the test cases...

Assignee
Assign to
Time tracking