How to hide page numbering on empty pages when using `pagebreak(to: ...)`

Let’s say I have the following:

#set page(
  width: auto,
  height: auto,
  numbering: "1",
)

Hello World

#pagebreak(to: "odd")

Hello world

It results in the following pdf:

I’d like to know if there’s a way to avoid showing the numbering on the second page, i.e., hide the numbering on the empty page. The third page should still have the number 3, tho.

I tried show pagebreak: set page(numbering: none), but I get error: maximum show rule depth exceeded.

You can create a wrap the pagebreak call in a new scope and add set page(numbering: none) inside of it:

#set page(
  width: auto,
  height: auto,
  numbering: "1",
)

Hello World

#{
  set page(numbering: none)
  pagebreak(to: "odd")
}

Hello world

1 Like