fixed appendix page header
This commit is contained in:
parent
edda30e460
commit
4c22a19cc7
|
@ -1,8 +1,31 @@
|
||||||
|
#import "../prelude.typ" as prelude
|
||||||
|
|
||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
// Appendix setup
|
// 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)
|
#set heading(numbering: none)
|
||||||
|
|
||||||
= Appendix
|
= Appendix
|
||||||
|
|
Loading…
Reference in New Issue