I saw there was a similar topic about this, but the proposed fix did not work for me, as I am already using Touying.
Here is a working example. As you can hopefully see, the last slide’s numbering resets:
#import "@preview/touying:0.5.3": *
#import themes.metropolis: *
#import themes.university: *
#import "@preview/ctheorems:1.1.3": *
#show: thmrules.with(qed-symbol: $square$)
#show: metropolis-theme.with(
aspect-ratio: "16-9",
align: top + left
)
#let theorem = thmbox(
"global.id",
"Theorem",
fill: rgb("#eeffee"),
base: none,
)
#let definition = thmbox(
"global.id",
"Definition",
inset: (x: 1.2em, top: 1em),
base: none,
)
#counter(heading).step()
#title-slide()
== Test slide 1
#definition[
This is definition 1
]
#definition[
This is definition 2
]
== A slide with no theorems
Wow, there really are no theorems here
#pause
Yup, even after pausing there is nothing interesting - But for some reason removing the pause fixes the numbering issue, even though it is not a realistic fix for my project
== The numbering resets
#definition[
This is definition 3. But it shows up as definition 1 later...
]
#pause
#theorem[
And this is the main theorem we will present. It is theorem 4
]