# 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. ## Examples ### Base template A simple exercise sheet using the 'base-template' layout. A simple exercise sheet using the `base-template` layout. [View source code](examples/base.typ) ### Formal template A formal exercise sheet using the 'formal-template' layout. A formal exercise sheet using the `formal-template` layout. [View source code](examples/formal.typ) **Note:** The `formal-template` layout is currently designed for **_German-language courses only_**. Full customisation may be supported in future releases. ## Quick start Create a ready-to-edit project: ```sh typst init @preview/clean-sheets:0.3.0 ``` Or import the package in an existing document: ```typst #import "@preview/clean-sheets:0.3.0": base-template, exercise, qed #show: body => base-template( 1, [Linear Algebra I], [Prof. Ada Example], [Dr. Alan Assistant], 3, ([Jane Doe], [John Doe]), [Taylor Tutor], show-credits: true, body, ) = Exercise 1 #exercise(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: - `semester`: custom semester name (`none`) - `tutor-label`: custom label beside the tutor name (`none`) - `sheet-label`: name displayed before the sheet number (`[Exercise Sheet]`) - `logo`: logo content, usually `image("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 function - `table-header-smallcaps`: use small capitals in table headers (`false`) - `text-font` and `math-font`: font families with portable fallbacks - `no-pagebreak`: whether to avoid page breaks between exercises (level 1 headings) (`true`) - `show-credits`: display the package credit (`false`) - `credits`: custom credit content ### `formal-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`: a `datetime` object for the submission deadline (`none`) - `attestations-from`: a `datetime` object for the beginning of the attestation period (`none`) - `attestations-until`: a `datetime` object 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 function - `group-digits`: whether to group digits in numbers, e.g. `1 000` instead of `1000` (`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 blocks - `text-font` and `math-font`: font families with portable fallbacks - `table-header-smallcaps`: whether to use small capitals in table headers (`false`) - `no-pagebreak`: whether to avoid page breaks between exercises (level 1 headings) (`false`) ### `modern-template` A modern layout, heavily inspired by the [`grape-suite`](https://github.com/piepert/grape-suite) package. The only required argument is `body`. Optional arguments: - `seminar`: title for the seminar (`[]`) - `professor`: professor name (`[]`) - `assistant`: assistant name (`none`) - `semester`: current semester (`[]`) - `sheet-title`: title for the exercise sheet (`[]`) - `name`: student name (`[]`) - `date`: date of submission (`datetime.today()`) - `exercise-label`: label for exercises (`[Exercise]`) - `hint-label`: label for hints (`[Hint]`) - `theme`: custom theme for the document - `decimal-comma`: whether to use a decimal comma instead of a decimal point (`false`) ## Components and helpers - `exercise`: exercise box with optional `heading`, `points`, `color`, `stroke-color`, `text-color`, and `radius` - `definition`, `axiom`, `theorem`, `lemma`, `corollary`: numbered statement boxes; each takes a body and the optional arguments `label`, `nobreak`, and `lang`. There are also the aliases `satz` and `korollar` for German-language documents. - `Cal` and `Complement`: calligraphic and complement math helpers - `chevrons`: wraps comma-separated math content in angle brackets - `german-date-time`: formats a datetime in German - `group-digits-text`: groups digits in a string - `qed`: right-aligned square; `jb`: justified line break - `smallcaps` and `upper`: tracked small-cap and uppercase helpers See `examples/base.typ` and `examples/formal.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 to `New Computer Modern` * math: `Fira Math`, falling back to `New Computer Modern Math` * code: `Fira Code`, falling back to `DejaVu 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](LICENSE). The bundled `assets/OneHalfLight.tmTheme` is the MIT-licensed [One Half Light theme](https://github.com/sonph/OneHalf) by Son Pham; see [`LICENSE-OneHalfLight`](LICENSE-OneHalfLight). Finally, since the `modern-template` layout is heavily inspired by the [`grape-suite`](https://github.com/piepert/grape-suite) package, we also include its MIT-license for by Tristan Pieper; see [`LICENSE-grape-suite`](LICENSE-grape-suite).