Live data from Hacker News

KaTeX: Math typesetting for the web

khan.github.io

71–80 of 101 posts

Re: KaTeX: Math typesetting for the web

#71

Are there any plans for an interactive equation editor supported by KaTeX? I think this is something the web is missing. I've been following the MathJax dev google group, and it seems like there aren't any solid plans for them to implement this feature. Some examples: My attempt: http://camdenre.github.io/src/app/html/EquationEditor Mathway: https://www.mathway.com/ Mathjq: http://www.mathjq.com/math-editor/ It would…

There aren't any plans at the moment. We've struggled with this problem before, and wrote something similar with https://github.com/khan/KAS/ but we've never worked at doing something inline. We use MathQuill in a couple places, which does the input decently (writing works, but typing something like x^2_2 gives you x^{2_2} not x^2_2), but the output doesn't look great. It's hard to do what the user wants, have clickable bits, and still have good looking output.

Re: KaTeX: Math typesetting for the web

#72

Any plans to support equation numbering (like MathJax) and \eqref? I didn't see this in any of the examples or docs.

This is definitely a goal for the future. Eventually we'd like to support everything that MathJax does (and maybe more!) Equation numbering involves more work than some of the other features (we've managed to get away with never calculating widths of elemnts, but we'd have to do that to get horizontal alignment working, we think), so we're pushing it back for now.

Re: KaTeX: Math typesetting for the web

#73

What choices did you make that make KaTeX faster than MathJax? (i.e. 'how is it done?')

There's a lot of choices. We support a smaller subset of browsers and outputs (only IE8+, only HTML+CSS, no SVG), so we gain some speed there. We also try to push as much of the calculation into CSS as possible, so that the native browser does as much work as possible, instead of the javascript. MathJax does a lot more manual positioning.

Re: KaTeX: Math typesetting for the web

#74

Are there any plans for an interactive equation editor supported by KaTeX? I think this is something the web is missing. I've been following the MathJax dev google group, and it seems like there aren't any solid plans for them to implement this feature. Some examples: My attempt: http://camdenre.github.io/src/app/html/EquationEditor Mathway: https://www.mathway.com/ Mathjq: http://www.mathjq.com/math-editor/ It would…

There aren't any plans at the moment. We've struggled with this problem before, and wrote something similar with https://github.com/khan/KAS/ but we've never worked at doing something inline. We use MathQuill in a couple places, which does the input decently (writing works, but typing something like x^2_2 gives you x^{2_2} not x^2_2), but the output doesn't look great. It's hard to do what the user wants, have clicka…

I agree that it's a very difficult problem. I think that it's a major missing piece for online math learning right now (actually interacting with math symbols in a non ASCII/textbox way). Thanks for all of the hard work you guys do!

Re: KaTeX: Math typesetting for the web

#75

Are there any plans for an interactive equation editor supported by KaTeX? I think this is something the web is missing. I've been following the MathJax dev google group, and it seems like there aren't any solid plans for them to implement this feature. Some examples: My attempt: http://camdenre.github.io/src/app/html/EquationEditor Mathway: https://www.mathway.com/ Mathjq: http://www.mathjq.com/math-editor/ It would…

There aren't any plans at the moment. We've struggled with this problem before, and wrote something similar with https://github.com/khan/KAS/ but we've never worked at doing something inline. We use MathQuill in a couple places, which does the input decently (writing works, but typing something like x^2_2 gives you x^{2_2} not x^2_2), but the output doesn't look great. It's hard to do what the user wants, have clicka…

I recently made this little tool for writing latex macros: http://kasperpeulen.github.io/PressAndHold/ It works the same as the OSX press and hold accent picker. I have also a unicode version which I think is much more appealing for young mathematicians: http://kasperpeulen.github.io/PressAndHold/Unicode/

All MIT licensed if you are interested in using it.

Re: KaTeX: Math typesetting for the web

#77

Are there any plans for an interactive equation editor supported by KaTeX? I think this is something the web is missing. I've been following the MathJax dev google group, and it seems like there aren't any solid plans for them to implement this feature. Some examples: My attempt: http://camdenre.github.io/src/app/html/EquationEditor Mathway: https://www.mathway.com/ Mathjq: http://www.mathjq.com/math-editor/ It would…

Desmos (supporting MathQuill) is leading the space here I think: https://www.desmos.com/calculator

Absolutely agree that if this was made and made open there would be a lot of opportunities in the math education space.

Re: KaTeX: Math typesetting for the web

#78

Heavy mathjax user here. Couple of use cases I'd love to know more about: - does KaTeX work pretty reasonably across the platforms? The simplest way I figured out for rendering math notation in-app on mobile devices was through web views + mathjax. E.g. say I wanted to use it in a web view in iOS or Android, would it work as intended? MathJax comes by default with a giant folder of various fonts / ways of rendering,…

We try to test in lots of different environments, so it should work reasonably in most environments. To get the speed we wanted, we had to ditch much older browsers (we don't support IE 7 and earlier), and we only render to HTML/CSS, not things like MathML. However, we're so far very happy with the look of the math in the environments we've tested. KaTeX works great in a headless environment. You can even do server s…

We actually work in the same space you guys do :)

We're all dealing with having to display more complex math to students once you get past 5th grade in the Common Core, also on web and iPads. Appreciate you folks taking the time to release something like this to the public. People haven't been hounding us down because of the slow UX yet, but I can see that happening down the line. I'm hoping we can open source some of our tools as well once we're your size :)

My only other question was: is KaTeX 100% interchangeable with MathJax as far as syntax goes? What I'm asking is if we already have a lot of content written for MathJax, will we need to massage it into a new syntax or should it work for the most part?

Re: KaTeX: Math typesetting for the web

#79

Is there an wysiwyg equation editor that can produce the code for this? Would be interested in adding equations to our product but our users wouldn't be familiar with TeX.

The third-party program MathType (http://www.dessci.com/en/products/mathtype/) is an GUI math editor that can export to LaTeX. It costs $97 for end-users though. I think it supports embedding math objects in arbitrary third-party programs, since both Microsoft Word and Apple Pages support that.

Re: KaTeX: Math typesetting for the web

#80

Earlier quoted context omitted.

We try to test in lots of different environments, so it should work reasonably in most environments. To get the speed we wanted, we had to ditch much older browsers (we don't support IE 7 and earlier), and we only render to HTML/CSS, not things like MathML. However, we're so far very happy with the look of the math in the environments we've tested. KaTeX works great in a headless environment. You can even do server s…

We actually work in the same space you guys do :) We're all dealing with having to display more complex math to students once you get past 5th grade in the Common Core, also on web and iPads. Appreciate you folks taking the time to release something like this to the public. People haven't been hounding us down because of the slow UX yet, but I can see that happening down the line. I'm hoping we can open source some o…

The syntax will be almost entirely interchangable with MathJax; we also have a lot of content in MathJax-flavored-TeX and need it to work. However there are a couple small things that MathJax did strangely that we'd like to fix.

However, there are some features we don't support yet, notably environments (with \begin/\end) and some symbols. If you're using more advanced features, you might hit some snags. If you're trying to do something simple and it's not working, feel free to submit an issue on github, we'll see what we can do for you.

Post reply on HN