Katex: add support for matrices

Created on 15 Sep 2014  路  18Comments  路  Source: KaTeX/KaTeX

It would be great to support things like \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} like MathJax does.

enhancement

Most helpful comment

@NateZimmer: yes, #246 implemented this, and KaTeX releases since 0.4.0 include that code. Simply give it a try on https://khan.github.io/KaTeX/. If something about matrices doesn't work as expected, that would likely be a separate issue.

All 18 comments

Definitely! One of the next features we're planning on adding is support for environments in general (anything that uses begin and end). At Khan, we use begin{align} the most, so that's the main motivation, but we'll try to support at least align, matrix, and array to start. It looks like pmatrix is just `left( begin{matrix} ... end{matrix} right)', so that shouldn't be too hard to add.

Yes, looking forward to see \begin{aligned} supported, too. Because I use that a lot, so I still cannot switch from MathJaX currently.

+1 for matrix support

+1

+1!

+1

Although I don't know why matrices are so annoying in LaTeX. I'd much prefer a python or MATLAB syntax...

+1

+1 for {matrix} and {bmatrix}. Really need it for linear algebra on slides.com and reveal.js presentations

+1

+1 for matrix

oh yeah +1

waiting for that day and then I'll move my ass from MathJax to KaTeX. +1!

I am allowed to say +1 :+1: here too? :)

Can we close this, now that #246 has been merged?

Yes! Fixed by #246

Uhm... I'm feeling the next upcoming release gonna be soon with a whole lotta of sweets.

+1 ... was this ever implemented?

@NateZimmer: yes, #246 implemented this, and KaTeX releases since 0.4.0 include that code. Simply give it a try on https://khan.github.io/KaTeX/. If something about matrices doesn't work as expected, that would likely be a separate issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pyramation picture pyramation  路  4Comments

hagenw picture hagenw  路  3Comments

jason-s picture jason-s  路  3Comments

msridhar picture msridhar  路  3Comments

janosh picture janosh  路  4Comments