added: new template structure

This commit is contained in:
Sven Vogel 2024-06-27 15:57:04 +02:00
parent ad004376c7
commit 84d9133b9a
33 changed files with 211 additions and 915 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2024 DHBW
Copyright (c) 2024 Sven Vogel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,3 +0,0 @@
% Bibliography based on BibTeX
% format: https://www.bibtex.com/g/bibtex-format/
% possible entry types: https://www.bibtex.com/e/entry-types/

View File

@ -1,9 +0,0 @@
language: de
ligratures: true
hyphenate: true
paragraph-spacing: 1.5 # relative to line height
line-spacing: 0.75 # relative to line height
first-line-indent: 1 # in centimetres
font-size: 12 # in point
font-familty: "TeX Gyre Termes"

View File

@ -1,9 +0,0 @@
glossary:
# Example:
# - short: PLC
# long: Programmable Logic Controller
# desc: Industrial computer for controlling automation devices

View File

@ -1,30 +0,0 @@
autor: Sven Vogel
titel: Konfiguration & Integration von PROFINET
untertitel: für die AC500 SPS
typ: T2000
semester: 3
fakultät: Technik
studiengang: Informationstechnik
universität: DHBW Mannheim
matrikelnummer: 1191225
betrieb: ABB AG
betreuer: Florian Miedniak
abgabe: 20. März 2024
bearbeitungszeitraum: 1. Januar 2024 - 20. März 2024
stichwörter:
- informatik
- profinet
# Berechent automatisch die Wochen Anzahl
# Start- und Endzeit müssen im Format dd-mm-yyyy sein.
arbeits-pakete:
- thema: Konfiguration des Stacks
start: 08.01.2024
ende: 31.01.2024
- thema: Integration in die Laufzeit
start: 01.02.2024
ende: 01.03.2024
- thema: Testen und Evaluation
start: 04.03.2024
ende: 20.03.2024

8
examples/lipsum.typ Normal file
View File

@ -0,0 +1,8 @@
#import "../src/template.typ": dhbw-template
#show: dhbw-template
= Lorem Ipsum
#lorem(50)

10
src/conf.typ Normal file
View File

@ -0,0 +1,10 @@
// .--------------------------------------------------------------------------.
// | Configuration |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 27.06.2024
// License: MIT

View File

@ -1,46 +0,0 @@
// ====================================================
//
// AUDITION OF WORK
//
// Author: Sven Vogel
// License: MIT
// Edited: 29.03.2024
//
// This file binds and styles pages about:
// - title
// - declaration of indipendence
// - confidential clause
// - gender note
// - working packages
// - abstract
// ====================================================
#import "../prelude.typ" as prelude
#set heading(numbering: none, supplement: [Heading])
#set page(numbering: "I.", footer: "")
#include "../pages/title.typ"
#include "../pages/declaration-of-indipendence.typ"
#include "../pages/confidential-clause.typ"
#set page(
binding: left,
header-ascent: 2em,
header: locate(loc => {
table(columns: (1fr, auto),
align: (left, right),
stroke: none,
inset: (top: 0pt, bottom: 0.5em, left: 0pt, right: 0pt),
text(size: prelude.to_pt(prelude.format.font-size), prelude.info.titel),
text(size: prelude.to_pt(prelude.format.font-size), counter(page).display("I.")),
table.hline()
)
}),
footer: ""
)
#include "../pages/gender-note.typ"
#include "../pages/working-packages.typ"
#include "../pages/abstract.typ"

View File

@ -1,39 +0,0 @@
// ====================================================
//
// BIBLIOGRAPHY
//
// Author: Sven Vogel
// License: MIT
// Edited: 29.03.2024
//
// This file binds and styles bibliography of this work
// ====================================================
#import "../prelude.typ" as prelude
#set heading(numbering: none)
// function for filtering out all heading which are not of level 1
#let filter_heading(heading) = {
heading.level == 1
}
#set page(
header: locate(loc => {
align(left, context [
#let current_heading = query(selector(heading).after(here())).filter(filter_heading).first()
#current_heading.body
])
v(-2em)
align(right, counter(page).display("1"))
v(-1em)
line(length: 100%)
}),
)
// load bibliography and add it to the document
#bibliography(
style: "ieee",
"../../conf/bibliography.bib"
)

