zl程序教程

您现在的位置是:首页 >  后端

当前栏目

Latex表格太宽处理方法 (How to shorten Latex table length)

方法 处理 to Table 表格 How length LaTeX
2023-09-27 14:24:27 时间

当表格太宽时, 为了能在页面中显示完整, 可以缩小表格, 或者横排.
缩小表格的好处是, 不用倒转页面阅读, 坏处是原始宽度不同的表格, 被缩小后, 字体不一, 不美观. 虽然可以调整参数使得所有表格字体一致, 但是非常不方便.
横排则可以保持字体大小一样.
[格式]注意, 表格包含标题, 表格体, 注解3部分.

[1]缩小方法(之一):使用\resizebox{\textwidth}{!}{...}, 用到graphix宏包.

\begin{center}
\begin{table*}[h]
\resizebox{\textwidth}{!}{ %
\begin{threeparttable}[b]
\caption{Survey of bond lengths.\tnote{a}}
\label{Tab:bondlength}
\begin{tabular}{ccccccccccc}
 

   ......
\end{tabular}
\begin{tablenotes}
    \item [a] {need to notice that...}
    \item [b] {...}
\end{tablenotes}
\end{threeparttable}}%
\end{table*}
\end{center}
\clearpage
[2]缩小方法(之二): 在\begin{table}后使用\footnotesize或其他指定的font size使得table字体变小, 注意太宽的表格变化后还有可能过宽, 此法只能暂时用用.
\begin{table*}[htb]\footnotesize
\begin{threeparttable}[b]
\caption{KE.\tnote{a}
\label{Tab:KE}}
\begin{tabular}{llccccccc}
    ...
\end{tabular}
 \begin{tablenotes}
    \item [a] {Note a.}
 \end{tablenotes}
\end{threeparttable}
\end{table*}
\clearpage

[3]横排:用到\usepackage{rotating}

\begin{sidewaystable}
\centering
\begin{threeparttable}[b]
\caption{Survey of bond lengths.\tnote{a}}
\label{Tab:bondleng}
\begin{tabular}{ccccccccccc}
 ...
\end{tabular}
  \begin{tablenotes}
    \item [a] { } 
   \end{tablenotes}
\end{threeparttable}
\end{sidewaystable}
\clearpage