latex - 乳胶桌太宽
问题描述
下面的代码显示了我的表格,但它显然太宽了。我不熟悉 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
您可以使用环境和使用包来旋转桌子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}
推荐阅读
- select - 关于 MySql 中存在评论的结果的问题
- c# - 导航方法执行后前一个组件不会消失
- node.js - 有没有办法等到所有数据都写入 selenium (nodejs) 中的 csv 文件后再退出测试?
- javascript - Vue.js 与服务 POST 请求不兼容吗?
- c - 尝试传递节点时出现分段错误
- pyspark - 在 pyspark 中,是否可以使用 1 个 groupBy 进行 2 个聚合?
- python - 有什么方法可以通过本地代码写入浏览器 cookie?
- python - 将附件添加到 EmailMessage 会引发 TypeError:set_text_content() 获得了意外的关键字参数“maintype”
- dns - Route53 不包括粘合记录
- android - 访问另一个活动的方法