I recently got a macbook and I have got mathjax on my browser. Now here is a screenshot of the latex that renders on math.se: enter image description here

How can I have a different font? For example I would like \mathcal{O}(1) to look like

enter image description here

instead of $$\mathcal{O}(1).$$

  • $\begingroup$ Please post a link to where you got this text... $\endgroup$
    – apnorton
    Jul 5 '13 at 3:13
  • $\begingroup$ Is this not how it's supposed to look? $\endgroup$ Jul 5 '13 at 3:24
  • $\begingroup$ @AlexBecker I have edited my question. In particular, see the last part of my question. $\endgroup$
    – user38268
    Jul 5 '13 at 3:39
  • $\begingroup$ What's the difference exactly? $\endgroup$
    – Alexander Gruber Mod
    Jul 5 '13 at 3:58
  • $\begingroup$ Have you changed Mathjax Renderer in Mathjax PopUp Menu? $\endgroup$ Jul 5 '13 at 5:31
  • $\begingroup$ The question shown in the screenshot is here. BTW why do you mention ChatJax in connection with this, when it is not in chat? $\endgroup$ Jul 5 '13 at 5:35
  • $\begingroup$ @MartinSleziak Sorry, I meant to say mathjax. $\endgroup$
    – user38268
    Jul 5 '13 at 6:06
  • 3
    $\begingroup$ I entirely fail to see the problem here. What is "rendering funny"? Are you complaining that the STIX font looks different from Computer/Latin Modern or the AMS fonts? $\endgroup$ Jul 5 '13 at 7:35
  • $\begingroup$ If you look in the Font Book application, does it list a number of STIX fonts in the All Fonts section? If so, what happens if you select all of them, choose Edit > Disable Fonts, and then restart your browser? $\endgroup$
    – user856
    Jul 5 '13 at 8:03
  • $\begingroup$ @WillieWong Perhaps my question was worded badly, but what I wanted to ask is how to change the font from what I currently have (I don't know the official latex name for the font) to the font for which \mathcal{O}(1) renders the way I want it to be. $\endgroup$
    – user38268
    Jul 5 '13 at 9:11
  • $\begingroup$ @WillieWong I think if I ask the mathjax renderer to be "SVG" then everything works the way I want it to be. How can I put this as the default? $\endgroup$
    – user38268
    Jul 5 '13 at 9:20

The question you ask is about choosing a font for MathJAX. For that I'd recommend first looking at this documentation page.

MathJAX by default uses local fonts when available, and web fonts next, and lastly image fonts. The currently only available web and image fonts are the TeX fonts, which happen to be the one you prefer.

Our current configuration on Math.SE seems to set preferredFont to TeX, but that only applies to local fonts.

The fact that you are seeing the STIX fonts used is because you do not have a local TeX font installed, and that you do have the STIX fonts installed.

If you do not want to use the STIX fonts, the simplest thing to do is to uninstall them. I am not familiar with Macs, so you are on your own there. (Presumably uninstalling a font when you know its name is not going to be that difficult.) This way MathJAX will fail to find any available local fonts and default to the web font (if your browser supports it) or image fonts (else), and in both cases the default for those are the TeX fonts which you seem to prefer.

Alternatively you can also try

  • Installing the TeX fonts. This probably will require downloading the MathJax package and figuring out where the fonts lie in the archive and extracting them for installation.
  • Write you own custom CSS overlay to overwrite the MathJAX configuration and replace availableFonts: ["STIX","TeX"] with availableFonts: ["TeX"] to prevent the use of STIX fonts on your computer.

Note that with the exception of actually installing a local copy of the TeX fonts, the other options will in effect cause web/image fonts to be used. Depending on how your computer handles caching and how fast your internet connection is this may make MathJAX appear noticeably slower.


You must log in to answer this question.