View File

@ -1,149 +0,0 @@
// ====================================================
//
// OUTLINE
//
// Author: Sven Vogel
// License: MIT
// Edited: 29.03.2024
//
// This file binds and styles the outline of this document
// ====================================================
#import "../prelude.typ" as prelude
#set page(
binding: left,
header-ascent: 2em,
header: locate(loc => {
table(columns: (1fr, auto),
align: (left, right),
stroke: none,
inset: (top: 0pt, bottom: 0.5em, left: 0pt, right: 0pt),
text(size: prelude.to_pt(prelude.format.font-size), prelude.info.titel),
text(size: prelude.to_pt(prelude.format.font-size), counter(page).display("I.")),
table.hline()
)
}),
footer: ""
)
#set heading(supplement: [Heading])
#set page(numbering: "I.", footer: "")
#if prelude.format.language == "de" [
= Inhaltsverzeichnis
] else if prelude.format.language == "en" [
= Table of contents
] else [
#panic("no translation for language: ", prelude.format.language)
]
#par(first-line-indent: 0pt)[
#show outline.entry.where(
level: 1
): it => {
strong(it)
}
#outline(title: none, indent: auto, target: heading.where(supplement: [Heading]))
]
#pagebreak()
#if prelude.format.language == "de" [
= Abbildungsverzeichnis
] else if prelude.format.language == "en" [
= List of figures
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: none,
target: figure.where(kind: image),
)
#pagebreak()
#if prelude.format.language == "de" [
= Tabellensverzeichnis
] else if prelude.format.language == "en" [
= List of tables
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: none,
target: figure.where(kind: table),
)
#pagebreak()
#if prelude.format.language == "de" [
= Quelltextverzeichnis
] else if prelude.format.language == "en" [
= List of source code
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: none,
target: figure.where(kind: raw),
)
#pagebreak()
// for creating glossary
#import "@preview/glossarium:0.2.6": make-glossary, print-glossary, gls, glspl
#show: make-glossary
#if prelude.format.language == "de" [
= Glossar
] else if prelude.format.language == "en" [
= Glossary
] else [
#panic("no translation for language: ", prelude.format.language)
]
// read all entries from config file
#let glossary = yaml("../../conf/glossary.yaml")
// destination array
#let glossary_entries = ()
// parse YAML entries into correct format
#if glossary.glossary != none {
for entry in glossary.glossary {
let short = entry.at("short", default: none)
let long = entry.at("long", default: none)
let desc = entry.at("desc", default: none)
if short == none {
panic("Key of glossary term must be specified")
}
glossary_entries.push((key: short, short: short, long: long, desc: desc))
}
}
#print-glossary(glossary_entries)
#pagebreak()
#if prelude.format.language == "de" [
= Anhangsverzeichnis
] else if prelude.format.language == "en" [
= List of appendencies
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: none,
target: heading.where(supplement: [Appendix]),
)
// reset page counter
#counter(page).update(0)

View File

@ -1,34 +0,0 @@
// ====================================================
//
// PREFACE
//
// Author: Sven Vogel
// License: MIT
// Edited: 29.03.2024
//
// This file binds and styles the preface of this document
// ====================================================
#import "../prelude.typ" as prelude
#set heading(supplement: [Heading])
#set page(numbering: "I.", footer: "")
#set page(
binding: left,
header-ascent: 2em,
header: locate(loc => {
table(columns: (1fr, auto),
align: (left, right),
stroke: none,
inset: (top: 0pt, bottom: 0.5em, left: 0pt, right: 0pt),
text(size: prelude.to_pt(prelude.format.font-size), prelude.info.titel),
text(size: prelude.to_pt(prelude.format.font-size), counter(page).display("I.")),
table.hline()
)
}),
footer: ""
)
#include "../pages/preface.typ"

