I am using longtable
package to make my large table span two pages. However I have set the font size with \fontsize
to my table to be quite small. The only problem is that when the table is finished, the text below it are also the small size.
\fontsize{9}{11}\selectfont
\centering
\begin{longtable}{| p{.20\textwidth} | p{.80\textwidth} |}
\hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
\caption{Your caption here}
\label{tab:myfirstlongtable}
\end{longtable}
(The above code was for test purposes as I was working from a tutorial)
Best Answer
\fontsize
is defined as:The two arguments to \fontsize are the actual font size in
size
and the size of the baseline-skip inskip
. The baseline-skip should be set to roughly 1.2x the font size. ReferenceThe declaration
affects all following text until the end of the current group, the fact that there is a longtable there isn't that relevant. You can use
\normalsize
to reset it or use{
and}
to limit the scope. It really is better to use\small
or other named sizes to get consistent sizing rather than setting each table to individually set point sizes. The scoping rules would apply to\small
as well.