From c06e80edbfa699b5bc2597c9a71a16b62a72e1a3 Mon Sep 17 00:00:00 2001 From: Gaspard Jankowiak Date: Mon, 17 Nov 2025 11:59:36 +0100 Subject: [PATCH] make number/group/trainer optional --- lib.typ | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib.typ b/lib.typ index 928d2bb..c29a740 100644 --- a/lib.typ +++ b/lib.typ @@ -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)