diff options
author | orangerot <orangerot@orangerot.dev> | 2025-09-09 13:18:10 +0200 |
---|---|---|
committer | orangerot <orangerot@orangerot.dev> | 2025-09-09 13:18:10 +0200 |
commit | 2ed73f8bf490c946915547fff63b3be1c659890b (patch) | |
tree | 3a2c9c1724662171f334dcd874fda69fe4d349d6 /muendliche-nachpruefung/lib.typ | |
parent | c6e566775daa8c77b1a9108ef2bfd1d9c1146b9d (diff) |
feat: package definiton with library and template
Diffstat (limited to 'muendliche-nachpruefung/lib.typ')
-rw-r--r-- | muendliche-nachpruefung/lib.typ | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/muendliche-nachpruefung/lib.typ b/muendliche-nachpruefung/lib.typ index 900cfc0..356d750 100644 --- a/muendliche-nachpruefung/lib.typ +++ b/muendliche-nachpruefung/lib.typ @@ -2,18 +2,22 @@ // // SPDX-License-Identifier: MIT -#let oral-post-exam( +#let event(name: "", year: "", did_attend: "") = ( + box(height: 1.2em)[*#name*], [#year], [#did_attend] +) + +#let exam-report( lecture: "", // Fach date: datetime(year: 0, month: 1, day: 1), // Prüfungsdatum examiner: "", // PrüferIn (Prof) assistant: "", // BeisitzerIn did_pass: none, // Bestanden? true || false exam_duration: duration(minutes: 0), // Prüfungsdauer - attendance: (: - /* Veranstaltung, Jahr, regelmäßig besucht? */ - "Vorlesung": (year: "", did_attend: ""), - "Übung": (year: "", did_attend: ""), - "Tutorium": (year: "", did_attend: ""), + attendance: ( + /* Veranstaltung, Jahr, regelmäßig besucht? */ + event(name: "Vorlesung", year: "", did_attend: ""), + event(name: "Übung", year: "", did_attend: ""), + event(name: "Tutorium", year: "", did_attend: ""), ), preparation_time: [ // Wie lange und wie hast alleine bzw. mit anderen vorbereitet? @@ -34,13 +38,6 @@ ) = [ #let checkbox(checked: false) = if (checked) {$times.square$} else {$square$} - #let events = ( - "Vorlesung": (year: "", did_attend: ""), - "Übung": (year: "", did_attend: ""), - "Tutorium": (year: "", did_attend: ""), - ..attendance - ) - #show <date>: if date.year() > 0 {date.display("[day].[month].[year]")} #show <examiner>: examiner #show <assistant>: assistant @@ -64,8 +61,7 @@ let _ = g.remove("label") table(..g, ..it.fields().children.at(0).children, - ..events.pairs().map(((location, (year, did_attend))) => - (box(height: 1.2em)[*#location*], [#year], [#did_attend])).flatten() + ..(attendance + 3*(event(),)).slice(0,3).flatten() ) } |