2024-06-27 13:57:04 +00:00
|
|
|
|
|
|
|
// .--------------------------------------------------------------------------.
|
|
|
|
// | Configuration |
|
|
|
|
// '--------------------------------------------------------------------------'
|
|
|
|
|
|
|
|
// Author: Sven Vogel
|
|
|
|
// Edited: 27.06.2024
|
|
|
|
// License: MIT
|
2024-07-02 08:57:38 +00:00
|
|
|
|
|
|
|
// default configuration
|
|
|
|
#let default-config = (
|
2024-07-05 11:04:27 +00:00
|
|
|
// language settings used to make decisions about hyphenation and others
|
|
|
|
lang: "en", // ISO 3166 language code of text: "de", "en"
|
|
|
|
region: "en", // region code
|
|
|
|
// mark this thesis as draft
|
|
|
|
// Adds preleminarry note page and watermark
|
2024-07-03 12:16:00 +00:00
|
|
|
draft: true,
|
2024-07-05 11:04:27 +00:00
|
|
|
// information about author(s)
|
2024-07-02 08:57:38 +00:00
|
|
|
author: (
|
|
|
|
name: "Sven Vogel",
|
|
|
|
semester: 4,
|
|
|
|
program: "Informationtechnology",
|
|
|
|
course: "TINF19IT1",
|
|
|
|
faculty: "Technik",
|
|
|
|
university: "DHBW Mannheim",
|
|
|
|
company: "ABB AG",
|
|
|
|
supervisor: "Benny Goodman",
|
|
|
|
matriculation-number: 123456789),
|
2024-07-05 11:04:27 +00:00
|
|
|
// information about thesis
|
2024-07-02 08:57:38 +00:00
|
|
|
thesis: (
|
|
|
|
title: "Unofficial ABB/DHBW Typst template",
|
2024-07-05 11:04:27 +00:00
|
|
|
subtitle: "for reports and thesises", // subtitle may be none
|
2024-07-02 08:57:38 +00:00
|
|
|
submission-date: "23rd march 2020",
|
|
|
|
timeframe: "1st january 2020 - 20th march 2020",
|
|
|
|
kind: "T2000",
|
2024-07-05 11:04:27 +00:00
|
|
|
// translated version of abstract, only used in case language is not english
|
2024-07-02 08:57:38 +00:00
|
|
|
summary: none,
|
|
|
|
abstract: none,
|
2024-07-04 13:09:05 +00:00
|
|
|
preface: none,
|
2024-07-02 08:57:38 +00:00
|
|
|
keywords: ( "IT", "other stuff" ),
|
|
|
|
bibliography: none /* bibliography("refs.bib") */,
|
|
|
|
glossary: none,
|
|
|
|
appendices: none),
|
|
|
|
style: (
|
|
|
|
header: (
|
2024-07-05 11:04:27 +00:00
|
|
|
content-padding: 1.5em,
|
2024-07-02 08:57:38 +00:00
|
|
|
underline-top-padding: 0pt,
|
|
|
|
logo-height: 3em),
|
2024-07-05 11:04:27 +00:00
|
|
|
footer: (
|
|
|
|
content-padding: 1.5em),
|
2024-07-02 08:57:38 +00:00
|
|
|
page: (
|
|
|
|
format: "a4",
|
|
|
|
margin: (
|
|
|
|
left: 3cm,
|
|
|
|
right: 2.5cm,
|
|
|
|
top: 2.5cm,
|
|
|
|
bottom: 2.5cm)),
|
|
|
|
text: (
|
|
|
|
size: 12pt,
|
|
|
|
font: "Open Sans"),
|
|
|
|
heading: (
|
|
|
|
font: "Montserrat"),
|
|
|
|
link: (
|
|
|
|
color: red.darken(15%))))
|
|
|
|
|
|
|
|
// Insert a dictionary `update` into `base` but only the entries of update that also exist in base
|
|
|
|
// Runs recursively on all sub dictionaries
|
|
|
|
#let deep-insert-checked(base, update) = {
|
|
|
|
if base == none {
|
|
|
|
panic("target dictionary is none")
|
|
|
|
}
|
|
|
|
|
|
|
|
if update == none {
|
|
|
|
return base
|
|
|
|
}
|
|
|
|
|
|
|
|
for (key, val) in base {
|
|
|
|
if key in update {
|
|
|
|
let update_val = update.at(key)
|
|
|
|
|
|
|
|
if type(val) == dictionary and type(update_val) == dictionary {
|
|
|
|
base.insert(key, deep-insert-checked(val, update_val))
|
|
|
|
} else if val == none or type(val) == type(update_val) {
|
|
|
|
base.insert(key, update_val)
|
|
|
|
} else {
|
|
|
|
panic("missmatched dictionary entry `" + key + "` type: expected `" + type(val) + "` got `" + type(update_val) + "`")
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
base.insert(key, val)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return base
|
|
|
|
}
|
|
|
|
|
|
|
|
#let validate-config(config) = {
|
|
|
|
return deep-insert-checked(default-config, config)
|
|
|
|
}
|