fixed appendix page header

This commit is contained in:
Sven Vogel 2024-04-04 12:55:30 +02:00
parent edda30e460
commit 4c22a19cc7
1 changed files with 23 additions and 0 deletions

View File

@ -1,8 +1,31 @@
#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)
= Appendix