Is there a package that distributes footnotes on two or three columns, depending on how long they are?
This style is used in some older books, e.g. Gadamer’s “Wahrheit und Methode”. I have written the following as an attempt, but it is inexact, clumsy, and ad hoc, as I lack a deep understanding of how TeX works, and really don’t want to spend the rest of my life learning about it. Comments or references to an already existing better version were much appreciated.
% Footnotes.
\usepackage[para]{footmisc}
\def\thefootnote{}
\newcount{\left}
\newcount{\thisfoot}
\newcount{\counter}
\newcount{\lastright}
\newcount{\footcountline}
\newcount{\footcountpage}
\newcount{\feet}
\newcount{\footsize}
\newcount{\nextfoot}
\newcount{\nextnextfoot}
\newcount{\lastfoot}
\newcount{\footparcount}
\newcount{\nextlength}
\newcount{\nextnextlength}
\newlength{\limit}
\left=0
\thisfoot=0
\footcountline=1
\footcountpage=0
\lastright=0
\feet=0
\footparcount=0
\newcount{\lastsize}
\newboolean{firstfootonpage}
\newcount{\ofthree}
\newcount{\endofline}
\endofline=0
\newlength{\halfwidth}
\newlength{\thirdwidth}
\newlength{\halfminusthird}
\newlength{\thirdminusindent}
\AtBeginDocument{
\halfwidth=.5\textwidth
\thirdwidth=.333333\textwidth
\addtolength{\halfwidth}{-22pt}
\addtolength{\thirdwidth}{-29pt}
\halfminusthird=\halfwidth
\addtolength{\halfminusthird}{-\thirdwidth}
%\addtolength{\halfminusthird}{-2.2em}
\thirdminusindent=\thirdwidth
%\addtolength{\thirdminusindent}{-1.5em}
}
\newcommand{\fc}[1]{%
\fn{%
\renewcommand*{\ibidemname}{ibid}%
\renewcommand*{\ibidemmidname}{ibid}%
\cite{#1}%
.}%
}
\newcommand{\fn}[1]{%
\global\advance\thisfoot by 1%
\global\lastfoot=\thisfoot
\global\advance\lastfoot by -1%
\global\nextfoot=\thisfoot
\global\advance\nextfoot by 1%
\label{foot\the\thisfoot}%
\ifthenelse{\not\equal{\pageref{foot\the\thisfoot}}{\pageref{foot\the\lastfoot}}}{%
\sbox{\footbox}{\footnotesize\up{\the\thisfoot}\ex\noibidem#1}%
}{% else
\sbox{\footbox}{\footnotesize\up{\the\thisfoot}\ex#1}%
}%
\global\setbox\thisfoot=\hbox{\usebox{\footbox}}%
\ifthenelse{\not\equal{\pageref{foot\the\thisfoot}}{\pageref{foot\the\lastfoot}}}{%
\setboolean{firstfootonpage}{true}%
\global\lastsize=0%
}{% else
\setboolean{firstfootonpage}{false}%
\renewcommand*{\ibidemname}{\ibidemmidname}%
}%
%
\up{\the\thisfoot}
%
\settowidth{\length}{\usebox{\footbox}}%
\ifthenelse{\lengthtest{\length>\halfwidth}}{% If paragraph
\footnote{%
\ifnum\endofline=1 \\makebox[.8em]{} \endofline=0 \fi%
\ifthenelse{\boolean{firstfootonpage}}{\makebox[.5em]{}}{}%
\up{\the\thisfoot}\ex#1%
\global\endofline=1%
}%
\global\lastsize=1%
}{% If not paragraph
\setbox0=\hbox{#1}%
\footnote{%
\ifthenelse{\lastsize<2}{%
\%
\ifthenelse{\lengthtest{\length>\thirdwidth}}{%
\makebox[\halfwidth][l]{\hspace{1em}\usebox{\footbox}}% 1/2
\global\lastsize=2%
}{% else
\makebox[\thirdwidth][l]{\hspace{1em}\usebox{\footbox}}% 1/3
\global\lastsize=3%
\global\ofthree=2%
}%
}{%
\ifthenelse{\lastsize=3}{%
\ifthenelse{\ofthree=2}{% 2/3
\ifthenelse{\not\lengthtest{\length>\thirdwidth}%
% \and \not\lengthtest{\wd\nextfoot>\thirdwidth}%
\and \equal{\pageref{foot\the\thisfoot}}{\pageref{foot\the\nextfoot}}}{% then
\global\lastsize=3%
\global\ofthree=3%
}{%
\makebox[\halfminusthird][l]{}% else, if 3/2 or last on page
\makebox[2.7em]{}% Indent second halfnote.
\usebox{\footbox}%
\global\lastsize=0%
\global\endofline=1%
}%
}{% else 3/3: printing 2/3
\ifthenelse{\not\lengthtest{\length>\thirdwidth}}{% if small
\makebox[\thirdwidth][l]{\usebox\lastfoot}%
\makebox[29pt]{}%
}{% ?
%\makebox[\halfminusthird][l]{}%
\usebox\footbox%
\%\makebox[1.5em]{}%
}%
\usebox{\footbox}% Last of 3
\global\lastsize=0%
\global\endofline=1%
}%
}{% expected 2/2
\makebox[2.7em]{}% Indent second halfnote.
\usebox{\footbox}%
\global\lastsize=0%
\global\endofline=1%
%
}%
}%
}%
}%
}
