typst-equate
typst-equate copied to clipboard
Add more documentation about `number-mode`
It would be nice if there were a way to avoid assigning equation numbers to equations that do not need to be referenced.
Related:
- https://github.com/typst/typst/issues/3031#issuecomment-2515355592
- https://forum.typst.app/t/how-to-conditionally-enable-equation-numbering-for-labeled-equations/977/14
Doesn't number-mode: "label" basically do that already?
You are absolutely right, thank you for pointing out.
sub-numbering: true, number-mode: "label"
#import "@preview/equate:0.3.2": equate
#set page(paper: "a7", flipped: true)
#set math.equation(numbering: "(1.1)")
#show: equate.with(breakable: true, sub-numbering: true, number-mode: "label")
$
1 = 1 \
2 = 2
$
$
1 = 1 #<line-only> \
2 = 2
$
$
1 = 1 \
2 = 2
$ <label-only>
$
1 = 1 #<both-line> \
2 = 2
$ <both-label>
@line-only @label-only @both-line @both-label
sub-numbering: true, number-mode: "line"
#import "@preview/equate:0.3.2": equate
#set page(paper: "a7", flipped: true)
#set math.equation(numbering: "(1.1)")
#show: equate.with(breakable: true, sub-numbering: true, number-mode: "line")
$
1 = 1 \
2 = 2
$
$
1 = 1 #<line-only> \
2 = 2
$
$
1 = 1 \
2 = 2
$ <label-only>
$
1 = 1 #<both-line> \
2 = 2
$ <both-label>
@line-only @label-only @both-line @both-label
sub-numbering: false, number-mode: "label"
#import "@preview/equate:0.3.2": equate
#set page(paper: "a7", flipped: true)
#set math.equation(numbering: "(1)")
#show: equate.with(breakable: true, sub-numbering: false, number-mode: "label")
$
1 = 1 \
2 = 2
$
$
1 = 1 #<line-only> \
2 = 2
$
$
1 = 1 \
2 = 2
$ <label-only>
$
1 = 1 #<both-line> \
2 = 2
$ <both-label>
@line-only @label-only @both-line @both-label
sub-numbering: false, number-mode: "line"
#import "@preview/equate:0.3.2": equate
#set page(paper: "a7", flipped: true)
#set math.equation(numbering: "(1)")
#show: equate.with(breakable: true, sub-numbering: false, number-mode: "line")
$
1 = 1 \
2 = 2
$
$
1 = 1 #<line-only> \
2 = 2
$
$
1 = 1 \
2 = 2
$ <label-only>
$
1 = 1 #<both-line> \
2 = 2
$ <both-label>
@line-only @label-only @both-line @both-label
#set page(paper: "a7", flipped: true)
#set math.equation(numbering: "(1)")
$
1 = 1 \
2 = 2
$
$
1 = 1 #<line-only> \
2 = 2
$
$
1 = 1 \
2 = 2
$ <label-only>
$
1 = 1 #<both-line> \
2 = 2
$ <both-label>
@label-only @both-label
I think the name number-mode is highly confusing. I would suggest add-number-to: (“labeled-lines-and-labeled-equation”, “all-lines”).