Live data from Hacker News

KaTeX: Math typesetting for the web

khan.github.io

31–40 of 101 posts

Re: KaTeX: Math typesetting for the web

#31
post #8

A great idea would be that when you copy a math expression from the browser, it would put the LaTeX code in the copy-paste buffer: f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi So then I could paste it in an email, in a text editor, in my own LaTeX document, etc.

I recently discovered this works in wikipedia,i.e. if copying the first rendered formula in a page[0] I get latex code.

Not sure if it's just the alt text.

[0] Try http://en.wikipedia.org/wiki/Axiom_of_choice and you get \forall X \left[ \emptyset \notin X \implies \exists f \colon X \rarr \bigcup X \quad \forall A \in X \, ( f(A) \in A ) \right] \,.

Re: KaTeX: Math typesetting for the web

#32
This looks really nice. Are there any handwriting recognition projects for being able to write on a wacom tablet that could output to a format like this?

That was always my dream when doing homework at the university.

Re: KaTeX: Math typesetting for the web

#35

Is there support for alternate math fonts (not sure what the proper term is) like \mathbf, \mathcal, \mathbb? Couldn't get it working. Looks fantastic though.

There isn't yet, but we're working on it! We have the fonts ready, just haven't added those functions yet. Could you make an issue on the github page so we make sure we don't forget?

Re: KaTeX: Math typesetting for the web

#36
I may be the odd man out, but especially for the case where I modify a small part of an expression I like MathML because those small parts can be uniquely identified and altered without altering or reformatting the rest of the expression. MathJax supports MathML, so this is possible with MathJax.

For example, the event handler that updates r at the bottom of this page: http://www.vizitsolutions.com/portfolio/gausslaw/ does not know anything about the expression as a whole, it only knows to update elements with a certain class with the new r value.

Of course I will take a look at this and see how it works for my content. It seems though, that this would be a case of interest to Khan Academy as it is comparatively common in instructional material.

Re: KaTeX: Math typesetting for the web

#37

Props to the coders for improving upon the LaTeX/Web use case space, but I can't help but feel something other than LaTeX is going to be necessary for the internet. LaTeX was fundamentally about document-level typesetting, and the internet is fundamentally not a place where that happens.

Well, TeX hasn't been used much for whole web page generation. For math however, it is uncontended.

Re: KaTeX: Math typesetting for the web

#39
post #8

A great idea would be that when you copy a math expression from the browser, it would put the LaTeX code in the copy-paste buffer: f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi So then I could paste it in an email, in a text editor, in my own LaTeX document, etc.

I recently discovered this works in wikipedia,i.e. if copying the first rendered formula in a page[0] I get latex code. Not sure if it's just the alt text. [0] Try http://en.wikipedia.org/wiki/Axiom_of_choice and you get \forall X \left[ \emptyset \notin X \implies \exists f \colon X \rarr \bigcup X \quad \forall A \in X \, ( f(A) \in A ) \right] \,.

That's just the alt text.

Re: KaTeX: Math typesetting for the web

#40

Not bad, but MathJax is also pretty fast: https://trinket.io/latex/788599bf30

On my machine at least, the KaTeX demo is considerably faster.

This is very useful for big math threads like often on terrytao.wordpress.com, which can take up to a minute to render in my browser. On mobile it's even worse.

Post reply on HN