Page MenuHomePhabricator

Consider removing the options from the Math extension
Closed, DeclinedPublic

Description

Please just close this task if I misunderstand something :)

There are currently three options for Math rendering:

  1. PNG images
  2. LaTeX source (for text browsers)
  3. MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools)

"LaTeX source" is useful for people who use text browsers. The primary reason for that is accessibility for people who don't see the formulas. Are there people who are interested in seeing LaTeX source for any other reason? If not, can it be removed? Isn't the alt attribute enough for text browsers and accessibility tools?

Furthermore, if I understand its name correctly, the MathML option covers pretty much all use cases:

  • Browsers that can render it, do it well.
  • Browsers that cannot do it, fall back to PNG.
  • Browsers that don't show images and users who don't want or cannot see images, see LaTeX source in alt text.

If that option indeed covers all use cases, are preferences needed at all? Perhaps they can be removed entirely? In general, having less preferences is a Good Thing, unless there is a particular reason to have them, and I don't see such a reason here, but I might be wrong.

The three options mentioned above are used on Wikimedia sites. In the source there's also something called "LaTeXML", but I don't remember ever seeing it in action, and I'm not sure where is it used or for what. In any case, if the three options above can be merged into one, then on sites where no other option can be used, there shouldn't be a Math section in the preferences.

If, for any reason, there is demand for a separate "LaTeX source" option, can the "PNG" option be removed? Is there anybody who consciously prefers PNG to SVG / MathML, despite using a browser that supports them?

(Tagging MediaWiki-Core-Preferences, even though this task is not in core, out of assumption that Math is a popular extension and that this may interest people who care about preferences in general. If it's inappropriate, please feel free to remove the tag.)

Event Timeline

I'm curious what exactly non-"modern browsers" are when it comes to compatibility of the third option.
And which options our users have currently enabled (percentage).

Some infos:

  • There is another bug that deals about removing option 1. However, this is not resolved.
  • LaTeX source is used for text browsers like https://en.wikipedia.org/wiki/W3m... not sure if people are actually using that.
  • There is a small group of users using latexml on private wikis.

I hope that I'll find time soon to look into this an related issues.

As for the numbers, here are some query results from big wikis:

English Wikipedia:

mysql:wikiadmin@db1080 [enwiki]> select up_value, count(up_value) from user_properties where up_property = 'math' group by up_value;
+----------+-----------------+
| up_value | count(up_value) |
+----------+-----------------+
|          |             525 |
| 0        |            8423 |
| 2        |           13315 |
| 3        |            2672 |
| 4        |           45067 |
| 5        |           11638 |
| 6        |            5697 |
| mathml   |            4492 |
| on       |              26 |
| png      |             983 |
| source   |             493 |
+----------+-----------------+
11 rows in set (2.04 sec)

German Wikipedia:

mysql:wikiadmin@db1087 [dewiki]> select up_value, count(up_value) from user_properties where up_property = 'math' group by up_value;
+----------+-----------------+
| up_value | count(up_value) |
+----------+-----------------+
|          |               8 |
| 0        |             784 |
| 2        |            2293 |
| 3        |             390 |
| 4        |            7815 |
| 5        |             697 |
| 6        |             584 |
| mathml   |             627 |
| on       |               1 |
| png      |             112 |
| source   |              38 |
+----------+-----------------+
11 rows in set (0.15 sec)

Spanish Wikipedia:

mysql:wikiadmin@db1086 [eswiki]> select up_value, count(up_value) from user_properties where up_property = 'math' group by up_value;
+----------+-----------------+
| up_value | count(up_value) |
+----------+-----------------+
|          |              11 |
| 0        |             438 |
| 2        |             911 |
| 3        |             254 |
| 4        |            2295 |
| 5        |             328 |
| 6        |             404 |
| mathml   |             219 |
| png      |             103 |
| source   |              49 |
+----------+-----------------+
10 rows in set (0.07 sec)

Russian Wikipedia:

mysql:wikiadmin@db1088 [ruwiki]> select up_value, count(up_value) from user_properties where up_property = 'math' group by up_value;
+----------+-----------------+
| up_value | count(up_value) |
+----------+-----------------+
|          |               8 |
| 0        |            1120 |
| 2        |            1281 |
| 3        |             229 |
| 4        |            3816 |
| 5        |            1208 |
| 6        |             956 |
| mathml   |             564 |
| on       |               8 |
| png      |             272 |
| source   |              36 |
+----------+-----------------+
11 rows in set (0.10 sec)

If I understand correctly,

  • png is equivalent to 0
  • source is equivalent to 3
  • mathml is equivalent to 5
  • mathml is the default
  • Other values are irrelevant (see T166369). I'm not sure what do they actually do. Probably the same as default.
Debenben subscribed.

We really need an option that covers all use-cases (especially because you have to login to get to the options) but currently we don't and these options are very helpful for debugging e.g. T194768 so they should stay for now.