make number/group/trainer optional

This commit is contained in:
Gaspard Jankowiak 2025-11-17 11:59:36 +01:00
commit c06e80edbf

17
lib.typ
View file

@ -134,6 +134,10 @@
course_number: "%COURSE_NUMBER%",
duration_minutes: "%DURATION%",
ask_student_number: false,
ask_trainer_name: false,
ask_group: true,
instructions: none,
language: "de", // or "en"
@ -163,6 +167,7 @@ if language == "en" {
student_name: "Name",
student_number: "Student number",
trainer_name: "Trainer",
group: "Group",
exercise: "Exercise",
exercise_short: "Ex.",
point: "point",
@ -180,6 +185,7 @@ if language == "en" {
student_name: "Name",
student_number: "Matrikelnr.",
trainer_name: "Übungsleiter",
group: "Übungsgruppe",
exercise: "Beispiel",
exercise_short: "Bsp.",
point: "Punkt",
@ -280,8 +286,15 @@ block(radius: 0.2cm, fill: lightgray, inset: 3pt, clip: true, table(
inset: (left:7pt, right:0pt, y:0pt),
align: horizon,
[#get_L("student_name")], rect(fill: white, width: 100%, radius: 0.2cm),
[#get_L("student_number")], rect(fill: white, width: 100%, radius: 0.2cm),
[#get_L("trainer_name")], rect(fill: white, width: 100%, radius: 0.2cm),
.. if ask_student_number {
([#get_L("student_number")], rect(fill: white, width: 100%, radius: 0.2cm))
},
..if ask_trainer_name {
([#get_L("trainer_name")], rect(fill: white, width: 100%, radius: 0.2cm))
},
..if ask_group {
([#get_L("group")], rect(fill: white, width: 100%, radius: 0.2cm))
}
))
v(0.5cm)