Next: , Up: Floats   [Contents][Index]


9.1.1 @float [type][,label]: Floating Material

To produce floating material, enclose the material you want to be displayed separate between @float and @end float commands, on lines by themselves.

Floating material often uses @image to display an already-existing graphic (see Inserting Images), or @multitable to display a table (see @multitable: Multi-column Tables). However, the contents of the float can be anything. Here’s an example with simple text:

@float Figure,fig:ex1
This is an example float.
@end float

And the output:

This is an example float.

Figure 9.1

As shown in the example, @float takes two arguments (separated by a comma), type and label. Both are optional.

type

Specifies the sort of float this is; typically a word such as “Figure”, “Table”, etc. If this is not given, and label is, any cross-referencing will simply use a bare number.

label

Specifies a cross-reference label for this float. If given, this float is automatically given a number, and will appear in any @listoffloats output (see @listoffloats: Tables of Contents for Floats). Cross references to label are allowed.

On the other hand, if label is not given, then the float will not be numbered and consequently will not appear in the @listoffloats output or be cross-referenceable.

Ordinarily, you specify both type and label, to get a labeled and numbered float.

In Texinfo, all floats are numbered in the same way: with the chapter number (or appendix letter), a period, and the float number, which simply counts 1, 2, 3, …, and is reset at each chapter. Each float type is counted independently.

Floats within an @unnumbered, or outside of any chapter, are simply numbered consecutively from 1.

These numbering conventions are not, at present, changeable.


Next: @caption & @shortcaption, Up: Floats   [Contents][Index]