Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

December 4, 2016

MathML Update

For a while now, Frédéric Wang has been urging me to enable native MathML rendering for Safari. He and his colleagues have made many improvements to Webkit’s MathML support. But there were at least two show-stopper bugs that prevented me from flipping the switch.

Fortunately:

  • The STIX Two fonts were released this week. They represent a big improvement on Version 1, and are finally definitively better than LatinModern for displaying MathML on the web. Most interestingly, they fix this bug. That means I can bundle these fonts1, solving both that problem and the more generic problem of users not having a good set of Math fonts installed.
  • Thus inspired, I wrote a little Javascript polyfill to fix the other bug.

While there are still a lot of remaining issues (for instance this one fixed), I think Safari’s native MathML rendering is now good enough for everyday use (and, in enough respects, superior to MathJax’s) to enable it by default in Instiki, Heterotic Beast and on this blog.

Of course, you’ll need to be using2 Safari 10.1 or Safari Technology Preview.

Update:

Another nice benefit of STIX Two fonts is that itex can support both Chancery (\mathcal{}) and Roundhand (\mathscr{}) symbols \mathcal{}: 𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵 \mathscr{}: 𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵 \begin{split} \backslash\mathtt{mathcal}\{\}:&\,\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \backslash\mathtt{mathscr}\{\}:&\,\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ} \end{split}

1 In an ideal world, OS vendors would bundle the STIX Two fonts with their next release (as Apple previously bundled the STIX fonts with MacOSX ≥10.7) and motivated users would download and install them in the meantime.

2 N.B.: We’re not browser-sniffing (anymore). We’re just checking for MathML support comparable to Webkit version 203640. If Google (for instance) decided to re-enable MathML support in Chrome, that would work too.

Posted by distler at December 4, 2016 2:56 PM

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/2925

8 Comments & 0 Trackbacks

Re: MathML Update

PW has a new post and he mentions you and an interaction with you in the past. Can you comment on the accuracy of his statements, as well as the string theory topic under consideration in the post?

http://www.math.columbia.edu/~woit/wordpress/?p=10188

Posted by: Random Bloke on April 7, 2018 12:38 AM | Permalink | Reply to this

Mathematical notation on “Musings” seems to have stopped working, on all platforms that I tried…

Posted by: Mitchell Porter on July 22, 2022 6:01 PM | Permalink | Reply to this

Math

What platforms would those be?

I’ve tried

  • Firefox
  • Chrome
  • Safari (Mac)
  • Safari (iPhone)

All seem to work for me.

Posted by: Jacques Distler on July 22, 2022 6:06 PM | Permalink | PGP Sig | Reply to this

Mitchell

Chrome and Microsoft Edge under Windows, Chrome under Android. They all still show the same problem, the markup is displayed uninterpreted.

Posted by: Mitchell Porter on July 23, 2022 2:26 PM | Permalink | Reply to this

Re: Mitchell

Is it just my blog, or is the n-Category Café also affected?

The browsers you list all use MathJax to render the formulæ. But so does Chrome on a Mac, and that works fine.

Posted by: Jacques Distler on July 23, 2022 3:25 PM | Permalink | PGP Sig | Reply to this

Re: Mitchell

The browsers you list all use MathJax to render the formulæ. But so does Chrome on a Mac, and that works fine.

Actually, now I am not sure what Chrome/Mac is doing.

I am guessing that MathJax is not initializing for you. This may be because I recently started to set a Content-Security-Policy header for this whole website (hence my question about the n-Category Café). Will need to do some more research…

Posted by: Jacques Distler on July 24, 2022 1:14 AM | Permalink | PGP Sig | Reply to this

re: math

It’s all working everywhere now!

Posted by: Mitchell Porter on July 24, 2022 2:38 PM | Permalink | Reply to this

re: math

That’s because I turned off sending the Content-Security-Policy header. It clearly doesn’t affect the loading of other Javascript, but does seem to mess with MathJax.

Posted by: Jacques Distler on July 24, 2022 2:53 PM | Permalink | PGP Sig | Reply to this

Post a New Comment