Writing & Markdown

Math (LaTeX)

Write inline and block mathematical expressions with LaTeX syntax — fractions, matrices, summations, and Greek letters rendered with KaTeX in Hugo.

Ownable renders math expressions using KaTeX, a fast LaTeX math renderer.

Inline Math

Wrap expressions in single dollar signs:

The famous equation $E = mc^2$ relates energy and mass.

The famous equation E=mc2E = mc^2 relates energy and mass.

Block Math

Use double dollar signs for display-mode equations:

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

Common Examples

Fractions & Roots

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

Matrices

$$
A = \begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{bmatrix}
$$
A=[123456789]A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}

Summation & Products

$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
\qquad
\prod_{i=1}^{n} i = n!
$$
i=1ni=n(n+1)2i=1ni=n!\sum_{i=1}^{n} i = \frac{n(n+1)}{2} \qquad \prod_{i=1}^{n} i = n!

Greek Letters

SyntaxOutputSyntaxOutput
$\alpha$α\alpha$\beta$β\beta
$\gamma$γ\gamma$\delta$δ\delta
$\theta$θ\theta$\lambda$λ\lambda
$\sigma$σ\sigma$\omega$ω\omega

Configuration

Math rendering is auto-detected — if your page contains $...$ or $$...$$, KaTeX loads automatically.

To force-enable math rendering on a page, add to your front matter:

---
math: true
---

For the full list of supported LaTeX commands, see the KaTeX documentation.

Was this page helpful?

From the makers of

© 2026 Lore Labs.

On this page