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-pruefung-mathematik | |
parent | c6e566775daa8c77b1a9108ef2bfd1d9c1146b9d (diff) |
feat: package definiton with library and template
Diffstat (limited to 'muendliche-pruefung-mathematik')
-rw-r--r-- | muendliche-pruefung-mathematik/README.md | 16 | ||||
-rw-r--r-- | muendliche-pruefung-mathematik/lib.typ | 22 | ||||
-rw-r--r-- | muendliche-pruefung-mathematik/main.typ | 16 |
3 files changed, 28 insertions, 26 deletions
diff --git a/muendliche-pruefung-mathematik/README.md b/muendliche-pruefung-mathematik/README.md index 334c566..a1bc4d7 100644 --- a/muendliche-pruefung-mathematik/README.md +++ b/muendliche-pruefung-mathematik/README.md @@ -16,9 +16,9 @@ Zum Erstellen des Dokumentes müssen lediglich die Argumente in der Datei `main.typ` ausgefüllt werden. ```typst -#import "lib.typ": oral-exam, KIND +#import "lib.typ": exam-report, event, KIND -#show: oral-exam.with( +#show: exam-report.with( study: "", // Studiengang lecture: "", // Fach kind: KIND.NONE, // Prüfungsart KIND.{DIPLOM, STAATSEXAM, STUDIENBEGLEITEND, BACHELOR, MASTER} @@ -29,12 +29,12 @@ Zum Erstellen des Dokumentes müssen lediglich die Argumente in der Datei exam_duration: duration(minutes: 0), // Prüfungsdauer checked_knowledge_gaps: none, // Wurde Unwissen abgeprüft? attendance: ( - // Titel der Vorlesung, Dozent, Wann gehört, SWS, ECTS, LP - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + /* Titel der Vorlesung, Dozent, Wann gehört, SWS, ECTS, LP */ + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), ), attendance_worth: [ // Wie regelmäßig hast du die Lehrveranstaltungen besucht? Hat sich der diff --git a/muendliche-pruefung-mathematik/lib.typ b/muendliche-pruefung-mathematik/lib.typ index 2793320..c8512d0 100644 --- a/muendliche-pruefung-mathematik/lib.typ +++ b/muendliche-pruefung-mathematik/lib.typ @@ -7,7 +7,11 @@ "NONE": "" ) -#let oral-exam( +#let event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: "") = ( + name, lecturer, year, sws, ects, lp +) + +#let exam-report( study: "", // Studiengang lecture: "", // Fach kind: KIND.NONE, // Prüfungsart KIND.{DIPLOM, STAATSEXAM, STUDIENBEGLEITEND, BACHELOR, MASTER} @@ -18,12 +22,12 @@ exam_duration: duration(minutes: 0), // Prüfungsdauer checked_knowledge_gaps: none, // Wurde Unwissen abgeprüft? attendance: ( - // Titel der Vorlesung, Dozent, Wann gehört, SWS, ECTS, LP - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + /* Titel der Vorlesung, Dozent, Wann gehört, SWS, ECTS, LP */ + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), ), attendance_worth: [ // Wie regelmäßig hast du die Lehrveranstaltungen besucht? Hat sich der @@ -92,7 +96,7 @@ ) #show <attendance>: it => table(..grid_arguments(it), ..it.fields().children.at(0).children, - ..(attendance.map(lecture => lecture.values()).flatten() + 5*6*([],)).slice(0,count: 5*6) + ..(attendance + 5*(event(),)).slice(0,5).flatten() ) #show <checked_knowledge_gaps>: [ #h(1fr) @@ -106,5 +110,3 @@ #doc ] -#oral-exam()[] - diff --git a/muendliche-pruefung-mathematik/main.typ b/muendliche-pruefung-mathematik/main.typ index 186c2e6..f735cfc 100644 --- a/muendliche-pruefung-mathematik/main.typ +++ b/muendliche-pruefung-mathematik/main.typ @@ -1,6 +1,6 @@ -#import "lib.typ": oral-exam, KIND +#import "lib.typ": exam-report, event, KIND -#show: oral-exam.with( +#show: exam-report.with( study: "", // Studiengang lecture: "", // Fach kind: KIND.NONE, // Prüfungsart KIND.{DIPLOM, STAATSEXAM, STUDIENBEGLEITEND, BACHELOR, MASTER} @@ -11,12 +11,12 @@ exam_duration: duration(minutes: 0), // Prüfungsdauer checked_knowledge_gaps: none, // Wurde Unwissen abgeprüft? attendance: ( - // Titel der Vorlesung, Dozent, Wann gehört, SWS, ECTS, LP - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), - (lecture: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + /* Titel der Vorlesung, Dozent, Wann gehört, SWS, ECTS, LP */ + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), + event(name: "", lecturer: "", year: "", sws: "", ects: "", lp: ""), ), attendance_worth: [ // Wie regelmäßig hast du die Lehrveranstaltungen besucht? Hat sich der |