View File

@ -1,50 +0,0 @@
// general document information
#let format = yaml("../../conf/format.yaml")
#let TitleSize = 2
#let SubtitleSize = 1.5
#let LargetextSize = 1.25
#let to_em(x) = {
x * 1em
}
#let to_cm(x) = {
x * 1cm
}
#let to_pt(x) = {
x * 1pt
}
// titles are bold and twice the size of normal text
// also they are centered and not justified
#let title(x) = {
align(center, par(justify: false, text(weight: "regular", size: to_pt(format.font-size) * TitleSize)[#x]))
}
// subtitles are 1.5x the size of normal text
// also they are centered and not justified
#let subtitle(x) = {
par(justify: false, text(size: to_pt(format.font-size) * SubtitleSize)[#x])
}
#let largetext(x) = {
par(justify: false, text(size: to_pt(format.font-size) * LargetextSize)[#x])
}
#let signature = {
set align(bottom)
grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
row-gutter: 0.75em,
align(left, {line(length: 6cm)}),
align(left, {line(length: 6cm)}),
align(left, "Ort, Datum"),
align(left, "Unterschrift")
)
}

View File

@ -1,144 +0,0 @@
#import "prelude.typ" as prelude
// ------------------------------------------
// Set page geometry and PDF meta data
// ------------------------------------------
// set page geometry:
// paper format of A4
// top margin is 2cm (blank space) + 2em (header) + 1em (spacing)
#set page(
margin: (left: 3cm, right: 2cm, top: 2cm + 3em, bottom: 2cm),
paper: "a4",
)
// set PDF meta information
#set document(
title: prelude.info.titel,
author: prelude.info.autor,
keywords: prelude.info.stichwörter
)
// ------------------------------------------
// Configure fonts and headings
// ------------------------------------------
// set global text parameter
#set text(
font: prelude.format.font-familty,
size: prelude.to_pt(prelude.format.font-size),
ligatures: prelude.format.ligratures,
hyphenate: prelude.format.hyphenate,
alternates: false,
discretionary-ligatures: prelude.format.ligratures,
lang: prelude.format.language
)
// set the text properties of verbatim/raw text blocks
#show raw: set text(
font: "FiraCode Nerd Font",
size: prelude.to_pt(prelude.format.font-size),
ligatures: prelude.format.ligratures,
hyphenate: prelude.format.hyphenate,
alternates: false,
discretionary-ligatures: prelude.format.ligratures,
lang: prelude.format.language
)
#show heading.where(level: 1): set text(
font: prelude.format.font-familty,
size: prelude.to_pt(prelude.format.font-size) * 2,
ligatures: prelude.format.ligratures,
hyphenate: prelude.format.hyphenate,
alternates: false,
discretionary-ligatures: prelude.format.ligratures,
lang: prelude.format.language,
weight: "regular"
)
#show heading.where(level: 2): set text(
font: prelude.format.font-familty,
size: prelude.to_pt(prelude.format.font-size) * 1.5,
ligatures: prelude.format.ligratures,
hyphenate: prelude.format.hyphenate,
alternates: false,
discretionary-ligatures: prelude.format.ligratures,
lang: prelude.format.language,
weight: "regular"
)
#show heading.where(level: 3): set text(
font: prelude.format.font-familty,
size: prelude.to_pt(prelude.format.font-size) * 1.25,
ligatures: prelude.format.ligratures,
hyphenate: prelude.format.hyphenate,
alternates: false,
discretionary-ligatures: prelude.format.ligratures,
lang: prelude.format.language,
weight: "regular"
)
// ------------------------------------------
// Setup paragraphs
// ------------------------------------------
// use block element as paragraph
// set block settings for every paragraph
#show par: set block(
below: prelude.to_em(prelude.format.paragraph-spacing), // paragraph spacing
)
// set global paragraph settings
#set par(
leading: prelude.to_em(prelude.format.line-spacing),
justify: true,
first-line-indent: prelude.to_cm(prelude.format.first-line-indent)
)
// ------------------------------------------
// Start of content
// ------------------------------------------
#include "content/audition.typ"
#include "content/preface.typ"
#include "content/outline.typ"
#set heading(numbering: "1.")
// start numbering pages with numeric digits
#set page(numbering: "1.")
#let filter_heading(heading) = {
heading.level == 1
}
#set page(
binding: left,
header-ascent: 2em,
header: locate(loc => {
let current_heading = query(selector(heading).after(here())).filter(filter_heading).first()
let heading_depth = counter(heading).get().at(0) + 1
table(columns: (1fr, auto),
align: (left, right),
stroke: none,
inset: (top: 0pt, bottom: 0.5em, left: 0pt, right: 0pt),
text(size: prelude.to_pt(prelude.format.font-size))[#heading_depth #current_heading.body],
text(size: prelude.to_pt(prelude.format.font-size), counter(page).display("1")),
table.hline()
)
}),
footer: ""
)
#set heading(supplement: [Heading])
#include "pages/introduction.typ"
// ------------------------------------------
// Actual work pages follow here
// ------------------------------------------
#include "content/bibliography.typ"
#include "pages/appendix.typ"

