How to Change the Font Size in a LaTeX Table
At a glance
- 1. Choose a size
Use a standard command such as small, footnotesize, or scriptsize for a smaller table.
- 2. Scope the change
Place the command before tabular and group it so the size change does not affect surrounding text.
- 3. Compile and check
Inspect the table for readability and fit; adjust spacing separately if needed.
- 4. Set an exact size
Use fontsize with selectfont when a standard size is not precise enough.
To change the text size in a LaTeX table, apply a font-size command before the tabular environment. A local group keeps the change limited to the table, so the text before and after it retains its normal size.
For most tables, a standard size command is the simplest choice. If you need an exact point size, LaTeX also lets you specify one directly. Font size and row or column spacing are separate settings, so changing the text size may not be enough to make a table fit neatly.
Use a standard font-size command
LaTeX provides declarations including \tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, and \Large. The available sizes are relative to the document class and its base size. For example, in the standard article class at 10 pt, \small selects 9 pt text.
Put the declaration before \begin{tabular}. Enclose it and the table in braces to localize the effect:
{\small
\begin{tabular}{ll}
Item & Quantity \\
Apples & 4 \\
Pears & 6
\end{tabular}
}
The opening brace starts a group and the closing brace ends it. The size declaration applies within that group, including to the table, but not to text outside it. For a less drastic reduction, try \small; for a denser table, \footnotesize may be suitable. Check the result at its intended printed or on-screen size before choosing a very small setting.
Complete example
This example compiles with the standard article class and needs no additional packages. The table text is small, while the surrounding paragraph stays at the document’s normal size.
\documentclass{article}
\begin{document}
This paragraph uses the document's normal font size.
\begin{table}[ht]
\centering
{\small
\begin{tabular}{lr}
Product & Price \\
Notebook & 3.50 \\
Pen & 1.25
\end{tabular}
}
\caption{A compact price table.}
\end{table}
This paragraph also uses the normal font size.
\end{document}
The \small declaration sits inside a brace group around tabular, so it does not change the paragraphs or caption. The table environment creates a floating table; the font-size change works the same way if you use tabular without a float.
Set a precise font size
If the standard commands are not suitable, use \fontsize followed by \selectfont. Its first argument is the font size in points; its second is the baseline skip, which controls the distance between lines. For example:
{\fontsize{9}{11}\selectfont
\begin{tabular}{ll}
Name & Status \\
Riley & Complete
\end{tabular}
}
This requests 9 pt text with an 11 pt baseline skip. \fontsize sets the requested values, and \selectfont activates them. Keep the commands in a group to prevent the custom settings from applying to later text. For paragraph-style, multi-line cells, increasing the baseline skip can help; to increase the space between table rows, adjust \arraystretch instead.
Adjust spacing separately
Reducing the font size also reduces the text, but it may not solve every layout problem. LaTeX adds horizontal padding to table columns and vertical space between rows. If the table is only slightly too wide, reducing column padding can be preferable to making all the text substantially smaller. The standard LaTeX length \tabcolsep controls this padding, so no additional package is needed. For example, you can change it using \setlength{\tabcolsep}{4pt}. The default is 6 pt on each side of a column, so this can make a table narrower without shrinking its lettering.
To increase row height, standard LaTeX also provides \arraystretch; no package is needed. Set it using \renewcommand{\arraystretch}{1.2}. This scales the usual row spacing; values above 1 increase it. Set it locally if you want it to affect just one table. These spacing changes do not change the font size.
If the table must fit a fixed width, \resizebox from the graphicx package can scale the entire table. This also scales the lettering and rules, so it can make text harder to read; try a font-size or padding adjustment first.
Common mistakes
- Putting the command after the table: A declaration only affects material typeset after it. Place it before
\begin{tabular}to apply it to the whole table. - Leaving the declaration ungrouped: Without a group or another scope boundary, the font size can carry on into subsequent content. Use braces as shown above.
- Confusing font size with spacing:
\arraystretchchanges row spacing, not letter size.\tabcolsepchanges horizontal column padding, not letter size. - Making text too small to read: Prefer removing unnecessary column padding, shortening headings, or splitting a very wide table before resorting to
\scriptsizeor\tiny. - Expecting a fixed size from a relative command: Commands such as
\smalldepend on the document class and base font size. Use\fontsize{...}{...}\selectfontwhen a specific size is required.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.