Northwestern University Library

Humanities Computing Testbed

The future can be best predicted by inventing it.

April 27, 2005

Footnotes following multi-page tables in LaTeX

Q: I find that the footnotes in a longtable (but not in small tables) appear at the bottom of the page instead of immediately after the longtable. By any chance, do you have any suggestion/solution to this problem?

A: This is a little bit tricky because the point of a longtable is that it stretches over several pages, which blocks the easiest path, which would be to put the entire table into a minipage. I have written a little package for you that should work to produce tables with following footnotes. The package defines the environment longtablefn. Here's an example how to use it:

\documentclass{article}
\usepackage{longtablefn}

\begin{document}

\begin{longtablefn}{ll}
\hline
\textsc{School} & \textsc{Specialty} \\
\hline
Weinberg   & Arts \& Sciences \\
Kellogg   &  Cereals\footnote{Need to check this.} \\
\hline
\end{longtablefn}

\end{document}

And here is the style is the style file, which you can also download here:

\ProvidesPackage{longtablefn}

\RequirePackage{longtable}

\newenvironment{longtablefn}[1]{
  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
  \let\@footnotetext\@mpfootnotetext
  \begin{longtable}{ll}}
  {\end{longtable}
  \ifvoid\@mpfootins\else
   \vskip\skip\@mpfootins
   \normalcolor
   \footnoterule
   \unvbox\@mpfootins
   \vskip20pt
   \fi}

I have ripped the code for storing and placing footnotes out of LaTeX's definition of the minipage.

As a typographic consideration, be aware that putting footnotes at the end of a multipage table may not be the most user-friendly way of placing the note since the reader will have to flip pages between the table and the note.


Comments
Post a comment









Remember personal info?