Say I want §label (or another rare symbol) to refer to #ref(label, form: “page”), similar to how @label already refers to #ref(label, form: “normal”). Is something like that doable?
Sorry if there are posts about this already, I just don’t know any terms I could search for.
No, it’s not possible to add custom syntax like that. A variant that I’ve seen for citations is to use the supplement for custom rules like this. Here’s an example where we use @test[page] and page is the supplement:
#set page(numbering: "1")
#set heading(numbering: "1.1")
= Test <test>
#show ref: it => {
if it.supplement == [page] {
let (target, ..fields) = it.fields()
ref(target, form: "page")
} else {
it
}
}
See @test on @test[page]