View File

@ -1,17 +0,0 @@
#import "../prelude.typ" as prelude
= Abstract
// abstract text goes here
#let abstract = [
]
// summary text goes here
// and is only included if the language is set to german
#if prelude.format.language == "de" [
= Zusammenfassung
]

View File

@ -1,65 +0,0 @@
#import "../prelude.typ" as prelude
// ------------------------------------------
// Appendix setup
// ------------------------------------------
// function for filtering out all heading which are not of level 1
#let filter_heading(heading) = {
heading.level == 1
}
#set page(
binding: left,
header-ascent: 2em,
header: locate(loc => {
let current_heading = query(selector(heading).after(here())).filter(filter_heading).first()
table(columns: (1fr, auto),
align: (left, right),
stroke: none,
inset: (top: 0pt, bottom: 0.5em, left: 0pt, right: 0pt),
text(size: prelude.to_pt(prelude.format.font-size))[#current_heading.body],
text(size: prelude.to_pt(prelude.format.font-size), counter(page).display("1")),
table.hline()
)
}),
footer: ""
)
#set heading(numbering: none)
#if prelude.format.language == "de" [
= Anhang
] else if prelude.format.language == "en" [
= Appendix
] else [
#panic("no translation for language: ", prelude.format.language)
]
#set heading(numbering: "A.1")
// reset page counter
#counter(heading).update(1)
#let appendix(text) = [
#heading(
supplement: [Appendix],
level: 2,
numbering: "A.1",
)[#text]
<#text>
]
// ------------------------------------------
// Put your appendencies here and link them
// to correclty reference them in the document
// ------------------------------------------
// Example:
//
// #appendix([Titel])
//
// Some appendix content goes here
// Then reference it in the document:
// @Titel

View File

@ -1,31 +0,0 @@
#import "../prelude.typ" as prelude
// title
#if prelude.format.language == "de" [
= Sperrvermerk
] else if prelude.format.language == "en" [
= Confidential Clause
] else [
#panic("no translation for language: ", prelude.format.language)
]
#v(1cm)
#prelude.largetext()[
#if prelude.format.language == "de" [
Der Inhalt dieser Arbeit darf weder als Ganzes noch in
Auszügen Personen außerhalb des Prüfungsprozesses
und des Evaluationsverfahrens zugänglich gemacht werden,
sofern keine anders lautende Genehmigung der Ausbildungsstätte vorliegt.
] else if prelude.format.language == "en" [
The content of this thesis may not be made accessible
to persons outside the examination process and the evaluation procedure,
either in whole or in part, unless otherwise authorized by the institution.
] else [
#panic("no translation for language: ", prelude.format.language)
]
]
#prelude.signature
#pagebreak()

