Mathematics on Web with KaTeX

Mathematics on Web with KaTeX

Displaying mathematics on the web has become easy with KaTeX. This blog fully supports LaTeX for mathematical formulas.

Inline Math

You can write simple formulas like E=mc2E = mc^2 or α+β=γ\alpha + \beta = \gamma directly in text.

Display Math

For more complex formulas, use display mode:

Quadratic formula:

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Gaussian integral:

0ex2dx=π2\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}

Conclusion

KaTeX renders on the server (SSG) so no client-side JavaScript is needed. This makes the website faster and more SEO-friendly.