zudo-doc

Type to search...

to open search from anywhere

Math Equations

CreatedMar 22, 2026Takeshi Takatsudo

KaTeX math equation support for inline, block, and fenced code block math.

When math is enabled in settings (default: true), you can render mathematical equations using KaTeX.

Inline Math

Use single dollar signs to embed math within a line of text.

The formula E=mc2E = mc^2 is inline.

The formula $E = mc^2$ is inline.

Block Math

Use double dollar signs to render a centered display equation.

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

Fenced Code Block

Use a fenced code block with the math language identifier.

×E=Bt\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}
```math
\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}
```

Configuration

Math support is controlled by the math setting in src/config/settings.ts:

export const settings = {
  // ...
  math: true, // enabled by default
};

More Examples

Quadratic Formula

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

Summation

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

Matrix

[abcd][xy]=[ax+bycx+dy]\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}
$$
\begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix}
=
\begin{bmatrix}
ax + by \\
cx + dy
\end{bmatrix}
$$

Revision History

AI Assistant

Ask a question about the documentation.