Hi, I’m trying to have page numbers appear on all 4 corners of my pages. (If you’re wondering why I’m making such a bizarre design choice… it’s to make it easier to navigate the document while zoomed in on a tablet or phone)
I don’t have any fancy existing page setups except #set page(numbering: "1") which I will no longer be using.
What I have come up with so far is
#let page_num = context counter(page).get().first()
#set page(header: page_num, footer: page_num)
This has given me page numbers on the two corners on the left.
Then I saw this example in the documentation that has the content of the header parameter as a list:
#set par(justify: true)
#set page(
margin: (top: 32pt, bottom: 20pt),
header: [
#set text(8pt)
#smallcaps[Typst Academy]
#h(1fr) _Exercise Sheet 3_
],
)
#lorem(19)
Naturally I tried to mimic it:
#let page_num = context counter(page).get().first()
#set page(header: [page_num, page_num], footer: page_num)
Not what I was expecting! The compiler error message is hilarious, though:
Misspelling: The word "page_num" seems to be misspelled
How do I do this correctly?


