I want to have figures with a bold supplement+number+separator, but I don’t want my references to the figure to be in bold.
I have multiple figure types (Figure, Algorithm, Table) so I want the solution to be DRY if possible (I don’t want to repeat the same boilerplate for every figure/type).
However, the following code does not work, as it does not increment the figure number in the caption (but it does in the figure references):
#show figure.caption: it => box(
inset: (left: 1em, right: 1em),
align(left)[
*#it.supplement~#it.numbering#it.separator*#it.body
]
)
#figure(
box(stroke: 1pt, inset: 5pt)[This is a figure],
caption: [This is a caption]
) <fig1>
#figure(
box(stroke: 1pt, inset: 5pt)[This is a figure],
caption: [This is a caption]
) <fig2>
@fig1 @fig2
How to fix this?