2024-06-27 13:57:04 +00:00
|
|
|
|
|
|
|
// .--------------------------------------------------------------------------.
|
|
|
|
// | Template of DHBW thesis |
|
|
|
|
// '--------------------------------------------------------------------------'
|
|
|
|
|
|
|
|
// Author: Sven Vogel
|
|
|
|
// Edited: 27.06.2024
|
|
|
|
// License: MIT
|
|
|
|
|
2024-08-12 16:09:14 +00:00
|
|
|
#import "conf.typ": validate-config, default-config
|
|
|
|
#import "branding.typ": *
|
|
|
|
#import "style.typ": global_styled_doc, content_styled, end_styled
|
|
|
|
#import "glossary.typ": glossary
|
|
|
|
#import "pages/titlepage.typ": new_title_page
|
|
|
|
#import "pages/declaration-of-authorship.typ": new_declaration_of_authorship
|
|
|
|
#import "pages/confidentiality-statement.typ": new_confidentiality_statement_page
|
|
|
|
#import "pages/prerelease-note.typ": new_prerelease_note
|
|
|
|
#import "pages/outline.typ": new_outline
|
|
|
|
#import "pages/abstract.typ": new_abstract
|
|
|
|
#import "pages/preface.typ": new-preface
|
|
|
|
#import "pages/appendix.typ": show-appendix
|
|
|
|
|
|
|
|
#let group-break() = {
|
2024-07-08 11:49:04 +00:00
|
|
|
[#pagebreak()]
|
|
|
|
}
|
|
|
|
|
2024-08-12 16:07:44 +00:00
|
|
|
#let inline-color(color, content) = {
|
|
|
|
box(
|
|
|
|
stroke: 1pt + ABB-GRAY-05,
|
|
|
|
radius: 2pt,
|
|
|
|
inset: (left: 2pt, right: 2pt),
|
|
|
|
outset: (top: 4pt, bottom: 4pt),
|
|
|
|
fill: ABB-GRAY-06,
|
|
|
|
[#box(fill: rgb(color), radius: 2pt, inset: 0pt, width: 0.75em, height: 0.75em) #text(
|
|
|
|
font: default-config.style.code.font,
|
|
|
|
size: default-config.style.code.size,
|
|
|
|
content,
|
|
|
|
)],
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2024-08-20 12:17:50 +00:00
|
|
|
#let url(label, content) = {
|
2024-08-22 08:51:35 +00:00
|
|
|
link(label)[#underline(offset: 2pt, stroke: 0.5pt + blue, text(fill: blue)[
|
|
|
|
#content
|
|
|
|
#let domain = label.find(regex("\w+\.\w+(?:\.\w+)*"))
|
|
|
|
#if domain.len() > 0 [
|
|
|
|
(#domain)
|
|
|
|
]
|
|
|
|
])]
|
2024-08-20 12:17:50 +00:00
|
|
|
}
|
|
|
|
|
2024-07-05 11:04:27 +00:00
|
|
|
// start of template pages and styles
|
|
|
|
#let dhbw-template(config, body) = [
|
2024-07-02 08:57:38 +00:00
|
|
|
#let config = validate-config(config)
|
2024-07-01 14:02:42 +00:00
|
|
|
#let doc = body
|
|
|
|
|
2024-06-27 13:57:04 +00:00
|
|
|
// apply global style to every element in the argument content
|
2024-07-05 11:04:27 +00:00
|
|
|
#global_styled_doc(config)[
|
|
|
|
|
|
|
|
// set document properties
|
|
|
|
#set document(
|
|
|
|
author: config.author.name,
|
|
|
|
keywords: config.thesis.keywords,
|
2024-08-12 16:09:14 +00:00
|
|
|
title: config.thesis.title,
|
|
|
|
)
|
2024-06-27 13:57:04 +00:00
|
|
|
|
2024-07-01 11:50:54 +00:00
|
|
|
// configure text locale
|
2024-07-02 08:57:38 +00:00
|
|
|
#set text(
|
|
|
|
lang: config.lang,
|
2024-08-12 16:09:14 +00:00
|
|
|
region: config.region,
|
|
|
|
)
|
2024-06-28 09:54:30 +00:00
|
|
|
|
2024-06-27 13:57:04 +00:00
|
|
|
// preppend title page
|
2024-07-01 10:13:57 +00:00
|
|
|
#new_title_page(config)
|
2024-06-28 09:54:30 +00:00
|
|
|
|
2024-07-01 11:50:54 +00:00
|
|
|
// prelude includes: title, declaration of authorship, confidentiality statement, outline and abstract
|
|
|
|
// these will have roman page numbers
|
2024-07-01 12:46:32 +00:00
|
|
|
#new_declaration_of_authorship(config)
|
|
|
|
#new_confidentiality_statement_page(config)
|
2024-07-03 12:16:00 +00:00
|
|
|
#if config.draft {
|
|
|
|
new_prerelease_note(config)
|
|
|
|
}
|
2024-07-01 14:02:42 +00:00
|
|
|
#new_abstract(config)
|
2024-07-04 13:09:05 +00:00
|
|
|
#new-preface(config)
|
2024-07-01 12:46:32 +00:00
|
|
|
#new_outline()
|
2024-06-27 13:57:04 +00:00
|
|
|
|
2024-08-12 16:07:44 +00:00
|
|
|
// glossary is built inline here because the links must be
|
2024-07-01 11:50:54 +00:00
|
|
|
// exposed to the entire document
|
2024-07-08 11:49:04 +00:00
|
|
|
#import "glossarium.typ": *
|
2024-07-01 10:13:57 +00:00
|
|
|
#show: make-glossary
|
|
|
|
|
|
|
|
#pagebreak(weak: true)
|
2024-07-01 12:46:32 +00:00
|
|
|
|
2024-07-01 14:17:54 +00:00
|
|
|
#if "glossary" in config.thesis and config.thesis.glossary != none {
|
2024-07-08 08:27:48 +00:00
|
|
|
print-glossary(
|
2024-08-14 09:57:27 +00:00
|
|
|
show-all: true,
|
2024-07-08 08:27:48 +00:00
|
|
|
disable-back-references: true,
|
2024-07-08 11:49:04 +00:00
|
|
|
enable-group-pagebreak: true,
|
2024-08-26 13:08:03 +00:00
|
|
|
glossary(config.thesis.glossary, config),
|
2024-08-12 16:09:14 +00:00
|
|
|
)
|
2024-07-01 12:46:32 +00:00
|
|
|
|
2024-07-01 14:17:54 +00:00
|
|
|
pagebreak(weak: true)
|
2024-08-12 16:07:44 +00:00
|
|
|
}
|
2024-07-03 12:25:37 +00:00
|
|
|
#counter(page).update(1)
|
2024-07-01 10:13:57 +00:00
|
|
|
|
2024-07-01 11:50:54 +00:00
|
|
|
// mark end of prelude
|
2024-07-01 10:13:57 +00:00
|
|
|
#metadata("prelude terminate") <end-of-prelude>
|
|
|
|
|
2024-07-05 11:04:27 +00:00
|
|
|
#content_styled(config, doc)
|
2024-07-01 10:13:57 +00:00
|
|
|
|
2024-07-01 11:50:54 +00:00
|
|
|
#metadata("content terminate") <end-of-content>
|
|
|
|
|
2024-07-05 11:04:27 +00:00
|
|
|
#end_styled(config)[
|
2024-07-01 11:50:54 +00:00
|
|
|
// add bibliography if set
|
2024-07-02 08:57:38 +00:00
|
|
|
#if "bibliography" in config.thesis and config.thesis.bibliography != none {
|
2024-07-01 10:13:57 +00:00
|
|
|
pagebreak(weak: true)
|
2024-07-03 12:27:12 +00:00
|
|
|
counter(page).update(1)
|
2024-07-01 10:13:57 +00:00
|
|
|
set bibliography(style: "ieee")
|
|
|
|
config.thesis.bibliography
|
|
|
|
}
|
2024-07-01 11:50:54 +00:00
|
|
|
|
|
|
|
// appendix
|
|
|
|
#show-appendix(config: config)
|
2024-07-05 11:04:27 +00:00
|
|
|
]
|
|
|
|
]
|
2024-08-12 16:07:44 +00:00
|
|
|
]
|