Earlier quoted context omitted.
Everything else on a web page is rendered client side (HTML is just text…) so client side rendering makes sense to me here too.
Rendering HTML doesn't require a huge JS library.
Render mathematical expressions in Markdown On GitHub
111–114 of 114 posts
Re: Render mathematical expressions in Markdown On GitHub
#112Earlier quoted context omitted.
I used to think KaTeX was far superior to MathJax but now I'm not so sure. I made https://mk12.github.io/web-math-demo/ to compare them and other things. They're definitely superior to browser MathML rendering today, which is nonexistent in Chrome (though see https://mathml.igalia.com/ ), quite bad in Safari, and OK in Firefox. It's true pre-rendering KaTeX produces a lot of markup, but it compresses very well so I d…
> https://github.com/KaTeX/KaTeX/issues/3400 has gone unfixed for a long time. I don't think I'd qualify an issue from the end of last year as "unfixed for a long time".
Re: Render mathematical expressions in Markdown On GitHub
#113Nice! A welcome addition! Too bad they're not using KaTeX [0] instead. It renders the maths server-side, so there's no runtime needed. An additional bonus is that the resulting math is copy-pasteable, which in the case of disply math might not be that useful (since most equations are to complex to be meaningfully copy-pasted with unicode), but it helps from inline math dissappearing when copy pasting texts. But, that…
The last I knew, KaTeX had issues with accessibility. But honestly it is probably just best to ship raw MathML, translated from LaTeX on the server, and use MathJax as a polyfill for Chrome and Edge users. That way you get extremely fast rendering in Safari and Firefox without any extra javascript, and eventually Chrome will catch up.
Re: Render mathematical expressions in Markdown On GitHub
#114Earlier quoted context omitted.
The last I knew, KaTeX had issues with accessibility. But honestly it is probably just best to ship raw MathML, translated from LaTeX on the server, and use MathJax as a polyfill for Chrome and Edge users. That way you get extremely fast rendering in Safari and Firefox without any extra javascript, and eventually Chrome will catch up.
I wouldn’t recommend relying on Safari MathML rendering today for anything but very basic equations. Firefox is a lot better, but still not quite at MathJax quality. I made a demo here https://mk12.github.io/web-math-demo/ that lets you compare them. Also if you edit the MathML markup box, it will render directly from that, just like the poly fill (sometimes the layout shifts slightly when switching from TeX -> MathJ…
However, isn’t that just the fact the the default math font (DejaVu Math TeX Gyre in Firefox i-on Ubuntu) is not good enough? I use Libertinus Math in my own little demo page (https://runarberg.github.io/mathup/) and it looks just fine (IMO). The only think to note is that TeX Gyre is so pervasive (as it is the default [only?] MathJax font) that it takes a bit getting used to other math fonts on the web.
For example here is the Iglalia example from your demo page displayed with Libertinus Math in Firfox (https://imgur.com/q3QuJOA). The same example has some issues in your demo page with DejaVu Math TeX Gyre