Typst Math Syntax Guide

A quick reference for the Typst math notation used throughout the game.

Powers, subscripts, and roots

You wantTypeNotes
x squaredx^2Superscript. Group multi-token exponents: x^(n+1)
x sub nx_nSubscript. Group with parens: x_(i j)
square rootsqrt(a + b)Everything under the root goes in the parentheses
nth rootroot(3, x)First argument is the index

Fractions and grouping

You wantTypeNotes
a over ba/bGroup numerators/denominators: (n+1)/(2n)
parentheses(x + y)Parentheses render as written

Big operators

You wantTypeNotes
sumsum_(i=1)^nLimits use _ and ^
productproduct_(k=1)^n
integralintegral_a^b f(x) dif xdif x is the differential; the space is required
limitlim_(x -> 0)-> renders as an arrow
infinityoo

Symbols

Greek letters have their own section below.

SymbolType
∞ ± × ·oo, plus.minus, times, dot
≤ ≥ ≠<=, >=, !=
∂ ∇ ∈ ⊂diff, nabla, in, subset

Vectors, accents, and matrices

You wantTypeNotes
vector arrowarrow(a)Accent over the argument
hathat(x)
bar / meanbar(x)Overline accent
binomialbinom(n, k)
matrixmat(a, b; c, d)Commas separate columns, semicolons separate rows
absolute valueabs(x) or |x|
normnorm(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 → Α).

NameLowercaseUppercase
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: