I’m new to Typst, and so far, I’m really enjoying it.
I would like to know if there is a way to change the automatic labelling from “Figure 1” to “Fig. 1”?
I’ve so far figured out how to add automatically bold to the label, but not how to change it.
Do you want it to be “Fig” underneath the figure itself (1) or when you reference it in text (2)?
(1) You can just add a supplement parameter to your figure:
#figure(
...,
supplement: [Fig.]
)
(2) Like shown in the docs you can set a show rule for when you reference a figure in normal form (reference to the name of the figure instead of the page) like (Reference Function – Typst Documentation)
#show ref.where(form: "normal"): set ref(supplement: it => {
if it.func() == figure {
"Fig."
}
})
#figure(...)<fig>
In @fig we see...
If you only want to reference it like that once, you could also just use In @fig[Fig.] we see...
This is all mentioned in the Typst Documentation so head over there if something is not clear.
I hope this answers your question.
Ooooh it was so easy!
Thank you so much for the quick answer, it works wonders. I was looking for the solution 1), but I actually didn’t knew I would need the 2) as well haha.