Hello! At the moment, I am in the process of writing a typst template that will meet the standards for the design of a thesis document for my university.
According to the university standard, references to tables and figures in the text have different signatures. Considering the documentation by ref I use this code:
#set ref(supplement: it => {
if it.func() == heading {
"chap."
} else if it.func() == figure {
"fig."
} else {
"smth."
}
})
This code currently works only for figures, because images and tables placed in the figures for making corresponding captions for them. What should I do to make different refs for images and tables that are placed in figures?