Typst is a new markup-based typesetting system that is designed to be as powerful as LaTeX while being much easier to learn and use. Typst has:
- Built-in markup for the most common formatting tasks
- Flexible functions for everything else
- A tightly integrated scripting system
- Math typesetting, bibliography management, and more
- Fast compile times thanks to incremental compilation
- Friendly error messages in case something goes wrong
This repository contains the Typst compiler and its CLI, which is everything you need to compile Typst documents locally. For the best writing experience, consider signing up to our collaborative online editor for free.
Typst's CLI is available from different sources:
-
You can get sources and pre-built binaries for the latest release of Typst from the releases page. Download the archive for your platform and place it in a directory that is in your
PATH
. To stay up to date with future releases, you can simply runtypst update
. -
You can install Typst through different package managers. Note that the versions in the package managers might lag behind the latest release.
- Linux:
- View Typst on Repology
- View Typst's Snap
- macOS:
brew install typst
- Windows:
winget install --id Typst.Typst
- Linux:
-
If you have a Rust toolchain installed, you can install
- the latest released Typst version with
cargo install --locked typst-cli
- a development version with
cargo install --git https://github.com/typst/typst --locked typst-cli
- the latest released Typst version with
-
Nix users can
- use the
typst
package withnix-shell -p typst
- build and run a development version with
nix run github:typst/typst -- --version
.
- use the
-
Docker users can run a prebuilt image with
docker run ghcr.io/typst/typst:latest --help
.
Once you have installed Typst, you can use it like this:
# Creates `file.pdf` in working directory.
typst compile file.typ
# Creates PDF file at the desired path.
typst compile path/to/source.typ path/to/output.pdf
You can also watch source files and automatically recompile on changes. This is faster than compiling from scratch each time because Typst has incremental compilation.
# Watches source files and recompiles on changes.
typst watch file.typ
Typst further allows you to add custom font paths for your project and list all of the fonts it discovered:
# Adds additional directories to search for fonts.
typst compile --font-path path/to/fonts file.typ
# Lists all of the discovered fonts in the system and the given directory.
typst fonts --font-path path/to/fonts
# Or via environment variable (Linux syntax).
TYPST_FONT_PATHS=path/to/fonts typst fonts
For other CLI subcommands and options, see below:
# Prints available subcommands and options.
typst help
# Prints detailed usage of a subcommand.
typst help watch
If you prefer an integrated IDE-like experience with autocompletion and instant preview, you can also check out Typst's free web app.
The resume what build by typst
More Read from official doc