I'm trying to find a way for mathjax to not use STIX fonts for math in my iPython notebook. Instead, I'd much rather have it use the 'TeX' fonts. According to the documentation for Mathjax I should use:
MathJax.Hub.Config({
"HTML-CSS": {
preferredFont: "TeX"
}
});
That being said, I'm not sure where to put this. I've already tried putting this chunk of code into my custom.js file pertaining to my own ipython profile, but it doesn't work. Ideally, I'd like to make ipython profile specific adjustments for mathjax.
A simple test to make sure that you're getting the configuration correct is to change preferredFont: "TeX"
to scale: 200
. Then save and reload a notebook. The math should be obviously way bigger than before. So assuming that worked, it means your config.js
is doing what it needs to.
Now, more to the point, try adding another line so that your configuration looks like
MathJax.Hub.Config({
"HTML-CSS": {
availableFonts: ["TeX"],
preferredFont: "TeX",
}
});
Don't forget to fully refresh the notebook page after you've saved that. This overrides (what I'm guessing is) the default value of that availableFonts
variable, which would allow STIX if mathjax can't find TeX. I'm not sure why it seems to ignore the preferred font, but this seems more like a mathjax issue than an ipython issue.
So now, if it still isn't in TeX font (which mathjax seems to call MathJax_Math-Italic.otf
, or similar), I would guess that mathjax just can't find that font, and may have fallen back on something else. If that is the case, there's something messed up about your mathjax installation.