我想问一下,如何在包含大量注释的页面中将表格居中。我将注释定义为表格的一部分。我应用的代码如下,但结果看起来不太好。
\documentclass{article}
\usepackage{graphicx}
\usepackage{threeparttablex}
\usepackage{lscape}
\usepackage{booktabs}
\usepackage{tabularx}
\pagenumbering{gobble}
\begin{document}
\begin{table}
\begin{center}
\resizebox{1.\textwidth}{!}{
\begin{threeparttable}
\begin{tabular}{lrrrrrrrr}
\multicolumn{9}{l}{Table 2: Results} \\ \hline
% & MEAN & STD & SKEW & KURT & JBpval & AC(1) \\ \hline
\multicolumn{9}{l}{Panel A: A} \\ \hline
A & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
B & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
C & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
D & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
E & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
F & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
G & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
H & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
I & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
J & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
K & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
L & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
M & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
N & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
O & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
Q & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
\hline
\multicolumn{9}{l}{Panel B: B} \\ \hline
A & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
B & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
C & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
D & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
E & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
F & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
G & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
H & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
I & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
J & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
K & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
L & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
M & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
N & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
O & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\
Q & -0.00 & \textbf{0.00} & \textbf{0.00**} & \textbf{0.00**} & \textbf{0.11} & \textbf{0.00*} & -0.11 & \textbf{0.00} \\ \hline \hline
\hline
\end{tabular}
\begin{tablenotes}[para,flushleft]
\small
\item Long Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long TextTextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Long TextLong Text Long Text Long Text Long TextLong Text Long TextLong Text Long Text Long Text Long TextLong Long Long TextLong Text Long Text Long Text Long TextLong TextLong Text Long Text Long Text Long TextLong Long TextLong Text Long Text Long Text Long TextLong Text Long TextLong Text Long Text Long Text Long TextLong TextLong Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long TextLong Text Long Text Long Text Long Text ZZZZZZZZ
\end{tablenotes}
\end{threeparttable}
}
\end{center}
\end{table}
\end{document}
答案1
- 不要使用
\resizebox
- 相反
\begin{center} .... \end{center}
,这会引入额外的垂直空间,放在\centering
后面\begin{table}
- 考虑使用较小的字体:用于表格
\small
和表格注释footnotesize
- 看看您是否可以更改页面布局,例如增加
\textheight
和\textwidth
。
考虑到前三项,我得到以下结果:
无关:
- 表格的代码可以更短(如果整个列都用粗体表示,那么可以用
\begin{tabular}{lrr *{5}>{\bfseries}r} r >{\bfseries}r}
并省略表体中的所有\textbf{
...。}
- 对于表格标题,您应该使用功能
threeparttable
并将标题从multicolumn
表格中移动到标题threeparttable
:
...
\begin{table}
\small
\centering
\begin{threeparttable}
\caption{Table 2: Results}
\begin{tabular}{lrrrrrrrr}
\hline
% & MEAN & STD & SKEW & KURT & JBpval & AC(1) \\ \hline
\multicolumn{9}{l}{Panel A: A} \\ \hline
...