How can I align multiline footnotes at the start of the text instead of at the number?

:wave: - i’m trying to format footnotes accordingly to a paper’s formatting rules, where i am asked to align the footnotes text (not the numbers).

Unfortunately the basic behaviour aligns by the numbers:

#lorem(20) #footnote[#lorem(20)]

It seems to me the footnote number is added to the footnotes body and the resulting paragraph is being layed out according to the footnote-entry rules.

So i tried to pass my footnote content using a “box”:

#lorem(20) #footnote[#box(lorem(20))]

Which ensures the body of the content is being aligned as requested. Unfortunately the inline box grows out to the top, sticking the footnote-number to the bottom line.

The question is - is there a better way to implement the requested behavior and if not - how to fix the footnote number to stick with the top line of the paragraph?

Thank you in advance! :pray: :candy:

A possible fix seems to be using the hanging-indent attribute of par although it feels a bit hacky:

#show footnote.entry: it => [#par(hanging-indent: 1.41em)[#it]]

#set page(paper: "a8", flipped: true)

#lorem(20) #footnote[#lorem(20)]

grafik

:warning: Playing around with this occasionally crashed my compiler. :person_shrugging:

1 Like

I think you are just looking for the indent parameter of footnote.entry like so (or at least it will be easier to align it with this):

#set page(paper: "a8", flipped: true)
#set footnote.entry(indent: 0em) // or -4pt to align at text.

#lorem(20) #footnote(lorem(20))

image

1 Like

Thanks a lot @xkevio - that’s indeed a more elegant solution! I didn’t check it because i expected it to shift the hanging indent as well.

Hi @Florian, welcome and thank you for your question! I have changed your post’s title to bring it in line with the question guidelines and thus make it easier to understand from the title:

Good titles are questions you would ask your friend about Typst.

I also added some tags, as they make your question easier to find.

1 Like

Thanks a lot @SillyFreak :pray: - the next time i’ll try better… :slight_smile:

1 Like