Reputation: 155
I have a html document that I am working on. When using MathJax however, the lines in fractions do not show up. After a bit of experimenting I realised that this was due to the font that I was using in the main body of the text. Is there any way to change the font of the MathJax text only whilst still only having to write $$ etc in the main text?
Upvotes: 0
Views: 294
Reputation: 12205
The difficulty with horizontal lines is due to some browsers dropping thin lines when they are less than a pixel wide, or if they fall too close to pixel boundaries. See MathJax Issue 1095 and MathJax issue 1279 for more details. In version 2.6 (currently in beta), the widths are given in units of px
rather than em
, which tends to improve the results.
EDIT: In terms of the font, the reason the change may make a difference is that MathJax scales its fonts to try to match the ex-height of the surrounding fonts. So if you change that font, it will change the scaling factor that MathJax uses, and that can affect whether the horizontal lines are dropped or not.
Note, however, that this is very browser, OS, and zoom-level dependent, so making a change in the font in order to "fix" it may only fix it for you, and may make it worse for others.
Upvotes: 2