unofficial-hka-thesis/modules/titlepage.typ
2024-12-30 16:02:49 +01:00

114 lines
No EOL
2.9 KiB
Typst
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#let titlepage(
settings: (),
degree: "",
program: "",
title: "",
subtitle: "",
titleGerman: "",
subtitleGerman: "",
author: "",
matriculationNumber: "",
placeOfWork: "",
supervisor: "",
advisor: "",
startDate: none,
submissionDate: none,
) = {
set document(title: title, author: author)
set page(
paper: "a4",
margin: (left: 30mm, right: 30mm, top: 40mm, bottom: 40mm),
numbering: "I",
number-align: center,
footer: ""
)
set text(
font: settings.fontBody,
size: settings.fontBodySize,
lang: "en"
)
set par(leading: 1em)
// Title Page
//TODO: How to apply company logo?
grid(
columns: (1fr, 1fr),
align(left)[
#image("/assets/company.svg", height: 1.5cm)
],
align(right)[
#image("/assets/HKALogo.png", height: 2cm)
]
)
v(5mm)
align(center, text(font: settings.fontHeading, 1.9em, weight: 700, "University of Applied Sciences Karlsruhe"))
v(15mm)
align(center, text(font: settings.fontHeading, 1.5em, weight: 100, degree + "s Thesis in " + program))
v(8mm)
if titleGerman.len() > 0 {
if subtitle.len() > 0 or subtitleGerman.len() > 0 {
align(center, text(font: settings.fontHeading, 1.2em, weight: 700, title))
align(center, text(font: settings.fontHeading, 1.2em, weight: 500, subtitle))
v(10mm)
align(center, text(font: settings.fontHeading, 1.2em, weight: 700, titleGerman))
align(center, text(font: settings.fontHeading, 1.2em, weight: 500, subtitleGerman))
} else {
align(center, text(font: settings.fontHeading, 1.4em, weight: 700, title))
v(10mm)
align(center, text(font: settings.fontHeading, 1.4em, weight: 700, titleGerman))
}
} else {
if subtitle.len() > 0 {
align(center, text(font: settings.fontHeading, 1.8em, weight: 700, title))
v(5mm)
align(center, text(font: settings.fontHeading, 1.4em, weight: 500, subtitle))
} else {
align(center, text(font: settings.fontHeading, 2.0em, weight: 700, title))
}
}
if advisor.len() > 0 {
pad(
top: 3em,
right: 10%,
left: 10%,
grid(
columns: (3fr, 3fr),
gutter: 1em,
strong("Author: "), author,
strong("Matriculation Number: "), matriculationNumber,
strong("Place of Work: "), placeOfWork,
strong("Supervisor: "), supervisor,
strong("Advisor: "), advisor,
strong("Start Date: "), startDate,
strong("Submission Date: "), submissionDate,
)
)
} else {
pad(
top: 3em,
right: 10%,
left: 10%,
grid(
columns: (3fr, 3fr),
gutter: 1em,
strong("Author: "), author,
strong("Matriculation Number: "), matriculationNumber,
strong("Place of Work: "), placeOfWork,
strong("Supervisor: "), supervisor,
strong("Start Date: "), startDate,
strong("Submission Date: "), submissionDate,
)
)
}
pagebreak()
}