作者Swanj (瓦泥)
看板LaTeX
标题Re: 请问 caption 强制不换行
时间Wed Jun 11 11:41:09 2008
※ 引述《[email protected] (蒙古大夫 2.0)》之铭言:
: ※ 引述《[email protected] (瓦泥)》之铭言:
: > 谢谢您的回应
: > 因为 table 本身比较小,所以没有使用 caption package,
: > 预设的情况是 caption 不会超出 table,如下所示:
: > Table 3.2: This is a
: > table caption
: > -------------------------
: > | This is a table |
: > 但是我希望可以调整成这样
: > Table 3.2: This is a table caption
: > -------------------------
: > | This is a table |
: > 不知道有没有方法呢?
: > 谢谢您!
: 我会要实际小例子(实际的文稿 TeX code),就是因为一般情况下,
: caption 不会因为你的表格较小而折行。LaTeX 的预设,他的宽就是
: textwidth。
正如您所说,我发现问题了
code 如下
-------------------------------------------------------------
\begin{center}
% \begin{threeparttable}
\begin{table}
\large
\caption{Coding Rationale for Payment Method}
\label{t_coding_rationale_for_payment_method}
\small\centering
\begin{tabular}{cc}
\toprule
Payment Method & Coding \\
\midrule
Cash & 0 \\
Mix & 1 \\
Stock & 2 \\
\bottomrule
\end{tabular}
\end{table}
% \end{threeparttable}
\end{center}
-----------------------------------------------------------
会换行的原因在於
因为要使用 tablenotes 所以采用 threeparttable
threeparttable 的预设情况是 caption 会依据表格的宽度自动拆行
但是 table 预设情况就是单行 \textwidth 的宽度了
只不过这样这样排版注解就会比较麻烦了
不知道您有没有什麽好方法呢?
谢谢您!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 123.192.179.64