See this mwe:
\documentclass{article}
\makeatletter
\renewcommand\@makefntext[1]{%
\parindent 1em%
\noindent\hbox{\sf\bfseries\@thefnmark}\hspace*{.7em plus 0pt minus 0pt}#1}
\makeatother
\begin{document}
Hello\footnote{I am a footnote!}\footnote{I am another footnote}.
\end{document}
Which results to:
which has the distance of 0.7 em between the number and the footnote. But when I change the font to a font that has figures with proportional width, this leads to a ragged left footnote block (see below for an mwe - this does not reflect my real document, as I could simply remove the \proportionalnums
command in the mwe):
% mwe with proportional figures and more footnote text
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{libertine,blindtext}
\makeatletter
\renewcommand\@makefntext[1]{%
\parindent 1em%
\noindent\hbox{\proportionalnums{\@thefnmark}}\hspace*{.7em plus 0pt minus 0pt}#1}
\makeatother
\begin{document}
Hello\footnote{I am a footnote!}\footnote{I am another footnote \blindtext}.
\end{document}
Question: how can I always make sure the begining of the footnote is at the same horizontal level (for each numbering with the same amount of digits, footnotes 1-9 have a different start level than 10-99 and 100 and above).
The solution would probably be a \hbox to ...{..}
, the width depending on the number of digits in the footnote. I also have the situation where sometimes where I temporarily redefine \def\thefootnote{*}
to have an *
as a footnote symbol instead of a character. This should count as "one digit".
Edit: I have changed the second mwe to have more text to illustrate the multi-line footnotes
\renewcommand\@makefntext[1]{% \parindent 1em% \noindent \ifnum\c@footnote>9 \hb@xt@ 20pt % \else \hb@xt@ 15pt % \fi {\sffamily\bfseries\@thefnmark\hss}#1}
\ifnum\c@footnote > 99 \hb@xt@ 20pt \else
right after the> 9
. Thank you very much.