added: prelude of document

This commit is contained in:
Sven Vogel 2024-06-28 11:54:30 +02:00
parent 84d9133b9a
commit 381e8d5d42
6 changed files with 267 additions and 61 deletions

View File

@ -0,0 +1,49 @@
#let new_confidentiality_statement_page(
thesis,
author) = context [
#if text.lang == "de" [
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Sperrvermerk")
] else if text.lang == "en" [
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Confidentiality statement")
]
#if text.lang == "de" [
Der Inhalt der dieser Arbeit mit dem Thema
] else if text.lang == "en" [
The content of this work with the topic
]
#v(1em)
#set align(center)
*#thesis.title*
#thesis.subtitle
#set align(left)
#v(1em)
#set par(justify: true)
#if text.lang == "de" [
darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evalua-tionsverfahrens zugänglich gemacht werden, sofern keine anderslautende Genehmigung der Ausbildungsstätte vorliegt.
] else if text.lang = "en" [
may not be made accessible to persons outside the examination process and the evaluation procedure, either as a whole or in excerpts, unless otherwise authorized by the training institution.
]
#v(25%)
#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, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ place, date ] else { panic("no translation for language: ", text.lang) }),
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
]

View File

@ -0,0 +1,46 @@
#let new_declaration_of_authorship(thesis, author) = context [
#if text.lang == "de" [
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Selbständigkeitserklärung")
] else if text.lang == "en" [
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Declaration of authorship")
]
#v(1em)
#if text.lang == "de" [
Ich versichere hiermit, dass ich meine Prüfung mit dem Thema
] else if text.lang == "en" [
I hereby certify that I have passed my examination with the subject
]
#v(1em)
#set align(center)
*#thesis.title*
#thesis.subtitle
#set align(left)
#v(1em)
#set par(justify: true)
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.
#v(25%)
#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, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ place, date ] else { panic("no translation for language: ", text.lang) }),
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
]

View File

@ -0,0 +1,41 @@
#let new_prerelease_note(thesis, author) = context [
#if text.lang == "de" [
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Vorabfassung")
] else if text.lang == "en" [
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Preliminary version")
]
#v(1em)
#if text.lang == "de" [
Bei dieser Ausgabe der Arbeit mit dem Thema
] else if text.lang == "en" [
This edition of the work with the subject
]
#v(1em)
#set align(center)
*#thesis.title*
#thesis.subtitle
#set align(left)
#v(1em)
#set par(justify: true)
#if text.lang == "de" [
handelt es sich _nicht_ um die fertige Fassung. Das Dokument kann Inhaltliche-, Grammatikalische- sowie Format-Fehler enthalten. Das Dokument ist im Rahmen der Aufgabenstellung von Seiten der #author.university nicht zur Bewertung freigegeben und ein anderer Verwendungszweck als eine Vorschau ist nicht gestattet.
] else if text.lang == "en" [
is _not_ the final version. The document may contain content, grammatical and format errors. The document is not released for evaluation by #author.university within the scope of the assignment and any use other than a preview is not permitted.
]
#v(1em)
#h(1em) #author.name, #datetime.today().display()
]

View File

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

View File

@ -8,15 +8,53 @@
// License: MIT // License: MIT
// global style of document // global style of document
#let global_styled_doc(doc: content) = [ #let global_styled_doc(doc: content) = context [
// set page geometry // set page geometry
// paper format of A4 // paper format of A4
#set page( #set page(
paper: "a4", paper: "a4",
margin: (left: 3cm, right: 2cm, top: 2cm, bottom: 2cm)) margin: (left: 3cm, right: 2.5cm, top: 2.5cm, bottom: 2.5cm))
#set text(
size: 12pt,
ligatures: true,
hyphenate: true,
dir: ltr,
font: "Open Sans")
#show heading: set text(
font: "Montserrat",
weight: "semibold")
// Set header spacing
#show heading.where(level: 1): it => v(2em) + it + v(1em)
#show heading.where(level: 2): it => v(1em) + it + v(0.5em)
#show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
#set raw(tab-size: 4)
#doc #doc
] ]
#let HeaderPaddingBottom = 3em
#let LogoHeight = 3em
#let HeaderUnderlinePaddingTop = 8pt
#let prelude_styled(doc: content, thesis) = context [
#set page(
header-ascent: HeaderUnderlinePaddingTop + HeaderPaddingBottom,
numbering: "I",
margin: (top: 2.5cm + LogoHeight + HeaderUnderlinePaddingTop + HeaderPaddingBottom),
header: [
#grid(
columns: (1fr, auto),
align: (horizon, bottom),
context [ _ #thesis.title _ ],
image("pages/res/DHBW.svg", height: LogoHeight)
)
#v(HeaderUnderlinePaddingTop - 1em)
#line(length: 100%)
])
#doc
]

View File

@ -10,15 +10,48 @@
// start of template pages and styles // start of template pages and styles
#let dhbw-template(doc) = [ #let dhbw-template(doc) = [
#import "style.typ": global_styled_doc #import "style.typ": global_styled_doc, prelude_styled
// apply global style to every element in the argument content // apply global style to every element in the argument content
#global_styled_doc(doc: [ #global_styled_doc(doc: [
#import "pages/titlepage.typ": new_title_page #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
#set text(lang: "de", region: "de")
#let author = (
name: "Sven Vogel",
semester: 4,
program: "Informationstechnik",
course: "TINF22IT2",
faculty: "Technik",
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: "Florian Miedniak",
matriculation-number: 1191225
)
#let thesis = (
title: "Konfiguration & Integration von PROFINET",
subtitle: "für die AC500 SPS",
submission-date: "20. März 2024",
timeframe: "1. Januar 2023 - 20. März 2024",
kind: "T2000"
)
// preppend title page // preppend title page
#new_title_page() #new_title_page(thesis, author)
#prelude_styled(thesis, doc: [
#new_declaration_of_authorship(thesis, author)
#pagebreak()
#new_confidentiality_statement_page(thesis, author)
#pagebreak()
#new_prerelease_note(thesis, author)
])
// code of document follows here // code of document follows here
#doc #doc