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
GWicke updated the task description. (Show Details)Dec 9 2014, 8:16 PM
GWicke updated the task description. (Show Details)
Arlolra triaged this task as Normal priority.Dec 18 2014, 8:08 PM
Arlolra added a subscriber: Arlolra.
brion added a subscriber: brion.Jan 23 2015, 8:00 PM
Physikerwelt moved this task from Incoming to Next-up on the Math board.Mar 5 2015, 2:30 PM
GWicke moved this task from Backlog to Unnamed Column on the Services board.Mar 17 2015, 8:09 PM
He7d3r added a subscriber: He7d3r.Apr 24 2015, 5:38 PM
Ltrlg added a subscriber: Ltrlg.Apr 24 2015, 11:04 PM
Physikerwelt raised the priority of this task from Normal to High.Jul 19 2015, 10:42 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 19 2015, 10:42 PM
Prod added a subscriber: Prod.Jul 20 2015, 10:17 PM
Prod removed a subscriber: Prod.Jul 25 2015, 7:18 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.

Physikerwelt added a comment.EditedOct 3 2015, 10:31 AM

@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.

Kulla awarded a token.Oct 26 2015, 6:37 PM
Kulla added a subscriber: Kulla.
Kulla added a comment.Oct 26 2015, 6:43 PM

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.

Arlolra moved this task from Backlog to Non-Parsoid Tasks on the Parsoid board.Feb 5 2016, 5:39 AM
Restricted Application added a project: TCB-Team. · View Herald TranscriptFeb 22 2016, 2:17 PM
Kulla added a comment.Mar 29 2016, 7:20 PM

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

Physikerwelt added a comment.EditedApr 7 2016, 3:45 PM

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 closed this task as Resolved.Apr 29 2016, 2:37 PM
Physikerwelt claimed this task.

Closing after 1 year and 4 month :-)

They have to install https://addons.mozilla.org/en-US/firefox/addon/mathjax-native-mathml/ to get MathML instead of SVG output.

Page not found.