Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Please, add a minimal example of what you're trying to do. –  egreg Feb 12 '12 at 11:06

3 Answers 3

up vote 7 down vote accepted

This should work:

Text before the long table

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

Text after the long table
share|improve this answer
    
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
    
@Mara Please, add a sample to your question –  egreg Feb 13 '12 at 8:29

This will also work:

Text before longtable

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

Table data...

\end{longtable}
\end{footnotesize}

Text after longtable
share|improve this answer

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.