Typst Math Syntax Guide
A quick reference for the Typst math notation used throughout the game.
Powers, subscripts, and roots
| You want | Type | Notes |
| x squared | x^2 | Superscript. Group multi-token exponents: x^(n+1) |
| x sub n | x_n | Subscript. Group with parens: x_(i j) |
| square root | sqrt(a + b) | Everything under the root goes in the parentheses |
| nth root | root(3, x) | First argument is the index |
Fractions and grouping
| You want | Type | Notes |
| a over b | a/b | Group numerators/denominators: (n+1)/(2n) |
| parentheses | (x + y) | Parentheses render as written |
Big operators
| You want | Type | Notes |
| sum | sum_(i=1)^n | Limits use _ and ^ |
| product | product_(k=1)^n | |
| integral | integral_a^b f(x) dif x | dif x is the differential; the space is required |
| limit | lim_(x -> 0) | -> renders as an arrow |
| infinity | oo | |
Symbols
Greek letters have their own section below.
| Symbol | Type |
| ∞ ± × · | oo, plus.minus, times, dot |
| ≤ ≥ ≠ | <=, >=, != |
| ∂ ∇ ∈ ⊂ | diff, nabla, in, subset |
Vectors, accents, and matrices
| You want | Type | Notes |
| vector arrow | arrow(a) | Accent over the argument |
| hat | hat(x) | |
| bar / mean | bar(x) | Overline accent |
| binomial | binom(n, k) | |
| matrix | mat(a, b; c, d) | Commas separate columns, semicolons separate rows |
| absolute value | abs(x) or |x| | |
| norm | norm(x) | Double bars ‖x‖ |
Practice these in the game →
The Greek alphabet
All 24 Greek letters. Type the name in lowercase for the lowercase letter and
capitalize the first letter for the uppercase version (e.g. alpha
→ α, Alpha → Α).
| Name | Lowercase | Uppercase |
| Alpha | α alpha | Α Alpha |
| Beta | β beta | Β Beta |
| Gamma | γ gamma | Γ Gamma |
| Delta | δ delta | Δ Delta |
| Epsilon | ε epsilon | Ε Epsilon |
| Zeta | ζ zeta | Ζ Zeta |
| Eta | η eta | Η Eta |
| Theta | θ theta | Θ Theta |
| Iota | ι iota | Ι Iota |
| Kappa | κ kappa | Κ Kappa |
| Lambda | λ lambda | Λ Lambda |
| Mu | μ mu | Μ Mu |
| Nu | ν nu | Ν Nu |
| Xi | ξ xi | Ξ Xi |
| Omicron | ο omicron | Ο Omicron |
| Pi | π pi | Π Pi |
| Rho | ρ rho | Ρ Rho |
| Sigma | σ sigma | Σ Sigma |
| Tau | τ tau | Τ Tau |
| Upsilon | υ upsilon | Υ Upsilon |
| Phi | φ phi | Φ Phi |
| Chi | χ chi | Χ Chi |
| Psi | ψ psi | Ψ Psi |
| Omega | ω omega | Ω Omega |
Whitespace & general formatting
All math goes between dollar signs — $ x^2 + 1 $. Inside them, three
rules cover almost everything:
- Spaces around operators don't matter.
a+b and
a + b come out identical; Typst spaces operators for you, so type
whichever is comfortable.
- A space between letters means "multiply".
a b reads
as a times b, whereas ab (no space) is treated as one
name. This is why 4a c and 4ac look different.
- Group with parentheses whenever a power, subscript, or fraction
spans more than one token —
x^(n+1), a_(i j), and
(a+b)/2 all need them.