# Changing the font size in a table

What's the recommend way of changing the font size in a particular table? Is there a better way than enclosing all values with, for example, the \tiny function.

-

Write \tiny immediately after \begin{table}. If you don't use a (floating) table environment, enclose your (e.g.) tabular environment in a group and write \tiny after \begingroup.

\documentclass{article}

\begin{document}

\begin{table}
\tiny
\centering
\begin{tabular}{cc}
Knuth & Lamport
\end{tabular}
\end{table}

\end{document}


EDIT: To change the fontsize for all tables (or even floats of every type), one may use the floatrow package (this also saves typing \centering in every table):

\documentclass{article}

\usepackage{floatrow}
\DeclareFloatFont{tiny}{\tiny}% "scriptsize" is defined by floatrow, "tiny" not
\floatsetup[table]{font=tiny}

\begin{document}

\begin{table}
\begin{tabular}{cc}
Knuth & Lamport
\end{tabular}
\end{table}

\end{document}

-
Just one quick additional remark: whenever your figure/table has a caption, be sure to change the font size only after you've specified the caption. This is particularly important if you're specifying tiny or scriptsize for the font size. – Mico Aug 31 '11 at 17:26

Scale down your table to the textwidth

\documentclass{article}
\usepackage{graphicx}
\begin{document}

\begin{table}
\resizebox{\textwidth}{!}{%
\begin{tabular}{cc}
Knuth & Lamport
\end{tabular}}
\end{table}

\end{document}


then you have the optimal font size. However, the lines are also scaled down which doesn't matter because it looksnicer.

-
 You gave the needed answer, instead of the answer asked for. Great job! – Marcel Valdez Orozco Feb 9 at 5:51 this works great! thanks! – ultrajohn May 8 at 12:25