我想将标题居中,而不是表格中特定列的主体。例如:
\begin{table}[!t]
\centering
\caption{
\bf{My table}}
\begin{tabular}{l|c|}
...
\end{tabular}
\end{table}
将生成左对齐列和中心对齐列。我希望所有标题都集中在一起,但桌子的主体实际上是左对齐的。如果每列中的条目都很宽,那么左对齐或右对齐的内容没有居中标题看起来很奇怪(它在标题中留下了很多空白)。
第二,有没有办法强制表在LaTeX中自己的页面上?或者这个问题的任何数字?
答案 0 :(得分:38)
使用
定义标题\multicolumn{1}{c}{Heading}
根据需要随意在|
周围粘贴c
个。{/ p>
答案 1 :(得分:8)
为了在自己的页面上放置一个表(或任何浮点数),请使用p
参数作为位置:
\begin{table}[p]
...
它将显示在章节/部分的末尾,或者当您发出\clearpage
或\cleardoublepage
时。
答案 2 :(得分:0)
使用caption
包
\usepackage{caption}
\captionsetup[table]{skip=6pt}
或
\captionsetup[table]{aboveskip=6pt}
\captionsetup[table]{belowskip=6pt}
添加前言
\begin{table}[!t]
\centering
\caption{\bfseries{My table}}
\begin{tabular}{l|c|}
...
\end{tabular}
\end{table}