I'd like to change the font size of all contents of a longtable
to footnotesize
. However the rest of the document and also the caption (!) shall be (stay) in normal size.
(pdflatex
is used)
How can I do that?
- I tried to put the
\footnotesize
command outside thelongtable
-environment, but then thecaption
is also smaller. - If I put the command in before the first line of the table, it is only executed for the first cell of the table.
- If I put it before
\endoffirsthead
, I get an error message during compiling.
EDIT: I don't want to be the whole document to be in \footnotesize
, but only the content of the tables!
Minimal example:
\documentclass{scrbook}
\usepackage{longtable, booktabs}
\begin{document}
\begin{longtable}{ccc}
\caption{This is the caption of the table which shall be normal size!}\\
\toprule
aaaaaaa & bbbbbb & ccccccccc\\
\midrule
a & b & c\\
a & b & c\\
a & b & c\\
a & b & c\\
a & b & c\\
a & b & c\\
\bottomrule
\end{longtable}
Best Answer
You can modify the definition of
\LT@makecaption
in such a way that it uses\normalsize
; since you are usingscrbook
one has to use its definition. I'll define a new environment that will make things easier.The syntax of the
longtable*
environment is simple: it takes as argument the desired size of the table's body; the usual argument tolongtable
follows. I've left the two examples to show the difference.