Re: 請問 caption 強制不換行
※ 引述《Edward.bbs@bbs.sayya.org (蒙古大夫 2.0)》之銘言:
: ※ 引述《Swanj.bbs@ptt.cc (瓦泥)》之銘言:
: > 謝謝您的回應
: > 因為 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
討論串 (同標題文章)
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章