I would like page numbers to be aligned to the outside of pages; that is, to the left on verso and to the right on recto. I can do this with an if
inside a manual footer, but all I need is the basic numbering so it’d be nice to have this with a simple rule. I tried this:
#set page(number-align: left)
#show page: it => context {
let abspage = locate(here()).page();
if calc.odd(abspage) {
set page(number-align: right)
}
it
}
But that doesn’t seem to work. I also tried this:
// page(number-align) not manually set
#show page: it => context {
let abspage = locate(here()).page();
if calc.odd(abspage) {
set page(number-align: right)
} else {
set page(number-align: left)
}
it
}
In general, is there any easy way to align like this or do we just have to branch on the parity of the page number every time? I don’t see a relevant option in the alignment type.