typst

Modern typesetting system and compiler

TLDR

Compile document to PDF
$ typst compile [document.typ]
Compile with specific output
$ typst compile [document.typ] [output.pdf]
Watch and recompile on changes
$ typst watch [document.typ]
Compile to PNG
$ typst compile [document.typ] [output.png]
Compile to SVG
$ typst compile [document.typ] [output.svg]
List available fonts
$ typst fonts
Compile with custom font path
$ typst compile --font-path [/path/to/fonts] [document.typ]
Initialize new project
$ typst init

SYNOPSIS

typst command [--font-path path] [options] input [output]

DESCRIPTION

Typst is a modern typesetting system designed as an alternative to LaTeX. It combines the power of LaTeX with simpler syntax and faster compilation.Documents use .typ files with markup similar to Markdown. Headers, lists, emphasis, and links use familiar syntax. Mathematical equations use a LaTeX-inspired but simpler notation.Compilation is incremental and extremely fast - documents compile in milliseconds. Watch mode provides near-instant preview updates during editing.Styling uses a functional approach. Set rules configure defaults; show rules transform elements. The language is Turing-complete, enabling complex documents with scripting.Templates and packages extend functionality. Bibliography support uses BibTeX or Hayagriva formats. Multi-column layouts, figures, and tables work intuitively.Output formats include PDF (default), PNG pages, and SVG. Font embedding ensures documents render correctly anywhere.

PARAMETERS

compile INPUT [OUTPUT]

Compile document to output.
watch INPUT
Watch for changes and recompile.
fonts
List available fonts.
init [TEMPLATE]
Initialize new project.
query INPUT SELECTOR
Query document metadata.
--root DIR
Project root directory.
--font-path PATH
Additional font search path.
-f, --format FORMAT
Force output format (pdf, png, svg). Normally inferred from output extension.
--ppi NUM
Pixels per inch for raster output (default 144).
--pages RANGE
Comma-separated list of pages to export (e.g. 1-3,5).
--diagnostic-format FMT
Diagnostic format: human, short.
--input KEY=VALUE
Set input variable.
--open
Open output after compile.
-h, --help
Show help.
-V, --version
Show version.

INSTALL

sudo pacman -S typst
sudo apk add typst
sudo zypper install typst
brew install typst
nix profile install nixpkgs#typst

CAVEATS

Newer ecosystem with fewer packages than LaTeX. Some advanced features still developing. Not all LaTeX packages have equivalents. PDF/A for archival not yet supported. Limited IDE integration compared to LaTeX.

HISTORY

Typst was created by Martin Haug and Laurenz Mädje around 2019 as a master's thesis project. The goal was creating a typesetting system that's as powerful as LaTeX but more approachable. After development at Typst GmbH, it was open-sourced in 2023 and rapidly gained adoption.

SEE ALSO

pdflatex(1), pandoc(1), groff(1), asciidoctor(1)