Closed hbierlee closed 1 week ago
What exactly do you expect it to return?
Since citations are references, and references are locatable, I'd expect it to return a reference to the citation.
The context is that I want to show undefined references as TODO's in the document like:
#show ref: it => {
if query(it.target).len() > 0 {
it
} else {
it.target
}
}
As per the issue I linked above. I can't discern undefined references from citations at the moment.
The thing is that your query searches for elements with the given label, but neither the citation nor the reference have that label attached to themselves, they just reference it.
I don't think discerning the two cases is currently possible, at least without parsing the bibliography file.
I see, thanks for your time. Feel free to close as not planned or keep open for a future feature.
Since the query itself is working as intended, I'll close this for now.
Description
Hi,
See here. I believe
query
should work for citation labels like for headings, but it always returns an empty list()
:Given:
Render:
Cheers,
Henk
Reproduction URL
https://typst.app/project/wDfVPd0Ej5rAl9xPsdIBzN
Operating system
Linux
Typst version