## Tuesday, September 13, 2011

### Long tables in LaTeX using apa.cls

I needed to print a tbale spanning multiple pages in my manuscript, but could not get it to work by passing the longtable option to apa.cls. The table still didn't fit on one page when I used the \small command (see this post). Only the first page of the table would be inserted, and in some cases even the numbering of pages went astray. So I decided to resort to a less clean solution: cutting up the table into parts myself. Actually, this approach is nicely described on page 47 of this document.

At first I got stuck using the \addtocounter{table}{-1} command. If you use itbetween tables, the commands are added up and subtracted from the original couter value. That is, if you use it 5 times, the first table will be numbered -4, the second -3, etc. If you use it directly after the \begin{table} command, it works out fine.

Example

\documentclass[man]{apa}
\begin{document}

\begin{table}
\caption{The First Table in the Manuscript}
\begin{tabular}{ll}
1 & 2 \\
3 & 4 \\
\end{tabular}
\label{tablelabel}
\end{table}

\begin{table}
\caption{Continued}
\begin{tabular}{ll}
5 & 6 \\
7 & 8 \\
\end{tabular}
\end{table}

\begin{table}
\caption{Continued}
\begin{tabular}{ll}
9 & 10 \\
11 & 12 \\
\end{tabular}
\end{table}

\begin{table}
\caption{The Second Table in the Manuscript}
\begin{tabular}{ll}
a & b \\
c & d \\
\end{tabular}
\end{table}

\end{document}