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.

October 1, 2005

4 Steps

Though I’m a Mac user, viewing MathML on a Mac has been an unsatisfactory experience, as long as I’ve had this blog. Mostly, this is the result of a long-standing bug in Mac/Mozilla. Fortunately, the bug has recently been fixed.

So, herewith, are the steps to better viewing of MathML on the Mac.

  1. Get yourself a recent version of Mozilla or Firefox (Camino is not MathML-enabled).
  2. Install the Mathematica fonts and the Code2001 font on your system.
  3. Edit the
    ~/Library/Mozilla/Profiles/default/XXXXXX.slt/user.js [Mozilla]
    ~/Library/Application\ Support/Firefox/Profiles/default/XXXXXX.slt/user.js [Firefox].
    XXXXXX” is some random string unique to your installation. Add the lines
    user_pref("font.mathfont-family", "Math1,Math2,Math4");
    user_pref("font.mathfont-family.\u2212.base", "Times");
    to the user.js file.
  4. Now the tricky part. The bug was caused by a missing file. Eventually, the missing file will find its way into the distributed version of Mozilla/Firefox. In the meantime, download it and install it inside the application by typing
    cp /Applications/
    cp /Applications/
    or whatever.
    The patch has landed in CVS, so grab the latest nightly build of Mozilla or Firefox.

Now, if you have even a smidgen of appreciation for good typography, you will scream in pain at the ugly, ugly fonts I told you to install at step 2. Unfortunately, the release of the Stix fonts has been delayed yet again (not till mid-2006 at the earliest; but don’t hold your breath). And there remain various rendering problems, some of which are clearly related to the crappy, mismatched fonts, some of which may be actual bugs in Mozilla.

Still, what you’ll see, if you follow the above steps, will be legible, if not pretty. Which is a big improvement over the previous situation.

Update (11/21/2005):

Recent bugfixes make some of these steps obsolete. See this post for details.
Posted by distler at October 1, 2005 2:31 AM

TrackBack URL for this Entry:

7 Comments & 0 Trackbacks

Re: 4 Steps

I’ve gotten pretty good results in Firefox 1.0 by turning off some of the fonts in Font Book:

Computer Modern: CMEX, and CMSY
Math 2
Math 4

I still get thick tops on square roots and some minus signs are missing, but everything is readable. That might be a quicker solution for some people and doesn’t require a beta version of the browser.


Posted by: Gavin on October 3, 2005 6:48 AM | Permalink | Reply to this

Re: 4 Steps

Well, yeah, that’s pretty much what one had to do to mitigate the effect of the bug. (Missing minus signs is a separate bug; I don’t see how you could ever consider missing minus signs ‘acceptable.’)

Anyway, fixing this bug does not require using a beta version of the browser. Adding the aforementioned file to any of the recent release versions of the browser will suffice.

Posted by: Jacques Distler on October 3, 2005 8:02 AM | Permalink | PGP Sig | Reply to this

Minus signs

I should have said that the second line in Step 3 was designed to correct the ‘missing minus sign’ bug. Any font Family visible in Mozilla’s Font Selector, which contains the character U+2212 (−) would do as well.

Posted by: Jacques Distler on October 3, 2005 8:19 AM | Permalink | PGP Sig | Reply to this

Re: 4 Steps


I’m using Firefox on an up-to-date Debian Sarge box and i don’t think i’m having trouble with my fonts… at least, that’s what i think… so far.

I’ve tried installing the math fonts (as suggested by Mozilla, in its MathML page – not sure they are the same you suggested above), but everytime i do it, my math fonts “break”, ie, they work worse than they did out-of-the-box.

Would i be asking too much if… “Could you post some MathML code that should show up ‘broken’ together with an image of what it should be?”

Thanks a lot!

Posted by: Daniel Doro Ferrante on October 3, 2005 8:49 AM | Permalink | Reply to this

Re: 4 Steps

On Linux, you should be using the Computer Modern Fonts (either the TrueType or PostScript Type1 versions). I’m not real clear on which should be used with which Linux distro, and the instructions are not much help.

In any case, you should also install the Code2001 font because of stupidities in the way Mozilla (all versions) currently handles Plane-1 Unicode characters.

Would i be asking too much if… “Could you post some MathML code that should show up ‘broken’ together with an image of what it should be?”

The best single page for that is the MathML Torture Test.

Posted by: Jacques Distler on October 3, 2005 9:14 AM | Permalink | PGP Sig | Reply to this

Re: 4 Steps

I take it all back: It was a really silly comment… I apologize, Jacques. :(

I read your comment over the weekend, had the same question, realized it was a Mac business and droped it. Then, this morning, all i could think about was “why my fonts were ok”… i ended up posting the question without thinking about it.

Posted by: Daniel Doro Ferrante on October 3, 2005 1:15 PM | Permalink | Reply to this

Re: 4 Steps

By now the real issue with MathML is whether this or that distribution or package is properly configured by the vendor; it should no longer be a matter of user configuration or installation.

Here are current screen shots of the MathML “torture” page in both Mozilla and Firefox under a fresh installation of Fedora Core 4 Linux. (Fedora Core 4 is one of the most common and current Linux distributions.) Mozilla+MathML renders the formulas beautifully. Firefox+MathML looks like crap. Somehow Firefox is slightly misconfigured and uses bad fonts and bad font metrics. In addition, both Firefox and Mozilla spuriously complain that fonts are missing. If fonts really were missing, the output wouldn’t look good in Mozilla.

Is any MathML expert, or Firefox expert, reading this? If so, how can I fix these stupid problems? Who should I tell so that they can be fixed permanently?

Posted by: Greg Kuperberg on October 13, 2005 12:16 AM | Permalink | Reply to this

Post a New Comment