9.1.2 @caption
& @shortcaption
You may write a @caption
anywhere within a @float
environment, to define a caption for the float. It is not allowed in
any other context. @caption
takes a single argument, enclosed
in braces. Here’s an example:
@float
An example float, with caption.
@caption{Caption for example float.}
@end float
The output is:
An example float, with caption.
Caption for example float.
@caption
can appear anywhere within the float; it is not
processed until the @end float
. The caption text is usually a
sentence or two, but may consist of several paragraphs if necessary.
In the output, the caption always appears below the float; this is not
currently changeable. It is preceded by the float type and/or number,
as specified to the @float
command (see the previous section).
The @shortcaption
command likewise may be used only within
@float
, and takes a single argument in braces. The short
caption text is used instead of the caption text in a list of floats
(see the next section). Thus, you can write a long caption for the
main document, and a short title to appear in the list of floats. For
example:
@float
... as above ...
@shortcaption{Text for list of floats.}
@end float
The text for @shortcaption
may not contain comments
(@c
), verbatim text (@verb
), environments such as
@example
, footnotes (@footnote
) or other complex
constructs. The same constraints apply to @caption
unless
there is a @shortcaption
.