View File

@ -1,49 +0,0 @@
#import "../prelude.typ" as prelude
#set align(center)
// title
#if prelude.format.language == "de" [
= Selbständigkeitserklärung
] else if prelude.format.language == "en" [
= Declaration of independence
] else [
#panic("no translation for language: ", prelude.format.language)
]
#v(1cm)
#prelude.largetext()[
#if prelude.format.language == "de" [
Ich versichere hiermit, dass ich meine #linebreak() Prüfung mit dem Thema
] else if prelude.format.language == "en" [
I hereby certify that I have written my #linebreak() exam with the topic
] else [
#panic("no translation for language: ", prelude.format.language)
]
]
#v(1cm)
#prelude.title(prelude.info.titel)
// subtitle
#prelude.subtitle(prelude.info.untertitel)
#set align(left)
#v(1cm)
#prelude.largetext()[
#if prelude.format.language == "de" [
selbständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel benutzt habe.
Ich versichere zudem, dass die eingereichte elektronische Fassung mit der gedruckten Fassung übereinstimmt.
] else if prelude.format.language == "en" [
independently and have not used any sources or aids other than those specified.
I also confirm that the electronic version submitted is identical to the printed version.
] else [
#panic("no translation for language: ", prelude.format.language)
]
]
#prelude.signature
#pagebreak()

View File

@ -1,23 +0,0 @@
#import "../prelude.typ" as prelude
// title
#if prelude.format.language == "de" [
= Gender-Hinweis
] else if prelude.format.language == "en" [
= Gender note
] else [
#panic("no translation for language: ", prelude.format.language)
]
#prelude.largetext()[
#if prelude.format.language == "de" [
Zur besseren Lesbarkeit wird in dieser Arbeit das generische Maskulinum verwendet.
Die in dieser Arbeit verwendeten Personenbezeichnungen beziehen sich, sofern nicht anders kenntlich gemacht, auf alle Geschlechter.
] else if prelude.format.language == "en" [
For better readability, the generic masculine is used in this work.
The personal designations used in this work refer to all genders, unless otherwise indicated.
] else [
#panic("no translation for language: ", prelude.format.language)
]
]

View File

@ -1,4 +0,0 @@
#import "../prelude.typ" as prelude
= Einleitung

View File

