侧边桌子被切断

侧边桌子被切断

我正在尝试使用 informs3 类创建横向表格。运行 pdflatex 后,表格在顶部被截断,并且未正确居中在页面上。如果我更改文档类,横向表格看起来不错。问题似乎出在哪里?代码如下。

非常感谢

\documentclass[trsc,nonblindrev]{informs3}
\usepackage{rotating,booktabs}
....
....
\begin{sidewaystable} 

\caption{Comparison between the best solutions obtained with BLS and MGCH, in terms of the individual  GAP objectives.  }
\medskip
\scriptsize \centering

\begin{tabular}{p{5cm} | c c  | c c | c c | c c | c c | c c}
\hline
Objective  & \multicolumn{2}{c}{\underline{$D_1$}} & \multicolumn{2}{c}{\underline{$D_2$}}&\multicolumn{2}{c}{\underline{$D_3$}} & \multicolumn{2}{c}{\underline{$D_4$}} & \multicolumn{2}{c}{\underline{$D_5$}} & \multicolumn{2}{c}{\underline{$D_6$}}\\

 & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH \\
\hline
Min.(avg.) idle time bewteen activities at the same gate (in min.) &    10(212.7) & 10(212.3) & \textbf{15}(199.6) &    10(163.7) & \textbf{15}(193.6) & 10(182.3) & \textbf{15}(192.0) &10(175.3)   & 10(175.1) &  10(144.9) & 10(177.6) & 10(161.2) \\
Min.(avg.) idle time bewteen activities at shadowing gates (in min.) &  20(503.9) & \textbf{25}(607.8)  & 40(419.7) &   40(422.8) & \textbf{45}(458.4) & 15(363.7) &    \textbf{30}(789.1) & 15(517.6) & 20(342.9) & 20(368.2) & \textbf{20}(412.9) & 10(411.9) \\
Min.(avg.) idle time bewteen activities at the same gate group (in min.) & \textbf{5}(93.4) & 0(91.6) & \textbf{5}(85.7) &  0(59.2) & \textbf{5}(81.4) & 0(76.7) & \textbf{5}(85.5) & 0(65.5) & \textbf{5}(69.6) & 0(56.8) & \textbf{5}(83.3) & 0(76.9) \\

\hline
 \end{tabular} \label{objective values}

\begin{tabular}{c | c c  | c c | c c | c c | c c | c c}
\hline
 Objective  & \multicolumn{2}{c}{\underline{$D_{1to6}$}} & \multicolumn{2}{c}{\underline{$P0.87$}}&\multicolumn{2}{c}{\underline{$P.97$}} & \multicolumn{2}{c}{\underline{$P1.03$}} & \multicolumn{2}{c}{\underline{$P1.14$}} \\
 & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH  \\
\hline

Min.(avg.) idle time bewteen activities at the same gate (in min.) & 10 (321.6) & 10 (323.3) & 10 (204.9) & 10 (207.9) & \textbf{15} (209.8) &  10 (212.6) & 10 (208.8) & 10 (211.1) & 10 (203.9) & 10 (208.5) \\
Min.(avg.) idle time bewteen activities at shadowing gates (in min.) &  \textbf{15} (1633.7) & 10 (1453.3) & \textbf{25} (583.7) & 10 (554.9) & \textbf{20} (546.6) & 15 (534.2) &  \textbf{25} (491.9) & 15 (533.8) & \textbf{25} (489.3) &    10 (567.2) \\
Min.(avg.) idle time bewteen activities at the same gate group (in min.) &  \textbf{5} (65.1) & 0 (47.1) & \textbf{5} (94.6) &  0 (89.0) & \textbf{5} (80.9) &  0 (84.7) & \textbf{5} (99.5) &  0 (83.0) &  \textbf{5} (77.3) & 0 (79.9) \\

\hline
 \end{tabular} \label{objective values}
\end{sidewaystable}

答案1

你提到,如果使用通知3文档类,但如果您使用其他文档类则不行。(顺便问一下,您尝试过哪些其他文档类或哪些类?)

