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
|
|
|
|
2024-07-08 07:55:38 +00:00
|
|
|
#import "branding.typ": *
|
|
|
|
|
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-11-19 10:14:04 +00:00
|
|
|
university: (
|
2024-07-02 08:57:38 +00:00
|
|
|
program: "Informationtechnology",
|
|
|
|
faculty: "Technik",
|
2024-11-19 10:14:04 +00:00
|
|
|
name: "dualen Hochschule Baden-Württemberg",
|
|
|
|
campus: "Eppelheim"
|
|
|
|
),
|
|
|
|
authors: (
|
|
|
|
(
|
|
|
|
name: "Sven Vogel",
|
|
|
|
course: "TINF19IT1",
|
|
|
|
company: "ABB AG",
|
|
|
|
supervisor: "Benny Goodman",
|
|
|
|
matriculation-number: 123456789
|
|
|
|
),
|
|
|
|
(
|
|
|
|
name: "Kurt Jammer",
|
|
|
|
course: "TINF24AI2",
|
|
|
|
company: "Siemens",
|
|
|
|
supervisor: "Henry Badman",
|
|
|
|
matriculation-number: 478568763
|
|
|
|
),
|
|
|
|
),
|
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,
|
2024-11-11 13:37:16 +00:00
|
|
|
logo-height: 3em,
|
|
|
|
logo-image: "res/ABB.svg"),
|
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: (
|
2024-08-12 16:09:14 +00:00
|
|
|
left: 3cm,
|
|
|
|
right: 2.5cm,
|
|
|
|
top: 2.5cm,
|
2024-07-02 08:57:38 +00:00
|
|
|
bottom: 2.5cm)),
|
|
|
|
text: (
|
|
|
|
size: 12pt,
|
2024-09-27 15:43:58 +00:00
|
|
|
font: "Fira Sans"),
|
2024-07-02 08:57:38 +00:00
|
|
|
heading: (
|
2024-09-27 15:43:58 +00:00
|
|
|
font: "Fira Sans"),
|
2024-07-08 08:18:03 +00:00
|
|
|
code: (
|
|
|
|
theme: "res/abb.tmTheme",
|
|
|
|
font: "FiraCode Nerd Font",
|
2024-07-19 13:08:11 +00:00
|
|
|
lines: false,
|
|
|
|
size: 10pt,
|
2024-07-08 08:18:03 +00:00
|
|
|
tab-size: 4),
|
2024-07-02 08:57:38 +00:00
|
|
|
link: (
|
2024-07-08 07:55:38 +00:00
|
|
|
color: ABB-GRAY-02)))
|
2024-07-02 08:57:38 +00:00
|
|
|
|
|
|
|
// 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 {
|
2024-08-12 16:09:14 +00:00
|
|
|
if key in update {
|
|
|
|
let update_val = update.at(key)
|
2024-07-02 08:57:38 +00:00
|
|
|
|
2024-11-19 10:14:04 +00:00
|
|
|
if type(val) == array {
|
|
|
|
// ignore checking arraay
|
|
|
|
} else if type(val) == dictionary and type(update_val) == dictionary {
|
2024-08-12 16:09:14 +00:00
|
|
|
base.insert(key, deep-insert-checked(val, update_val))
|
|
|
|
} else if val == none or type(val) == type(update_val) {
|
|
|
|
base.insert(key, update_val)
|
2024-07-02 08:57:38 +00:00
|
|
|
} else {
|
2024-08-12 16:09:14 +00:00
|
|
|
panic("missmatched dictionary entry `" + key + "` type: expected `" + type(val) + "` got `" + type(update_val) + "`")
|
2024-07-02 08:57:38 +00:00
|
|
|
}
|
2024-08-12 16:09:14 +00:00
|
|
|
} else {
|
|
|
|
base.insert(key, val)
|
2024-07-02 08:57:38 +00:00
|
|
|
}
|
2024-08-12 16:09:14 +00:00
|
|
|
}
|
2024-07-02 08:57:38 +00:00
|
|
|
|
|
|
|
return base
|
|
|
|
}
|
|
|
|
|
|
|
|
#let validate-config(config) = {
|
|
|
|
return deep-insert-checked(default-config, config)
|
|
|
|
}
|