typst-compile(1)
π typst-compile β like, the girlies' guide to compiling ur Typst file β¨
okay so bestie, welcome to typst-compile(1) from the General Commands Manual β this is the one that takes ur input file and turns it into an output format that actually slays. Let's get into it π«Ά
πΈ SYNOPSIS πΈ
typst-compile [-f|--format] [--root] [--input] [--font-path]
[--ignore-system-fonts] [--ignore-embedded-fonts] [--package-path]
[--package-cache-path] [--creation-timestamp] [--pages] [--pdf-standard]
[--no-pdf-tags] [--ppi] [--deps] [--deps-format] [-j|--jobs]
[--features] [--diagnostic-format] [--open] [--timings] [-h|--help]
<INPUT> [OUTPUT]
π¦ DESCRIPTION π¦
Compiles an input file into a supported output format. that's it, that's the vibe. iconic behaviour, no notes π
β¨ OPTIONS β¨
-f,--format=FORMATβ the format of the output file. by default it's lowkey inferred from the extension, main character energy fr fr- possible values:
pdf,png,svg,html
- possible values:
--root=DIRβ sets up the project root (for absolute paths, iykyk). you can also set this with theTYPST_ROOTenvironment variable π--input=key=valueβ drops in a string key-value pair that's visible throughsys.inputs--font-path=DIRβ adds extra directories that get recursively searched for fonts. if you're passing multiple paths, separate them with the system's path separator (:on Unix-like systems and;on Windows). also available via theTYPST_FONT_PATHSenvironment variable π--ignore-system-fontsβ makes sure system fonts won't be searched, unless they're explicitly included via--font-path. also available via theTYPST_IGNORE_SYSTEM_FONTSenvironment variable--ignore-embedded-fontsβ makes sure fonts embedded into Typst won't be considered. also available via theTYPST_IGNORE_EMBEDDED_FONTSenvironment variable--package-path=DIRβ custom path to local packages. defaults to a system-dependent location. also available via theTYPST_PACKAGE_PATHenvironment variable--package-cache-path=DIRβ custom path to the package cache. defaults to a system-dependent location. also available via theTYPST_PACKAGE_CACHE_PATHenvironment variable--creation-timestamp=UNIX_TIMESTAMPβ the document's creation date, formatted as a UNIX timestamp β for more info, see <https://reproducible-builds.org/specs/source-date-epoch/>. also available via theSOURCE_DATE_EPOCHenvironment variable--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,5to 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)
- pages to export are separated by commas, and can be either simple page numbers (e.g.
--pdf-standard=PDF_STANDARDβ one (or multiple comma-separated) PDF standards that Typst will enforce conformance with π₯
Possible values:
1.4: PDF 1.41.5: PDF 1.51.6: PDF 1.61.7: PDF 1.72.0: PDF 2.0a-1b: PDF/A-1ba-1a: PDF/A-1aa-2b: PDF/A-2ba-2u: PDF/A-2ua-2a: PDF/A-2aa-3b: PDF/A-3ba-3u: PDF/A-3ua-3a: PDF/A-3aa-4: PDF/A-4a-4f: PDF/A-4fa-4e: PDF/A-4eua-1: PDF/UA-1
--no-pdf-tagsβ so normally, even when you're not producing aPDF/UA-1document, a tagged PDF document gets written to provide a baseline of accessibility (we love inclusive queen behaviour π«Ά). but in some circumstances (for example when you're trying to reduce the size of a document) it can be desirable to disable tagged PDF--ppi=PPI[default: 144] β the PPI (pixels per inch) to use for PNG export π--deps=PATHβ file path to which a list of the current compilation's dependencies will be written. use-to write to stdout--deps-format=DEPS_FORMAT[default: json] β file format to use for dependencies
Possible values:
json: encodes as JSON, failing for non-Unicode paths πzero: separates paths with NULL bytes and can express all pathsmake: emits in Make format, omitting inexpressible paths
-j,--jobs=JOBSβ number of parallel jobs spawned during compilation. defaults to the number of CPUs. setting it to1disables parallelism π--features=FEATURESβ enables in-development features that may be changed or removed at any time (bestie, they are NOT stable, do not build ur whole personality on them π)- possible values:
html,a11y-extras - also available via the
TYPST_FEATURESenvironment variable
- possible values:
--diagnostic-format=DIAGNOSTIC_FORMAT[default: human] β the format to emit diagnostics in- possible values:
human,short
- possible values:
--open=VIEWERβ opens the output file with the default viewer or a specific program after compilation. ignored if the 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 β so like, ur secrets are safe, ngl-h,--helpβ print help (see a summary with-h) β¨<INPUT>β path to the input Typst file. use-to read input from stdin π[OUTPUT]β path to the 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}.pngcreatespage-01-of-10.png,page-02-of-10.png, and so on πΈ
- 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
π real talk:--featuresis literally for in-development stuff that may be changed or removed at any time, and--timingsis experimental. don't come for me if they get weird, ok? π
aaaaaaaaand that's the whole page, bestie π¦ ty for coming to my TED talk. this iconic little number lives in the General Commands Manual, its footer says typst-compile and the page is typst-compile(1) β go forth and compile, you absolute queen ππ
π¦ where this page comes from
- alpine 3.24: typst-doc 0.14.2-r0 Β· Apache-2.0
- nixos 26.05: typst 0.14.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms