I wanted to adjust the left indentation of footnotes depending on the number of digits of the footnote mark. Thus, footnotes with one digit are aligned a the length of single \parindent (which is set at 4mm) from the left margin: while footnotes with two or three digits (let's not assume there will be more) are aligned 8 mm from the left (= 2*\parindent). I managed to do so with the following code:
\documentclass[11pt]{article}
\setlength{\parindent}{4mm}
\usepackage{fancyvrb,footnote}
\VerbatimFootnotes% I created the code in a file which used this command, but for some reason it doesn't work without it.
\usepackage{ifthen}
\makeatletter
\renewcommand\@makefntext[1]{%
\ifthenelse{\value{footnote}>9}{%
\parindent 12mm%
\noindent
\@hangfrom{%
\hb@xt@ 8mm{\@thefnmark}#1%
}%
}{%
\parindent 8mm%
\noindent
\@hangfrom{%
\hb@xt@ 4mm{\@thefnmark}#1%
}%
}%
}
\makeatother
\usepackage{blindtext}
\begin{document}
A word, phrase, or sentence that needs to be commented on.\footnote{\blindtext}
\setcounter{footnote}{15}
\blindtext\footnote{\blindtext\par\blindtext}
\end{document}
Then I had a second problem: on a page that has any one- and two-digit footnotes, I do not want this difference. There, the double indentation/margin should be used for one-digit footnote marks as well. I figure that it should be enough to make the indentation dependent on whether footnote 10 appears on the page or not. Is there a way to add such a condition?


