Typst
Typst document compilation and live preview workflow.
Basic commands
Compile to PDF:
typst c report.typCompile with a custom root (for imports from parent dirs):
typst c report.typ --root .Watch and recompile on save:
typst watch report.typOpen PDF viewer alongside (zathura auto-reloads):
typst watch report.typ & zathura report.pdf
Typical workflow
typst watch report.typ # terminal 1: auto-compile
zathura report.pdf # terminal 2: auto-reloading viewer
nvim report.typ # editor
Package management
Local packages live in:
~/.local/share/typst/packages/local/<name>/<version>/Install local package (copy or symlink):
ln -s ~/Repos/benou-typst/packages/local/benou ~/path/to/typst/packages/local/
Tips
zathuraauto-reloads the PDF when it changes — no need to reopen- Use
typst watchinstead of re-runningtypst cmanually --root .is needed when importing from../../paths