Menu

HowTo_FootnoteNoIndent

How to set footnotes without indentation but with fixed spacing after the number

The \deffootnote instruction can actually only be used to define footnotes with a fixed width for the number. Thanks to the generic hooks, however, a \deffootnote instruction can be injected into the definition of the footnote text, in which the space required for the number is then redefined:

\documentclass{scrartcl}
\usepackage{blindtext}

\newlength{\currentfnumwidth}
\AddToHook{cmd/@footnotetext/before}{%
  \settowidth{\currentfnumwidth}{\footnotesize\bfseries\thefootnotemark\enskip}%
  \deffootnote[\currentfnumwidth]{0em}{1em}{%
    \bfseries\thefootnotemark\enskip
  }%
}

\begin{document}

Test\footnote{\blindtext}!

\setcounter{footnote}{12}%
Toast\footnote{\blindtext}!

\setcounter{footnote}{998}%
Duck\footnote{\blindtext}!

\vfill

The distance between the footnote number and the footnote text should be constant:

\end{document}

If you use \currentfnumwidth as the first mandatory argument instead of the optional argument in the definition:

\newlength{\currentfnumwidth}
\AddToHook{cmd/@footnotetext/before}{%
  \settowidth{\currentfnumwidth}{\footnotesize\bfseries\thefootnotemark\enskip}%
  \deffootnote{\currentfnumwidth}{1em}{%
    \bfseries\thefootnotemark\enskip
  }%
}

you can achieve the frequently expressed wish to make the indentation of the footnote dependent on the width of the footnote number. In contrast to the indentless solution from the complete example, however, this clearly looks like a typographical error. Something like:

\newlength{\currentfnumwidth}
\AddToHook{cmd/@footnotetext/before}{%
  \settowidth{\currentfnumwidth}{\footnotesize\bfseries\thefootnotemark\enskip}%
  \deffootnote[\currentfnumwidth]{1em}{1em}{%
    \bfseries\thefootnotemark\enskip
  }%
}

on the other hand, I could well imagine.


Related

Wiki (English): HowTo_Layout