LinuxCommandLibrary

typst

Modern typesetting system and compiler

TLDR

Compile document to PDF

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

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.
--format FORMAT
Output format: pdf, png, svg.
--ppi NUM
Pixels per inch for raster output.
--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.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community