#import "@preview/equate:0.2.0": equate
#show: equate.with(breakable: false, sub-numbering: true)
#set math.equation(numbering: "(1.1)")
#set heading(numbering: "(1.1)")
= heading
<sec>
A ref to heading with custom sup @sec
$
1+1=2 #<dbg:eq:1-1>\
42
$ <dbg:eq:1>
This is a ref to an equation @dbg:eq:1, and ok ref to sub-equation @dbg:eq:1-1
#set ref(supplement: el => {
if el.func() == heading {
[CUSTOM SUP.]
} else {
el.supplement
}
})
This is a ref to an equation @dbg:eq:1, and buggy sub-equation @dbg:eq:1-1
A work-around at the moment is to use show instead, but it would be nice if we can safely overwrite ref default arguments.
Hi,
Great work on your
equate
plugin!I think I found an issue if I set
supplement
default onref
.See Example on typst.app
A work-around at the moment is to use
show
instead, but it would be nice if we can safely overwriteref
default arguments.Cheers,
Henk