MathML in Chrome
Thanks to the hard work of Frédéric Wang and the folks at Igalia, the Blink engine in Chrome 109 now supports MathML Core.
It took a little bit of work to get it working correctly in Instiki and on this blog.
- The
columnalign
attribute is not supported, so a shim is needed to get the individual <mtd>
to align correctly.
- This commit enabled the display of SVG embedded in equations and got rid of the vertical scroll bars in equations.
- Since Chrome does not support hyperlinks (either
href
or xlink:href
attributes) on MathML elements, this slightly hacky workaround enabled hyperlinks in equations, as created by \href{url}{expression}
.
There are a number of remaining issues.
Math accents don’t stretch, when they’re supposed to. Here are a few examples of things that (currently) render incorrectly in Chrome (some of them, admittedly, are incorrect in Safari too):
This equation
doesn’t display remotely correctly, because Chrome doesn’t implement the <menclose>
element. Fixed now.
- …
But, hey, this is amazing for a first release.
Update:
I added support for \boxed{}
and \slash{}
, both of which use <menclose>
, which is not supported by Chrome. So now the above equation should render correctly in Chrome. Thanks to Monica Kang, for help with the CSS.
Posted by distler at February 12, 2023 11:02 PM
TrackBack URL for this Entry: https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/3451