5 ms·
Did Mathjax just become obsolete?
by gravity13 12y ago
Did Mathjax just become obsolete?
- xymostech 12y agoNot quite yet, but we're working on it. There are some significant features that KaTeX doesn't yet support, but we're working to add them in the near future. In the meantime, you could use our TeX React component to use KaTeX when possible, and fall back to MathJax only when necessary: http://khan.github.io/react-components/#tex http://khan.github.io/react-components/#tex
- 1971genocide 12y agoAwesome project ! could you explain me how you are rendering maths symbol without mathjax ?
- xymostech 12y agoWe're using the similar fonts to what MathJax uses (ours have some slight changes in spacing), but we do our own layout calculations to be much faster.
- gravity13 12y agoGreat work! Would love to read a blog post in the future about how you guys did your layout engine behind this.
- brendano 12y agoIt would be helpful to know what KaTeX can and cannot do.
- xymostech 12y agoThere's a list of functions it supports here: https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX Most inline math is done, but we're missing a bunch of individual symbols (see CONTRIBUTING.md in the repo if you'd like to contribute!) The main things we're missing are environments (i.e. \begin and \end), but we'll be working on those soon!
- jordigh 12y agoSorry to tl;dr your code, but how exactly is it based on TeX? Do you actually run Knuth's TeX code to make this work, or did you reimplement it? Also, kind of irrelevant, do you think we'll ever get something better than (La)TeX syntax? I've been frustrated by obscure error messages from LaTeX in big documents because it's a macro language, so the interpreter doesn't actually see what you're typing. How does KaTeX handle errors?
- xymostech 12y agoWe reimplemented the TeX formatting algorithms in JavaScript. Most of them are in https://github.com/Khan/KaTeX/blob/master/src/buildTree.js https://github.com/Khan/KaTeX/blob/master/src/buildTree.js (there are references to the pages from the TeXbook that the algorithms are on). Also, we attempt to have relatively good error handling! If you open up the javascript console on the main page and type in a bad expression, you can see what the errors we throw look like. We're not planning on supporting anything other than LaTeX syntax for now though, unfortunately.