# Firefox 4: MathML vs MathJaX

I recently started using Firefox 4. It seems that the browser understands MathML. However, the output is not as pleasing as the old MathJaX. Will this improve when Firefox 4 gets out of the Beta phase? Is there a way to get the old MathJaX back? I guess this question will become relevant in the near future when "everybody" will change to Firefox 4.

• I'm not sure but there is some discussion of this on the TeX site: tex.stackexchange.com/questions/2692/… – Jeff Atwood Mar 4 '11 at 17:30
• Yes, Fabian, a thousand times yes! I was afraid to post the same thought for fear of seeming superficial, but this site renders so much more beautifully on Chrome than on Firefox I just couldn't go back to it. The $f$s and $n$s "flow" just how I like them on Chrome, the same way I write them on paper, it makes the site a real artistic pleasure to enjoy. I too am curious about the difference, because I like to browse Math SE and other sites at the same time, so NoScript the Firefox addon becomes a must-have...if I could change Firefox 4's current rendering, I would. – Uticensis Mar 6 '11 at 1:26
• Using Firefox 4b12, I find that if I right-click on a math formula and go to Settings->MathRenderer and make that MathML, it makes the math perfectly fine. Here's a test piece: $\lim_{h \to 0} \sup_{x < h} f(x)$ – Carl Mummert Mar 9 '11 at 16:39
• According to Sean Hogan's comment on my answer below, as well as Boris Zbarsky at Mozilla, everything would be fixed by simply upgrading to MathJax 1.1. Pinging @Jeff Atwood. – Rahul Mar 25 '11 at 4:57
• @Rahul: Cool link, this is the bug I submitted :D – Asaf Karagila Mar 25 '11 at 9:53

Now that Firefox 4 has been released, this is a real problem. The HTML/CSS rendering of MathJax here does not use the MathJax TeX fonts, but instead seems to use the default serif font of the browser, making the rendering look terrible. The problem does not occur in the demos on the MathJax site, which suggests that this is a problem with the deployment of MathJax here on StackExchange.

Here are some screenshots taken on Linux of an post by Michael Lugo which conveniently had a lot of formulae in one place.

Firefox 3.6.15, HTML/CSS (this is the right behaviour):

Firefox 4.0, HTML/CSS:

Firefox 4.0, MathML:

The Firefox 3 HTML/CSS rendering is clearly the best of the three, as all the symbols are of the right size, and the math font's height and width is almost identical to that of the body text. On Firefox 4, the HTML/CSS rendering is clearly broken while the MathML rendering, while readable, is too small and uses too narrow a font compared to the body text.

• +1 Switching rendering mode to Math-ml helps, but not nearly as nice as previously – Juan S Mar 25 '11 at 1:57
• The mathjax.org site uses the recently released version 1.1, so the problem you are seeing could be due to MathJax v1.0 used at math.stackexchange.com. The Firefox-4 release seems to cause some new issues in v1.0, but not v1.1. MathJax recommends everyone upgrade. (There's also a significant performance boost) – Sean Hogan Mar 25 '11 at 4:40
• For what it's worth, if the STIX fonts are installed locally then things are a little better, but there are still problems. (See here, for example.) – Zhen Lin Mar 28 '11 at 10:22

This should be fixed now that MathJax 1.1 is deployed.

We will be sponsoring the MathJax project as well, with more details to be announced later.

• Yes, the look of the TeX looked changed. The text now looks like ink on starched paper; I like it. – Uticensis Mar 29 '11 at 14:27
• Thank you. The math on the site looks great now. – Rahul Mar 29 '11 at 15:21
• It's also noticeably faster, I've noticed. – Uticensis Mar 29 '11 at 21:31

Well, perhaps an obvious question, but has a bug report been filed for Firefox? I'm sure, if the bug lies in Firefox, such a thing would get the deserved attention (especially if you mention the Chrome niceness :) ).

• I have submitted a bug report a few weeks ago. (Well at least a feedback if not a proper bug report) – Asaf Karagila Mar 8 '11 at 22:05
• filed this bug bugzilla.mozilla.org/show_bug.cgi?id=644885 Has anyone looked for differences using something like firebug? – uncle brad Mar 25 '11 at 2:27

Using firebug, I can see that the HTML is not the same from 3.6.16 to 4.0. However using User Agent Switcher to make 4.0 look like 3.6.16 does not seem to help.

Edit 1

Boris Zbarsky was nice enough to really dig into this and add a lot of detail to the bug (http://bugzilla.mozilla.org/show_bug.cgi?id=644885). Apparently, it has to do with how MathJax determines whether downloadable fonts are supported. MathJax 1.1 does this correctly for FF 4.0.

• FWIW: I don't think MathJax is processed server side. So User-Agent switcher probably should have zero effect. On the other hand, if Firefox were to have something similar to Internet Explorer's "compatibility modes"... – Willie Wong Mar 25 '11 at 13:36