Typesetting Math with KaTeX
Math is a first-class citizen on this blog. Thanks to remark-math and
rehype-katex, you can write LaTeX directly in Markdown and get properly
typeset output.
Inline math
Wrap an expression in single dollar signs to render it inline, like or the quadratic formula .
Display math
For a standalone equation, put $$ on its own line:
The definition of the Gaussian integral is another classic:
Matrices and summations
KaTeX handles more advanced notation too. Here is a matrix:
And a summation with limits:
A note on escaping
Because $ is the delimiter, avoid using a lone dollar sign in prose unless
you mean to open math. If you need a literal one, escape it as \$.
Math rendering happens at build time, so there is no client-side JavaScript cost — the HTML ships with the equations already typeset.
Related posts
Subscribe to the Newsletter
Get the latest posts delivered right to your inbox.
Comments