MacDownApp/macdown

Switch to KaTeX and server-side math rendering

开放

#162 创建于 2014年9月16日

 (2 条评论) (0 个反应) (0 位负责人)Objective-C (930 个派生)batch import
enhancementhelp wantedtodo

仓库指标

星标
 (7,686 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南