Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want to test out some examples from your website to see how they'd look in KaTeX vs. browser MathML rendering, I made a tool for that here: https://mk12.github.io/web-math-demo/


Nice tool! Seems "New Computer Modern" font is the Native MathML rendering that looks closest like standard LaTeX rendering, I guess cause LaTeX uses Computer Modern by default. But I notice extra space around the parenthesis, which annoys me because LaTeX math allows you to be so precise about how wide your spaces (e.g. \, \: \; \!). Is there a way to get the spaces around the parenthesis to be just as wide as standard LaTeX math? And the ^ hat above f(x) isn't nicely above just the top part of the f.


Assuming you’re seeing the same issue as me: I find the parenthesis spacing is messed up whenever there are unnecessary \left and \right, as there are in some of the samples, which leads to an extra <mrow> in the MathML. If you only use those when they really need to stretch, then it looks much better.


Thanks, the special \left and \right parenthesis were indeed the culprit.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: