Add #show: addendum

Add #show: addendum before your addendum to insert an addendum-outline and correct formatting
This commit is contained in:
2025-09-09 13:34:31 +02:00
parent add3eff5a6
commit f77021aa57

View File

@@ -20,8 +20,7 @@
column-gutter: 1cm, column-gutter: 1cm,
columns: (50%, 50%), columns: (50%, 50%),
row-gutter: 10pt, row-gutter: 10pt,
[#location, #submission-date.display("[day].[month].[year]")], [#location, #submission-date.display("[day].[month].[year]")], align(bottom, line(length: 6cm, stroke: 0.75pt)),
align(bottom, line(length: 6cm, stroke: 0.75pt)),
[], [],
( (
if gender == none { if gender == none {
@@ -35,8 +34,11 @@
) )
] ]
#let addendum-outline() = context { #let addendum(body) = {
if query(selector(figure).after(here())).len() > 0 { pagebreak()
counter(heading).update(0)
set heading(numbering: none)
context if query(selector(figure).after(here())).len() > 0 {
{ {
show heading: none show heading: none
heading(numbering: none)[Anhangverzeichnis] heading(numbering: none)[Anhangverzeichnis]
@@ -44,6 +46,13 @@
outline(title: "Anhangverzeichnis", target: selector(figure).after(here())) outline(title: "Anhangverzeichnis", target: selector(figure).after(here()))
pagebreak() pagebreak()
} }
set figure(kind: raw, supplement: "Anhang")
counter(figure.where(kind: raw)).update(0)
[= Anhang <dhsn.addendum>]
body
pagebreak()
} }
#let dhsn( #let dhsn(
topic: "Thema der Arbeit", topic: "Thema der Arbeit",
@@ -69,7 +78,6 @@
body, 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 heading(numbering: (..nums) => nums.pos().map(str).join("."))
set bibliography(style: "harvard-cite-them-right", title: "Literaturverzeichnis") set bibliography(style: "harvard-cite-them-right", title: "Literaturverzeichnis")
@@ -165,15 +173,28 @@
pagebreak() pagebreak()
context { context {
if query(selector(figure).before(<dhsn.addendum>)).len() > 0 { if query(selector(figure.where(kind: image).before(<dhsn.addendum>))).len() > 0 {
{ {
show heading: none show heading: none
heading(numbering: none)[Abbildungsverzeichnis] heading(numbering: none)[Abbildungsverzeichnis]
} }
outline(title: "Abbildungsverzeichnis", target: selector(figure).before(<dhsn.addendum>)) outline(title: "Abbildungsverzeichnis", target: selector(figure.where(kind: image)).before(<dhsn.addendum>))
pagebreak()
} }
} }
context {
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>))
}
}
context if (
query(selector(figure.where(kind: table).or(figure.where(kind: table))).before(<dhsn.addendum>)).len() > 0
) {
pagebreak()
}
context { context {
if (acros.get() != none and acros.get().len() > 0) { if (acros.get() != none and acros.get().len() > 0) {
@@ -181,7 +202,7 @@
show heading: none show heading: none
heading(numbering: none)[Abkürzungsverzeichnis] heading(numbering: none)[Abkürzungsverzeichnis]
} }
print-index(title: "Abkürzungsverzeichnis", row-gutter: 0.5em) print-index(title: "Abkürzungsverzeichnis", row-gutter: 1.2em)
pagebreak() pagebreak()
} }
} }