MathJax_Font_Test reset for min/max width
From the user group at https://groups.google.com/d/msg/mathjax-users/01qMxJXjo8I/cDIlBUsytNUJ -- seems like we should do something about that.
I'm working on an ebook product which has a very basic HTML structure - essentially all content elements (mostly
) are immediate children of
. I've centered this content with the following CSS:body > * { min-width: 300px; max-width: 650px; margin-left: auto; margin-right: auto; }
Since the font test
<div>
is added as an immediate child of<body>
, this CSS prevents the font detection from working. It was a bit fiddly to track down, as the only 'errors' I could detect were that STIX fonts would always be skipped, and there was a delay in loading the web-fonts. It would stick on "Loading web-font TeX/Main/Regular" for maybe 8 seconds, then show "Can't load web-font TeX/Main/Regular", however it would then seem to render using "MathJax_Main" anyway.Once I figured it out, normal behaviour for font detection/loading was restored by adding:
#MathJax_Font_Test { min-width: 0; max-width: none; }
My thought is that it might be worth adding min/max width resets to MathJax itself since the font detection depends on the width of #MathJax_Font_Test, yet it was so easy for me to unwittingly break it.