The TeX FAQ

Frequently Asked Question List for TeX

Formatting

The style of captions

Changes to the style of captions may be made by redefining the commands that produce the caption. So, for example, \fnum@figure (which produces the float number for figure floats) may be redefined, in a package of your own, or between \makeatletter\makeatother:

\renewcommand{\fnum@figure}{\textbf{Fig.~\thefigure}}

which will cause the number to be typeset in bold face. (Note that the original definition used \figurename.) More elaborate changes can be made by patching the \caption command, but since there are packages to do the job, such changes (which can get rather tricky) aren’t recommended for ordinary users.

The float package provides some control of the appearance of captions, though it’s principally designed for the creation of non-standard floats. The caption and ccaption (note the double “c”) packages provide a range of different formatting options.

ccaption also provides “continuation” captions and captions that can be placed outside of float environments. The (very simple) capt-of package also allows captions outside a float environment. Note that care is needed when doing things that assume the sequence of floats (as in continuation captions), or potentially mix non-floating captions with floating ones.

The memoir class includes the facilities of the ccaption package; the KOMA-script classes also provide a wide range of caption-formatting commands.

The documentation of caption is available by processing a file manual.tex, which is created when you unpack caption.dtx

Note that the previously-recommended package caption2 has now been overtaken again by caption; however, caption2 remains available for use in older documents.

FAQ ID: Q-captsty
Tags: structure