Initial commit

This commit is contained in:
Popa committed 2026-09-10 20:02:22 +02:00
commit d524878451
18 files changed
+1852

No files matched your search

+99
View File
@@ -0,0 +1,99 @@
# 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:
```sh
typst init @preview/clean-sheets:0.2.2
```
Or import the package in an existing document:
```typst
#import "@preview/clean-sheets:0.2.2": 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`: name displayed before the sheet number (`[Exercise Sheet]`)
- `logo`: logo content, usually `image("logo.png")` (`none`)
- `show-logo`: whether to display the provided logo (`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
- `show-end-message`: display the package credit (`false`)
- `end-message`: custom credit content
### `computer-science-template`
A denser layout with submission and test dates, optional digit grouping, and
decimal-comma formatting. Required arguments are `course`, `students`,
`semester`, `university`, `institute`, and `body`.
Optional arguments are `sheetnumber`, `subtitle`, `department`, `submit_until`,
`testats_from`, `testats_until`, `group-digits`, `decimal-comma`,
`page-numbering`, `raw-syntaxes`, `info-text`, `text-font`, `math-font`,
`table-header-smallcaps`, and `no-pagebreak`.
## Components and helpers
- `ex_box`: exercise box with optional `heading`, `points`, `color`,
`stroke-color`, `text-color`, and `radius`
- `def`, `axiom`, `satz`, `lemma`, `kor`: numbered statement boxes; each takes
a body and the optional arguments `label` and `nobreak`
- `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/computer-science.typ` for complete source
examples.
## Fonts
The defaults use New Computer Modern, New Computer Modern Math, and DejaVu Sans
Mono. All three are bundled with Typst, so the template renders consistently in
the web app and on the command line. Pass `text-font` and `math-font` to either
template if you prefer locally installed fonts such as Fira Sans and Fira Math.
## 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`.