Page MenuHomePhabricator

Implement a single math rendering mode that works across all devices (MathML / SVG using mathoid)
Closed, ResolvedPublic

Description

The current math rendering options are confusing and fragment the caches. Instead, we should implement a single math rendering mode that

  • 'just works' across different devices, screen sizes, resolutions & browsers,
  • is accessible for screen readers and other a11y tech, and
  • uses modest bandwidth and client-side resources.

The MathML / SVG rendering mode implemented by Mathoid with PNG fall-back images should eventually be able to fulfill these requirements, but more work is needed until we can make it the only math rendering mode:

  • Support PNG fall-back: T71702
  • Minimize SVG output: T74547
  • Remove PNG-only render mode: T74240
  • Fix some scaling / alignment issues: T34694
  • Emit this rendering mode from Parsoid: T53698.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Arlolra triaged this task as Medium priority.Dec 18 2014, 8:08 PM
Arlolra subscribed.
Physikerwelt raised the priority of this task from Medium to High.Jul 19 2015, 10:42 PM

I would like to mention that the current SVG mode seems to accept different TeX commands than the PNG mode and that they looks significantly different in certain formulas. It would be nice to have a unification in those respects, so that you only have to check one of them while writing and article.

@Mathmensch: Thank you for that information. That should not happen. Can you point to some examples. Especially, I'm surprised that different commands are excepted, since the texvcjs program that is the successor of texvc was checked against enwiki.

@Physikerwelt: I can't reproduce the different commands. Maybe I remembered it wrongly (quite possible). There are different error messages though. Maybe the PNG fallback differs from the PNG produced if you have PNG as your standard option?

The PNG seems much larger and the mathcal style is quite different than the SVG version.

I would also be pleased if the new system puts commas after a multiline equation into the last line. Auto-alignment of PNG images would also be a dream.

If you have any questions regarding usability, you can ask me and have a relatively high chance that I know an answer; I wrote a ton of TeX at wikibooks.

On de.WP there is a big support for this feature: See https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_W%C3%BCnsche_2015/Artikel#Barrierefreie_Darstellung_von_mathematischen_Formeln

I write a math textbook on de.wikibooks.org ( https://de.wikibooks.org/wiki/Mathe_f%C3%BCr_Nicht-Freaks ) together with other authors and also we are looking forward for having MathML finally enabled for IPs ;-)

On de.WP there is a big support for this feature: See https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_W%C3%BCnsche_2015/Artikel#Barrierefreie_Darstellung_von_mathematischen_Formeln

I write a math textbook on de.wikibooks.org ( https://de.wikibooks.org/wiki/Mathe_f%C3%BCr_Nicht-Freaks ) together with other authors and also we are looking forward for having MathML finally enabled for IPs ;-)

@GWicke, @mobrovac ^^ so the community support stands. The PNG Fallback for IE 6-8 is the only remaining blocker.

FYI: On de.wikibooks.org the community decided that MathML / SVG should be the default math rendering mode; https://de.wikibooks.org/wiki/Wikibooks:Verbesserungsvorschl%C3%A4ge#Umstellung_des_Formelrenderings_auf_MathML

There are two remaining tasks:

  1. Remove PNG-only render mode: T74240 --> here the problem is that the librsvg-dev package installed in vagrant and production does not work with the node-librsvg modle. I forked the node module to extend the test cases at https://github.com/physikerwelt/node-rsvg All tests pass on travis and windows but fail on vagrant
  2. T118435: Fix empty math editing box for users of MathML rendering mode; --> If that problem still remains users could not use the math ve

We finally fixed the PNG issue. While the VE issue remains this might be a minor thing.

  1. T118435: Fix empty math editing box for users of MathML rendering mode; --> If that problem still remains users could not use the math ve

I am just wondering why "T132096: Improve save / preview performance of MathML math rendering mode" is blocking this request?

@mobrovac @GWicke collecting feedback from http://en.wikipedia.beta.wmflabs.org/wiki/Math shows that T132607 is a serious problem. I think we should NOT show MathML by default for Firefox users.
As outlined in https://www.mediawiki.org/wiki/Extension:Math#Viewing_math the installation of the MathML font plugin is recommended anyhow for optimal rendering results. I spoke with @fredw who maintains the plugin. He could change the plugin so that the MathML element is enabled only if the plugin is installed.

@Hungryce, T132096 is about making sure that the new render mode won't introduce a significant performance regression in view or edit workflows. Performance matters a lot, and the differences documented on the task were non-trivial on math-heavy pages. A lot of progress has already been made in the last weeks, and I'm confident that we can eliminate the remaining delta as well.

Finally, from my end everything is implemented. And the required code should land in production on April 28.
However, there is a significant change. MathML will not shown by default to Firefox users. They have to install https://addons.mozilla.org/en-US/firefox/addon/mathjax-native-mathml/ to get MathML instead of SVG output.

Physikerwelt claimed this task.

Closing after 1 year and 4 month :-)