LaTeX Math Support with KaTeX

August 1, 2025

This blog now supports LaTeX math expressions powered by KaTeX! Here are some examples:

Inline Math

You can write inline math like this: E=mc2E = mc^2 or π3.14159\pi \approx 3.14159.

The quadratic formula is x=b±b24ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Display Math

For larger expressions, use display math blocks:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

The Fourier transform:

F(f)(k)=f(x)e2πikxdx\mathcal{F}(f)(k) = \int_{-\infty}^{\infty} f(x) e^{-2\pi i k x} dx

Matrix Example

You can also render matrices:

(abcd)(xy)=(ax+bycx+dy)\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}

Complex Expressions

Even complex mathematical expressions work beautifully:

n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} limx0sinxx=1\lim_{x \to 0} \frac{\sin x}{x} = 1

That's it! Your blog now supports beautiful LaTeX math rendering.