Live data from Hacker News

KaTeX: Math typesetting for the web

khan.github.io

61–70 of 101 posts

Re: KaTeX: Math typesetting for the web

#62
post #60

I love this. One question: how much emphasis was put on security? Can I safely let the users of my website input any string and feed it directly to the render function?

We never do any unsafe dom manipulations, like using .innerHTML, only createElement and appendChild, so things should be fairly safe. Also, if you do server-side rendering, we escape code that users type in, so that should work well also.

Re: KaTeX: Math typesetting for the web

#63

Looks great! Will KaTeX support (c.q. integrate with) ASCIIMathML.js¹,²? AsciiMath is dubbed “TeX without backslashes”, or as “markdown for math”.³ (La)TeX input can become laborious, and the syntax gets difficultly readable, very rapidly. With AsciiMath syntax⁴ (and Unicode!⁵) you can write δA instead of `\delta A`, ½ instead of `\frac{1}{2}`, ((a,b),(c,d)) instead of `\begin{pmatrix}a & b \\ c & d \end{pmatrix}`, &…

We won't support ASCIIMath yet. There's a lot of content on the web already in LaTeX syntax (and on our own website), and a lot of people already know it. It is difficult to use and read, but it gets the job done. Maybe once we've gotten all of the core LaTeX features done, we'll start looking to this. Thanks for the info, though!

yes, would love asciimath support. most of the math that'll exist on the web isn't there yet, and it'll be so much easier to the next billion internet users than learning latex.

katex looks great though. we (socratic.org) might start using it if we can find a good asciimath=>latex converter.

Re: KaTeX: Math typesetting for the web

#65
post #61

Is it just me or is the style of this website a rip off of writelatex.com? Edit: I guess I hit a nerve then.

I didn't design the KaTeX site (but I implemented it), and I hadn't seen writelatex.com before. Honestly, I don't see much resemblance other than the fact that both are green.

Re: KaTeX: Math typesetting for the web

#67
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 be nice to have something officially supported by a large project. I think that there is a lot of potential on the web for interactive math lessons with symbolic input using a CAS (not multiple choice).

Re: KaTeX: Math typesetting for the web

#68

Earlier quoted context omitted.

We won't support ASCIIMath yet. There's a lot of content on the web already in LaTeX syntax (and on our own website), and a lot of people already know it. It is difficult to use and read, but it gets the job done. Maybe once we've gotten all of the core LaTeX features done, we'll start looking to this. Thanks for the info, though!

yes, would love asciimath support. most of the math that'll exist on the web isn't there yet, and it'll be so much easier to the next billion internet users than learning latex. katex looks great though. we (socratic.org) might start using it if we can find a good asciimath=>latex converter.

Check out https://github.com/mathjax/asciimathml/blob/master/asciimath.... It uses the AsciiMath parser to generate latex to be fed into mimetex for rendering, but it could probably be daisy-chained with katex. I keep it current with the latest AsciiMath revisions.
Post reply on HN