1
我需要改变我的文档的序言中更改表的样子。 目前我所有的表都有字幕添加到底部,对准中心看上去像:“表N:表标题”。
我需要的是标题分成两个部分并移动的话,那么我的表看起来像:
表N(对齐到左)
表标题(对齐中心)
表我应该添加到文档序言来更改表浮动外观?
哪有我做到这一点?
我需要改变我的文档的序言中更改表的样子。 目前我所有的表都有字幕添加到底部,对准中心看上去像:“表N:表标题”。
我需要的是标题分成两个部分并移动的话,那么我的表看起来像:
表N(对齐到左)
表标题(对齐中心)
表我应该添加到文档序言来更改表浮动外观?
哪有我做到这一点?
像下面这样可以工作,但你的描述留下了几个问题,在我的脑海。
\documentclass{article}
\usepackage{booktabs}% pretty rules for the table
\usepackage{lipsum}% provides filler text
%% Let's define our caption style
\usepackage{caption}
\DeclareCaptionLabelSeparator{fill-newline}{\hfill\null\par}
\captionsetup{%
format=plain,
labelformat=simple,
labelsep=fill-newline,
singlelinecheck=false,
justification=centering,
position=top,
}
\begin{document}
\lipsum[1]
\begin{table}[h]
\caption{I've used the \texttt{caption} package to achieve this caption format.}
\centering
\begin{tabular}{ll}
\toprule
Option & Setting \\
\midrule
format & plain \\
labelformat & simple \\
labelsep & fill-newline \\
singlelinecheck & false \\
justification & centering \\
position & top \\
\bottomrule
\end{tabular}
\end{table}
\lipsum[2]
\end{document}
的caption
包可以让你重新设置字幕在几乎你想要的任何方式。
你想要“表N”和标题文本在同一行或单独的行(如上面)吗?
应该如果字幕占用多条线路发生什么?
我可以用格式的更多拨弄如果这不是你想要什么相当。如果您想在自己与ITI玩,检查出caption
package documentation。
是“表N”和字幕文本应该是在同一行?或者是“表N”本身?如果标题文本占用多行,会发生什么情况? – godbyk 2009-06-28 22:31:03