Is there support for matrices? Neither \begin{bmatrix} a & b \\ c & d \end{bmatrix} nor \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} works.
Doesn't look like it: https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX
KaTeX: Math typesetting for the web
91–100 of 101 posts
Re: KaTeX: Math typesetting for the web
#92Is there support for matrices? Neither \begin{bmatrix} a & b \\ c & d \end{bmatrix} nor \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} works.
Re: KaTeX: Math typesetting for the web
#93I'm curious: why does this work so much better than MathJax? What's the technical "secret sauce" that makes this tick? I was looking for that on the site and in the README, but it doesn't seem to have any explanation as to the tricks that make up KaTeX.
MathJax also does strange things involving inserting elements into the DOM to look at metrics that it uses in its calculations, then removing them, which takes a lot of time. We make sure that the same input is rendered the same every time, and try to make sure it looks good everywhere (there are a couple cases where we aren't the best at this, mostly because browser font rendering isn't great).
We also support less environments than MathJax, for example we only support HTML+CSS output (for now, though MathML is in the works for accessibility reasons), whereas MathJax supports HTML+CSS, SVG, MathML, and older browsers like IE 6. This means it can't rely on things like good CSS rendering like we do. It's a worthwhile tradeoff for us, because we can make ours so much faster, but it is a tradeoff.
Re: KaTeX: Math typesetting for the web
#94Props 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.
I suppose by "internet" you mean "web" and in particular the fundamental problem you see is that LaTeX assumes the input contains everything needed for the final output, whereas hypertext on the web can be remixed in an open-ended way? I.e., it's hard to get pleasing results out of a process of composition of disparate LaTeX sources? Otherwise could you clarify the conflict you have in mind?
Re: KaTeX: Math typesetting for the web
#95If you don't see the value in browser built-in features, consider how badly the upgrade to retina worked with JS+canvas compared to SVG.
Re: KaTeX: Math typesetting for the web
#96A 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
#97Re: KaTeX: Math typesetting for the web
#98Is 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.
Re: KaTeX: Math typesetting for the web
#99Earlier quoted context omitted.
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.
Re: KaTeX: Math typesetting for the web
#100Here it is: http://www.intmath.com/cg5/asciimathml-katex-mathjax.php
Here's how it was done: http://www.intmath.com/blog/katex-with-asciimathml-input-and...