Compare commits

...

14 Commits

Author SHA1 Message Date
16ab666f74 Bump acrostiche to v0.7.0 2026-03-04 21:29:18 +01:00
7bc2ba0c33 backport addendum-index fix 2026-02-24 08:06:21 +01:00
78966cecde backport/update dependencies 2026-02-12 08:01:12 +01:00
5c09e20dc6 Add supplement for addendum 2025-09-11 16:53:41 +02:00
5cd21dd2cf Fix Outline Styles when using Figure sources 2025-09-10 08:35:21 +02:00
f77021aa57 Add #show: addendum
Add #show: addendum before your addendum to insert an addendum-outline and correct formatting
2025-09-09 13:34:31 +02:00
add3eff5a6 Modify outlines
Please tag your "Addendum"-Heading with <dhsn.addendum> and use #addendum-outline() before your addendum!
2025-09-09 11:48:40 +02:00
2c42f6f55f correct line spacing outside of text blocks 2025-09-05 09:18:51 +02:00
e8cbd09b8a fix formatting in addendum and code blocks 2025-09-04 10:32:51 +02:00
b822cb1312 correct line-height! 2025-09-04 10:08:53 +02:00
6b6b2dab2e IMPORTANT: Update line-height parameter and other formatting 2025-09-04 10:04:09 +02:00
8f9e1c4c7f Correct display of sources, pagebreak after every outline type 2025-08-29 08:07:18 +02:00
dcdac322a3 Add contribution information 2025-08-14 09:37:52 +02:00
15e3e9eccb fix outline typos 2025-08-14 09:37:35 +02:00
2 changed files with 254 additions and 198 deletions

View File

@@ -64,3 +64,15 @@ This content is taken out of a book #footnote[Vgl. @booklabel]
This content is taken out of another book #footnote[Vgl. #cite(<anotherbook>), S. 15] This content is taken out of another book #footnote[Vgl. #cite(<anotherbook>), S. 15]
```` ````
## How to contribute
If you have any suggestions/feedback or wnat to submit a pull request, usually you would do it via an issue or a direct pull request on this instance. But registration is not enabled here so the best way to do it would be:
1. Clone the repo
2. Make your changes
3. Upload the repo to another git server (e.x. github, codeberg,...)
4. Send a friendly mail to s3005647@edu.dhsn.de with a link to the repo or the .patch file of the commit(s) an attachment.
5. I will merge your changes into this repo!
*If you have any other suggestions besides pull requests, you can also send a mail to s3005647@edu.dhsn.de*

440
dhsn.typ
View File

