A scaffolding kit for Typst documents: page presets, a type and colour system, ready-made parts, a template, and tools that stamp and audit what you build. It serves anything from a one-page information sheet to a conversation piece, a manual or a book, and one PDF serves both the screen and the printer. Anyone can use it, under the AGPL (see Licence).
This README ships in every release. Working on press itself? Its repository's
CLAUDE.md covers that.
Every document should start from decisions already made well, so its author spends the effort on what it says. The page, the type, the colours and the parts a reader learns to recognise are decided once, not again in every document.
Typst makes a good document easy to write and hard to keep consistent. Left alone, each one re-decides its page, its type scale and how a warning looks, and the copies of those decisions drift apart. press holds them in one kit every repository making documents can take, so a new document starts from a ready-made template and ready-made parts, and a fix made for one document reaches all of them at the next release. It offers rather than governs: its templates are a universal default, imported as they are or copied and changed, as a repository wishes.
It is more than styling. Its stamp marks each document with when its content last changed, so a printed copy can be checked against the current one, and its audit catches the font and glyph failures typst lets through without a word. A document is built the same way on every machine, from fonts that ship with press.
One output, read anywhere. A press document is a single PDF that reads on a screen and prints true, so every part is made for both:
- Text is real text: searchable, copyable, and set in vendored fonts, so it renders the same on every machine.
- Links work on both: they click on screen, and
link-notefootnotes their address for paper, or prints it in parentheses after them in a page's header or footer. - A document names itself once: its title is the PDF's metadata, so a viewer shows it, and the template prints it in the header and footer from there.
- Colour is never the only carrier of meaning, so a greyscale printer or a colour-blind reader loses nothing.
- Commands are short and unwrapped, so they copy cleanly from the screen and can be typed from paper.
- Pages keep all ink clear of the printer's band at every edge, 0.5in unless a calibration says otherwise, so printing at actual size never clips; on screen it is simply margin.
- Self-contained. If a fact is needed to act, it is in the document. A runbook kept beside the machine it describes is read exactly when that machine is down.
From a sheet to a book. The same tokens and parts carry a one-page reference card, a proposal, a manual and a book. Short documents are best served today. press grows from the documents that use it: a template or part is added when a real document needs it, and from the next release every document can use it.
press is a folder of files your repository holds. From the directory it should live in —
third_party/ at the project root, as this guide assumes — run the installer for your
system. It puts press/ there, and run again it updates it.
Linux, macOS:
curl -fsSL https://github.com/TylerVigario/press/releases/latest/download/install.sh | shLinux without curl:
wget -qO- https://github.com/TylerVigario/press/releases/latest/download/install.sh | shWindows, from PowerShell or cmd.exe:
powershell -NoProfile -c "irm https://github.com/TylerVigario/press/releases/latest/download/install.ps1 | iex"Each release attaches its own installer, which installs that release: latest/download is the
newest, and download/v<version> in its place fixes one. The installer downloads its
release's archive, refuses it unless its SHA-256 is the one written into the installer, and
swaps the new press/ in whole, so a file a release removed does not linger. A press/ that
is not press, or is a git checkout, it leaves alone, and it changes nothing outside press/.
Any directory under the project root works: typst reads no file outside it, and new.sh
writes each import for wherever press sits. Not vendor/, which other toolchains own:
go mod vendor deletes whatever else is in it, its presence alone breaks go build in a Go
module with dependencies it does not vendor, and Composer projects keep it out of git.
Commit press/. The copy your repository holds is the version it builds with, and
press/press.toml says which. Run the installer again to move to the newest release: the diff
shows what changed.
Without the installer, the archives unpack with the same tools. Delete press/ first when
updating, or files a release removed stay behind.
Linux, macOS:
curl -fsSL https://github.com/TylerVigario/press/releases/latest/download/press.tar.gz | tar -xzWindows, PowerShell 5.1 or 7:
$ProgressPreference='SilentlyContinue'; Invoke-WebRequest https://github.com/TylerVigario/press/releases/latest/download/press.zip -OutFile press.zip; Expand-Archive press.zip -DestinationPath .; Remove-Item press.zipUnder the Restricted execution policy, PowerShell 7 cannot load Expand-Archive; the
installer does not use it. Each release's SHA256SUMS lists both archives and both
installers. Never stream the zip into tar. A zip is read from its end: piped into tar,
files are dropped silently and it still exits 0. Pipe the tarball; unpack the zip from a file.
A document imports press by its path from the project root:
#import "/third_party/press/lib.typ": *and builds with plain typst, from whatever runs your builds:
typst compile --root . --font-path third_party/press/fonts --ignore-system-fonts docs/guide/main.typ print/docs/guide/main.pdfThe same three settings can come from the environment instead — TYPST_ROOT=.,
TYPST_FONT_PATHS=third_party/press/fonts, TYPST_IGNORE_SYSTEM_FONTS=true — which also serves
typst watch and an editor. press must sit under the project root, since typst reads no file
outside it. typst does not create the output directory; press's stamp tool does.
press's tools are plain sh scripts, called the same way from any runner:
| tool | does |
|---|---|
sh third_party/press/tools/new.sh docs/guide |
scaffolds docs/guide/main.typ from the template, its import written for where press sits; add letter, recipe or resume for those templates |
sh third_party/press/tools/build.sh docs/guide/main.typ |
builds and audits each document named to print/<same path>.pdf and says in one line what it made: new, changed, unchanged or cached, pages, words, size and the stamp; given several, ends with the count. --check first runs the audit alone, refusing without its tools |
sh third_party/press/tools/all.sh [dir...] |
builds every document under the directories named (default docs/), not the files they are made of and not press's own, then the count; fails if any failed. --check audits them instead |
sh third_party/press/tools/watch.sh docs/guide/main.typ |
recompiles on every save to print/<same path>.watch.pdf, a preview beside the stamped PDF |
sh third_party/press/tools/clean.sh |
deletes print/; .press-stamps stays, so an unchanged page keeps its stamp |
sh third_party/press/tools/stamp.sh <doc> <pdf> <flags> |
builds, stamping the PDF with when its content last changed and keeping the old time when nothing on the page changed; makes the output directory; then audits it, where the audit's tools are installed |
sh third_party/press/tools/check.sh <doc> <pdf> third_party/press <flags> |
the audit alone, which refuses to run without its tools: typst warnings, fonts that are not vendored, characters no face draws, ink too near the edge, text off the paper, text printed on text, code that wraps, a PDF with no title |
sh third_party/press/tools/install-typst.sh <dir> |
installs the typst press is built and audited with into <dir>, pinned by version and digest, on Linux x86_64 or aarch64: for a repository's CI (see In CI below) |
sh third_party/press/tools/fetch.sh <url> <file> |
downloads a file, trying again where the server or the network failed, though not on a missing file, and says on stderr how each try went: the host that answered each hop, its status and the IDs it gave the request, and how long the last try took. install-typst.sh downloads typst with it |
<flags> are the three above: --root . --font-path third_party/press/fonts --ignore-system-fonts.
Every build is audited. A finding prints, and the build exits 1 with the PDF still written,
so a runner, CI and all see it and the page can still be looked at. Where the audit's tools
are missing, the build says the audit was skipped and why, and succeeds: building never
depends on them. check.sh is the same audit for when it must run, as in CI: without its tools
it refuses. The audit also says how many open items a document still carries for its owner
to supply, and how many estimates it prints, each marked with unsourced(), and fails for
neither: a draft carries them. A form page with its measuring grid on, form(probe:), does
fail it: the grid is for measuring. So does a line of a code block too long for it, which wraps:
a command copies with a break in it, and on paper reads as two. A character no face draws fails
it wherever it came from, typed, escaped or read from a data file: the audit compiles the
document again as PDF/A-2b, which typst refuses for such a character. A document that places a
PDF without scan() cannot be compiled that way, and only the characters typed in its own files
are checked; the audit says so. A PDF with no title fails it too: the title, a template's title
or set document(title:), is what a screen reader names the document by, and WCAG and PDF/UA
each require one.
An unchanged document is not built again. One file in press's folder, .build-record,
records what each document's last build read — every file typst lists, the fonts, typst's
version, press's tools, the flags and the zone — each with a checksum, and what its audit said.
When all of it still matches, the build says cached at once, without compiling or auditing,
and repeats what the audit said. Unchanged is a different answer: the document was built again
and came out the same bytes, or other bytes whose every page draws the same pixels, and it keeps
its time. A press update that builds a part another way, a different typst, or a font file
rewritten without a glyph changing, changes the bytes and not the page; telling the two apart
takes poppler's pdftoppm, and without it other bytes count as changed. Only a build whose
audit ran in full and passed is recorded, so a failing document, or one built without the
audit's tools, is built and audited every time. The kit's own .gitignore keeps the record out
of git, an update replaces it with press's folder, and deleting it costs one full build per
document, never a wrong answer.
A page the document did not set — a scanned form it fills in, an embedded PDF page — is
marked with scan(...). The audit then reads a copy with every scan hidden, so the scan's own
fonts, text layer and edge-to-edge ink are not findings, and what the document sets over it is
audited as usual. The copy costs a second compile, only for a document that reads an image.
A form filled in is a form() page for each page of it, its answers placed with typst's own
place(dx:, dy:) from the page's top-left corner and its boxes marked with tick(); its blank
is a scan already. The point is an answer's own top-left, where its capitals begin, so an answer
meant to stand on a blank's line goes above the line by its capitals' height, about seven
tenths of its text size.
A finding a document keeps on purpose — a sent record that will not be restyled — is accepted in the document's own file, naming the pass and why; a file it imports or includes cannot accept for it, since a finding a shared file causes is that file's to fix:
// press: accept ink-margin — sent 2026-03-02, kept as sentIts findings still print, then a line saying they are accepted and why, and they do not fail
the build. The passes are warnings, fonts, glyphs, ink-margin, off-page,
text-on-text, code-wrap and untitled. An acceptance with no reason fails, and so does one
its pass finds nothing for: left standing, it would hide that pass's next real finding. A pass that
cannot run, for a missing or broken tool, fails the audit whatever the document accepts.
A document's stamp is kept in .press-stamps, at the repository's root beside .press.toml,
which the repository commits with its documents. Each build writes its document's line, the
document, its PDF, the stamp and the PDF's checksum, and drops the line of a document no longer
there. A build compiles the document at its line's stamp and keeps the stamp where the PDF has
that checksum, as typst makes the same bytes from the same inputs on any machine, so an unchanged
page keeps its time after clean.sh, in a fresh clone and on another machine, with no PDF there
to compare with. Where the bytes differ and the PDF is there, its pages decide, as above; where it
is gone, the page is stamped anew. A document that sets its own date, set document(date:),
keeps press's stamp too once it has a line; the build that first writes one, finding the
document's date in the PDF, stamps the page anew. A line the build cannot read, as a merge can
leave, or a PDF listed twice, stops the build: keep one line for each PDF, or delete a line, and
its next build writes it again.
The stamp prints to the second, updated 2026-11-08 01:50:23 UTC, so two editions built in the
same minute print different times. It prints in the zone the repository names once, in
.press.toml at its root, where the tools run:
timezone = "America/Los_Angeles"An IANA zone name, or UTC for documents read across zones, so every machine prints the same
time and an unchanged page stays unchanged wherever, and by whatever, it is built. With none named
the stamp prints in UTC, never the building machine's own zone. PRESS_TZ names another zone for
a build, over the file, and a tool's --tz for a run, over both: build.sh --tz UTC. The file
takes name = "value" lines and # comments, and a build fails on a line it cannot read or a
name it does not know, rather than printing in UTC unnoticed.
A build with SOURCE_DATE_EPOCH set, as a reproducible build sets it, takes it for the
current time, as its specification
says: a page new or changed is stamped with it, and one unchanged keeps its stamp, or comes back
to it where the stamp is later. A value that is not a whole number of seconds stops the build.
npm — on Windows npm runs scripts with cmd.exe, where mkdir -p makes a folder named
-p; press's tools make the output directory themselves:
"scripts": {
"press": "sh third_party/press/tools/all.sh",
"press:build": "sh third_party/press/tools/build.sh",
"press:check": "sh third_party/press/tools/all.sh --check",
"press:watch": "sh third_party/press/tools/watch.sh"
}npm run press builds every document under docs/, and npm run press -- recipes those under
another directory; npm run press:build -- docs/guide/main.typ builds one,
and npm run press:watch -- docs/guide/main.typ previews it.
make:
.PHONY: all FORCE
all:
sh third_party/press/tools/all.sh
print/%.pdf: %.typ FORCE
sh third_party/press/tools/build.sh $<
FORCE:A document reads more than its own file, its data and its chapters, and build.sh knows them
all: FORCE has make ask it every time, and an unchanged document comes back cached.
just — press.just is ready-made recipes for a repository that already uses just. One
line in its justfile: import 'third_party/press/press.just', or mod press 'third_party/press/press.just' where it has recipes of its own (import refuses a recipe name it
already has). Then:
just build docs/guide/main.typ # -> print/docs/guide/main.pdf, audited, and a line saying what it made
just watch docs/guide/main.typ # a preview on every save -> print/docs/guide/main.watch.pdf
just check docs/guide/main.typ # the audit, refusing without its tools
just all # every document under docs/, or under the directories named
just new docs/next-doc # scaffold; just new docs/to-x letter for a letter
just clean # delete print/Under mod it is just press build …, and just press lists the recipes; under import,
just --list does. Each recipe is one call to a tool in tools/, which any runner can call:
build is build.sh, check is build.sh --check, all is all.sh, watch is watch.sh,
new is new.sh and clean is clean.sh. all builds documents, not their parts: a file
named _*.typ is a part, and so is everything beside a main.typ, at any depth; press's own
folder is skipped, so just all . builds the repository's documents and not press's files. It
builds every one, then fails if any failed its audit.
- typst 0.14 or newer. An older one is refused with a message naming both versions.
shfor the tools. On Windows it comes with Git for Windows.- The audit needs poppler (
pdffonts,pdftotext,pdftoppm,pdftocairo), a Python, and a grep with PCRE (GNU grep; on macOS,brew install grep); a build without them is not audited, though it still counts the open items and estimates, and fails while a form's measuring grid is on or a line of a code block wraps, which need only typst. WherePATHfinds the wrong one, name it:PRESS_PDFTOTEXT,PRESS_PDFFONTS,PRESS_PDFTOPPM,PRESS_PDFTOCAIRO,PRESS_PYTHON,PRESS_GREP(ggrepon macOS). The audit refuses apdftotextthat is not poppler's, and findspdftocairobeside the onePRESS_PDFTOTEXTnames. - just 1.55 or newer, only to use
press.just.
winget install Typst.Typst Git.Git oschwartz10612.Poppler(andCasey.Justforpress.just), and a Python 3 onPATHaspythonorpython3.- The tools run in Git's
sh, inC:\Program Files\Git\bin. Git's default PATH choice adds onlyGit\cmd, which has nosh: add thebindirectory to your userPATH. - Set
PRESS_PDFTOTEXT, even though PowerShell finds poppler. winget puts poppler'sLibrary/binon your userPATH, andwhere pdftotextin PowerShell finds poppler's. The tools run in Git'ssh, though, which puts Git's own/ucrt64/bin, or/mingw64/binbefore Git 2.56, ahead of everything onPATH, and Git bundles Xpdf'spdftotext. Insideshthat one wins, and the audit refuses it: builds say "not audited: pdftotext is not poppler's". NoPATHorder fixes this. SetPRESS_PDFTOTEXTin your user environment, with forward slashes, topdftotext.exein poppler'sLibrary/bin(under%LOCALAPPDATA%/Microsoft/WinGet/Packages/). The audit findspdftocairobeside it. Git bundles nopdffontsorpdftoppm;PRESS_PDFFONTSandPRESS_PDFTOPPMpin those the same way if you want all three fixed. - Set them again after
winget upgradeupdates poppler. The folder they name carries poppler's version,poppler-25.07.0, and winget keeps no link to poppler that survives an upgrade, so an upgrade leaves them naming a folder that is gone. Builds still succeed, now saying each document "is not audited: poppler's … pdftotext.exe is not found", andcheckrefuses. Point the variables at the new version'sLibrary/bin.
A repository's CI installs typst with press's own tool, which holds press's pin of it: the
version press is built and audited with, checked against its digest. The pin is in press's
folder, so the repository keeps no copy to fall behind; moving to a press release moves its typst
with it. poppler comes from the runner's packages; GitHub's Ubuntu runners already have Python 3
and GNU grep. The audit runs as check there, which refuses without its tools rather than
skipping it. On GitHub Actions, for a repository that builds with npm:
- run: sh third_party/press/tools/install-typst.sh "$RUNNER_TEMP/bin"
- run: echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
- run: sudo apt-get update && sudo apt-get install -y poppler-utils
- run: npm run press:checkinstall-typst.sh runs on Linux, x86_64 or aarch64, and refuses anywhere else; a workstation
installs typst from its own packages. Its download is said in the log, in lines that begin
fetch:, so a failed one shows which hop failed and the IDs GitHub gave it.
press sets nothing until something asks. Importing it changes no page. Its templates are
functions a document applies: #show: brief.with(title: [...], author: "...") sets the page,
the type, the show rules and the header from press's general-purpose default, and letter does
the same for a letter. A document uses one as it is. Or a repository keeps a template of its
own that applies press's with what all its documents share, docs/_template.typ:
#import "/third_party/press/lib.typ": *
#let house(title: none, body) = {
show: brief.with(title: title, author: "Valley Clinic")
set par(leading: 0.58em)
body
}and each document applies that, #import "_template.typ": * and
#show: house.with(title: [Intake]), so a fix to press's template still reaches every document;
all takes _template.typ for a part and does not build it. Or a repository copies press's
template and changes its copy. press prefers none of them. new.sh starts a document that applies
one, with placeholder text to replace. The words a part prints are its words, a dictionary
whose English defaults the part's signature shows in full: continued(words: (page: [Página])),
enclosures(..items, words: (singular: [Anexo], plural: [Anexos])). A document passes every key
the part prints, and a missing one is a compile error that names it. A template takes the header
or footer it places, letter.with(header: continued(words: (page: [Página]))), because a page
rule written after its head would start a new page.
A document that lays out its own page applies base:
#show: base.with(title: [...], author: "...", preset: reading) sets the page, names the document
once, sets the body type, and installs the show rules for code and links, from press's
defaults, and draws nothing. A set rule written after the show rule changes any of these for
that document — #set par(leading: 0.58em) wins over base's own — so a repository with
spacing of its own writes only the lines that differ. footer is a page's footer,
#set page(footer: footer(status: [draft])): the title and status, then the stamp and page,
so a page parted from the rest still says what it is and which edition.
Without base, a document sets these itself: its body font, #set text(font: face-text, ...)
(without it the body renders in typst's own Libertinus Serif, without a word); its name, with
#set document(title: [...], author: "..."), which a PDF viewer shows and a page prints from
document.title; and the show rules it needs, raw and code for commands, link-note for
links, and #show math.equation: set text(font: face-math) for equations.
A longer document is a directory: new.sh makes docs/handbook/main.typ, and chapters go
beside it, #included from it. Give it the reading page, brief.with(preset: reading), use
typst's headings and #outline(), and import press in every chapter that uses its parts —
#include does not carry main.typ's imports. A4 is a preset with its paper changed,
(..card, paper: "a4"), given to brief as its preset or spread into #set page(...): the
preset margins are absolute, and the audit measures them on any page size. Landscape is
(..card, flipped: true).
A document built from data reads the data itself. json(), csv(), yaml(), toml() and
xml() read a file, by a path from the document or from the root, into typst values, and a string
shown as a value, #r.note or a cell of a sheet, is set as text and never read as markup. So
nothing in the data needs escaping: //, a hyphen before a digit, a line that starts with = or
-, and every character typst's markup uses print as written. Quotes and apostrophes are the one
exception: every template curls them as markup's are, so the data and the prose beside it print
one form of each.
#import "/third_party/press/lib.typ": *
#show: brief.with(title: [Stock], author: "Sam Example")
#let items = json("stock.json")
#sheet((auto, auto, 1fr), ([Item], [Count], [Note]),
..items.map(r => (r.item, num(r.count), r.note)).flatten())
In all, #num(items.map(r => r.count).sum(default: 0)) items.Counts, sums, filters, sorting and dates are typst's own: an array's sum, filter and
sorted, calc and datetime. A sum takes a default, sum(default: 0), since data can have no
rows, a month with no entries, and sum() of none stops the build; num() groups a count by
thousands. Logic that typst does not suit stays in a script, which writes
what it works out as data, a JSON file the document reads, and never as markup: a script that
writes .typ must escape every value it writes, and an escape that misses one case prints that
value wrong, or drops the rest of its line. The build follows the data. typst lists every file a
document reads, so a changed data file builds the document again and moves its stamp, with no
script to run first, and an unchanged one leaves it cached.
A letter applies letter: new.sh docs/to-landlord letter starts one.
#show: letter.with(title:, author:, contact:, date:) names the writer and the date once,
sets the reading page and the letterhead, and heads page two onward with the writer, the date
and the page; the letter carries no build stamp, since its reader is outside. The body is the
letter from the recipient on, ending with signature, which keeps the closing, and the
paragraph before it, on the same page as lines for an ink signature and a date, or a typed
sign-off with signed: false. re keeps reference numbers together and enclosures lists
what goes with the letter. To match a résumé, pass its face (face: face-sans) and centre the
letterhead (centred: true). A letter that composes its own page uses the same parts:
letterhead, dateline and continued().
A recipe applies recipe: new.sh recipes/black-beans recipe starts a card.
#show: recipe.with(title:, yield:, method:, time:, intro:) sets the card page and a header that
says what the cook is in for, serves 8 · stovetop · about 40 min, with a line under it saying
what the dish is. Page one is the whole cook: the ingredients in a sheet, the method in
steps, a costly step in warn. Whatever the card labels <depth> starts the
reference on a page of its own, under a line saying page one is the whole job, and a step points
there with typst's page reference, as in a brief. writein() leaves lines for what the cook
changed.
A résumé applies resume: new.sh docs/resume resume starts one.
#show: resume.with(title:, author:, headline:, contact:) sets one column to a page, with
no footer, under a head of the writer's name, the headline and the contact line. A section is a
heading, = Experience, and a role is entry(role, org, dates): one paragraph, the dates after
the organisation, so a parser reads the role, the organisation and the dates in that order however
it reads the page, and dates that do not fit on the line go whole to the next; flush: true sets
them at the right instead. size: sets the body, sz.body by default, and the headline and the
contact line follow it. heading-size: sets the headings, 1.1 times size where it is auto, in
heading-weight:, 700, with heading-tracking:, 0.5pt, between their letters; name-size: and
name-weight: set the name, sz.title and 700: #show: resume.with(..., heading-size: 14pt).
face: and centred: match a letter's. A heading's gaps are set rules after the show rule:
#show heading: set block(above: 8pt).
brief and its starter, template/main.typ, are written to six conventions for a document
someone acts on. They are brief's, not press's: the letter, recipe and résumé starters state
their own, and a document of any other kind composes its pages as suits it.
- Meat first. Whatever the reader must act on goes at the top.
- One idea per unit, opened by a bold lead. The lead is the highlight, pre-made.
- Units are self-contained. Sections get read out of order and returned to weeks later.
- A heading says what its section is for — act on this, how it works, reference — so skipping is deliberate.
- Colour is state, never decoration, and it gets a legend.
- No length cap. If a unit needs depth, give it depth or push it to a second layer — never delete it to fit a layout. If it does not fit, the layout changes.
From 1 and 6: the act layer comes first, the depth layer after it. The document labels
whatever opens the depth layer <depth>, typst's own label, and brief starts it on a page of its
own under an italic line saying nothing past it is needed to act. A pointer into it is typst's
own page reference, #ref(<label>, form: "page"), which prints "page 2" and links there. The
split is by role, not page number.
Tone is a string: "note" (slate) · "ok" (green) · "warn" (amber) · "bad" (red).
tones maps each to its colour and tint, for a part a document draws itself: tones.at("ok")
is (ok, ok-tint). With press's own calibration each colour is at least 4.5:1 on its tint, so a
label set in it on the tint reads, as a chip's and a callout's do.
shapes maps each to the shape a part draws before a state, so the state reads without its
colour: (note: none, ok: "square", warn: "triangle", bad: "octagon"). Each means to a reader of
safety signs what its state means. The EU's signs at work, Directive 92/58/EEC, give the green sign
for "No danger" a square, a warning a triangle, and red "Stop, shutdown"; on a US road the octagon
is STOP and nothing else, in the MUTCD's 11th edition, Section 2A.05. There a circle is a
prohibition or an order, and a diamond a hazardous chemical's pictogram, so no state draws either
unless a document gives it, and note, no state at all, draws none. Every template takes shapes:
#show: brief.with(shapes: (ok: "circle")) draws a circle for ok wherever the document shows it,
its chips, units, callouts and sections' headings, and every other state keeps press's. A part's
own shape changes its own alone.
The parts that take any number of items, letterhead, re, enclosures, units, sheet,
steps, flow, src and sources, take them by position. An argument given by name that a part
does not take stops the build, naming it, as typst stops for any function: letterhead(contact: […]) is refused, where letterhead([…]) prints the contact line.
A part takes each value it draws with as an argument, press's own its default, so a document draws
one otherwise without copying it: callout.with(stroke: (left: 2pt)), or stamp.with(style: "normal"). Each is named for the typst parameter it sets, fill, stroke, inset, radius,
size, weight, tracking or style, and color for the part's accent; where a part draws
several pieces, the piece's name goes first, label-size or meta-fill, as typst's own
body-indent does. In a part drawn as a box, fill is the box's, and its text's colour is a
piece's, body-fill; in a part that is only text, colophon, src, footer, link-note or
heading-label, fill is the text's, as in text(fill:). auto follows the part's tone or its
color: a callout's fill: auto is its tone's tint. A stroke takes any form typst takes, a
dictionary of sides among them, (left: 2pt + red), and one given a width alone is drawn in the
colour the part draws that line in. One of press's colours given is drawn as the calibration sets
it, and a line no thinner than its floor; a colour of the document's own is drawn as given. On a
fill of the document's own, a part sets press's inks and highlighted code at 4.5:1 or more on it, as
on press's tints; on a fill so dark that black reads under 4.5:1 on it, navy among them, the colour
of the text on it is the document's.
| Call | For |
|---|---|
base(title:, author:, preset: card, calibration: calibration, shapes: shapes, lang: auto) |
Template: the page, the document's name, the type and the show rules, with nothing drawn, for a document that lays out its own page. #show: base.with(...). Every template takes calibration, a printer's numbers, which set its margins, inks, tints and rules: Printing says how. Every template takes shapes, the shape each state draws, as Vocabulary gives them: shapes: (ok: "circle") changes ok's for the whole document, every other state keeping press's. Every template takes lang too, the document's language, lang: "es" for Spanish, which sets its words and its PDF's language alike, the language screen readers and translation software go by. Left out, the language is the document's own, English unless it sets another at its start, #set text(lang: …) before the show rule, as typst's accessibility guide gives it; set under the show rule, it reaches the words but not always the PDF's language, which typst takes from the first content it meets. |
brief(title:, author:, meta:, legend: none, header: header, footer: footer(), preset: card, calibration: calibration, shapes: shapes, lang: auto, caps: true, depth: [...]) |
Template: the general-purpose document's page, type, show rules, header and footer. header is the header, which brief calls with meta: header: header.with(color: steel) draws it with any of header's arguments, and none leaves it out. A section is a heading: = draws a band, heading-band, and == a labelled hairline, heading-label, slate unless section(color:) says otherwise; a rule of the document's own draws either otherwise, #show heading.where(level: 1): heading-band.with(fill: navy), and under caps: false passes caps: false too. Whatever the document labels <depth> starts its depth layer on a page of its own under depth, a line saying nothing past it is needed; none prints no line. legend, the note and then the chips for the states its pages carry, prints under the header and says what its colours mean, its note kept apart from its chips however long: legend: ([Colour is state.], chip([DONE], "ok")). #show: brief.with(...). |
letter(title:, author:, contact:, date:, face: face-text, centred: false, header: continued(), preset: reading, calibration: calibration, shapes: shapes, lang: auto) |
Template: a letter's page, letterhead and date, and the page-two header. preset is the page: preset: (..reading, paper: "a4") sets it on A4. Code is set as brief sets it, in press's mono face. #show: letter.with(...). |
resume(title:, author:, headline:, contact:, face: face-text, centred: false, size: sz.body, accent: slate, caps: true, heading-size: auto, heading-weight: 700, heading-tracking: 0.5pt, name-size: sz.title, name-weight: 700, preset: (paper: "us-letter", margin: (x: 1.05in, y: 0.5in)), calibration: calibration, shapes: shapes, lang: auto) |
Template: a résumé's page, type and head, and its headings as ruled sections. Code is set as brief sets it, in press's mono face. #show: resume.with(...). |
recipe(title:, author:, yield:, method:, time:, intro:, header: header, footer: footer(), preset: card, calibration: calibration, shapes: shapes, lang: auto, caps: true, depth: [...]) |
Template: a recipe card's page and header, its yield, method and time beside the dish, and its headings as brief draws them, with heading-band and heading-label. header is the header, which recipe calls with the yield, method and time as its meta: header.with(…) draws it otherwise, and none leaves it out. Whatever the card labels <depth> starts its reference on a page of its own under depth. Code is set as brief sets it, in press's mono face. #show: recipe.with(...). |
unit(label, tone, lead, body, caps:, breakable: auto, shape: auto, fill: paper-tint, stroke: auto, inset: (x: 8pt, y: 6.5pt), size: sz.fine, color: auto, lead-weight: 700) |
The workhorse. One idea: label, bold lead, body. Its tone's shape goes before its label, as a chip's does, so its state reads on a grey printout; shape takes another, or none. Kept whole or broken as code's block is. |
units(..items, pack: "stacks", gutter:, spacing:) |
A group of units. "stacks": two columns, the units in the order given, down the left and then the right, split where their measured heights come out most nearly level, the left the longer where two splits are as level; a group that runs past its page fills each page's left column and then its right, as sheet(across: 2) does, its last page split as a group that fits is, and keeps each unit whole where it fits in a column. "grid": rows aligned, when the pairing means something. "single": one column. |
header(meta: none, color:, face:, size:, weight: 700, fill: ink, meta-size: sz.fine, meta-fill: ink-soft, rule-stroke: 2pt) |
A document's header: its title, the one the document names itself with, on the left, meta on the right, and a rule beneath, clear of the title's descenders. A title that fits on one line keeps it, and meta wraps beside it. Beside a title too long for one line, meta keeps its one line where it fits in half the line, and else the two share the line in halves. |
eyebrow(body, color:, caps:, size: sz.fine, weight: 700, tracking: 1.2pt) |
Small tracked-out uppercase label. |
section(body, color: slate) |
A section whose headings show its state: inside it, heading-band and heading-label, a template's = band and == label, take color, any colour, where their fill is auto, and every other heading stays slate, and where it is ok, warn or bad they draw that state's shape too. Wrap one heading, #section(color: bad)[= Red-flag signs], or the whole section; a label on the heading stays, <depth> among them. #show: section.with(color: steel) colours a whole document's. |
heading-band(it, fill: auto, body-fill: white, inset: (x: 8pt, y: 4.5pt), radius: 1pt, size: sz.fine, weight: 700, tracking: 1.2pt, caps: true) |
Show rule for a heading, drawn as a band: its text on fill, section(color:)'s colour where it is auto and slate outside one, in body-fill, with the section's shape where its colour is a state's. brief and recipe draw = with it; a rule of the document's own draws it otherwise: #show heading.where(level: 1): heading-band.with(fill: navy). body-fill, white, is not one of press's inks, which a part sets at 4.5:1 or more on a fill of the document's own, so a pale fill takes a dark body-fill: heading-band.with(fill: slate-tint, body-fill: ink). |
heading-label(it, fill: auto, size: sz.fine, weight: 700, tracking: 1.2pt, rule-stroke: 0.7pt + rule-hair, caps: true) |
Show rule for a heading, drawn as a label over a hairline: its text as eyebrow sets it, in fill, section(color:)'s colour where it is auto and slate outside one, with the section's shape where that colour is a state's, over rule-stroke. brief and recipe draw == with it; a rule of the document's own draws it otherwise: #show heading.where(level: 2): heading-label.with(fill: ink). The label is kept with its hairline across a page break. |
chip(label, tone, boxed: true, shape: auto, fill: auto, stroke: auto, inset: (x: 4pt, y: 2pt), radius: 1pt, size: auto, weight: 700, color: auto) |
A state, shown by its tone's colour and a shape drawn before its label, so it reads on a grey printout too: the template's shapes, press's a square for ok, a triangle for warn, an octagon for bad and none for note. Boxed, a pill for a legend; boxed: false, the shape and the label alone, bold in the tone's colour at the text's own size, for a value in a table whose every cell has a state: chip([4], "ok", boxed: false). shape takes "circle", "triangle", "square", "diamond" or "octagon", or none. |
callout(body, tone: "note", label: none, size:, shape: auto, caps: true, fill: auto, stroke: auto, inset: (x: 10pt, y: 8pt), label-size: sz.fine, color: auto) |
Aside that must not be missed. Its tone's shape goes before its label, or before its body where it has none; shape takes another, or none. |
panel(body, label: none, color: slate, caps: true, fill: none, stroke: 0.6pt + rule-mid, inset: 10pt, radius: 1pt, label-size: sz.fine) |
Boxed block, no tone semantics. |
code(body, breakable: auto, fill: paper-tint, stroke: 0.6pt + rule-mid, inset: (x: 7pt, y: 6pt), radius: 1.5pt) |
Code-block treatment; the document installs it as a show rule, and under a template, which installs it, a rule of the document's own draws it otherwise: #show raw.where(block: true): code.with(fill: none). A line too long for its block wraps, and the audit fails on it. A block is kept whole where it fits on a page, and one that does not fit starts the next; a block taller than a page breaks across pages. breakable: true lets it break at any page turn, and false keeps it whole, so that one taller than a page runs off its foot. |
link-note(it, fill: slate, stroke: 0.5pt, offset: 1.6pt, note: true) |
Show rule for links: coloured and underlined, address footnoted for paper; in a page's header or footer, which typst sets no footnote from, the address in parentheses after the text. stroke is the underline, in the link's colour unless it names its own, and none draws none; offset is its distance below the text; note: false prints the link alone. Under a template, which installs it, a rule of the document's own draws links otherwise: #show link: link-note.with(note: false). |
item(n, title, body, color:, size:, breakable: auto, weight: 700, body-indent: 5pt, below: 6pt) |
One numbered entry: its number, its title and its body. Kept whole or broken as code's block is. For a run of steps, steps. |
steps(..steps, color: slate, size: sz.body, start: 1, breakable: auto, weight: 700, body-indent: 5pt + 0.25em, spacing: 0.8em + 6pt) |
Numbered steps, as one list: each (title, body), or (title, body, color) for a step in a colour of its own, warn for the step a mistake ruins. Each step's number is beside its title and its body under the title. They are typst's numbered list, so a tagged PDF marks them as one and a screen reader moves from step to step. Each is kept whole or broken as code's block is. |
sheet(cols, head, ..rows, size:, blank: 0, across: 1, gutter: 9pt, breakable: auto, stroke: none, blank-stroke: 0.4pt + rule-hair, inset: (x: 5pt, y: 4pt), head-fill: slate-tint, stripe-fill: paper-tint, head-weight: 700, blank-height: 8mm) |
A table of any number of columns: zebra rows, and a header that repeats across pages. Its cells are set at size, code included. The head is set in head-weight on head-fill, and every other row after it on stripe-fill, none for no stripes. A table that is read draws no rule round its cells, since its head's fill and its stripes mark its rows, and a blank row draws one round each, a guide for the pen: stroke rules the cells given and blank-stroke the blank ones, none for no rules, and a width alone draws in rule-hair. A sheet filled in by hand in the cells it is given rules them too: #sheet(..., stroke: 0.4pt). inset is a cell's padding, a length or a dictionary of sides, a side it leaves out keeping press's. A row is kept whole where it fits on a page, and one that does not fit starts the next; a row taller than a page splits. breakable: true lets every row split, and false keeps every one whole. blank adds empty rows, each blank-height tall, room to write in. across: 2 sets a long, narrow sheet in two columns, gutter apart, read down each column and then the next, with the header atop every column; where it ends, its last rows are shared between the columns by height, so the columns end level. A cell given as typst's table.cell keeps its span and its other fields, and a table.hline, table.vline or table.footer is drawn as in typst's table: a totals row is a footer. The sheet places its cells in the order given, so a cell takes no x or y, and rows a span ties together are kept together, as one row is. Under across, the footer closes the last column, and a line takes no y. |
writein(n, label: none, pitch: 8mm, label-size: sz.micro, label-fill: ink-soft, stroke: 0.5pt + ink) |
Lines to write on by hand, each after its label: writein(3, label: [date]). Print only; typst writes no PDF form fields. |
checkbox(checked: false, size: 4mm, stroke: 0.6pt + ink, radius: 1pt) |
A box to tick by hand, 4mm square in any text it sits in, the box the Australian Bureau of Statistics' forms standard gives a closed question: a smaller box is hard to tick, and people write in a larger one. It goes inline, in a sheet() cell, or as a list's marker, #set list(marker: checkbox(), body-indent: 0.6em), for a checklist. It is centred on the lowercase beside it, and on the text of a sheet's next cell too: a box taller than its line rises past the line's top, as far as the descenders of the line above, and the line grows by the rest. checked: true marks it with an X. The audit does not count an empty box. |
signature(name: auto, closing: none, signed: true, dated: true, width: 2.6in, words: (date: [Date])) |
Where a document is signed: the closing, kept on its page with the paragraph before it, whole, under each of press's templates, then lines for an ink signature over the signer's name and a hand-written date, or with signed: false a typed sign-off. name is the document's author unless given; a document several people sign calls it once for each. width is the ink line, and a relative width is of the room it has: width: 100% fills a grid's cell. dated: "below" puts the date line under the name instead of beside it, so two signers fit side by side: a two-column grid of signature(width: 100%, dated: "below"). |
flow(..steps, stroke: 0.6pt + rule-mid, inset: (x: 9pt, y: 6pt), radius: 1pt, size: sz.body, arrow-fill: ink-faint) |
Left-to-right stage sequence. |
decision(n, q, note, color: bad, breakable: auto, size: sz.fine, weight: 700, badge-inset: (x: 4.5pt, y: 3pt), note-fill: ink-soft, below: 5.5pt) |
Open question needing an answer, under its number in a filled badge. Kept whole or broken as code's block is. |
colophon(body, size: sz.micro, fill: ink-faint, style: "italic", rule-stroke: 0.5pt + rule-hair) |
The note at a document's end about the document itself: where its facts came from and when they were read, what it was made from, how it is kept. Its hairline stays with its words across a page break. |
addendum(date, body, label: [Later], color: ink-faint, caps: true, stroke: auto, inset: (left: 0.8em), body-fill: ink-soft) |
A note set under an entry later, beside what it amends rather than over it: a revisit, a retelling, a correction. color draws its edge and label. Its label and date stay with its body across a page break, and its label is no larger than the text around it, as in a sheet's cell. |
src(..keys, size: sz.micro, fill: ink-faint) |
Sources cited by number, in the text: src("wells", "survey") prints [1, 3], small and faint, the numbers sources() gives those keys. A key no sources() gives stops the build. |
sources(..entries, size: sz.micro, across: 2, gutter: 10pt) |
The numbered list of the sources a document cites, where they close it: each (key, title, address) is numbered in the order given and printed on a line, its address without https:// and its link whole. A second list's numbers go on from the first's, so a marker's number is the one its source prints with. An address of none prints the title alone, and a key given twice, in one list or in two, stops the build. |
unsourced(body, kind: "open", color: auto, weight: auto, style: auto, words: (estimate: [estimate])) |
A value the document prints without having read it from a source, marked by its kind. "open": what only the owner can supply, left to fill in, in red and bold; the audit says how many remain. "missing": what no one will supply, #unsourced(kind: "missing")[not recorded], in faint italic where a blank would read as none; the audit does not count it. "estimate": a figure printed but guessed, #unsourced(kind: "estimate")[\$18.00], followed by the word estimate, in amber and bold; the audit says how many. The audit fails for none of them. color, weight and style change the kind's look; #let est = unsourced.with(kind: "estimate") names a kind used often. A template's author takes a name so marked, author: unsourced[Your name]: the PDF's author is its words, and it is counted once, however many places print it. |
num(n, words: (thousands: [,])) |
A number with its whole part grouped by thousands, from four digits, so a count or an amount read from data is not misread at a glance: num(3465) prints 3,465, and num(decimal("1234567.50")) 1,234,567.50. Its decimals and its sign stay as typst prints them. It takes an int, a float or a decimal, so a figure read as text is converted first, num(int(row.cows)). A sum of money is a decimal, num(decimal(row.amount)): typst prints a float in its shortest form, so 12480.50 read as a float prints 12,480.5, and a sum of floats can print 0.30000000000000004. In TOML or JSON, where a number with cents is a float, write the sum as a string. A figure is kept whole, so a line never breaks inside it. words: (thousands: [#sym.space.thin]) groups it with a thin space, as NIST SP 811 groups digits. |
updated(words: (updated: [updated], unstamped: [...])) |
When the content last changed, as the stamp records it. For the footer. |
footer(status: none, edition: updated(), size: sz.micro, fill: ink-faint) |
A page's footer: the title and status, then updated() and the page of the total, kept apart from them however long the title. #set page(footer: footer()), or a template's footer: footer(status: [draft]). A title marked with unsourced() is counted once, though every page prints it, and a template counts it where nothing prints it, as a letter's; a head of the document's own that prints the title does it with typst's title(), so it is counted there. A status marked with unsourced() is counted once too. |
press-version |
The version of press a document was built with. Never typed by hand. |
scan(body) |
Marks content the document did not set, a scanned or embedded page, for the audit to leave out; what is set over it is still audited. |
form(blank, probe: none, body) |
One page of a flat PDF form, filled in: the page is the blank's own, its size and edge to edge, with none of the document's header, footer, background or foreground, and the blank a scan() under the answers. #form(image("application.pdf", page: 2))[...]; the document makes the image, so the path is its own. probe: 18pt draws a measuring grid over the page, a line every 18pt, every fourth one heavier, and where two heavy lines cross, that point's x and y in points, for reading where each blank is; the audit fails while it is on. |
tick(x, y) |
A box marked with an X, centred on the point given. |
letterhead(..contact, face: face-text) |
A letter's head: the writer (the document's author), a contact line, a rule. A link that shows its own address needs no footnote. |
dateline(date) |
A letter's date, written once where it prints; continued reads it, each page taking the last one printed on it or before it, so a document of several letters dates each page by its own. |
re(..refs, words: (re: [Re:])) |
A letter's subject line; each reference stays whole and copyable. |
enclosures(..items, words: (singular: [Enclosure], plural: [Enclosures])) |
What goes with a letter, one item to a line. |
continued(words: (page: [Page])) |
A header for page two onward of a letter: writer, date, page, each kept apart from the next however long the writer's name. set page(header: continued()). In a document of several letters, each letter's first page, the one its letterhead is on, is left to it, and its pages are numbered from there. |
entry(role, org, dates, stacked: false, flush: false) |
A résumé's role: role, organisation and dates in one paragraph and in that order on the line, the dates after the organisation and kept whole, so a parser reads them in order however it reads a page; stacked puts the organisation and its dates on a line of their own. flush: true sets the dates at the right of the line instead, which a parser that groups a page's text by where it stands reads after every role. It stays with what follows, so no page ends on a role. |
Tokens. Colours ink, ink-soft, ink-faint, rule-hair, rule-mid, paper-tint,
slate, slate-tint, steel, and ok/warn/bad each with a -tint. Faces face-text,
face-display and face-sans (Noto Sans), face-mono (Noto Sans Mono) and face-math (Noto
Sans Math) — use these, never font names as strings. Sizes sz.micro 8.6 · fine 9.4
· small 10.2 · body 11 · lead 12.5 · head 14.5 · title 21 · hero 28. Page presets
card, as many lines as a page holds, and reading, wide margins for a document read at length,
each with a line of about 88 characters at sz.body, spread with #set page(..card), and
calibration, the printer's numbers they are set for, which every template takes by default;
printer() gives each printer press records, and calibrated(calibration) hands back every
preset set for a printer's own.
When the vocabulary does not fit, build it in the document.
- Fonts fail in three ways, and only one warns. A missing family warns and still ships,
and the audit fails it; a missing glyph is drawn from typst's own fonts silently, or printed
as an empty box, and only the audit catches it; a missing weight or style substitutes the
nearest face press has silently, and nothing catches it: italic code prints upright, since
Noto Sans Mono has no italic.
Read
FONTS.mdbefore using any symbol, weight or style. - Some symbols are in no vendored face. Noto's faces draw
✓ ✗ ▸ ⚠ ☐ ⛔ 📋and many more, but⚓ ♻ ⚙render from typst's DejaVuSansMono and⎋from its NewCMMath, and a character no face draws, such as🔧or漢, prints as an empty box. Build a probe and audit it. unit,callout,panel,addendum,eyebrow, and brief's, recipe's and résumé's headings uppercase their labels. "pH" becomes "PH", "µS" becomes "ΜS" (a capital Mu). Passcaps: falseto the part, or to the template for its headings, whenever case means something.- A link in a heading is footnoted twice once there is an outline. The contents repeat the heading and its footnote. Keep links out of headings.
- A table that crosses a page loses its header unless it uses
table.header.sheetdoes; a hand-rolledtable()does not. - Markdown habits break typst:
**bold**warns and vanishes (use one*),+ thingat a line start becomes a list,/ thingis a compile error. Reword rather than escape. - Only code, math and an address keep a straight quote. typst curls a quote typed in
markup, and every template curls one in a string the same way, so a title given as one, data
and prose print one form. An escaped
\'curls too. A quote that must print straight, in a command or a value to copy, goes in raw text,`grep 'x'`, or underset smartquote(enabled: false). - An apostrophe after a digit prints as a prime. typst reads a quote after a digit as a foot
or an inch mark, so
2026'sprints 2026′s, in markup or from data, as12"prints 12″. Type the apostrophe itself,2026’s, or reword. - A
#letin markup ends at its line break. With#let rows = log.filter(f)and.sorted(key: k)on the next line,rowsholds only the first line, unsorted, and.sorted(key: k)prints on the page as text. In a file of helpers nothing prints, and the value is simply wrong. Wrap the expression in parentheses,#let rows = (log.filter(f) ...), or write it in a code block,#{ ... }, where a chain carries on across lines. rev()aftersorted(key:)also reverses entries that share a key. typst's sort keeps entries with equal keys in their order, andrev()turns those round with the rest, so a log sorted newest first lists each day's entries in the reverse of the order they were written, andsorted(by: (a, b) => a > b)does the same. Reverse it first, then sort, then reverse it again:log.rev().sorted(key: r => r.date).rev().- A minus sign is not a hyphen. typst prints U+2212, the typographic minus, for a hyphen
typed before a digit (
ls -1,-12.34567) and for a negative number it shows, in content or throughstr(). No keyboard has it, so a coordinate, a command or a code copied from the PDF will not paste into a map or a shell. Raw text and a string shown as is (#"-1") keep the hyphen. For a number,str(n).replace("\u{2212}", "-")keepsstr()'s format, whererepr()writes-2.0for −2 and-1e-7for −0.0000001.
Print at 100% — "Actual size", never "Fit to page". The presets are exactly US Letter and keep all ink at least 0.5in from every edge, clear of a band of 0.48in at each edge that a printer cannot print, and further where a calibration's band is wider; a document that overrides the margin or places content absolutely can break that, and the audit measures it.
A printer's own calibration. The presets are set for press's own calibration, calibration
in tokens.typ: the median, number by number, of the printers press records in
printers.csv at normal quality, each by its latest printing. While it records
none, it is what press used before it had a sheet, so a page prints as it always has. A printer is
set by its own numbers, the calibration sheet's readings, given to a template as its
calibration; a number left out takes press's:
| key | the reading | what it sets |
|---|---|---|
edges: (top:, bottom:, left:, right:) |
2 and 3: the band it cannot print at each edge, the larger of front and back | each margin, widened by as much as the band exceeds 0.48in, so the page's ink, its header and footer included, clears it; and the audit's floor at that edge |
ink: |
4: the lightest grey that reads, as its contrast, 6 for 6:1 |
each of press's inks lighter than it, and each colour typst highlights code in, darkened to it, its hue kept; with no printer recorded, press's is warn's, 5.30:1 |
fill: |
5: the palest grey that prints an even fill | each of press's tints paler than it, darkened to it; with no printer recorded, press's is paper-tint's, 1.07:1 |
rule: (rule-hair:, rule-mid:, slate:, ink:) |
6: the thinnest rule that prints unbroken in each colour | each line a part draws, at least as wide as the floor of the darkest of those colours no darker than its own; with no printer recorded, press's are the thinnest it draws, 0.4pt in rule-hair and 0.5pt in the others |
#show: brief.with(title: [Rack power], author: "Your name",
calibration: (edges: (top: 4mm, bottom: 17mm, left: 6.5mm, right: 6.5mm), ink: 6))A band no wider than 0.48in leaves the margins as they are, one narrower than press's lets the
audit pass ink nearer that edge, and an ink or a fill below press's lightest, or a rule thinner
than its thinnest, leaves press's colours and lines as it draws them. press's functions take
every preset from the calibration their template was given, and text the template sets in one of
press's inks takes the darkened ink, a document's own text(fill: ink-faint) among it. Text a
part sets on one of press's tints, in a chip, a callout, a unit, a code block or a sheet's head
and stripes, a document's own in it included, is darkened further where it would read under
4.5:1 on the tint as the calibration sets it, its hue kept, so a fill that darkens the tint keeps
it readable there; the same ink on white keeps the calibration's. Code typst highlights is held
to the same floors, though its colours are typst's and not press's: each is darkened from
typst's, its hue kept, to the calibration's ink, and on a tint to 4.5:1 on it, where it would
read lighter. Code given a theme of the document's own, raw(theme:), keeps its colours. For what
a document draws itself, calibrated(calibration) hands back the presets set for a calibration,
by name: #let c = calibrated(calibration), then rect(fill: c.paper-tint),
line(stroke: c.rule.rule-hair + rule-hair) or #set page(..c.card).
A printer press records. Each printer in printers.csv is a calibration by its make and
model, so a repository that prints on one needs no sheet of its own. printer("Make Model") is
its latest printing at normal quality, and printer("Make Model", mode: "economy") its latest in
economy mode; printer() is press's own calibration, and printer(mode: "economy") the median
of the printers press records in economy mode. A printer or a mode it does not record stops the
build, saying what it records.
#show: brief.with(title: [Rack power], author: "Your name",
calibration: printer("Make Model", mode: "economy"))A number changes over a printer's as over any calibration, (..printer("Make Model"), ink: 6);
a band or a rule given in a dictionary of its own takes press's for the others, so one that keeps
the printer's is written into its: let p = printer("Make Model"), then
(..p, edges: p.edges + (bottom: 17mm)).
A repository whose documents print on one printer writes its numbers once, in a file of its own that its documents, or its shared template, import after press:
#import "/docs/printer.typ": calibration // which holds: #let calibration = (ink: 6)
#show: brief.with(title: [Rack power], author: "Your name", calibration: calibration)Every template takes a calibration, base among them, the template for a document that lays out
its own page. A page rule that spreads a preset itself, #set page(..calibrated(calibration).card),
is widened for the bands, but the audit holds it to press's own; a document that lays out its own
page for a printer of its own takes base, which records them.
calibration.typ measures a printer by numbers, each of its scales numbered by its value: the
band it cannot print at each edge of each side of a sheet, whether it prints at actual size, and
the lightest ink, the palest fill, the thinnest rule and the darkest solid it holds. Build it like
any document (third_party/press/calibration.typ), print it on the paper and printer you actually
use — at Actual size, duplexed on the long edge, once at normal quality and once in economy mode —
and write the numbers on its first page, which says what each one sets. Its edge gauges print
into the edges on purpose, so it accepts the audit's ink-margin finding.
Each printer the sheet is printed on for press is recorded in printers.csv, by
make and model, with what it read, and PRINTERS.md says how one is recorded.
The copy of press a repository holds is the version it builds with. Move only to a release,
never to a commit on main between releases. 0.1.0 was the Typst package @vts/press:0.1.0,
used from a git submodule at vendor/press. A repository moving past it removes the
submodule (git rm vendor/press), runs the installer in third_party/, and changes each
import to /third_party/press/lib.typ, and any other vendor/press path, such as a
justfile's import, all in one commit.
Copyright © 2026 Tyler Vigario. AGPL-3.0-or-later — see LICENSE. What you
typeset with it is yours: a compiled PDF carries no licence from the kit.
The faces under fonts/ are Noto, under the SIL Open Font License 1.1 (OFL-1.1), with each
project's licence text in fonts/licenses/. See FONTS.md.