Phonemos User Guide

PDF and Typst (.pdf)

Typst is the engine is used by Phonemos to generate PDFs. But it can also be valuable to generate the raw typst files in case you want to do some manual postprocessing.

The archive can contain the following files:

Filename

Description

Baseline (Start with)

default.typ

Template to generate the Typst file in the Pandoc template format. Use this to customize the output.

see Pandoc documentation for the syntax and Phonemos Pandoc Format for the source format.

pandoc -o default.typ --print-default-template=typst

template.typ

(variable)

The Typst template that should be used. Will be included in the typst code.

you need to either set variables.template or use a custom default.typ to use the template.
Referenced by a variables.template, so it may also be named differently.

see the Typst Universe for examples

defaults.yaml

YAML file containing additional options. Common ones are

  • toc (boolean): Add a table of contents to the document

  • toc-depth (integer): Number of section levels to include into the table of contents

  • variables (object): Variables for Typst, see documentation. They are referenced in the default.typ. Most common are:

    • template (string): Name of the typst template to use (see template.typ

  • lua-filters (list of string): Filename of lua filters to apply to the input document (for advanced processing). See Phonemos Pandoc Format for the documentation of the input file.

Example:

1 2 3 4 toc: true toc-depth: 1 variables: template: template.typ

see Pandoc documentation for more advanced settings.

empty file

*.ttf

in root or in /fonts

Custom fonts to use in your template. Both paths will be provided to typst as --font-path, refer to the typst documentation under “fonts” for more details about the requirements and on how to refer to this fonts from your template.