.ie \n(.g .ds Aq \(aq .el .ds Aq ' .TH typst-compile 1 "typst-compile " .SH NAME typst\-compile \- Compiles an input file into a supported output format .SH SYNOPSIS \fBtypst\-compile\fR [\fB\-f\fR|\fB\-\-format\fR] [\fB\-\-root\fR] [\fB\-\-input\fR] [\fB\-\-font\-path\fR] [\fB\-\-ignore\-system\-fonts\fR] [\fB\-\-ignore\-embedded\-fonts\fR] [\fB\-\-package\-path\fR] [\fB\-\-package\-cache\-path\fR] [\fB\-\-creation\-timestamp\fR] [\fB\-\-pretty\fR] [\fB\-\-pages\fR] [\fB\-\-pdf\-standard\fR] [\fB\-\-no\-pdf\-tags\fR] [\fB\-\-ppi\fR] [\fB\-\-deps\fR] [\fB\-\-deps\-format\fR] [\fB\-j\fR|\fB\-\-jobs\fR] [\fB\-\-features\fR] [\fB\-\-diagnostic\-format\fR] [\fB\-\-open\fR] [\fB\-\-timings\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIINPUT\fR> [\fIOUTPUT\fR] .SH DESCRIPTION Compiles an input file into a supported output format .SH OPTIONS .TP \fB\-f\fR, \fB\-\-format\fR \fI\fR The format of the output file, inferred from the extension by default .br .br \fIPossible values:\fR .RS 14 .IP \(bu 2 pdf .IP \(bu 2 png .IP \(bu 2 svg .IP \(bu 2 html .IP \(bu 2 bundle .RE .TP \fB\-\-root\fR \fI\fR Configures the project root (for absolute paths) .RS May also be specified with the \fBTYPST_ROOT\fR environment variable. .RE .TP \fB\-\-input\fR \fI\fR Add a string key\-value pair visible through `sys.inputs` .TP \fB\-\-font\-path\fR \fI\fR Adds additional directories that are recursively searched for fonts. If multiple paths are specified, they are separated by the system\*(Aqs path separator (`:` on Unix\-like systems and `;` on Windows). .RS May also be specified with the \fBTYPST_FONT_PATHS\fR environment variable. .RE .TP \fB\-\-ignore\-system\-fonts\fR Ensures system fonts won\*(Aqt be searched, unless explicitly included via `\-\-font\-path` .RS May also be specified with the \fBTYPST_IGNORE_SYSTEM_FONTS\fR environment variable. .RE .TP \fB\-\-ignore\-embedded\-fonts\fR Ensures fonts embedded into Typst won\*(Aqt be considered .RS May also be specified with the \fBTYPST_IGNORE_EMBEDDED_FONTS\fR environment variable. .RE .TP \fB\-\-package\-path\fR \fI\fR Custom path to local packages, defaults to system\-dependent location .RS May also be specified with the \fBTYPST_PACKAGE_PATH\fR environment variable. .RE .TP \fB\-\-package\-cache\-path\fR \fI\fR Custom path to package cache, defaults to system\-dependent location .RS May also be specified with the \fBTYPST_PACKAGE_CACHE_PATH\fR environment variable. .RE .TP \fB\-\-creation\-timestamp\fR \fI\fR The document\*(Aqs creation date formatted as a UNIX timestamp. For more information, see . .RS May also be specified with the \fBSOURCE_DATE_EPOCH\fR environment variable. .RE .TP \fB\-\-pretty\fR Whether to pretty\-print produced output. This formats the output in a more human\-readable, but less space\-efficient way. Affects HTML, SVG, and PDF export, but not PNG export. .TP \fB\-\-pages\fR \fI\fR 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. \*(Aq2,5\*(Aq to export only pages 2 and 5) or page ranges (e.g. \*(Aq2,3\-6,8\-\*(Aq 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\*(Aqs page counter). .TP \fB\-\-pdf\-standard\fR \fI\fR One (or multiple comma\-separated) PDF standards that Typst will enforce conformance with .br .br \fIPossible values:\fR .RS 14 .IP \(bu 2 1.4: PDF 1.4 .IP \(bu 2 1.5: PDF 1.5 .IP \(bu 2 1.6: PDF 1.6 .IP \(bu 2 1.7: PDF 1.7 .IP \(bu 2 2.0: PDF 2.0 .IP \(bu 2 a\-1b: PDF/A\-1b .IP \(bu 2 a\-1a: PDF/A\-1a .IP \(bu 2 a\-2b: PDF/A\-2b .IP \(bu 2 a\-2u: PDF/A\-2u .IP \(bu 2 a\-2a: PDF/A\-2a .IP \(bu 2 a\-3b: PDF/A\-3b .IP \(bu 2 a\-3u: PDF/A\-3u .IP \(bu 2 a\-3a: PDF/A\-3a .IP \(bu 2 a\-4: PDF/A\-4 .IP \(bu 2 a\-4f: PDF/A\-4f .IP \(bu 2 a\-4e: PDF/A\-4e .IP \(bu 2 ua\-1: PDF/UA\-1 .RE .TP \fB\-\-no\-pdf\-tags\fR By default, even when not producing a `PDF/UA\-1` document, a tagged PDF document is written to provide a baseline of accessibility. In some circumstances (for example when trying to reduce the size of a document) it can be desirable to disable tagged PDF .TP \fB\-\-ppi\fR \fI\fR [default: 144] The PPI (pixels per inch) to use for PNG export .TP \fB\-\-deps\fR \fI\fR File path to which a list of current compilation\*(Aqs dependencies will be written. Use `\-` to write to stdout .TP \fB\-\-deps\-format\fR \fI\fR [default: json] File format to use for dependencies .br .br \fIPossible values:\fR .RS 14 .IP \(bu 2 json: Encodes as JSON, failing for non\-Unicode paths .IP \(bu 2 zero: Separates paths with NULL bytes and can express all paths .IP \(bu 2 make: Emits in Make format, omitting inexpressible paths .RE .TP \fB\-j\fR, \fB\-\-jobs\fR \fI\fR Number of parallel jobs spawned during compilation. Defaults to number of CPUs. Setting it to 1 disables parallelism .TP \fB\-\-features\fR \fI\fR Enables in\-development features that may be changed or removed at any time .br .br \fIPossible values:\fR .RS 14 .IP \(bu 2 html .IP \(bu 2 bundle .IP \(bu 2 a11y\-extras .RE .RS May also be specified with the \fBTYPST_FEATURES\fR environment variable. .RE .TP \fB\-\-diagnostic\-format\fR \fI\fR [default: human] The format to emit diagnostics in .br .br \fIPossible values:\fR .RS 14 .IP \(bu 2 human .IP \(bu 2 short .RE .TP \fB\-\-open\fR [\fI\fR] Opens the output file with the default viewer or a specific program after compilation. Ignored if output is stdout .TP \fB\-\-timings\fR \fI\fR 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. .TP \fB\-h\fR, \fB\-\-help\fR Print help (see a summary with \*(Aq\-h\*(Aq) .TP <\fIINPUT\fR> Path to input Typst file. Use `\-` to read input from stdin .TP [\fIOUTPUT\fR] 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.