You can modify the horizontal width of a table using a number of choices:
- Manual inter-column separation using, for example,
\begin{tabular}{@{10}{@{\hspace{<len>}}c@{\hspace{<len>}}}} % Inter-column gap of <len>
Modify commands like \tabcolsep
or \extracolsep
to adjust the inter-column separation.
Resizing the entire table to fit within the line width via the graphicx
package \resize{<h-len>}{<v-len>}{<stuff>}
command:
\resizebox{\linewidth}{!}{%
\begin{tabular}{...}
...
\end{tabular}%
}%
- Use fixed-width tabulars. This could be using the
tabular*
environment, or using tabularx
from the tabularx
package. The latter provides a stretchable column specifier X
. However, none of these will shrink the table to fit into \linewidth
if the table is wider than \linewidth
. For example:
\begin{tabular*}{\linewidth}{<column specs>}
...
\end{tabular*}
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
...
\begin{tabularx}{\linewidth}{<column specs>}
...
\end{tabularx}
- Use a different font, say
\small
. However, this gives the entire table a different look/feel compared to the rest of the document. Not recommended.
Read more about this on the fixed-width tables entry on the TeX FAQ.
For adjusting the vertical length of your table, you can try one of the following:
Adjust the vertical length using the \resizebox{<h-len>}{<v-len>}{<stuff>}
command in a similar fashion than described above. This time, set <h-len>=!
to maintain aspect ratio.
Modifying the \arraystretch
parameter using something like \renewcommand{\arraystretch}{0.8}
Specify a manual line-skip by using \\[<len>]
instead of just \\
to produce new tabular lines. This gives you some control over how big the skip between rows are.