在 iosart2c 的双列布局中,“table*”后面的下一个“table”的标题会错误地流入第二列,从而与那里的文本重叠。这是一个已知限制还是一个错误?我该如何正确限制标题?
表格标题溢出错误的最小工作示例。
\documentclass{iosart2c}
\begin{document}
\begin{table*}
\caption{This table will make the next one overflow.}
\end{table*}
\begin{table}
\caption{This caption should be broken into a single column but won't as it runs into the second column.}
\end{table}
Some text to show that we indeed have two column layout and that it overlaps.
\end{document}
答案1
我不确定为什么该课程对 做出了可疑的定义\@maketablecaption
;修复它并修复table
,table*
结果就是预期的。
\documentclass{iosart2c}
\usepackage{lipsum}
\makeatletter
\long\def\@maketablecaption#1#2{%
\begingroup
\sbox\@tempboxa{\footnotesize #2}%
\centering
{\footnotesize#1\par}%
\ifdim \wd\@tempboxa>\tablewidth
\parbox[t]{\tablewidth}{%
\footnotesize%
#2\vphantom{Ay}\par
}%
\else
\mbox{\box\@tempboxa\vphantom{Ay}}%
\fi
\vskip\belowcaptionskip
\endgroup
}
\renewenvironment{table}
{\let\@makecaption\@maketablecaption
\tablewidth=\columnwidth
\let\@floatboxreset\@tableboxreset\@float{table}}
{\end@float}
\renewenvironment{table*}
{\let\@makecaption\@maketablecaption%
\tablewidth=\textwidth
\let\@floatboxreset\@tableboxreset\@dblfloat{table}}
{\end@dblfloat}
\makeatother
\begin{document}
\lipsum[1]
\begin{table*}
\caption{This table will make the next one overflow.}
\end{table*}
\begin{table*}
\caption{This table will make the next one overflow. This table will make the next one overflow.
This table will make the next one overflow.}
\end{table*}
\lipsum[2-3]
\begin{table}
\caption{This caption should be broken into a single column but won't as it runs into the second column.}
\end{table}
\lipsum
\end{document}
答案2
我找到了一个快速解决方案。\hbox
在标题内使用。\hbox
使文本跨越表格宽度 --- 解决后一个问题。使用多个\hbox
链手动拆分图例 --- 解决前一个问题。
\begin{table*}[!t]
\caption{\hbox{The table shows the number of words in the master file --- selected based on} \hbox{along with their letter count}\label{xyz} }
.
.