At present: I do not think KaTeX is yet a viable option. At issue is feature parity. For comparison: MathJax supports on the order of ~800 built-in commands, plus the ability to define new macros using \def
or \newcommand
. Currently, the link given in Lipis's comment shows around ~250 commands supported. Mathjax also supports environments defined in the AMSMath (loaded by default here) and AMSCD extensions which involve vertical alignment.
Until feature parity is achieved we cannot expect KaTeX to be a drop-in replacement.
A few specific things missing that will break many of the pages on Math.SE at the moment:
- The lack of
\mathbb
and \mathrm
commands (at least one of our 100K users will not stand for the lack of the latter :-)
).
- No matrix or array environments.
- A rather limited set of arrows.
- Very limited support for basic elementary set theory and logic notations.
- It does not support unicode input.
Also I am not particularly impressed with how they deal with really long math expressions (scroll bar rather than overflow or line break).
I am also not entirely convinced that when feature parity is reached, KaTeX will still exhibit the same speed-up compared to MathJax, since both are based on a JavaScript backend.
One interesting aspect which is related to KaTeX's claim that it runs on all major web browsers with identical output, is that KaTeX outputs are, as far as I can tell, only using the HTML-CSS paradigm. Whether that contributes to the speed-up I don't know, but I find it somewhat disingenuous that on the KaTeX test page they chose to use the TeX-AMS-MML_HTMLorMML
configuration (which accepts both LaTeX-style and MathML input and outputs to configurable HTML or MathML output) instead of the TeX-AMS_HTML
configuration (which is still more feature-rich than what KaTeX provides, but is a better approximation of what KaTeX supports). There should be some (perhaps minor) speed up for MathJax just by loading a smaller set of features.
{\int}_0^\infty
matches TeX's and LaTeX's -- MathJax's behavior is arguably wrong here. If you remove the curly braces, the bottom limit is placed correctly. $\endgroup$tag
is also missing so you can't label equations. Katex may be faster, but not noticeable. The feature set as well as typesetting quality is nowhere near that of MathJax. While it might be okay for more elementary math which Khan Academy uses (though I do not see much reason to use it even there), it is definitely not suitable here. $\endgroup$\mathbb{R}
now. $\endgroup$