Why doesn't `#counter(page).display("Page 1/1", both: true)` display `Page 1/10`?

My footer contains

#counter(page).display("Page 1/1", both: true)

which produces

Page 3

instead of

Page 3/10

Is this a bug?

How do I get it to display Page 3/10?

#counter(page).display("Pg 1/1", both: true)

produces

Pg 3/10

but I want Page instead of Pg.

Notice how the spelling of the word Page changes on each page:

Page 10
Pbge 10
Pcge 10
etc...

The character a is interpreted by the counter as the symbol to increment, so it changes from a to b to c, etc…

To get your desired effect the “Page” should be placed outside of the display() function. This way there is no confusion about the display format that you want.

#set page(footer: context [Page #counter(page).display("1/1", both: true)])

#for _ in range(10) [
  #lorem(5)
  #pagebreak(weak: true)
]

3 Likes

The documentation has a list of symbols that are recognised as numbering symbols which are automatically counted up.

3 Likes