Tell me more ×
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.

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.

share|improve this question

2 Answers

up vote 26 down vote accepted

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

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

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.