enable customizing exercise numbering

This commit is contained in:
Gaspard Jankowiak 2025-11-17 20:56:12 +01:00
commit c81d8f65b2
2 changed files with 40 additions and 4 deletions

View file

@ -18,7 +18,7 @@ A summary is then printed on the front page.
## Usage
Writing an exam is now easy:
Writing an exam is now easy (see [API](#api) for all options):
#import "@local/exam:0.1.0": exam, exercise, exercise-items, mtext
@ -99,3 +99,34 @@ These are used in the example above.
- `mtext(str)` to typeset text within math mode using the default text font.
- `frame(stroke_width)` provides `stroke` for use in a `table`, horizontal lines only,
top and bottom lines are bold.
### API
```typ
exam(
title: "%KLAUSUR or EXAM%",
course-title: [%COURSE_TITLE_FIRST_LINE% \ %COURSE_TITLE_SECOND_LINE%],
course-short-title: "%course-short-title%",
course-code: "%course-code%",
date: "%DATE%",
institution: smallcaps("NAWI Graz"),
duration-minutes: "%DURATION%",
ask-student-number: false,
ask-trainer-name: false,
ask-group: true,
instructions: none,
language: "de", // or "en"
font-size: 12pt,
paper-size: "a4",
exercise-numbering: "1",
)
```