@@ -1,198 +1,242 @@
#import "@preview/acrostiche:0.6.0": * #import "@preview/acrostiche:0.7.0": *
#let statement(location, submission-date, gender) = context [ #let statement(location, submission-date, gender) = context [
#pagebreak() #pagebreak()
#set heading(numbering: none) #set heading(numbering: none)
#set page(footer: none, numbering: none) #set page(footer: none, numbering: none)
= Eidesstattliche Erklärung = Eidesstattliche Erklärung
Ich erkläre an Eides statt, dass ich die vorliegende Arbeit Ich erkläre an Eides statt, dass ich die vorliegende Arbeit
selbständig und ohne unerlaubte fremde Hilfe angefertigt, andere als selbständig und ohne unerlaubte fremde Hilfe angefertigt, andere als
die angegebenen Quellen und Hilfsmittel nicht benutzt habe. Die aus die angegebenen Quellen und Hilfsmittel nicht benutzt habe. Die aus
fremden Quellen direkt oder indirekt übernommenen Stellen sind als fremden Quellen direkt oder indirekt übernommenen Stellen sind als
solche kenntlich gemacht.\ solche kenntlich gemacht.\
Die Zustimmung des Partnerunternehmens in der Praxis zur Verwendung betrieblicher Unterlagen habe ich eingeholt.\ Die Zustimmung des Partnerunternehmens in der Praxis zur Verwendung betrieblicher Unterlagen habe ich eingeholt.\
Die Arbeit wurde bisher in gleicher oder ähnlicher Form keiner anderen Die Arbeit wurde bisher in gleicher oder ähnlicher Form keiner anderen
Prüfungsbehörde vorgelegt und auch nicht veröffentlicht. Prüfungsbehörde vorgelegt und auch nicht veröffentlicht.
#v(1.5cm) #v(1.5cm)
#grid( #grid(
columns: (50%, 50%), column-gutter: 1cm,
column-gutter: 1cm, columns: (50%, 50%),
row-gutter: 10pt, row-gutter: 10pt,
[#location, #submission-date.display("[day].[month].[year]")], align(bottom, line(length: 6cm, stroke: 0.75pt)), [#location, #submission-date.display("[day].[month].[year]")], align(bottom, line(length: 6cm, stroke: 0.75pt)),
[Ort, Abgabetermin], [],
( (
if gender == none { if gender == none {
[Unterschrift des Verfassers] [Unterschrift des Verfassers]
} else if (gender == "M") { } else if (gender == "M") {
[Unterschrift des Verfassers] [Unterschrift des Verfassers]
} else if (gender == "F") { } else if (gender == "F") {
[Unterschrift der Verfasserin] [Unterschrift der Verfasserin]
} }
), ),
) )
]
#let dhsn( ]
topic: "Thema der Arbeit", #let addendum(supplement: "Anhang", body) = {
subtitle: [Art der Arbeit], pagebreak()
group: "0XY99-0", counter(heading).update(0)
company-data: [Praxispartner GmbH \ 01234 Stadt], set heading(numbering: none)
author: "Maxi Musterfrau", context if query(selector(figure).after(here())).len() > 0 {
author_gender: none, {
location: "Dresden", show regex("[\n,;.]? *Quelle:.*"): none
consultants: ( show ref: none
( {
gender: "M", show heading: none
name: "Person Eins", heading(numbering: none)[Anhangverzeichnis]
), }
( outline(title: "Anhangverzeichnis", target: selector(figure).after(here()))
gender: "F", pagebreak()
name: "Person Zwei", }
), set figure(kind: raw, supplement: "Anhang")
), counter(figure.where(kind: raw)).update(0)
assignment-date: datetime.today(),
submission-date: datetime.today(), [= #supplement <dhsn.addendum>]
bib: none, body
body, pagebreak()
) = { } else {
// show figure.where(kind: table): set figure(kind: raw, supplement: "Anhang") body
show figure.where(kind: raw): set figure(supplement: "Anhang") }
set heading(numbering: (..nums) => nums.pos().map(str).join(".")) }
#let dhsn(
set bibliography(style: "harvard-cite-them-right", title: "Literaturverzeichnis") topic: "Thema der Arbeit",
set cite(form: "prose") subtitle: [Art der Arbeit],
show cite: c => { group: "0XY99-0",
show "ohne Datum": "o.D." company-data: [Praxispartner GmbH \ 01234 Stadt],
show regex("ohne Datum \D\)"): it => { author: "Maxi Musterfrau",
show ")": "])" author_gender: none,
show "ohne Datum ": "o.D.[" location: "Dresden",
it consultants: (
} (
c gender: "M",
} name: "Person Eins",
set text(size: 12pt, lang: "de", region: "de") ),
set par(justify: true) (
set page( gender: "F",
margin: ( name: "Person Zwei",
top: 2cm, ),
bottom: 2cm, ),
left: 3cm, assignment-date: datetime.today(),
right: 2cm, submission-date: datetime.today(),
), bib: none,
footer: context [ body,
#align(right)[#counter(page).display()] ) = {
], // show figure.where(kind: table): set figure(kind: raw, supplement: "Anhang")
) set heading(numbering: (..nums) => nums.pos().map(str).join("."))
context [ set bibliography(style: "harvard-cite-them-right", title: "Literaturverzeichnis")
#set page(footer: none, margin: (left: 2cm)) set document(
#set text(size: 14pt) title: topic,
#show heading.where(level: 1): it => { author: author,
set text(size: 24pt) description: [#subtitle],
block(it.body) date: submission-date,
} )
#grid( set cite(form: "prose")
columns: (50%, 50%), show cite: c => {
gutter: 5pt, show "ohne Datum": "o.D."
align(left + bottom)[Duale Hochschule Sachsen\ show regex("ohne Datum \D\)"): it => {
Staatliche Studienakademie Dresden\ show ")": "])"
#group], show "ohne Datum ": "o.D.["
align(right + bottom)[_Praxispartner:_\ #company-data], it
) }
c
}
#align(center + horizon)[ set text(size: 12pt, lang: "de", region: "de")
#block(width: 15cm, [#heading(level: 1, outlined: false, numbering: none)[#topic] set par(justify: true, leading: 1.2em)
#v(1.5cm) show heading: set block(below: 1.2em)
#subtitle show figure: set par(leading: 0.8em)
#v(1.5cm) show figure.caption: set text(size: 10pt)
eingereicht von:\ show table: set par(leading: 0.8em)
#author]) show raw: it => {
] if (it.lines.first().count > 1) {
#align(bottom)[ set par(leading: 1em)
#for c in consultants { it
if (c.keys().contains("gender") == false) { } else {
[Gutachter/in: ] it
} else if (c.gender == "M") { }
[Gutachter: ] }
} else if (c.gender == "F") { set page(
[Gutachterin: ] margin: (
} top: 2cm,
c.name bottom: 2cm,
linebreak() left: 3cm,
} right: 2cm,
#v(1cm) ),
Tag der Themenübergabe: #assignment-date.display("[day].[month].[year]") footer: context [
#align(right)[#counter(page).display()]
Tag der Einreichung: #submission-date.display("[day].[month].[year]") ],
#v(3cm) )
]
#pagebreak() context [
] #set page(footer: none, margin: (left: 2cm))
set page(numbering: (..nums) => numbering("I", counter(page).get().at(0))) #set text(size: 14pt)
#set par(leading: (1 / 1.2) * 1em)
{ #show heading.where(level: 1): it => {
show heading: none set text(size: 24pt)
heading(numbering: none)[Inhaltsverzeichnis] block(it.body)
} }
outline(indent: 0%) #grid(
columns: (50%, 50%),
pagebreak() gutter: 5pt,
align(left + bottom)[Duale Hochschule Sachsen\
context { Staatliche Studienakademie Dresden\
if query(figure.where(kind: image)).len() > 0 { #group],
{ align(right + bottom)[_Praxispartner:_\ #company-data],
show heading: none )
heading(numbering: none)[Abbildungsverzeichnis]
}
outline(title: "Abbildungsverzeichnis", target: figure.where(kind: image)) #align(center + horizon)[
} #block(width: 15cm, [#heading(level: 1, outlined: false, numbering: none)[#topic]
} #v(1.5cm)
context { #subtitle
if query(figure.where(kind: raw)).len() > 0 { #v(1.5cm)
{ eingereicht von:\
show heading: none #author])
heading(numbering: none)[Anhangverzeichnis] ]
} #align(bottom)[
outline(title: "Anhangverzeichnis", target: figure.where(kind: raw)) #for c in consultants {
} if (c.keys().contains("gender") == false) {
} [Gutachter/in: ]
context { } else if (c.gender == "M") {
if query(figure.where(kind: table)).len() > 0 { [Gutachter: ]
{ } else if (c.gender == "F") {
show heading: none [Gutachterin: ]
heading(numbering: none)[Tabellenverzeichnis] }
} c.name
outline(title: "Tabellenverzeichnis", target: figure.where(kind: table)) linebreak()
} }
} #v(1cm)
Tag der Themenübergabe: #assignment-date.display("[day].[month].[year]")
context {
if (acros.get() != none and acros.get().len() > 0) { Tag der Einreichung: #submission-date.display("[day].[month].[year]")
{ #v(3cm)
show heading: none ]
heading(numbering: none)[Abkürzungsverzeichnis] #pagebreak()
} ]
print-index(title: "Abkürzungsverzeichnis", row-gutter: 5pt) set page(numbering: (..nums) => numbering("I", counter(page).get().at(0)))
}
} {
show heading: none
heading(numbering: none)[Inhaltsverzeichnis]
pagebreak() }
counter(page).update(1) outline(indent: 0%)
set page(numbering: (..nums) => numbering("1", counter(page).get().at(0)))
pagebreak()
body
{ context {
show "ohne Datum": "o.D." show regex("[\n,;.]? *Quelle:.*"): none
show regex("ohne Datum \D\)"): it => { show ref: none
show ")": "])" if query(selector(figure.where(kind: image).before(<dhsn.addendum>))).len() > 0 {
show "ohne Datum ": "o.D.[" {
it show heading: none
} heading(numbering: none)[Abbildungsverzeichnis]
bib }
}
statement(location, submission-date, author_gender) outline(title: "Abbildungsverzeichnis", target: selector(figure.where(kind: image)).before(<dhsn.addendum>))
} }
if query(selector(figure.where(kind: table)).before(<dhsn.addendum>)).len() > 0 {
{
show heading: none
heading(numbering: none)[Tabellenverzeichnis]
}
outline(title: "Tabellenverzeichnis", target: selector(figure.where(kind: table)).before(<dhsn.addendum>))
}
if (
query(selector(figure.where(kind: table).or(figure.where(kind: table))).before(<dhsn.addendum>)).len() > 0
) {
pagebreak()
counter(footnote).update(0)
}
}
context {
if (_acronyms.final() != none and _acronyms.final().len() > 0) {
{
show heading: none
heading(numbering: none)[Abkürzungsverzeichnis]
}
print-index(title: "Abkürzungsverzeichnis", row-gutter: 1.2em)
pagebreak()
}
}
counter(page).update(1)
set page(numbering: (..nums) => numbering("1", counter(page).get().at(0)))
body
{
show "ohne Datum": "o.D."
show regex("ohne Datum \D\)"): it => {
show ")": "])"
show "ohne Datum ": "o.D.["
it
}
show regex(`Zugegriffen\: \d+`.text): it => {
let day = str.replace(it.text, "Zugegriffen: ", "")
"Abgerufen am " + day + "."
}
bib
}
statement(location, submission-date, author_gender)
}