I have a LaTeX table that looks like this:
\begin{table}[!ht]
\centering
\small
\caption{
\bf{Caption}}
\begin{tabular}{l|c|c|l|c|c|c|c|c}
field1 & field 2 & ... \\
\hline
...
the problem is that even with "\small" the table is too big, since I use:
\usepackage{setspace}
\doublespacing
in the header. How can I:
I'd like it to fit on an entire page.
This question is related to
latex
There is also the singlespace
environment:
\begin{singlespace}
\end{singlespace}
if it's too long for one page, use the longtable
package. and if it's too wide for the page, use p{width}
in place of l,r, or c for the column specifier. you can also go smaller than \small
, i.e. \footnotesize
and \tiny
. I would consult the setspace package for options on how to remove the double space, though it's probably \singlespace
or something like that.
http://en.wikibooks.org/wiki/LaTeX/Tables#Resize_tables talks about two ways to do this.
I used:
\scalebox{0.7}{
\begin{tabular}
...
\end{tabular}
}
You could add \singlespacing near the beginning of your table. See the setspace instructions for more options.
If you want a smaller table (e.g. if your table extends beyond the area that can be displayed) you can simply change:
\usepackage[paper=a4paper]{geometry}
to \usepackage[paper=a3paper]{geometry}
.
Note that this only helps if you don't plan on printing your table out, as it will appear way too small, then.
Source: Stackoverflow.com