KaTeX Math
Enable with latex: true in nextra(). Nextra handles remark-math and rehype-katex internally.
Inline Math
Use single $ delimiters: The quadratic formula is .
Euler’s identity:
Block Math
Use double $$ for display math:
$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$
$$
\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}
$$Matrix
$$
\mathbf{A} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}
$$Aligned Equations
$$
\begin{aligned}
\dot{x} &= \sigma(y - x) \\
\dot{y} &= x(\rho - z) - y \\
\dot{z} &= xy - \beta z
\end{aligned}
$$Math Fence Block
Use a ```math ``` code fence as an alternative to $$:
Was this page helpful?