MathML in Web Browsers

Launch of the MathML project
12 February 2019

Igalia has begun implementing MathML in Chromium and working with others to improve interoperability.

Last November, we announced that NISO obtained a grant from the Alfred P. Sloan Foundation to support the implementation of MathML in Chromium. Thanks to NISO’s sponsorship, Igalia’s web platform engineers will be able to commit to MathML development in 2019.

Brief summary of activities to date

Google contacted us early this year to reiterate their support for this MathML project. Their layout team offered to help Igalia with design and code reviews. They also re-confirmed the plan agreed to in 2017 which was that we will work on top of Chromium’s new layout engine “LayoutNG” and introduce C++ API or CSS features as needed to ensure a clean layering.

Development has been in progress since January. Following the approach used for adding Wayland support to Chromium, we set up a dedicated Chromium branch with continuous integration (for style check, compilation and test execution). This branch is regularly rebased against Chromium’s upstream repository in order to get the latest changes to the layout engine and ensure that the web platform tests are up-to-date. Incidentally, these MathML tests are now imported into the Chromium repository at regular intervals.

In 2016, we realized that the official MathML specification and test suites had several limitations. In particular the MathML 3 specification lacks detailed implementation rules for web engines (integration with CSS layout, use of low-level primitives, math rendering based on TeXBook’s appendix G and the OpenType MATH table…), the official MathML test suite is not automated and the specification has many features without strong use cases. Similar concerns have been raised by miscellaneous groups including browser vendors and more recently the W3C TAG.

Some effort has been made to address these issues. Specifically, an implementation note for a core subset has been drafted, we have started the transition from browser-specific and non-automated W3C tests to official Web Platform Tests and a lot of feedback has been provided to the Math Working Group. The Math Working Group has, however, been on hold for a while which has prevented any official progress at the W3C. After discussion between browser implementers, former Math WG members and other actors of MathML community, a MathML Refresh W3C group has been launched to tackle these issues.

Next steps for Igalia and the MathML Refresh W3C Group

One of the main goals will be to work on a new specification for a core subset of MathML with careful implementation details. Some redundant or less important features will be deprecated and tools to ensure backward compatibility will be provided. Missing low-level primitives for math rendering will also be added: for example we’ve been working with some Mozilla engineers to standardize CSS features for math that are currently implemented in Gecko/Stylo as internal properties. Last but not least, great care will taken for better interoperability and more Web Platform Tests will be added to verify the specification. In particular, we expect to import, merge and rewrite tests that are available in WebKit and Gecko’s own test suites.


We believe that we are off to a good start and we are excited to implement MathML in Chromium. We look forward to continuing to collaborate with the different groups on W3C specifications and tests for better interoperability of math on the web!

More news