2024-06-27 13:57:04 +00:00
|
|
|
|
|
|
|
// .--------------------------------------------------------------------------.
|
|
|
|
// | Template of DHBW thesis |
|
|
|
|
// '--------------------------------------------------------------------------'
|
|
|
|
|
|
|
|
// Author: Sven Vogel
|
|
|
|
// Edited: 27.06.2024
|
|
|
|
// License: MIT
|
|
|
|
|
|
|
|
// start of template pages and styles
|
2024-07-01 14:02:42 +00:00
|
|
|
#let dhbw-template(config: dictionary, body) = [
|
2024-06-27 13:57:04 +00:00
|
|
|
|
2024-07-02 08:57:38 +00:00
|
|
|
#import "conf.typ": validate-config
|
2024-07-01 12:46:32 +00:00
|
|
|
#import "style.typ": global_styled_doc, content_styled, end_styled
|
2024-07-02 08:57:38 +00:00
|
|
|
#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/appendix.typ": show-appendix
|
|
|
|
|
|
|
|
#let config = validate-config(config)
|
2024-07-01 11:50:54 +00:00
|
|
|
|
2024-07-01 14:02:42 +00:00
|
|
|
#let doc = body
|
|
|
|
|
2024-07-01 11:50:54 +00:00
|
|
|
// set document properties
|
|
|
|
#set document(
|
|
|
|
author: config.author.name,
|
|
|
|
keywords: config.thesis.keywords,
|
|
|
|
title: config.thesis.title)
|
2024-06-27 13:57:04 +00:00
|
|
|
|
|
|
|
// apply global style to every element in the argument content
|
2024-07-01 10:13:57 +00:00
|
|
|
#global_styled_doc(config: config, body: [
|
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,
|
|
|
|
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-01 12:46:32 +00:00
|
|
|
#new_outline()
|
2024-06-27 13:57:04 +00:00
|
|
|
|
2024-07-01 11:50:54 +00:00
|
|
|
// glossary is built inline here because the links must be
|
|
|
|
// exposed to the entire document
|
2024-07-02 08:57:38 +00:00
|
|
|
#import "@preview/glossarium:0.4.1": make-glossary, print-glossary
|
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 {
|
|
|
|
heading(supplement: [outline], "Glossar")
|
2024-07-01 12:46:32 +00:00
|
|
|
|
2024-07-01 14:17:54 +00:00
|
|
|
print-glossary(config.thesis.glossary)
|
2024-07-01 12:46:32 +00:00
|
|
|
|
2024-07-01 14:17:54 +00:00
|
|
|
pagebreak(weak: true)
|
|
|
|
}
|
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-02 08:57:38 +00:00
|
|
|
#content_styled(config: config, body: doc)
|
2024-07-01 10:13:57 +00:00
|
|
|
|
2024-07-01 11:50:54 +00:00
|
|
|
#metadata("content terminate") <end-of-content>
|
|
|
|
|
|
|
|
#end_styled(config: config, body: [
|
|
|
|
// 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-06-28 13:20:58 +00:00
|
|
|
])
|
2024-06-27 13:57:04 +00:00
|
|
|
])
|
|
|
|
]
|