logoalt Hacker News

susamyesterday at 1:21 PM1 replyview on HN

For someone used to the typesetting quality of LaTeX, MathML leaves much to be desired. For example, if you check the default demo at https://mk12.github.io/web-math-demo/ you'll notice that the contour integral sign (∮) has an unusually large circle in the MathML rendering (with most default browser fonts) which is quite inconsistent with how contour integrals appear in print. It's not the fault of MathML of course since the symbol '∮' is rendered using the available fonts. It is not surprising that a glyph designed for 'normal' text sizes doesn't look good when it's simply scaled up to serve as a large integral symbol.

Even if we address this problem using custom web fonts, there are numerous other edge cases (spacing within subscripts and superscripts, sizing within subscripts within subscripts, etc.) that look odd in MathML. At that point, we might as well use full KaTeX. Granted, many of these issues are minor. If they don't bother you, MathML could be a good alternative. Unfortunately, for me, these inconsistencies do bother me, so I've been using MathJax, and more recently KaTeX, since they get you closer to the typesetting quality of LaTeX compared to MathML.


Replies

xigoiyesterday at 2:58 PM

If you want every symbol to look exactly like in Latin Modern (the default typeface in LaTeX), simply use Latin Modern as your math typeface. The size of the circle on the contour integral is a matter of personal preference, but it just depends on the typeface and is orthogonal to the choice of LaTeX/MathML.

show 1 reply