How can I switch from Roman to Arabic page numbers without breaking the total page count?

Slightly shorter:

#set page(width: 6cm, height: 3cm, footer-descent: 0pt, margin: 4mm)
#set pagebreak(weak: true)

#set page(numbering: (..n) => context {
  numbering("I/I", n.at(0), ..counter(page).at(<last-roman-page>))
})

= I First Roman section
#pagebreak()

= II Second Roman section
#pagebreak()

= III Last Roman section

#metadata("last-roman-page") <last-roman-page>
#pagebreak()
#counter(page).update(1)
#set page(numbering: "1/1")

= 1 First Arabic section
#pagebreak()

= 2 Second Arabic section

P.S. I’ve looked at the 2 posts and was confused why I see what I’ve written just a moment ago, but don’t see my post. I thought it got removed or something. But apparently it’s a completely new topic and the one I was thinking about is How to use Arabic and Roman page numbers in one document? - #5 by Andrew.

1 Like