@ -1,10 +0,0 @@
#import "../prelude.typ" as prelude
= Vorwort
= Firmengeschichte
= Das Unternehmen ABB
= Abteilung

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -1,142 +0,0 @@
#import "../prelude.typ" as prelude
#let LogoHeight = 1.5cm
#set align(center)
// logo of ABB and DHBW
#grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
// left align logo of ABB
align(left, image("../../res/svg/ABB.svg", height: LogoHeight)),
// right align logo of DHBW
align(right, image("../../res/svg/DHBW.svg", height: LogoHeight))
)
// title
#v(2cm)
#prelude.title(prelude.info.titel)
// subtitle
#prelude.subtitle(prelude.info.untertitel)
// type of paper
#v(1cm)
#prelude.largetext(prelude.info.typ)
// number of semester
#if prelude.format.language == "de" [
Praxisphase des #prelude.info.semester Studienjahrs
] else if prelude.format.language == "en" [
Practical phase of the #prelude.info.semester academic year
] else [
#panic("no translation for language: ", prelude.format.language)
]
// fakulty
#pad(top: 0.5cm)[
#if prelude.format.language == "de" [
an der Fakultät für #prelude.info.fakultät
#linebreak()
im Studiengang #prelude.info.studiengang
] else if prelude.format.language == "en" [
at the Faculty of #prelude.info.fakultät
#linebreak()
in the degree program #prelude.info.studiengang
] else [
#panic("no translation for language: ", prelude.format.language)
]
]
// university
#pad(top: 0.5cm)[
#if prelude.format.language == "de" [
an der
] else if prelude.format.language == "en" [
at
] else [
#panic("no translation for language: ", prelude.format.language)
]
#linebreak()
#prelude.info.universität
]
#set align(bottom + left)
#if prelude.format.language == "de" [
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
"Verfasser:",
prelude.info.autor,
"Bearbeitungszeitraum:",
prelude.info.bearbeitungszeitraum,
"Matrikelnummer, Kurs:",
str(prelude.info.matrikelnummer) + ", " + prelude.info.studiengang,
"Ausbildungsbetrieb:",
prelude.info.betrieb,
"Betrieblicher Betreuer:",
prelude.info.betreuer,
"Abgabedatum:",
prelude.info.abgabe
)
] else if prelude.format.language == "en" [
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
"Author:",
prelude.info.autor,
"Editing period:",
prelude.info.bearbeitungszeitraum,
"Matriculation number, course:",
str(prelude.info.matrikelnummer) + ", " + prelude.info.studiengang,
"Training company:",
prelude.info.betrieb,
"Company supervisor:",
prelude.info.betreuer,
"Submission date:",
prelude.info.abgabe
)
] else [
#panic("no translation for language: ", prelude.format.language)
]
#pad(
top: 1cm,
grid(
// set width of columns
// we need two, so make both half the page width
columns: (60%, 40%),
align(left, if prelude.format.language == "de" [
Unterschrift des betrieblichen Betreuers
] else if prelude.format.language == "en" [
Signature of the company supervisor
] else [
#panic("no translation for language: ", prelude.format.language)
]
),
align(right, {line(length: 6cm)})
)
)
#pagebreak()
#counter(page).update(1)

144
src/pages/titlepage.typ Normal file
View File

@ -0,0 +1,144 @@
#let new_title_page() = [
#let LogoHeight = 1.5cm
#set align(center)
// logo of ABB and DHBW
#grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
// left align logo of ABB
align(left, image("../../res/svg/ABB.svg", height: LogoHeight)),
// right align logo of DHBW
align(right, image("../../res/svg/DHBW.svg", height: LogoHeight))
)
// title
#v(2cm)
#prelude.title(prelude.info.titel)
// subtitle
#prelude.subtitle(prelude.info.untertitel)
// type of paper
#v(1cm)
#prelude.largetext(prelude.info.typ)
// number of semester
#if prelude.format.language == "de" [
Praxisphase des #prelude.info.semester Studienjahrs
] else if prelude.format.language == "en" [
Practical phase of the #prelude.info.semester academic year
] else [
#panic("no translation for language: ", prelude.format.language)
]
// fakulty
#pad(top: 0.5cm)[
#if prelude.format.language == "de" [
an der Fakultät für #prelude.info.fakultät
#linebreak()
im Studiengang #prelude.info.studiengang
] else if prelude.format.language == "en" [
at the Faculty of #prelude.info.fakultät
#linebreak()
in the degree program #prelude.info.studiengang
] else [
#panic("no translation for language: ", prelude.format.language)
]
]
// university
#pad(top: 0.5cm)[
#if prelude.format.language == "de" [
an der
] else if prelude.format.language == "en" [
at
] else [
#panic("no translation for language: ", prelude.format.language)
]
#linebreak()
#prelude.info.universität
]
#set align(bottom + left)
#if prelude.format.language == "de" [
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
"Verfasser:",
prelude.info.autor,
"Bearbeitungszeitraum:",
prelude.info.bearbeitungszeitraum,
"Matrikelnummer, Kurs:",
str(prelude.info.matrikelnummer) + ", " + prelude.info.studiengang,
"Ausbildungsbetrieb:",
prelude.info.betrieb,
"Betrieblicher Betreuer:",
prelude.info.betreuer,
"Abgabedatum:",
prelude.info.abgabe
)
] else if prelude.format.language == "en" [
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
"Author:",
prelude.info.autor,
"Editing period:",
prelude.info.bearbeitungszeitraum,
"Matriculation number, course:",
str(prelude.info.matrikelnummer) + ", " + prelude.info.studiengang,
"Training company:",
prelude.info.betrieb,
"Company supervisor:",
prelude.info.betreuer,
"Submission date:",
prelude.info.abgabe
)
] else [
#panic("no translation for language: ", prelude.format.language)
]
#pad(
top: 1cm,
grid(
// set width of columns
// we need two, so make both half the page width
columns: (60%, 40%),
align(left, if prelude.format.language == "de" [
Unterschrift des betrieblichen Betreuers
] else if prelude.format.language == "en" [
Signature of the company supervisor
] else [
#panic("no translation for language: ", prelude.format.language)
]
),
align(right, {line(length: 6cm)})
)
)
#pagebreak()
#counter(page).update(1)
]

