How do I reduce the size of an entire LaTeX table?
Use \resizebox
:
\resizebox{3cm}{!}{
\begin{something}
something
\end{something}
}
The !
tells LaTeX to keep the aspect ratio. You can also scale the y direction differently by giving a value there.
Scaling elements that contain text is really not a good idea (see https://tex.stackexchange.com/questions/425453/why-not-scale-elements-that-contain-text for more information) therefore here are two other approaches how to reduce the size of a table:
- reducing the inter column space with
\addtolength{\tabcolsep}{-1pt}
- manually selecting a smaller font size, e.g. with font commands like
\small
or for more fine control\fontsize{9.5pt}{10.25pt}\selectfont
\documentclass{article}
\usepackage{lipsum}
\begin{document}
Reducing the inter column spacing a bit:
\begin{table}[htbp]
\addtolength{\tabcolsep}{-1pt}
\begin{tabular}{lll}
\hline
some text some text & some text some text & some text some text some text\\
\hline
\end{tabular}
\end{table}
\lipsum[2]
Smaller font size:
\begin{table}[htbp]
\small
\begin{tabular}{lll}
\hline
some text some som text & some text some text & some text some text some text\\
\hline
\end{tabular}
\end{table}
\end{document}