KaTeX test

 from Red Blob Games
2015 Jun

KaTeX is a math formatting library for web pages. It is much faster than MathJax 2, but supports far fewer features. The main thing I want to format is matrices. They added support for this in June 2015.

This is the LaTeX-formatted math:

      k.renderToString("\\begin{bmatrix} x \\\\ y \\end{bmatrix} = size \\times \\begin{bmatrix} \\sqrt{3} & \\sqrt{3}/2 \\\\ 0 & \\tfrac{3}{2} \\end{bmatrix} \\times \\begin{bmatrix} q \\\\ r \\end{bmatrix}", {displayMode:true})


This is rendered in the browser:


This is rendered on the server and turned into html. This does not require the 147k javascript library to be loaded, but it does need the css and fonts.

[xy]=size×[33/2032]×[qr]\begin{bmatrix} x \\ y \end{bmatrix} = size \times \begin{bmatrix} \sqrt{3} & \sqrt{3}/2 \\ 0 & \tfrac{3}{2} \end{bmatrix} \times \begin{bmatrix} q \\ r \end{bmatrix}

Email me , or tweet @redblobgames, or comment: