If I try to customize the footnote entry, even following an example from the docs, the link from the text to the footnote entry stops working: it’s still a link, but it seems to point to nowhere (my PDF reader jumps to the beginning of document).
Below is a minimal working example. Commenting the entire #show block makes the footnote link work again.
#set page(paper: "a6")
#show footnote.entry: it => {
let loc = it.note.location()
numbering(
"1: ",
..counter(footnote).at(loc),
)
it.note.body
}
#lorem(200)
A text
#footnote[And a footnote] // this link stops working
#lorem(5)
In an HTML way, I would try to add an anchor with correct id (or label in Typst) wrapping the numbering of the footnote entry. But I don’t know how to do that (or if it’s even possible) in Typst…
Yes, but perhaps (I haven’t tested it) in outline.entry it’s simpler because the outline entry is the link itself, and we already have the target element to build that link if needed. But a footnote entry is not the link but the target; it would need to know somehow which label it’s assigned to, so that we can properly build it as a link target.
Maybe the footnote entry could receive another field, as a link type, with the link that targets it. That would allow to even put a “back to the text” link in the note.