Make MathML selectable for great interop with apps that consume MathML in HTML such as Word and PowerPoint
@dpvc is already working on this.
Since Feb 26, 2026.
- Dominant language
- JavaScript
- Stars
- 10.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
- In the web browser load the following webpage that uses MathJax 4.1 with assistiveMml on: https://petewu100.blob.core.windows.net/newcontainer/MathJax.4.1.Test.htm
- Drag across the web page to select some content including some math.
- Ctrl+C to Copy.
- Boot Word for Windows Version 2508 or later.
- Blank Document.
- Ctrl+V to Paste.
=> Note: the pasted content only contains the heading text and not the math.
Expected: the math to be included as well.
- In the web browser, go to https://petewu100.blob.core.windows.net/newcontainer/SelectableMathMLBookmarklet.htm.
- Click on the "Selectable MathML" link and drag it to the browser Favorites or Bookmarks bar.
- Go back to https://petewu100.blob.core.windows.net/newcontainer/MathJax.4.1.Test.htm.
- Click the "Selectable MathML" button on the browser Favorites or Bookmarks bar.
- Drag across the web page to select some content including some math.
- Ctrl+C to Copy.
- Switch back to Word.
- Ctrl+V to Paste.
=> Note: now the math is included.
Expected: the math to be included after step 6 without having to use the "Selectable MathML" bookmarklet.
MathJax adds the following CSS rule in the webpage which makes the MathML unselectable:
mjx-assistive-mml {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
Why?
I haven't noticed any interaction problems when the MathML is selectable. Other math packages on the web keep the MathML selectable and it doesn't seem to cause any problems.
Making the MathML selectable has a huge benefit. It allows the math to be copy/paste to apps that consume MathML in HTML such as Word, PowerPoint. Excel (within shapes in SmartArts), and soon OneNote. Furthermore, the semantics of the math are preserved so that it is editable and accessible in the documents.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.