Refactor heading display logic in product test template

This commit is contained in:
2026-07-07 13:25:54 +03:30
parent 2e997ff366
commit 4c79d7c6e4

View File

@@ -109,8 +109,6 @@
))],
)
]
line(length: 100%)
// set heading(numbering: "۱.۱- ")
set math.equation(numbering: "(1)")
set footnote(numbering: "۱.")
@@ -118,11 +116,24 @@
set footnote.entry(indent: 0em)
set align(right)
show heading: it => [
#set align(right)
#it.body
#v(10pt)
]
show heading: it => context {
let y = here().position().y
let body-top = if counter(page).get().first() > 1 {
page.margin.top + 28pt
} else {
page.margin.top
}
let not-at-top = y > body-top + 12pt
[
#if not-at-top and it.level <= 2 [
#line(length: 100%)
#v(8pt)
]
#set align(right)
#it.body
#v(10pt)
]
}
set text(spacing: 100%)
set par(