fix: update statement numbering with headings

This commit is contained in:
Popa committed 2026-09-11 15:08:56 +02:00
1 parent 337ff33853
commit 66b6c98cd0
6 files changed
+103 -72

No files matched your search

+9 -9
View File
@@ -15,6 +15,7 @@
tutor-label: none,
sheet-label: [Exercise Sheet],
logo: none,
track-heading-counter: true,
page-numbering: common-theme.page-numbering,
table-header-smallcaps: false,
text-font: base-theme.text-font,
@@ -66,18 +67,17 @@
show heading: set text(fill: colors.text)
let first-h1 = state("first-h1", true)
show heading.where(level: 1): it => {
if first-h1.get() {
first-h1.update(false)
} else {
if (not no-pagebreak) {
pagebreak(weak: true)
}
}
v(0.3em)
if track-heading-counter and it.numbering == none { counter(heading).step(level: 1) }
if first-h1.get() { first-h1.update(false) } else { if (not no-pagebreak) { pagebreak(weak: true) } }
it
v(-0.9em)
line(length: 100%, stroke: 0.4pt + colors.stroke)
v(0.3em)
v(0.25cm)
}
show heading.where(level: 2): it => {
if track-heading-counter and it.numbering == none { counter(heading).step(level: 2) }
it
}
set footnote(numbering: common-theme.footnote.numbering.note)
+8 -7
View File
@@ -16,6 +16,7 @@
attestations-from: none,
attestations-until: none,
info-text: none,
track-heading-counter: true,
page-numbering: common-theme.page-numbering,
group-digits: false,
decimal-comma: true,
@@ -50,13 +51,13 @@
let first-h1 = state("first-h1", true)
show heading.where(level: 1): it => {
if first-h1.get() {
first-h1.update(false)
} else {
if (not no-pagebreak) {
pagebreak(weak: true)
}
}
if track-heading-counter and it.numbering == none { counter(heading).step(level: 1) }
if first-h1.get() { first-h1.update(false) } else { if (not no-pagebreak) { pagebreak(weak: true) } }
it
}
show heading.where(level: 2): it => {
if track-heading-counter and it.numbering == none { counter(heading).step(level: 2) }
it
}