Math Typesetting with KaTeX
106 words
Table of contents
Set math: true in a post’s front matter (or site-wide in params) and
Lucent loads KaTeX
for you.
Inline math#
The identity \(e^{i\pi} + 1 = 0\) is often called the most beautiful equation in mathematics. You can also use dollar signs: $a^2 + b^2 = c^2$.
Display math#
The Gaussian integral:
$$\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}$$A matrix:
$$ \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x\cos\theta - y\sin\theta \\ x\sin\theta + y\cos\theta \end{pmatrix} $$And a sum that overflows gracefully on small screens:
$$\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} = \prod_{p \text{ prime}} \frac{1}{1 - p^{-s}}, \quad \operatorname{Re}(s) > 1$$