5

In my Wikipedia account I've set the math appearance preference to MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools), and it worked fine for a long time...

... until recently when Firefox was upgraded to the Quantum version, and I notice that all the expressions are now in PNG fallbacks instead of beautiful MathML like before.

I'm using Windows 10. Why is that, and how do I fix it?

phuclv
  • 30,396
  • 15
  • 136
  • 260

2 Answers2

7

As described in the Wikipedia help article ''Displaying a Formula'', MathML in Firefox requires the Native MathML extension.

I suggest that you check that you have this extension installed and enabled.

0

I've figured out how to enable MathML on wikipedia with firefox. Normally, with default settings, wikipedia does put the mathml element into the page, just above where it puts the 'backup' svg. I put backup in quotes, since by default the mathml is hidden and the svg is shown.

Of course you can just get the aforementioned extension. But you might not want to. Note that the extension does a bunch of other stuff, not all of which can be disabled.

My method has only been very briefly tested, and is for people with uBlock Origin. It may be possible also with other adblock extensions with similar capabilities.

Simply add these lines to your list of static filters.

en.wikipedia.org##.mwe-math-mathml-a11y:style(clip: auto !important;overflow: visible !important;position: static !important;width: auto !important;height: auto !important;opacity: 1 !important;display: inherit !important;)
en.wikipedia.org##[class^=mwe-math-fallback-image]

This is just the relevent css taken from the Native MathML extension.

I should note, however, that personally I prefer the look of latex, so I use mathjax dynamically loaded (with a userscript) after getting the latex code out of the img tag (I think it's the alt text for the img).

lukeuser
  • 131