6 May 2016

Latex tip: Best way to resize tables to fit in page

Shrinking tables to fit page size is a cumbersome task of any Latex user. The best way to resize tables is to use the adjustbox package.

The code below will resize the table to page width.
\usepackage{adjustbox}
.
.
.
\begin{table}[ht]
\centering
\begin{adjustbox}{width=1\textwidth}
\small
\begin{tabular}{|l|l|l|}
\hline
1 & 2 & 3
\hline
\end{tabular}
\end{adjustbox}
\caption{Test Table}
\end{table}
The above code will shrink the table to page width. The downside of this method is that the text may become less readable.

No comments: