From 48181ca045fa2f6844c058300b93fcab47ee6a14 Mon Sep 17 00:00:00 2001 From: marius Date: Thu, 7 Aug 2025 13:15:38 +0200 Subject: [PATCH] Update typos, add arguments, change cite-style - Fix Typos in statement - Add argument "author_gender" (M/F) - Make all indexes conditional to only display if they have any content in them (for example only display the image index if you have image figures) - Change citation style to "harvard-cite-them-all" with customizations to match the dhsn-cite-style --- dhsn.typ | 103 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 82 insertions(+), 21 deletions(-) diff --git a/dhsn.typ b/dhsn.typ index 821a71f..3a41ae4 100644 --- a/dhsn.typ +++ b/dhsn.typ @@ -1,6 +1,9 @@ -#let statement(location) = context [ +#import "@preview/acrostiche:0.6.0": * + +#let statement(location, submission-date, gender) = context [ #pagebreak() #set heading(numbering: none) + #set page(footer: none, numbering: none) = Eidesstattliche Erklärung Ich erkläre an Eides statt, dass ich die vorliegende Arbeit @@ -8,8 +11,7 @@ die angegebenen Quellen und Hilfsmittel nicht benutzt habe. Die aus fremden Quellen direkt oder indirekt übernommenen Stellen sind als solche kenntlich gemacht.\ - Die Zustimmung des Partnerunternehmens in der Praxis zur Verwen- - dung 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 Prüfungsbehörde vorgelegt und auch nicht veröffentlicht. @@ -18,8 +20,17 @@ columns: (50%, 50%), column-gutter: 1cm, row-gutter: 10pt, - [#location, #datetime.today().display("[day].[month].[year]")], align(bottom, line(length: 6cm, stroke: 0.75pt)), - [Ort, Abgabetermin], [Unterschrift des Verfassers], + [#location, #submission-date.display("[day].[month].[year]")], align(bottom, line(length: 6cm, stroke: 0.75pt)), + [Ort, Abgabetermin], + ( + if gender == none { + [Unterschrift des Verfassers] + } else if (gender == "M") { + [Unterschrift des Verfassers] + } else if (gender == "F") { + [Unterschrift der Verfasserin] + } + ), ) ] #let dhsn( @@ -28,6 +39,7 @@ group: "0XY99-0", company-data: [Praxispartner GmbH \ 01234 Stadt], author: "Maxi Musterfrau", + author_gender: none, location: "Dresden", consultants: ( ( @@ -44,12 +56,21 @@ bib: none, body, ) = { - show figure.where(kind: table): set figure(kind: raw, supplement: "Anhang") + // show figure.where(kind: table): set figure(kind: raw, supplement: "Anhang") show figure.where(kind: raw): set figure(supplement: "Anhang") set heading(numbering: (..nums) => nums.pos().map(str).join(".")) - set bibliography(style: "springer-basic-author-date", title: "Literaturverzeichnis") + set bibliography(style: "harvard-cite-them-right", title: "Literaturverzeichnis") set cite(form: "prose") + show cite: c => { + show "ohne Datum": "o.D." + show regex("ohne Datum \D\)"): it => { + show ")": "])" + show "ohne Datum ": "o.D.[" + it + } + c + } set text(size: 12pt, lang: "de", region: "de") set par(justify: true) set page( @@ -57,7 +78,7 @@ top: 2cm, bottom: 2cm, left: 3cm, - right: 3cm, + right: 2cm, ), footer: context [ #align(right)[#counter(page).display()] @@ -110,28 +131,68 @@ #pagebreak() ] set page(numbering: (..nums) => numbering("I", counter(page).get().at(0))) + + { + show heading: none + heading(numbering: none)[Inhaltsverzeichnis] + } outline(indent: 0%) + pagebreak() - { - show heading: none - heading(numbering: none)[Abbildungsverzeichnis] + + context { + if query(figure.where(kind: image)).len() > 0 { + { + show heading: none + heading(numbering: none)[Abbildungsverzeichnis] + } + outline(title: "Abbildungsverzeichnis", target: figure.where(kind: image)) + } + } + context { + if query(figure.where(kind: raw)).len() > 0 { + { + show heading: none + heading(numbering: none)[Anhangverzeichnis] + } + outline(title: "Anhangverzeichnis", target: figure.where(kind: raw)) + } + } + context { + if query(figure.where(kind: table)).len() > 0 { + { + show heading: none + heading(numbering: none)[Tabellenverzeichnis] + } + outline(title: "Tabellenverzeichnis", target: figure.where(kind: table)) + } + } + + context { + if (acros.get().len() > 0) { + { + show heading: none + heading(numbering: none)[Abkürzungsverzeichnis] + } + print-index(title: "Abkürzungsverzeichnis", row-gutter: 5pt) + } } - outline(title: "Abbildungsverzeichnis", target: figure.where(kind: image)) - { - show heading: none - heading(numbering: none)[Anhangverzeichnis] - } - outline(title: "Anhangverzeichnis", target: figure.where(kind: table).or(figure.where(kind: raw))) pagebreak() counter(page).update(1) set page(numbering: (..nums) => numbering("1", counter(page).get().at(0))) body - - bib - - statement(location) + { + show "ohne Datum": "o.D." + show regex("ohne Datum \D\)"): it => { + show ")": "])" + show "ohne Datum ": "o.D.[" + it + } + bib + } + statement(location, submission-date, author_gender) }