Hi guys! I’m currently using Touying 0.6.1 combined with Equate 0.3.0 to create slides. I noticed that when the same formula appears multiple times across different slides, it ends up being assigned different equation numbers. For example:
#import "@preview/touying:0.6.1": *
#import themes.metropolis: *
#import "@preview/equate:0.3.0": equate
#set math.equation(numbering:"(1)")
#show: equate.with(breakable: false, sub-numbering: false, number-mode: "label")
#import "@preview/numbly:0.1.0": numbly
#show ref: it => {
let eq = math.equation
let el = it.element
if el != none and el.func() == eq {
// Override equation references.
numbering(
el.numbering,
..counter(eq).at(el.location())
)
} else {
// Other references as usual.
it
}
}
#show: metropolis-theme.with(
aspect-ratio: "16-9",
pagination: none,
footer: [],
footer-right: [],
config-info(
title: [$section 3$ Example],
subtitle: [],
author: [SpringFiled],
date: datetime.today(),
institution: [],
lang: "zh",
font: ("Linux Libertine", "Source Han Sans SC", "Source Han Sans")
),
config-common(handout: true)
)
#set heading(numbering: numbly(none, default: none))
// Extract slide functions
#set text(font: "Noto Sans CJK SC")
#title-slide()
= Example
== Formula
$
a=b
$ <AB>
==
$
a=b
$ <AB>
Here, the formula a = b
is labeled as equation (1) on the first slide, but as equation (2) on the next slide, even though it’s exactly the same equation.
How can I resolve this issue so that identical equations appearing multiple times across different slides share the same equation number? Many thanks!
PS: Additionally, I would like to number some (not all) equations in the form like (3.9A) rather than (3.9). How can I make it happen?