For the table at hand, I would strongly recommend not compressing it to make it fit into the width of the text block -- unless you're prepared to distribute free magnifying glasses with the document. :-) Instead, consider typesetting the table uncompressed in landscape mode, as is done in the example below with the help of the rotating package and its sidewaystable
environment.
Two additional recommendations: First, get rid of all vertical lines and most horizontal lines and retainjust three horizontal lines -- to be drawn with \toprule
, \midrule
, and \bottomrule
(from the booktabs package. Trust me, all those vertical and horizontal lines mostly provide clutter, not visual information. Second, align the numerical data on the decimal points to make it easier for readers to take in the information that's being presented. Aligning the numbers in this fashion can be done with the help of the dcolumn package, or with the S
column type provided by the siunitx package.
\documentclass{article}
\usepackage{dcolumn,booktabs,rotating}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}
\begin{sidewaystable}
%%\caption{A landscape-mode table} %% optional
\centering
\begin{tabular}{@{} l *{9}{d{3.4}} @{}}
\toprule
\textbf{df2/df1} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{8} & \textbf{9} \\
\midrule
\textbf{1} & 647.7890& 799.4822 & 864.15 & 899.5833 & 921.8479 & 937.1111 & 948.2169 & 956.6562 & 963.2846 \\
\textbf{2} & 38.5063 & 39.0000 & 39.166 & 39.2484 & 39.2982 & 39.3315 & 39.3553 & 39.3730 & 39.3869 \\
\textbf{3} & 17.4434 & 16.0442 & 15.439 & 15.1010 & 14.8848 & 14.7347 & 14.6244 & 14.5399 & 14.4731 \\
\textbf{4} & 12.2179 & 10.6491 & 9.9792 & 9.6045 & 9.3645 & 9.1973 & 9.0741 & 8.9796 & 8.9047 \\
\textbf{5} & 10.0070 & 8.4336 & 7.7636 & 7.3879 & 7.1464 & 6.9777 & 6.8530 & 6.7572 & 6.6811 \\
\textbf{6} & 8.8131 & 7.2599 & 6.5988 & 6.2271 & 5.9876 & 5.8197 & 5.6955 & 5.5996 & 5.5234 \\
\textbf{7} & 8.0727 & 6.5415 & 5.8898 & 5.5226 & 5.2852 & 5.1186 & 4.9949 & 4.8993 & 4.8232 \\
\textbf{8} & 7.5709 & 6.0595 & 5.4120 & 5.0526 & 4.8173 & 4.6517 & 4.5285 & 4.4333 & 4.3572 \\
\textbf{9} & 7.2093 & 5.7147 & 5.0781 & 4.7181 & 4.4844 & 4.3197 & 4.1970 & 4.1020 & 4.0260 \\
\textbf{10} & 6.9367 & 5.4564 & 4.8256 & 4.4684 & 4.2361 & 4.0721 & 3.9498 & 3.8549 & 3.7790 \\
\textbf{11} & 6.7241 & 5.2559 & 4.6300 & 4.2751 & 4.0440 & 3.8806 & 3.7586 & 3.6638 & 3.5879 \\
\textbf{12} & 6.5538 & 5.0959 & 4.4742 & 4.1212 & 3.8911 & 3.7283 & 3.6065 & 3.5118 & 3.4358 \\
\textbf{13} & 6.4143 & 4.9653 & 4.3472 & 3.9959 & 3.7667 & 3.6043 & 3.4827 & 3.3880 & 3.3120 \\
\textbf{14} & 6.2979 & 4.8567 & 4.2417 & 3.8919 & 3.6634 & 3.5014 & 3.3799 & 3.2854 & 3.2093 \\
\textbf{15} & 6.1995 & 4.7650 & 4.1528 & 3.8043 & 3.5764 & 3.4147 & 3.2934 & 3.1987 & 3.1227 \\
\textbf{16} & 6.1151 & 4.6867 & 4.0768 & 3.7294 & 3.5021 & 3.3406 & 3.2194 & 3.1248 & 3.0488\\
\textbf{17} & 6.0420 & 4.6189 & 4.0111 & 3.6648 & 3.4380 & 3.2767 & 3.1556 & 3.0610 & 2.9849\\
\textbf{18} & 5.9781 & 4.5597 & 3.9539 & 3.6083 & 3.3820 & 3.2209 & 3.0999 & 3.0053 & 2.9291 \\
\textbf{19} & 5.9216 & 4.5075 & 3.9034 & 3.5587 & 3.3327 & 3.1719 & 3.0509 & 2.9564 & 2.8801 \\
\textbf{20} & 5.8715 & 4.4612 & 3.8587 & 3.5147 & 3.2891 & 3.1284 & 3.0074 & 2.9128 & 2.8365 \\
\textbf{21} & 5.8266 & 4.4199 & 3.8188 & 3.4754 & 3.2501 & 3.0895 & 2.9686 & 2.8740 & 2.7977 \\
\textbf{22} & 5.7863 & 4.3828 & 3.7829 & 3.4401 & 3.2151 & 3.0546 & 2.9338 & 2.8392 & 2.7628 \\
\bottomrule
\end{tabular}
\end{sidewaystable}
\end{document}
The revtex4-1
document class do not offer an option to switch the unwanted behavior off, i.e. short captions are always centered. And since the caption
package is not adapted to revtex
yet one need to patch the responsible code for yourself, e.g.:
\long\def\@makecaption#1#2{%
\par
\vskip\abovecaptionskip
\begingroup
\small\rmfamily
\sbox\@tempboxa{%
\let\\\heading@cr
\@make@capt@title{#1}{#2}%
}%
\@ifdim{\wd\@tempboxa >\hsize}{%
\begingroup
\samepage
\flushing
\let\footnote\@footnotemark@gobble
\@make@capt@title{#1}{#2}\par
\endgroup
}{%
\global \@minipagefalse
\hb@xt@\hsize{\hfil\unhbox\@tempboxa\hfil}%
}%
\endgroup
\vskip\belowcaptionskip
}%
could be patched to:
\long\def\@makecaption#1#2{%
\par
\vskip\abovecaptionskip
\begingroup
\small\rmfamily
\begingroup
\samepage
\flushing
\let\footnote\@footnotemark@gobble
\@make@capt@title{#1}{#2}\par
\endgroup
\endgroup
\vskip\belowcaptionskip
}
As complete example document:
\documentclass[%
reprint,
amsmath,amssymb,
aps,nofootinbib,
]{revtex4-1}
\makeatletter
\renewcommand\@makecaption[2]{%
\par
\vskip\abovecaptionskip
\begingroup
\small\rmfamily
\begingroup
\samepage
\flushing
\let\footnote\@footnotemark@gobble
\@make@capt@title{#1}{#2}\par
\endgroup
\endgroup
\vskip\belowcaptionskip
}
\makeatother
\begin{document}
Some text...
\begin{table}
Test
\caption{Test}
\end{table}
Some text...
\end{document}
A more elegant solution using \patchcmd
offered by the etoolbox
package [1]:
\documentclass[%
reprint,
amsmath,amssymb,
aps,nofootinbib,
]{revtex4-1}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makecaption}{\@ifdim{\wd\@tempboxa >\hsize}}{\@firstoftwo}{}{}
\makeatother
\begin{document}
Some text...
\begin{table}
Test
\caption{Test}
\end{table}
Some text...
\end{document}
But please be aware that patching internals of document classes or packages is usually a bad idea since internals are subject of change in future versions of the patched document class or package.
[1] See also: Please tutor the usage of patchcmd and xpatch
Best Answer
You had an additional spurious closing brace in the first
C{2.6cm}
column; delete it. I used a\makebox
to center the table with respect to the text area:Some comments:
I changed the definitions of your columns, suppressing the
\let
and\hspace
commands.\bf
is an old command that shouldn't be used anymore; use\bfseries
instead; since cells form a group there's no need for explicit grouping.As a suggestion, don't use the too restrictive option
[!h]
as placement specifier; use a less restrictive one (or don't use any at all).Please (as a suggestion), consider using the
booktabs
package for your tables (they will look a lot better; no vertical rules, though).Since your table will have numeric values, you could consider using the
siunitx
for possible alignment.Just for comparison, the original table and the same table using booktabs: