# How to use \footnotesize with longtable command?

I am using \longtable command in a thesis preamble. My problem is that my data are large numbers, and I need to reduce the size of the table to footnote size. I tried using \begin{footnotesize}-\end{footnotesize} commands, it gave me an error message. What is the right way to reduce the size of the table with using a longtable?

-
Please, add a minimal example of what you're trying to do. –  egreg Feb 12 '12 at 11:06

This should work:

Text before the long table

{\footnotesize
\begin{longtable}{lll}
<data>
\end{longtable}}

Text after the long table

-
Thhank you for the answer, it is working, and te caption of the table still has the same normal size. However, the problem now is regading the header \multicolumn{5}{|c|}{{\tablename} \thetable{} -- Continued} \\ \hline that is repeated on every newpage except the first page and the footer \hline \multicolumn{5}{l}{{Continued on Next Page\ldots}} \\ that is repeated on every new page except that last page are also getting footnotesize. I need these to have fontsize as the normal font of the text. How to fix that please. Thank you in advance. –  Mara Feb 13 '12 at 1:47

This will also work:

Text before longtable

\begin{footnotesize}
\begin{longtable}{llll}

Table data...

\end{longtable}
\end{footnotesize}

Text after longtable

-

I would suggest to create an environment for the table. In this environment one can configure all aspects of the table. If there is an complex table it is easier to keep track of the configuration and you can reuse it for more than one table. This definition is placed in the preamble of the document to keep splitting content from formating stuff. Furthermore this is significant when you input the data automatically via a (Lua or Perl) script, because you don't have to write the formating stuff again and again. You just put the data into the created environment.

\documentclass{book}
\usepackage{longtable}

\newenvironment{myTable}%
{%
\footnotesize
\setlength\tabcolsep{1.4ex}
% other formating stuff
\begin{longtable}{ccc}
Column 1 &Column 2 &Column 3\\
\hline
}%
{%
\end{longtable}
}%

\begin{document}
Text

\begin{myTable}
A&B&B\\
D&E&F
\end{myTable}

Text
\end{document}

-