If you don’t have any other conflicting configuration of the footer, you could make your page numbering more regular ("1") and apply the extra decoration in the footer:
#set page(numbering: "1", footer: context {
let num = page.numbering
if num != none {
set align(page.number-align.x)
"- " + numbering(num, ..counter(page).get()) + " -"
}
})
The outline is smart and uses the page numbering as it was on each page, but it gives the wrong result in this case.
You can look at outline docs how to re-implement outline entry styling if you want, or apply something like the following, but any regex solution can of course have false positives:
#{
show outline.entry: it => {
show regex("- \d+ -"): it => {
it.text.trim(regex("[- ]"))
}
it
}
outline()
}
Change to what? With your current page numbering, you are trying to solve a different problem.
#counter(page).update(1) is fine.
Where what? What template? You include #show: templatehere. How can you import template from another function? Are you using currying or something?
If the template doesn’t matter, then you shouldn’t include it. Otherwise, include relevant parts. Your current example does not compile. See https://sscce.org/.