fontssizedoxygenmathjax

Why has Text in MathJax html-css fractions different letter sizes in the same fraction part, and how to prevent it?


currently I am trying to get some formulas into a doxygen (1.8.20) generated HTML document using MathJax 2

Somehow I do not understand why in \text{TEST} all letters are the same size, but in \frac{TEST}{2} the T is smaller then the E and S: different sized letters in fraction.

I could prevent this by using \dfrac instead of \frac, but this has other side effects like enlarging everything.

I am also a bit stumbled, because this only happens when MathJax renders in HTML-CSS or common HTML. For example as SVG, the letters are all the same size.

Can someone explain why these different size letters are generated, and what other options are available to prevent this?


Solution

  • As Davide Cervone pointed out in the MathJax user group, the font sizes of the letters differ, with E at .68 EM and T at .677 EM. With the sourrounding font size of 14px this leads to rounding issues so that T will be 9px high and E will be 10px high. Solution could be: