Typst Math
Inline math with $...$, display math with $ ... $ (note the spaces). Greek letters by name. No package imports. Blackboard bold built in.
The basics
// Inline math (no spaces inside $)
The equation $E = m c^2$ describes mass-energy.
// Display math (spaces inside $)
$ E = m c^2 $
// Greek letters by name
$alpha, beta, gamma, Sigma, Omega$
// Common operators
$sum_(i=1)^n x_i$
$integral_0^infinity e^(-x^2) dif x$
$lim_(x -> 0) sin(x)/x = 1$
// Number sets
$RR, NN, ZZ, QQ, CC$ // ℝ, ℕ, ℤ, ℚ, ℂAligned multi-line equations
$
a &= b + c \
d &= e + f + g \
h &= i
$Same &-for-alignment, \-for-newline as LaTeX align. No environment wrapper.
Matrices
// Square brackets (default)
$ mat(a, b; c, d) $
// Parentheses
$ mat(delim: "(", a, b; c, d) $
// Determinant
$ mat(delim: "|", a, b; c, d) $
// 3x3 with ellipsis
$ mat(
a_11, dots, a_(1n);
dots.v, dots.down, dots.v;
a_(m1), dots, a_(m n)
) $Equation numbering and references
#set math.equation(numbering: "(1)")
The energy is given by:
$ E = m c^2 $ <einstein>
As shown in @einstein, ...Common operators
| Typst | LaTeX | Symbol |
|---|---|---|
| sum | \sum | ∑ |
| prod | \prod | ∏ |
| integral | \int | ∫ |
| lim | \lim | lim |
| infinity | \infty | ∞ |
| partial | \partial | ∂ |
| nabla | \nabla | ∇ |
| dif | d | d (in differential) |
TypeTeX is a free in-browser Typst editor. No install needed — type math, see it render in milliseconds.
Start writing in TypstFrequently Asked Questions
Wrap inline math in $...$: $E = m c^2$. For display math (centered, on its own line), put spaces inside the dollar signs: $ E = m c^2 $. The space difference is how Typst tells inline from display.
Type the name: $alpha + beta = gamma$ produces α + β = γ. Capitals are capitalized: $Sigma$ for Σ. Variant forms: $epsilon$ for ε, $epsilon.alt$ for ϵ. No backslash, no \usepackage{} needed.
Use & in display math, just like LaTeX: $ a &= b + c \ d &= e + f $. The & marks the alignment column, \ separates lines. This works inside any display math without an environment wrapper.
Same as LaTeX: $x^2$ for superscript, $x_i$ for subscript. For multi-character: $x^(n+1)$ uses parentheses (not braces like LaTeX). Combined: $x_i^2$. The parens-vs-braces is the main syntactic difference from LaTeX.
Use the mat() function: $ mat(a, b; c, d) $ produces a 2x2 matrix in square brackets (Typst's default delimiter). For parens: $ mat(delim: "(", a, b; c, d) $. For determinant bars: $ mat(delim: "|", a, b; c, d) $. Commas separate columns, semicolons separate rows.
Built in: $RR$ for ℝ, $NN$ for ℕ, $ZZ$ for ℤ, $QQ$ for ℚ, $CC$ for ℂ. No package import needed. For arbitrary blackboard bold: $bb(X)$ for double-struck X.
$ E = m c^2 $ <einstein> attaches a label. Then reference with @einstein in body text. To enable numbering, use #set math.equation(numbering: "(1)") in your preamble. Each labeled display equation gets numbered automatically.
The space matters. $E=mc^2$ (no spaces) is inline. $ E = m c^2 $ (spaces inside the dollars) is display — centered, on its own line, with bigger operators. Typst uses whitespace to disambiguate where LaTeX uses different delimiters ($...$ vs \[...\]).
90% similar syntax, 10% better. Same ^/_ for super/subscripts, same alignment with &, similar operator names (sum, prod, int). The wins: no \usepackage{} for amsmath, blackboard bold built in, multi-character super/subscripts use parens not braces (less escaping), error messages tell you what's wrong instead of cryptic TeX warnings.