|||
(一)表格过长,页面横置,表格上下左右居中
解决表格过长,页面横置,表格上下居中,左右居中的问题,看如下几个例子:
表格横置的宏包是:\usepackage{rotating} % T for table
页面横置的宏包是:\usepackage{pdflscape} %page hengzhi
1. 页面竖置,表格横置于页面
表格横置而页面竖置
\begin{sidewaystable}
...
what you want to say
....
\begin{sidewaystable}
2. 页面横置,表格横置与页面,上下左右居中
页面横置,表格横置居中
\begin{landscape}
\vspace*{\fill}
...
what you want to say
...
\vfill % equivalent to \vspace{\fill}
\end{landscape}
————————————————
原文链接:http://blog.sina.com.cn/s/blog_67f507220102v6pt.html
https://www.jianshu.com/p/9710c32f5e55
(二)Latex 表格过大(或过小)的调整方法
1 表格宽过窄问题: 表格宽度小, 与页面大小不匹配, 效果前后如下图所示.
目标: 调整表格宽度, 效果为”按页面宽度调整表格”.
命令: \setlength{\tabcolsep}{7mm}{XXXX}
实现代码:
\begin{center}
\textbf{Table 2}~~Improved table.\\
\setlength{\tabcolsep}{7mm}{
\begin{tabular}{cccccc} \toprule
Models & $\hat c$ & $\hat\alpha$ & $\hat\beta_0$ & $\hat\beta_1$ & $\hat\beta_2$ \\ \hline
model & 30.6302 & 0.4127 & 9.4257 & - & - \\
model & 12.4089 & 0.5169 & 18.6986 & -6.6157 & - \\
model & 14.8586 & 0.4991 & 19.5421 & -7.0717 & 0.2183 \\
model & 3.06302 & 0.41266 & 0.11725 & - & - \\
model & 1.24089 & 0.51691 & 0.83605 & -0.66157 & - \\
model & 1.48586 & 0.49906 & 0.95609 & -0.70717 & 0.02183 \\
\bottomrule
\end{tabular}}
\end{center}
2 表格宽过宽问题: 表格宽度大, 与页面大小不匹配, 效果前后如下图所示.
目标: 调整表格宽度, 效果为”按内容调整表格”.
命令: \resizebox{\textwidth}{15mm}{XXXX}
实现代码:
\begin{center}
\textbf{Table 1}~~Original table.\\
\resizebox{\textwidth}{15mm}{
\begin{tabular}{cccccccccccc} \toprule
Models & $\hat c$ & $\hat\alpha$ & $\hat\beta_0$ & $\hat\beta_1$ & $\hat\beta_2$ & Models & $\hat c$ & $\hat\alpha$ & $\hat\beta_0$ & $\hat\beta_1$ & $\hat\beta_2$ \\ \hline
model & 30.6302 & 0.4127 & 9.4257 & - & - & model & 30.6302 & 0.4127 & 9.4257 & - & -\\
model & 12.4089 & 0.5169 & 18.6986 & -6.6157 & - & model & 30.6302 & 0.4127 & 9.4257 & - & - \\
model & 14.8586 & 0.4991 & 19.5421 & -7.0717 & 0.2183 & model & 30.6302 & 0.4127 & 9.4257 & - & - \\
model & 3.06302 & 0.41266 & 0.11725 & - & - & model & 30.6302 & 0.4127 & 9.4257 & - & - \\
model & 1.24089 & 0.51691 & 0.83605 & -0.66157 & - & model & 30.6302 & 0.4127 & 9.4257 & - & - \\
model & 1.48586 & 0.49906 & 0.95609 & -0.70717 & 0.02183 & model & 30.6302 & 0.4127 & 9.4257 & - & - \\
\bottomrule
\end{tabular}}
\end{center}
————————————————
原文链接:https://blog.csdn.net/wbl90/article/details/52597429/
点滴分享,福泽你我!Add oil!
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-10 07:10
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社