I have a table that I want to appear a little smaller to save some space. What environment can I put it in to shrink the whole table by a fraction ?
34 Answers
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 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
\smallor 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} \begin{table}[tch] \caption{foo} \begin{tabular}{lll} \hline \footnotesize{ foo&foo&foo\\ foo&doo&fofo\\ }\\\hline \end{tabular} \label{foo} \end{table} 1This is an example:
\begin{table}[h!] \resizebox{6cm}{!} { % here is the table content. } %\caption{Versiones a comparar.} \end{table} 7