table of contents
- Tumbleweed 0.13.1-1.1
- Leap-16.0
- Leap-15.6
typst-compile(1) | General Commands Manual | typst-compile(1) |
NAME¶
typst-compile - Compiles an input file into a supported output format
SYNOPSIS¶
typst-compile [-f|--format] [--root] [--input] [--font-path] [--ignore-system-fonts] [--package-path] [--package-cache-path] [--creation-timestamp] [--pages] [--pdf-standard] [--ppi] [--make-deps] [-j|--jobs] [--features] [--diagnostic-format] [--open] [--timings] [-h|--help] <INPUT> [OUTPUT]
DESCRIPTION¶
Compiles an input file into a supported output format
OPTIONS¶
- -f, --format=FORMAT
- The format of the output file, inferred from the extension by default
[possible values: pdf, png, svg, html]
- --root=DIR
- Configures the project root (for absolute paths)
- --input=key=value
- Add a string key-value pair visible through `sys.inputs`
- --font-path=DIR
- Adds additional directories that are recursively searched for fonts.
If multiple paths are specified, they are separated by the system's path separator (`:` on Unix-like systems and `;` on Windows).
- --ignore-system-fonts
- Ensures system fonts won't be searched, unless explicitly included via `--font-path`
- --package-path=DIR
- Custom path to local packages, defaults to system-dependent location
- --package-cache-path=DIR
- Custom path to package cache, defaults to system-dependent location
- --creation-timestamp=UNIX_TIMESTAMP
- The document's creation date formatted as a UNIX timestamp.
For more information, see <https://reproducible-builds.org/specs/source-date-epoch/>.
- --pages=PAGES
- Which pages to export. When unspecified, all pages are exported.
Pages to export are separated by commas, and can be either simple page numbers (e.g. '2,5' to export only pages 2 and 5) or page ranges (e.g. '2,3-6,8-' to export page 2, pages 3 to 6 (inclusive), page 8 and any pages after it).
Page numbers are one-indexed and correspond to physical page numbers in the document (therefore not being affected by the document's page counter).
- --pdf-standard=PDF_STANDARD
- One (or multiple comma-separated) PDF standards that Typst will enforce
conformance with
Possible values:
- 1.7: PDF 1.7
- a-2b: PDF/A-2b
- a-3b: PDF/A-3b
- --ppi=PPI [default: 144]
- The PPI (pixels per inch) to use for PNG export
- --make-deps=PATH
- File path to which a Makefile with the current compilation's dependencies will be written
- -j, --jobs=JOBS
- Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism
- --features=FEATURES
- Enables in-development features that may be changed or removed at any time
[possible values: html]
- --diagnostic-format=DIAGNOSTIC_FORMAT [default: human]
- The format to emit diagnostics in
[possible values: human, short]
- --open=VIEWER
- Opens the output file with the default viewer or a specific program after compilation. Ignored if output is stdout
- --timings=OUTPUT_JSON
- Produces performance timings of the compilation process. (experimental)
The resulting JSON file can be loaded into a tracing tool such as https://ui.perfetto.dev. It does not contain any sensitive information apart from file names and line numbers.
- -h, --help
- Print help (see a summary with '-h')
- <INPUT>
- Path to input Typst file. Use `-` to read input from stdin
- [OUTPUT]
- Path to output file (PDF, PNG, SVG, or HTML). Use `-` to write output to
stdout.
For output formats emitting one file per page (PNG & SVG), a page number template must be present if the source document renders to multiple pages. Use `{p}` for page numbers, `{0p}` for zero padded page numbers and `{t}` for page count. For example, `page-{0p}-of-{t}.png` creates `page-01-of-10.png`, `page-02-of-10.png`, and so on.
typst-compile |