Monday, October 3, 2016

Papeeria News, Oct 3: instant preview of the math formulae

TL;DR: Papeeria shows math formula previews

LaTeX excels at typesetting maths. However, if you make a typo or mistake in non-trivial math equation you get no immediate feedback and have to recompile the document to see if firmula looks good. Papeeria provides live preview of mathematics so you can see how the equation looks like without recompiling the document.

Formula preview shows up at the bottom of the text editor automatically when cursor enters math mode which is either delimited with single or double-dollar symbols, or inside equation environment. If cursor is already at the bottom of the editor, the preview moves to the top edge.

Matrix in the formula preview

Under the hood we use great KaTeX library developed by folks from Khan Academy, so the supported macros are restricted to the subset supported by KaTeX. The subset is prettywide, so chances are that your equations will look fine. KaTeX paints unknown tags with red color, so even if there is something which it can't render, you will still see partial result mixed with unrecognized tags.