How to add a label to a footnote in math mode?

I am currently doing this:

#show footnote: box
$
4#[@1]\
12#[#footnote[https://typst.app/app]<1>]
$

although I was curious to hear if anyone would approach this in a different way.

idk why box works, but the only thing that I can offer is

#show math.equation: it => {
  show footnote: box
  it
}

#let mfootnote(label, body) = [#footnote(body)#label]

$
  4#[@1] \
  12#mfootnote(<1>)[https://typst.app/app]
$
1 Like

It’s a known bug, see Footnotes in math are not superscript · Issue #7574 · typst/typst · GitHub

(I think box works because it switches back to the text layouter.)

3 Likes

This is actually a lot more convenient to write, thanks!

1 Like