Several small footnotes on same line, in LaTeX

Primary tabs

5 posts / 0 new
Last post
Laurentius's picture
Offline
Joined: 6 Feb 2009 - 5:09pm
Several small footnotes on same line, in LaTeX
0

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%
%
}%
}%
}%
}%
}

Steve Peter's picture
Offline
Joined: 8 May 2004 - 11:00am
0

I think the bigfoot package can do that, but I have not use it for that purpose.

J.P. Knox's picture
Offline
Joined: 8 Oct 2004 - 11:00am
0

I found this post looking to see if this feature is available for InDesign. I've included a link to a book set in QuarkXpress that has footnotes like this. Is there a way to do this in InDesign as well? My guess is that InFnote can do this, but I ain't sure.

David W. Goodrich's picture
Joined: 14 May 2008 - 2:23pm
0

We're wandering away from the original question, but if you don't mind a little manual labor, sure ID can do this. For your middle third-of-a-line column you make a variant of your footnote paragraph format with zero leading and an indent of a third of a line; then for your last third of a line you indent the format two thirds of a line, with the same zero leading. You must then manually apply those formats to the appropriate footnotes, but it works (though I admit I've never used this for more than two footnotes per line).

David

J.P. Knox's picture
Offline
Joined: 8 Oct 2004 - 11:00am
0

That is brilliant, David! I thought that since ID shows those frame borders around footnotes that you couldn't set them on the same line with 0pt leading. But if you set the "First Baseline Offset" to leading, and set the multicolumn footnotes to 0pt leading with an indent, sure enough it works. I feel giddy as a schoolgirl ...