Page MenuHomePhabricator

Deliver visible MathML to the browser
Closed, ResolvedPublic

Description

One subtask of enabling native MathML rendering from within the Math extension is that MathML (independent of the way how it was created) is delivered to the browser. Currently, MathML is only delivered if special browser plugins are enabled. I suggest the following plan:

  1. Update the description of the current default rendering option to reflect that effectively, most users see SVG images. patch
  2. Create a new MathML delivery option that outputs MathML, and client-side MathJax enabled (same configuration as in the wdqs-GUI)

Open questions:

  • Can we bundle client-side MathJax in MediaWiki in the same way as it is done in the WDQS-GUI? (@LucasWerkmeister, do you know the answer?)
  • Do we need additional code review if we ship MathJax?
  • The file size of WDQS GUI is 5.32MB compared to 1.83 MB for the matrix . Can this be related to the bundling of MathJax?
  • Should logged-in users have the option to disable/enable MathJax (via a checkbox or additional rendering mode)?
  • Should Lazy Typesetting be enabled?
  • Can the script from DLMF reliably detect MathML disabled browsers (in order to load MathJax on demand)?

Open Tasks:

Event Timeline

Change 803970 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/extensions/Math@master] Improve description of default rendering mode

https://gerrit.wikimedia.org/r/803970

Physikerwelt renamed this task from Deliver MathML to the browser to Deliver visible MathML to the browser.Jun 8 2022, 6:34 PM

Shipping MathJax should be technically possible, but it would have to go through security review like other libraries.

In terms of size, MathJax’ es5/mml-chtml.js is just under 1 MB (already minified), but you might need to add some fonts to that.

Change 803970 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Improve description of default rendering mode

https://gerrit.wikimedia.org/r/803970

@daniel raised the point that if many clients would request the MathJax library, this could add additional server load. So we would not need a review from the security team but also from the performance team.

This is now possible with MathML rendering (not yet default)