Clean Sheets
Clean, modern exercise sheets for university courses. The package provides two page layouts, an exercise overview, statement boxes, syntax-highlighted code, and small helpers for mathematical and German-language course material.
Quick start
Create a ready-to-edit project:
typst init @preview/clean-sheets:0.3.0
Or import the package in an existing document:
#import "@preview/clean-sheets:0.3.0": base-template, ex_box, qed
#show: body => base-template(
1,
[Linear Algebra I],
[Prof. Ada Example],
[Dr. Alan Assistant],
3,
([Jane Doe], [John Doe]),
[Taylor Tutor],
show-logo: false,
body,
)
= Exercise 1
#ex_box(heading: [Warm-up], points: [10 points])[
Prove that $1 + 1 = 2$.
]
The proof is immediate. #qed
Templates
base-template
The general exercise-sheet layout. Its required positional arguments are
sheetnumber, course, prof, assistant, exercises, students, tutor,
and body.
Optional arguments:
tutor-label: custom label beside the tutor name (none)sheet-label: name displayed before the sheet number ([Exercise Sheet])logo: logo content, usuallyimage("logo.png")or similar (none)track-heading-counter: whether to track heading counters for custom box components (see below) (true)page-numbering: custom page-numbering functiontable-header-smallcaps: use small capitals in table headers (false)text-fontandmath-font: font families with portable fallbacksno-pagebreak: whether to avoid page breaks between exercises (level 1 headings) (true)show-credits: display the package credit (false)credits: custom credit content
computer-science-template
A denser layout with (German) submission and attestation dates, optional digit
grouping, and decimal-comma formatting. Required arguments are sheetnumber,
course, students, semester, university, institute, and body.
Optional arguments:
subtitle: custom subtitle for this exercise sheet (none)department: custom department name (none)submit-until: adatetimeobject for the submission deadline (none)attestations-from: adatetimeobject for the beginning of the attestation period (none)attestations-until: adatetimeobject for the end of the attestation period (none)info-text: custom text to be displayed in the very beginning of the document (none)track-heading-counter: whether to track heading counters for custom box components (see below) (false)page-numbering: custom page-numbering functiongroup-digits: whether to group digits in numbers, e.g.1 000instead of1000(true)decimal-comma: whether to use a decimal comma instead of a decimal point (false)raw-syntaxes: a list of syntax names to be rendered as raw code blockstext-fontandmath-font: font families with portable fallbackstable-header-smallcaps: whether to use small capitals in table headers (false)no-pagebreak: whether to avoid page breaks between exercises (level 1 headings) (false)
Components and helpers
exercise: exercise box with optionalheading,points,color,stroke-color,text-color, andradiusdefinition,axiom,theorem,lemma,corollary: numbered statement boxes; each takes a body and the optional argumentslabel,nobreak, andlang.
There are also the aliasessatzandkorollarfor German-language documents.CalandComplement: calligraphic and complement math helperschevrons: wraps comma-separated math content in angle bracketsgerman-date-time: formats a datetime in Germangroup-digits-text: groups digits in a stringqed: right-aligned square;jb: justified line breaksmallcapsandupper: tracked small-cap and uppercase helpers
See examples/base.typ and examples/computer-science.typ for complete source
examples.
Fonts
The default font stack prefers Fira Sans, Fira Math, and Fira Code, with fallbacks that are available in a standard Typst installation:
- body text:
Fira Sans, falling back toNew Computer Modern - math:
Fira Math, falling back toNew Computer Modern Math - code:
Fira Code, falling back toDejaVu Sans Mono
The Fira fonts are available by default in the Typst web app. The local Typst CLI, however, only bundles a small set of fonts, including New Computer Modern, New Computer Modern Math, and DejaVu Sans Mono. When the Fira fonts are not installed locally, Typst therefore uses the respective fallback fonts.
You can check which fonts are available to your local Typst installation with
typst fonts. If you prefer different fonts, pass text-font and math-font
to either template.
License and credits
Clean Sheets is licensed under the MIT License. The bundled
assets/OneHalfLight.tmTheme is the MIT-licensed One Half Light theme by Son
Pham; see LICENSE-OneHalfLight.