TransWikia.com

Horizontal alignment of footnote numbers with hang-option of footmisc

TeX - LaTeX Asked on July 13, 2021

I would like to have a horizontal space between the footnote numbers and the text of the footnote. For this I am using the following code:

documentclass{article}

usepackage[english]{babel}
usepackage{blindtext}

usepackage{ragged2e}
usepackage[ragged,hang]{footmisc}

usepackage{dblfnote}

begin{document}

blindtextfootnote{A blind text like this gives you information about the selected font, how the letters are written and an impression of the look.}

setcounter{footnote}{10}
blindtextfootnote{A blind text like this gives you information about the selected font, how the letters are written and an impression of the look.}

setcounter{footnote}{100}
blindtextfootnote{A blind text like this gives you information about the selected font, how the letters are written and an impression of the look.}

end{document}

This gives me the following result:

enter image description here

The problem here is that the numbers are not aligned correctly (I would like to have the “1” above the second 1 in “11” and “11” above “01” in “101”). If I do not use the hang-option of the footmisc-package the alignment is correct but there is no horizontal space between the numbers and the text:

enter image description here

One Answer

You can patch @makefntext:

documentclass{article}

usepackage[english]{babel}
usepackage{blindtext}

usepackage{ragged2e}
usepackage[ragged,hang]{footmisc}

usepackage{dblfnote}

usepackage{etoolbox}
makeatletter
patchcmd@makefntext
  {@makefnmarkhss}
  {hss@makefnmarkspace}
  {}{}
makeatother

begin{document}

blindtextfootnote{A blind text like this gives you information about the
  selected font, how the letters are written and an impression of the look.}

setcounter{footnote}{10}
blindtextfootnote{A blind text like this gives you information about the
  selected font, how the letters are written and an impression of the look.}

setcounter{footnote}{100}
blindtextfootnote{A blind text like this gives you information about the
  selected font, how the letters are written and an impression of the look.}

end{document}

enter image description here

Answered by cgnieder on July 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP