Skip to content

Write your first report

This walkthrough starts with one file and ends with a compiled report. It assumes no prior Typst experience. You will learn what the import and show rule do, how to write headings and paragraphs, and how to change one setting without replacing the rest of the template configuration. For the complete beginner course—including citations, tables, final PDF checks, and paths to other document types—start with From a blank file to a finished document.

1. Start with a blank file

Create main.typ in a new folder, then paste this complete example:

#import "@local/satz:0.2.1": report
#show: report.with()
= Introduction
This report describes the question, the approach, and the main result.
== Context
Use two equals signs for a section below the main heading. A blank line starts
a new paragraph.
= Method
Describe what you did and how you did it.
= Findings
Write the result here. You can add a table, figure, or citation as the report
develops.

The import makes the report function available in this file. #show: report.with() applies its document layout to the content that follows. The equals signs create Typst headings; they also become numbered headings in the report. The text itself remains ordinary Typst, so you can use lists, emphasis, links, equations, and other Typst features inside the template.

2. Compile and read the result

With the local package directory from setup available, compile from the folder containing main.typ:

Terminal window
typst compile --package-path packages main.typ

Typst writes main.pdf next to the source. The report starts with your content. Satz does not add a cover automatically. You can create your own cover or use a Satz cover before the show rule; see Add a cover page. Contents pages are also optional.

3. Change one setting

You can replace the show rule with a configured one. For example, this selects a serif font and makes entries in the List of Figures shorter:

#show: report.with(config: (
typography: (font: "Libertinus Serif"),
lof: (depth: none, compact: true),
))

The nested dictionaries matter: typography contains text settings and lof contains List of Figures settings. Satz merges these overrides with its defaults, so you do not need to repeat unrelated values. depth: none enables the list, and compact: true omits caption text from it; it does not shorten captions where they appear in the report. The font must be available in the environment that compiles the PDF.

For the type, default, and effect of each supported field, use the configuration reference. The API reference documents the report arguments and which configuration groups each template uses.

To add a table of contents, or lists of figures and tables, enable each one independently:

#show: report.with(config: (
toc: (depth: none),
lof: (depth: none),
lot: (depth: none),
))

Use a positive toc.depth to limit heading levels. Figure and table lists appear only when there are matching outlined items.

4. Add a figure or table

Put image files beside main.typ (or in a subfolder) and refer to them by a relative path. Native Typst figures get captions, numbering, labels, and references:

#figure(
image("results.png", width: 80%),
caption: [Response across conditions.],
) <response-plot>
See @response-plot for the plotted response.

Continue with the figures and tables tutorial for tables, short captions, and cross-references.

5. Split a longer report into files

Once the document becomes hard to navigate, move a section into another .typ file and include it:

#include "sections/introduction.typ"
#include "sections/method.typ"

Create those files inside the project folder. #include inserts their content at that point in the document, so the report show rule still styles their headings. Keep the imports and show rule in main.typ so the entry file controls the whole document.

Where to go next