From 2ed73f8bf490c946915547fff63b3be1c659890b Mon Sep 17 00:00:00 2001 From: orangerot Date: Tue, 9 Sep 2025 13:18:10 +0200 Subject: feat: package definiton with library and template --- muendliche-pruefung/lib.typ | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'muendliche-pruefung/lib.typ') diff --git a/muendliche-pruefung/lib.typ b/muendliche-pruefung/lib.typ index 85117a1..47b884d 100644 --- a/muendliche-pruefung/lib.typ +++ b/muendliche-pruefung/lib.typ @@ -9,7 +9,11 @@ "NONE": "" ) -#let oral-exam( +#let event(name: "", lecturer: "", year: "", did_attend: "") = ( + name, lecturer, year, did_attend +) + +#let exam-report( study: "", // Studiengang lecture: "", // Fach kind: KIND.NONE, // Prüfungsart KIND.{WAHLPFLICHT, VERTIEFUNGSFACH, ERGUENZUNGSFACH} @@ -21,10 +25,10 @@ exam_duration: duration(minutes: 0), // Prüfungsdauer attendance: ( /* Veranstaltung, Dozent(in), Jahr, regelmäßig besucht? */ - (lecture: "", lecturer: "", year: "", did_attend: ""), - (lecture: "", lecturer: "", year: "", did_attend: ""), - (lecture: "", lecturer: "", year: "", did_attend: ""), - (lecture: "", lecturer: "", year: "", did_attend: ""), + event(name: "", lecturer: "", year: "", did_attend: ""), + event(name: "", lecturer: "", year: "", did_attend: ""), + event(name: "", lecturer: "", year: "", did_attend: ""), + event(name: "", lecturer: "", year: "", did_attend: ""), ), attendance_worth: [ // Hat sich der Besuch / Nichtbesuch der Veranstaltung für dich gelohnt? @@ -81,13 +85,10 @@ let g = it.fields() let _ = g.remove("children") let _ = g.remove("label") - let events = attendance.map(((lecture, lecturer, year, did_attend)) => - (lecture, lecturer, year, did_attend) - ).flatten() table(..g, ..it.fields().children.at(0).children, - ..(events + 4*4*([],)).slice(0,4*4) + ..(attendance + 4*(event(),)).slice(0,4).flatten() ) } -- cgit v1.2.3