Multipage Tables

%Multipage_table.tex
%
%Author:  Jeff Hein
%
%Created: July 14, 2009
%
%Notes:  This file demonstrates the longtable environment for producing tables that span more than one page.

\documentclass[letterpaper]{article}

%use longtable package for spanning a float across multiple pages
\usepackage{longtable}


%this command stores the data for the multipage table
\newcommand{\longtabledata}{%
		3 & Some text! & Lots!\\
		6 & Some more text! & Some!\\
		5 & not text! & None!\\
		32 & bla bla!! & purple\\
		1 & $\alpha\beta\gamma\delta\epsilon$ & baker\\
		6 & do not read this text & 4\\
		8 & that is a cat & yes\\
		67 & long tables are fun! & \#1\\
		$\pi$ & long tables are not fun! & back\\
}


\begin{document}


%start the longtable environment.  Define the columns in any regular table fashion
\begin{longtable}{ p{1in} p{2in} r}
	%-----------------------------------
	%define the table header for first page
	%-----------------------------------
	%
	\hline \textbf{Quantity}&\textbf{Description}& {\textbf{Amount}}\\
	\hline
	\endfirsthead
	%-----------------------------------

	%-----------------------------------
	%define the table header for subsequent pages
	%-----------------------------------
	%
	%multicolumn spans multiple columns.  Set the first parameter to match
	%the number of columns in your table
	\multicolumn{3}{c}{{\ldots\ continued from previous page}} \\
	\hline \textbf{Quantity}&\textbf{Description}& {\textbf{Amount}}\\
	\hline
	\endhead
	%-----------------------------------

	%-----------------------------------
	%define the table footer for all but last page
	%-----------------------------------
	%
	%multicolumn spans multiple columns.  Set the first parameter to match
	%the number of columns in your table
	\hline \multicolumn{3}{r}{{Continued on next page\ldots}}
	\endfoot

	%-----------------------------------
	%define the table footer for last page
	%-----------------------------------
	%
	\hline
	\endlastfoot

	%-----------------------------------
	%now define the table contents
	%-----------------------------------
	%
	%note: this repeated to conserve space and still illustrate the example
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
	\longtabledata
\end{longtable}

\end{document}