View File

@ -1,51 +0,0 @@
#import "../prelude.typ" as prelude
// title
#if prelude.format.language == "de" [
= Übersicht Arbeitspakete
Folgende Tabelle zeigt die Aktivtäten welche im Zeitraum vom #prelude.info.bearbeitungszeitraum abgehandelt wurden.
] else if prelude.format.language == "en" [
= Work package overview
The following table shows the activities that were covered during the #prelude.info.processing period.
] else [
#panic("no translation for language: ", prelude.format.language)
]
#let table_align(col, row) = {
if row == 0 {
center
} else {
left
}
}
#figure(
kind: table,
caption: if prelude.format.language == "de" [
Übersicht Arbeitspakete
] else if prelude.format.language == "en" [
Work package overview
] else [
#panic("no translation for language: ", prelude.format.language)
],
table(
columns: (1fr, auto, auto),
align: table_align,
inset: 0.25cm,
[*Thema*], [*Zeitraum*], [*Dauer (Wochen)*],
..for packet in prelude.info.arbeits-pakete {
let start_split = packet.start.split(".")
let start = datetime(day: int(start_split.at(0)), month: int(start_split.at(1)), year: int(start_split.at(2)))
let end_split = packet.ende.split(".")
let end = datetime(day: int(end_split.at(0)), month: int(end_split.at(1)), year: int(end_split.at(2)))
let dur = end - start
(packet.thema, packet.start + " - " + packet.ende, str(calc.round(dur.weeks())))
}
)
)
#pagebreak()

View File

@ -1,9 +0,0 @@
// import extras
#import "extra/util.typ": title, subtitle, largetext, signature, to_cm, to_pt, to_em
// import document information
#let info = yaml("../conf/info.yaml")
// general document information
#let format = yaml("../conf/format.yaml")

22
src/style.typ Normal file
View File

@ -0,0 +1,22 @@
// .--------------------------------------------------------------------------.
// | Global style of document |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 27.06.2024
// License: MIT
// global style of document
#let global_styled_doc(doc: content) = [
// set page geometry
// paper format of A4
#set page(
paper: "a4",
margin: (left: 3cm, right: 2cm, top: 2cm, bottom: 2cm))
#doc
]

26
src/template.typ Normal file
View File

@ -0,0 +1,26 @@
// .--------------------------------------------------------------------------.
// | Template of DHBW thesis |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 27.06.2024
// License: MIT
// start of template pages and styles
#let dhbw-template(doc) = [
#import "style.typ": global_styled_doc
// apply global style to every element in the argument content
#global_styled_doc(doc: [
#import "pages/titlepage.typ": new_title_page
// preppend title page
#new_title_page()
// code of document follows here
#doc
])
]