mathjax / mathjax/MathJax

MathML in SVG in MathML

Open
#896 32 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Background:

  • itex has an svg environment which allows the user to embed SVG figures in equations:

    $ ... \begin{svg} ... SVG goes here ... \end{svg} ... $

  • There is an extension for SVG-Edit, which allows the user to embed MathML in an SVG figure.

MathJax seems to work fine if you use one or the other of these mechanisms. That is, it seems to handle SVG-in-MathML and MathML-in-SVG (both inside an (X)HTML host document).

But if you try to use both mechanisms (creating, say, MathML-in-SVG-in-MathML), MathJax craps out, and renders the result poorly, if at all.

Is this an architectural limitation that we should just learn to live with, or is it a bug that could be fixed?

I can assure you that there are good use-cases for MathML-in-SVG-in-MathML. So it would be nice if MathJax supported it.

I can supply a test case, if needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by constructing a minimal browser test that combines MathML-in-SVG-in-MathML, using the separate SVG-in-MathML and MathML-in-SVG cases as controls. Trace MathJax's handling of the nested elements and determine whether the combined case can render reliably; done means the supplied nesting renders correctly without regressing either individual case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.