[英]Latex table too wide
下面的代码显示了我的表格,但它显然太宽了。 我不熟悉 tabularx 或 tabular* 这样的包,所以我真的不确定如何调整表格以使其正确适合我的页面。 我也不介意桌子侧向或处于横向模式,但是当我尝试桌子定位时,它的位置已经偏离了。 有人可以帮帮我吗?
\begin{table}
\begin{threeparttable}
\centering
\caption[Descriptive Statistics ]{Descriptive Statistics s}
\sisetup{add-integer-zero=false}
\begin{tabular}{lcccccccccccccccccccc}
\toprule
& \multicolumn{6}{c}{$\boldsymbol{2004-2011}$} && \multicolumn{6}{c}{$\boldsymbol{2012-2020}$} && \multicolumn{6}{c}{\textbf{Full Sample}}\\
\cmidrule(r){2-7}\cmidrule(lr){9-14}\cmidrule(l){16-21}
\\
& \textbf{Mean} & \textbf{Std.Dev.} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} && \textbf{Mean} & \textbf{Std.Dev.} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs}&& \textbf{Mean} & \textbf{Std.Dev.} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} \\
\midrule
\textbf{FSTS} & 0.39& 0.24& 0.38& -0.37&1.0& 3,039&& 0.42&0.24&0.40&-0.06&1.0&4,566& &0.40 & 0.24& 0.39& -0.37& 1.0&7,605 \\\addlinespace
\textbf{FATA} &0.33 &0.25 &0.30 &-2.15 &0.99 & 3,039&& 0.35&0.26&0.31&-1.53&1.0&4,566 && 0.34&0.25 &0.31 &-2.15 & 1.0&7,605 \\\addlinespace
\textbf{OSTS} &0.33 &0.34 &0.20 &0.0 &1.0 &3,039& &0.45 &0.34 & 0.55& 0.0&1.0 & 4,566&& 0.40&0.34 &0.46 &0.0 & 1.0&7,605 \\\addlinespace
\textbf{PDIO} &3.63 &3.19 & 2.0&1.0 &10.0& 3,039&& 4.79& 3.38& 4.0& 1.0& 10& 4,566&& 4.32 & 3.35& 3.0& 1.0& 10.0& 7,605 \\\addlinespace
\textbf{DOI} & 0.51&0.21& 0.43& 0.0& 0.99& 3,039& &0.59& 0.21& 0.62& 0.26& 1.0& 4,566&& 0.56& 0.21& 0.57& 0.0& 1.0& 7,605 \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item \footnotesize\textit{Note.} $N=330$ in $t_1$; $N=328$ in $t_2$; $N=298$ in $t_3$. $\alpha$ represents Cronbach's Alpha. Prompt pursuit is presented as a global scale.
\end{tablenotes}
\label{tab:scales}%
\end{threeparttable}
\end{table}
您可以使用sidewaystable
环境使用 package rotating
来旋转桌子。 我打破了Std.Dev这个词。 通过我的宏\spheadcenter
\newcommand{\spheadcenter}[2][0]{%
{{\begin{turn}{#1}\let\toprule\relax\begin{tabular}[t]{c} #2 \end{tabular}\end{turn}}}}
通过\tabcolsep3pt
调整列空间。 @{}
是去掉表格左右多余的空格。 见我下面的编码
\begin{sidewaystable}[!p]
\begin{threeparttable}
\centering
\caption[Descriptive Statistics ]{Descriptive Statistics s}
\sisetup{add-integer-zero=false}
{\tabcolsep3pt\begin{tabular}{@{}lcccccccccccccccccccc@{}}
\toprule
& \multicolumn{6}{c}{$\boldsymbol{2004-2011}$} && \multicolumn{6}{c}{$\boldsymbol{2012-2020}$} && \multicolumn{6}{c}{\textbf{Full Sample}}\\
\cmidrule(r){2-7}\cmidrule(lr){9-14}\cmidrule(l){16-21}
\\
& \textbf{Mean} & \textbf{\spheadcenter{Std.\\Dev.}} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} && \textbf{Mean} & \textbf{\spheadcenter{Std.\\Dev.}} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs}&& \textbf{Mean} & \textbf{\spheadcenter{Std.\\Dev.}} &\textbf{Median} & \textbf{Min.} & \textbf{Max.} & \textbf{Obs} \\
\midrule
\textbf{FSTS} & 0.39& 0.24& 0.38& -0.37&1.0& 3,039&& 0.42&0.24&0.40&-0.06&1.0&4,566& &0.40 & 0.24& 0.39& -0.37& 1.0&7,605 \\\addlinespace
\textbf{FATA} &0.33 &0.25 &0.30 &-2.15 &0.99 & 3,039&& 0.35&0.26&0.31&-1.53&1.0&4,566 && 0.34&0.25 &0.31 &-2.15 & 1.0&7,605 \\\addlinespace
\textbf{OSTS} &0.33 &0.34 &0.20 &0.0 &1.0 &3,039& &0.45 &0.34 & 0.55& 0.0&1.0 & 4,566&& 0.40&0.34 &0.46 &0.0 & 1.0&7,605 \\\addlinespace
\textbf{PDIO} &3.63 &3.19 & 2.0&1.0 &10.0& 3,039&& 4.79& 3.38& 4.0& 1.0& 10& 4,566&& 4.32 & 3.35& 3.0& 1.0& 10.0& 7,605 \\\addlinespace
\textbf{DOI} & 0.51&0.21& 0.43& 0.0& 0.99& 3,039& &0.59& 0.21& 0.62& 0.26& 1.0& 4,566&& 0.56& 0.21& 0.57& 0.0& 1.0& 7,605 \\
\bottomrule
\end{tabular}}
\begin{tablenotes}
\item \footnotesize\textit{Note.} $N=330$ in $t_1$; $N=328$ in $t_2$; $N=298$ in $t_3$. $\alpha$ represents Cronbach's Alpha. Prompt pursuit is presented as a global scale.
\end{tablenotes}
\label{tab:scales}%
\end{threeparttable}
\end{sidewaystable}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.