侧向桌+三部分桌

侧向桌+三部分桌

我想使用 sidewaystable 和 threepart table 在旋转表格的末尾添加表格注释,我尝试了 stackexchange 上提供的解决方案,但没有成功。这是我的表格的代码...

\documentclass[12pt,a4paper]{article}
\usepackage{threeparttable}
\def\MC#1{\multicolumn{1}{c}{#1}}
\usepackage{rotating}


\begin{document}

\begin{sidewaystable}
\begin{threeparttable}  
\centering 
\caption{Table-1}
\medskip
\resizebox{\linewidth}{!}{%
\tabcolsep=2pt  
\begin{tabular}{l@{}*{13}c@{}}\toprule

\MC{VARIABLES} &\MC{1} &\MC{2} &\MC{2}  &\MC{4}  &\MC{5}  & \MC{6} &\MC{7}  &\MC{8}  &\MC{9}&\MC{10}&\MC{11} &\MC{12} \\ \hline

row1 & -2.059{*}{*}{*} & -3.016{*}{*}{*} & -4.794{*}{*}{*} & -7.238{*}{*}{*} & -6.207{*}{*}{*} & -0.918{*}{*}{*} & 7.0569{*}{*} & 0.7439{*} & 0.158{*}{*}{*} &  &  &\\
& (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
row2 & -2.059{*}{*}{*} & -3.016{*}{*}{*} & -4.794{*}{*}{*} & -7.238{*}{*}{*} & -6.207{*}{*}{*} & -0.918{*}{*}{*} & 7.0569{*}{*} & 0.7439{*} & 0.158{*}{*}{*} &  &  &\\
& (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
 row3 & -2.059{*}{*}{*} & -3.016{*}{*}{*} & -4.794{*}{*}{*} & -7.238{*}{*}{*} & -6.207{*}{*}{*} & -0.918{*}{*}{*} & 7.0569{*}{*} & 0.7439{*} & 0.158{*}{*}{*} &  &  &\\
& (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\

\bottomrule 
\end{tabular}}
\begin{tablenotes}
\small
\item This is where authors provide additional information about the data, including whatever notes are needed.
\end{tablenotes}
\end{threeparttable}  
\end{sidewaystable} 

    \end{document}

答案1

以下解决方案将表格设置为横向模式,将相对字体大小设置为\small,使用tabular*环境确保表格占据可用的文本宽度,并使用该dcolumn包将第 2 至第 13 列中的数字对齐到各自的小数点标记上。它还使用了该包的线条绘制宏booktabs

\documentclass{article}
\usepackage{rotating,threeparttable,booktabs,caption,dcolumn}
\newcolumntype{d}[1]{D..{#1}}
\newcommand\MC[1]{\multicolumn{1}{c}{#1}} 

\begin{document}
\begin{sidewaystable}
\small
\setlength{\tabcolsep}{0pt}
\begin{threeparttable}
\caption{Table-1}
\begin{tabular*}{\textwidth}{ l @{\extracolsep{\fill}} *{12}{d{2.6}} }
\toprule
Variables &\MC{1} &\MC{2} &\MC{3} &\MC{4} &\MC{5}  &\MC{6}
          &\MC{7} &\MC{8} &\MC{9} &\MC{10}&\MC{11} &\MC{12} \\
\midrule
row1 & -2.059^{***} & -3.016^{***} & -4.794^{***} & -7.238^{***} & -6.207^{***} & -0.918^{***} & 7.0569^{**} & 0.7439^{*} & 0.158^{***} &  &  &\\
     & (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
\addlinespace
row2 & -2.059^{***} & -3.016^{***} & -4.794^{***} & -7.238^{***} & -6.207^{***} & -0.918^{***} & 7.0569^{**} & 0.7439^{*} & 0.158^{***} &  &  &\\
     & (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
\addlinespace
row3 & -2.059^{***} & -3.016^{***} & -4.794^{***} & -7.238^{***} & -6.207^{***} & -0.918^{***} & 7.0569^{**} & 0.7439^{*} & 0.158^{***} &  &  &\\
     & (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
\bottomrule
\end{tabular*}
\begin{tablenotes}
\item This is where authors provide additional information about the data, including whatever notes are needed.
\end{tablenotes}
\end{threeparttable}
\end{sidewaystable} 
\end{document} 

相关内容