KaTeX is a tool for rendering mathematical notation based on TeX — a popular typesetting syntax.
With Slab's KaTeX support, you can create and preview mathematical equations and expressions all within a Slab post!
Creating KaTex equations
To create a KaTex equation, simply create a code block and select TeX/KaTeX as the language.
Once your TeX is entered, a Preview button will appear at the top right corner. Clicking the button will show your TeX syntax as a KaTeX equation. In read mode, the rendered result is the default view.
If you need to make any changes to your equation:
Hover over the equation and click the Edit button at the top-right corner
Make changes to your TeX
Click the Preview button at the top-right corner to see the rendered change
If there are syntax errors, the preview button will be disabled until the errors are resolved.
If you'd like to learn more about supported TeX functions in KaTeX, you can learn all about it in KaTeX's documentation website.