
パッケージの sidewaystable を使用していますrotating
。キャプションとテーブルの間に空白を追加しようとしています (キャプションはテーブルの上に配置されます)。\captionsetup[table]{skip=10pt}
プリアンブルで を使用し、 sidewaystable 環境の の\captionsetup{skip=10pt}
直前で を使用しようとしました\caption
。どちらも機能しません。最初のオプションはすべての通常のテーブルに影響しますが、sidewaystable には影響しません。後者は効果がありません。
これを実行する方法を教えてください。また、これはこのテーブルのみに適用され、他のテーブルのキャプションには影響しないことが重要です。
ありがとうございます。
答え1
\captionsetup
が 内で効果を持たない理由は正確にはわかりませんが、代わりに の直前にを配置し、両方を中括弧 ( ) で囲むsidewaystable
ことができます。中括弧のペアはキャプション設定をローカライズします。\captionsetup
sidewaystable
{ .. }
完全な例:
\documentclass{article}
\usepackage{rotating,caption}
\begin{document}
\begin{table}
\centering
\caption{Word}
\begin{tabular}{c}
stuff
\end{tabular}
\end{table}
{\captionsetup[table]{aboveskip=2cm}\begin{sidewaystable} % opening brace on beginning of line
\centering
\caption{Word}
\begin{tabular}{c}
stuff
\end{tabular}
\end{sidewaystable}} % <- closing brace
\begin{table}
\centering
\caption{Word}
\begin{tabular}{c}
stuff
\end{tabular}
\end{table}
\end{document}