Hi, I’ve setup a page numbering like - 1 -
but I’d want it to stay like the default numbering inside the outline.
I’ve found a solution using state, and it almost works perfectly BUT when the outline is spread on multiple pages, the page numbering (on the bottom of the page where the outline starts) stays the default one.
The original solution I’ve found set the in-outline
state to true
for the entire outline. I’ve tried to change it to true
only inside outline entries but it didn’t changed anything :/
I’ve recreated the problem in a minimal file : (also available here : Typst)
#let in-outline = state("in-outline", false)
#set page(height: 120pt)
#set page(numbering: (..n) => context {
if in-outline.get() {
numbering("1", n.at(0))
} else {
numbering("- 1 -", n.at(0))
}
})
#show outline.entry: it => {
in-outline.update(true)
it
in-outline.update(false)
}
#block(height: 40pt)
#outline()
= #lorem(5)
= #lorem(5)
Code Result :
Desired behavior :
Does someone here has an idea how to fix this ?