\
caption
command will get its
position wrong (by 10pt
) if you simply write:
The topcapt package solves this problem:\begin{table} \caption{Example table} \begin{tabular}{...} ... \end{tabular} \end{table}
The KOMA-script classes provide a similar command\usepackage{topcapt} ... \begin{table} \topcaption{Example table} \begin{tabular}{...} ... \end{tabular} \end{table}
\
captionabove
; they also have a class option
tablecaptionabove
which arranges that \
caption
means \
captionabove
, in table environments. The
caption package may be loaded
with an option that has the same effect:
or the effect may be established after the package has been loaded:\usepackage[tableposition=top]{caption}
(Note that the two “position” options are different: actually, “above” and “top” in these contexts mean the same thing.) Doing the job yourself is pretty easy: topcapt switches the values of the LaTeX2e parameters\usepackage{caption} \captionsetup[table]{position=above}
\
abovecaptionskip
(default
value 10pt
) and \
belowcaptionskip
(default value
0pt
), so:
does the job (if the length values are right; the package and classes are more careful!).\begin{table} \setlength{\abovecaptionskip}{0pt} \setlength{\belowcaptionskip}{10pt} \caption{Example table} \begin{tabular}{...} ... \end{tabular} \end{table}
This answer last edited: 2011-08-19
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=destable