KaTeX By Khan Academy is a new math-typesetting library implemented completely with JavaScript and CSS. It is much faster than MathJax (which we currently use for math rendering), has much cleaner dependency, and can be bundled pretty cleanly inside a page, thus not requiring Internet connection.
Even better, it can do server-side rendering. Hoedown 3.0 will get first-class math syntax support, and combining a math callback with JavaScriptCore it should be possible to completely eliminate post-rendering callbacks needed by MathJax. Also, by bundling the rendering library we can also bundle the fonts, boosting performance even further (with less than 1 MB increase in bundle size).
The most obvious disadvantage at the current moment is TeX compatibility. KaTeX supports quite a lot already, but still much less than MathJax. But with any luck it should catch up pretty quickly.
Please comment if there’s anything you would like to add, or if you think this is a splendid/great/meh/bad/terrible idea. My current plan is to evaluate this again after Hoedown 3.0 is publicly available, and start the migration soon after we upgrade to it.
KaTeX By Khan Academy is a new math-typesetting library implemented completely with JavaScript and CSS. It is much faster than MathJax (which we currently use for math rendering), has much cleaner dependency, and can be bundled pretty cleanly inside a page, thus not requiring Internet connection.
Even better, it can do server-side rendering. Hoedown 3.0 will get first-class math syntax support, and combining a math callback with JavaScriptCore it should be possible to completely eliminate post-rendering callbacks needed by MathJax. Also, by bundling the rendering library we can also bundle the fonts, boosting performance even further (with less than 1 MB increase in bundle size).
The most obvious disadvantage at the current moment is TeX compatibility. KaTeX supports quite a lot already, but still much less than MathJax. But with any luck it should catch up pretty quickly.
Please comment if there’s anything you would like to add, or if you think this is a splendid/great/meh/bad/terrible idea. My current plan is to evaluate this again after Hoedown 3.0 is publicly available, and start the migration soon after we upgrade to it.