Added option regarding numbering equations.

This commit is contained in:
orca 2024-01-21 20:16:56 +01:00
parent 22bdb9cb19
commit f9224d3cce
Signed by: orca
GPG Key ID: 6923B8DFED96A68A
1 changed files with 8 additions and 1 deletions

View File

@ -52,4 +52,11 @@
E.g. if we are looking at the 6th equation in the 4th subheading
of the 2nd heading, it will show "(2.4.6)" in the right. */
#let numbering-equation(equation) = [(#counter(heading).display()#equation)]
#let numbered-equation(body) = math.equation(numbering: numbering-equation, block: true)[#body]
#let numbered-equation(body, name: "") = {
if name == "" {
math.equation(numbering: numbering-equation, block: true)[#body]
} else {
counter(math.equation).update(n => n - 1)
math.equation(numbering: it => "(" + name + ")", block: true)[#body]
}
}