MathML and Chrome: On Again, Off Again

February 6, 2013

Adam Hyde, writing for O’Reilly, recently summarized the state of MathML support in the browser world:

It seems that equation support is underwhelmingly resourced in the browser development world. WebKit’s great improvements this year (including a complete re-write + the effort to get it through Chrome’s code review) have been due to a single volunteer, Dave Barton. Frédéric Wang plays the same heroic (and unpaid) role for Firefox. The question is: Why is this critical feature being left to part-time voluntary developers? Aren’t there enough people and organisations out there that would need math support in the browser (think of all the university math departments just for starters…) to pay for development?

As Mr. Hyde notes, it seems surprising that the math typesetting problem has not been solved yet. Surely there are enough of us who need MathML support in our browsers. Can we not somehow organize to fund it’s development? Are we simply content with the current technology, where we produce and download each other’s PDF files?

MathML support is indeed a very complex problem and the fact is that it’s a feature for which the majority of browser users have no demand. In that sense, perhaps it’s not very surprising that the companies developing browsers have not thrown their full weight behind it. But there is a significant minority of users for whom it is important. The effort has been kept alive for several years due to the efforts of a few volunteers. We should be enormously thankful for their work, and they should in no way be held accountable for the sorry state of MathML support on the web nearly 15 years after it’s introduction.

Gecko, the underlying engine used by Firefox and other browsers, has had support1 for MathML for at least ten years. Internet Explorer has had support roughly as long as Mozilla/Firefox, but only through a third-party plugin, MathPlayer, released in 2002. Presto, the engine behind the Opera browser, has taken a half measure, and appears to be content with only partial support, something they have deemed MathML: CSS Profile.

Finally, we come to WebKit, the engine behind Chrome and Safari. WebKit is edging closer to supporting MathML, but, as Mr. Hyde goes on to say, the calls for celebration may be premature:

Recent cries that Chrome and Safari support MathML can give the wrong impression of the potential for MathML when users encounter bad rendering of basic constructs. The combination of native MathML support, font support and authoring tools (more on this in a later post) makes mathematical content one of the most complex situations for web typesetting.

I’m guilty of such cries myself, out of excitement after years of waiting. However, the unfortunate truth is that MathML has been turned on and off several times recently in Chrome. Even after being announced on the development blog, MathML almost didn’t make it into Chrome 24. An exchange on Chromium issue 152430 describes how MathML was disabled, then saved, just in time for the Chrome 24 release on January 10. This was great news, but, alas, the saga continues… A few of hours ago, it was announced in the very same thread that MathML has been disabled for the next version of Chrome:

Note that MathML has had to be turned off because the code is not yet production ready. We hope to turn it on in some future release. We plan to announce this in the Chrome 25 release notes.

To put this into perspective, recall that Chrome is the flagship browser of one of the most valuable companies in the world. Yet, the fate of MathML support in Chrome, which is largely due to the hard work of a handful of unpaid volunteers over the course of several years, now hangs in the balance once again.

MathML is not only important for the internet, it’s important for publishing more generally. Anyone who has read a mathematically-oriented book on an e-book reader can tell you that in the vast majority of cases, unless it’s in PDF format, it’s a terrible experience. The equations are all just blocked-in images, rather than scalable text, which makes them distracting and difficult to read. MathML in HTML 5 and EPUB could put an end to that, but the academic, scientific, and business communities need to work together a bit more to make it happen.

  1. I don’t want to split hairs about what “supporting MathML” means. Currently, no browser fully supports each and every aspect of MathML, but in practice, it’s fair to say that if you load this page and it looks as expected, then your browser “supports” MathML.