Wiki Js and Katex

John Dickinson

I have been playing with Wiki.js, I happened to notice that some math was not getting rendered correctly. Wiki.js uses Katex to render Latex (like) math expressions. I wanted to produce an unordered list of equations like this,

The markdown to do this looks like

* $\braket{v_i|v_i} = 1$ because we are dealing with a unit vector

* $\braket{v_1|v_2}=\braket{v_2^|v_1^}$

* $\braket{v_1\vert(a\vert v_2}+b\ket{v_3})=a\braket{v_1\vert v_2}+b\braket{v_1\vert v_3}$

On the preview pane it looked fine but on the actual wiki page it was being rendered like this

It turns out that there needs to be text after the closing $ symbol. Adding just a “.” to the end of each line fixed it and the rendering worked fine.