2024-06-27 13:57:04 +00:00
|
|
|
|
|
|
|
// .--------------------------------------------------------------------------.
|
|
|
|
// | Template of DHBW thesis |
|
|
|
|
// '--------------------------------------------------------------------------'
|
|
|
|
|
|
|
|
// Author: Sven Vogel
|
|
|
|
// Edited: 27.06.2024
|
|
|
|
// License: MIT
|
|
|
|
|
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
|
2024-07-04 13:09:05 +00:00
|
|
|
#import "pages/preface.typ": new-preface
|
2024-07-02 08:57:38 +00:00
|
|
|
#import "pages/appendix.typ": show-appendix
|
|
|
|
|
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,
|
|
|
|
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,
|
|
|
|
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-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-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-06-27 13:57:04 +00:00
|
|
|
]
|