diff --git a/.github/workflows/build-typst.yml b/.github/workflows/build-typst.yml index 897d49c..17353d7 100644 --- a/.github/workflows/build-typst.yml +++ b/.github/workflows/build-typst.yml @@ -20,3 +20,4 @@ jobs: source_file: | thesis.typ proposal.typ + registration_certificate.typ diff --git a/figures/logo.png b/figures/tum_logo.png similarity index 100% rename from figures/logo.png rename to figures/tum_logo.png diff --git a/layout/cover.typ b/layout/cover.typ index a0ae073..8266936 100644 --- a/layout/cover.typ +++ b/layout/cover.typ @@ -24,7 +24,7 @@ // --- Cover --- v(1cm) - align(center, image("../figures/logo.png", width: 26%)) + align(center, image("../figures/tum_logo.png", width: 26%)) v(5mm) align(center, text(font: sans-font, 2em, weight: 700, "Technical University of Munich")) diff --git a/layout/registration_certificate.typ b/layout/registration_certificate.typ new file mode 100644 index 0000000..8db3de2 --- /dev/null +++ b/layout/registration_certificate.typ @@ -0,0 +1,69 @@ +#import "/utils/formfield.typ": * + +#let registrationCertificate( + author: "", + birthdate: datetime, + title: "", + degree: "", + program: "", + supervisor: "", + startDate: datetime, + submissionDate: datetime, + currentDate: datetime, + body, +) = { + + // Set the document's basic properties. + set page( + margin: (left: 20mm, right: 20mm, top: 20mm, bottom: 20mm), + ) + + // Save heading and body font families in variables. + let body-font = "New Computer Modern" + let sans-font = "New Computer Modern Sans" + + // Set body font family. + set text( + font: body-font, + size: 12pt, + lang: "en" + ) + + align( + right, + stack( + dir: ttb, + spacing: 10pt, + image("/figures/tum_logo.png", width: 20%), + text(font: sans-font, weight: "bold", "Technical University \n of Munich") + ) + ) + + v(1.5cm) + + align(left, text(font: sans-font, 1.3em, weight: "bold", "Bestätigung zur Anmeldung der " + degree + "arbeit")) + + grid( + columns: 2, + row-gutter: 10mm, + column-gutter: 6mm, + formField("Name der/des Studierenden", author, length: 90%), + formField("Geburtsdatum", birthdate.display("[day].[month].[year]"),length: 90%), + formField("Studiengang", program, length: 90%), + formField("Titel der Arbeit", title, length: 90%) + ) + + v(1.5cm) + + "Hiermit bestätigen wir, dass der Kandidat/die Kandidatin sich am " + startDate.display("[day].[month].[year]") + " zur " + degree + "arbeit angemeldet hat. \n" + body + + v(1.5cm) + + grid( + columns: 2, + column-gutter: 2cm, + formField("Datum", currentDate.display("[day].[month].[year]"), length: 90%), + formField(supervisor, " ", length: 90%) + ) +} diff --git a/layout/titlepage.typ b/layout/titlepage.typ index ba4496f..c4b0a2a 100644 --- a/layout/titlepage.typ +++ b/layout/titlepage.typ @@ -32,7 +32,7 @@ // --- Title Page --- v(1cm) - align(center, image("/figures/logo.png", width: 26%)) + align(center, image("/figures/tum_logo.png", width: 26%)) v(5mm) align(center, text(font: sans-font, 2em, weight: 700, "Technical University of Munich")) diff --git a/metadata.typ b/metadata.typ index 787a64f..4b01016 100644 --- a/metadata.typ +++ b/metadata.typ @@ -6,5 +6,6 @@ #let supervisor = "Prof. Dr. Stephan Krusche" #let advisors = ("Jolanda Krümelmonster, M.Sc.",) #let author = "(Author)" +#let birthdate = datetime(day: 01, month: 01, year: 2002) // only necessary for registration certificate #let startDate = datetime(day: 1, month: 1, year: 2024) #let submissionDate = datetime(day: 1, month: 1, year: 2024) \ No newline at end of file diff --git a/registration_certificate.typ b/registration_certificate.typ new file mode 100644 index 0000000..ab81458 --- /dev/null +++ b/registration_certificate.typ @@ -0,0 +1,18 @@ +#import "/layout/registration_certificate.typ": * +#import "/metadata.typ": * + +#set text(lang: "de") + +#show: registrationCertificate.with( + author: author, + title: titleGerman, + birthdate: birthdate, + degree: degree, + program: program, + supervisor: supervisor, + startDate: startDate, + submissionDate: submissionDate, + currentDate: datetime.today(), +) + +// You can write additional text for the registration certificate here. \ No newline at end of file diff --git a/utils/formfield.typ b/utils/formfield.typ new file mode 100644 index 0000000..a21f787 --- /dev/null +++ b/utils/formfield.typ @@ -0,0 +1,9 @@ +#let formField(label, content, length: 5cm) = { + stack( + text(1em, weight: "bold")[#content], + v(2mm), + line(length: length), + v(1mm), + text(0.9em, style: "italic")[#label] + ) +} \ No newline at end of file