不过,我不认为informs3文档类是罪魁祸首。为了让表格适合文本块,你应该实施的主要更改是

  • 减少列间空白量(由参数 控制\tabcolsep),例如2pt(默认值:6pt),以及

  • 使用p{...}第二个环境的第一列的列类型tabular。(您的帖子使用了c该列的类型。

进行这些更改后,您可以使用\footnotesize字体大小指令,进行 20% 的线性减少,而不是\scriptsize在帖子中使用的更剧烈的(30% 的线性减少)指令。

此外,鉴于您已经加载了该booktabs包,您可能希望使用该包的宏\toprule\midrule\、\cmidrule和,\bottomrule而不是通用的 LaTeX\hline指令。使用\cmidrule指令,并根据需要进行左侧和右侧修剪,似乎也比使用\underline多列标题更好。(顺便说一句,如果您确实切换到包的线条绘制命令booktabs,则应避免绘制垂直规则。)

在此处输入图片描述

\documentclass[trsc,nonblindrev]{informs3}
\usepackage{rotating,booktabs}
\begin{document}
\begin{sidewaystable} 
\setlength\tabcolsep{2pt} % default value: 6pt
\footnotesize  % not `\scriptsize
\centering

\begin{tabular}{ @{} p{5cm} *{6}{cc} @{}}
\toprule
Objective  
& \multicolumn{2}{c}{$D_1$} & \multicolumn{2}{c}{$D_2$}
& \multicolumn{2}{c}{$D_3$} & \multicolumn{2}{c}{$D_4$}
& \multicolumn{2}{c}{$D_5$} & \multicolumn{2}{c}{$D_6$}\\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7}
\cmidrule(lr){8-9} \cmidrule(lr){10-11} \cmidrule(l){12-13}
& BLS & MGCH & BLS & MGCH 
& BLS & MGCH & BLS & MGCH 
& BLS & MGCH & BLS & MGCH \\
\midrule
Min.(avg.)\ idle time bewteen activities at the same gate (in min.) &    10(212.7) & 10(212.3) & \textbf{15}(199.6) &    10(163.7) & \textbf{15}(193.6) & 10(182.3) & \textbf{15}(192.0) &10(175.3)   & 10(175.1) &  10(144.9) & 10(177.6) & 10(161.2) \\
Min.(avg.)\ idle time bewteen activities at shadowing gates (in min.) &  20(503.9) & \textbf{25}(607.8)  & 40(419.7) &   40(422.8) & \textbf{45}(458.4) & 15(363.7) &    \textbf{30}(789.1) & 15(517.6) & 20(342.9) & 20(368.2) & \textbf{20}(412.9) & 10(411.9) \\
Min.(avg.)\ idle time bewteen activities at the same gate group (in min.) & \textbf{5}(93.4) & 0(91.6) & \textbf{5}(85.7) &  0(59.2) & \textbf{5}(81.4) & 0(76.7) & \textbf{5}(85.5) & 0(65.5) & \textbf{5}(69.6) & 0(56.8) & \textbf{5}(83.3) & 0(76.9) \\
\bottomrule
\end{tabular} 

\bigskip\bigskip % provide some separation between the tabular environments

\begin{tabular}{@{} p{5cm} *{5}{cc} @{}}
\toprule
 Objective  
& \multicolumn{2}{c}{$D_{1to6}$} & \multicolumn{2}{c}{$P0.87$}
& \multicolumn{2}{c}{$P.97$} & \multicolumn{2}{c}{$P1.03$} 
& \multicolumn{2}{c}{$P1.14$} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7}
\cmidrule(lr){8-9} \cmidrule(l){10-11}
& BLS & MGCH & BLS & MGCH & BLS & MGCH 
& BLS & MGCH & BLS & MGCH  \\
\midrule
Min.(avg.)\ idle time bewteen activities at the same gate (in min.) & 10 (321.6) & 10 (323.3) & 10 (204.9) & 10 (207.9) & \textbf{15} (209.8) &  10 (212.6) & 10 (208.8) & 10 (211.1) & 10 (203.9) & 10 (208.5) \\
Min.(avg.)\ idle time bewteen activities at shadowing gates (in min.) &  \textbf{15} (1633.7) & 10 (1453.3) & \textbf{25} (583.7) & 10 (554.9) & \textbf{20} (546.6) & 15 (534.2) &  \textbf{25} (491.9) & 15 (533.8) & \textbf{25} (489.3) &    10 (567.2) \\
Min.(avg.)\ idle time bewteen activities at the same gate group (in min.) &  \textbf{5} (65.1) & 0 (47.1) & \textbf{5} (94.6) &  0 (89.0) & \textbf{5} (80.9) &  0 (84.7) & \textbf{5} (99.5) &  0 (83.0) &  \textbf{5} (77.3) & 0 (79.9) \\
\bottomrule
\end{tabular}
%\caption{Comparison between the best solutions obtained with BLS and MGCH, in terms of the individual GAP objectives.}
%\label{objective values}

\end{sidewaystable}
\end{document}

相关内容