How to add a space after a footnote number?

How can I add a space after a footnote number, so that it will be not this:

--------
¹Footnote

but this?

--------
¹ Footnote

I tried the following example from Typst docs and it works fine:

#show footnote.entry: it => {
  let loc = it.note.location()
  numbering(
    "1. ",
    ..counter(footnote).at(loc),
  )
  it.note.body
}

Lorem ipsum#footnote[Dolor sit amet]

Lorem ipsum#footnote[Dolor sit amet]

But when I tried to replace "1. " with "#super[1 ]", it treats #super literally.

A very simple one line fix is:

" " + it.note.body
// Or as a unit
h(0.2em) + it.note.body

For more on #h() see here.

But I’m quite certain there will be someone with a better solution right around the corner :blush:

1 Like

This works, thank you. But how to keep footnote number superscript at the same time?

I mean the problem with my original solution is not a lack of space. The problem is that it adds space, but then I cannot figure out how to make the footnote number superscript.

Instead of putting the super into the "1.", put it around the numbering. Like this:

super(numbering(
  "1. ",
  ..counter(footnote).at(loc),
))

The string in the numbering is a numbering pattern rather than arbitrary content.

1 Like