|
7.17 Floats and lists of floats
Floats appear in the @float environment, optionaly with a style
and a label, and with optionnal @caption and @shortcaption.
Their list appear after a @listoffloats.
A hash reference is associated with each float, it is available in some
formatting functions. The keys are:
-
caption_texi
-
shortcaption_texi
A reference on an array containing the caption or shortcaption lines,
with texi @-commands.
-
style_texi
The style with texi @-commands.
-
style_id
The unique identifier associated with the style.
-
nr
The number with the same conventions than makeinfo (use the chapter number a
dot and then the number of the float of that style in the chapter, or an
absolute number if in unnumbered).
-
chapter_nr
The number of the chapter containing the float.
-
nr_in_chapter
The number of the float in the chapter.
-
absolut_nr
The number of the float in the document.
-
texi
The label with @-commands.
-
id
The unique identifier associated with the label. Usefull to make an anchor
or a reference.
-
element
A reference on a structure representing the element the float appear in.
7.17.1 Formatting a float
First there is an occasion to construct a texinfo text for the caption, using
the caption texinfo lines and the informations in the float structure.
The returned lines will be formatted in the main program. A function reference
is used here:
- Function Reference: (\@caption_lines_returned, \@shortcaption_lines_returned) caption_shortcaption \%float \@caption_lines \@shortcaption_lines
\%float is the structure defined above. \@caption_lines and
\@shortcaption_lines are references on arrays containing the
texinfo lines for caption and short caption. \@caption_lines_returned
and \@shortcaption_lines_returned are references on an array
containing the texinfo lines for the caption and shortcaption.
Then the float is formatted with the following function reference:
- Function Reference: $text float $float_text \%float $caption_text $shortcaption_text
$float_text is the text appearing within the @float, formatted.
\%float is still the structure defined above. $caption_text and
$shortcaption_text are the caption and short caption build with the
above function and formatted.
7.17.2 Formatting lists of floats
A list of floats is introduced by @listoffloats. The argument of
@listoffloats is the style. First the style texinfo can be
modified with the following function reference:
- Function Reference: $style_texi_returned listoffloats_style $style_texi
$style_texi is the @listoffloats argument with texinfo
@-commands kept. It is possible to make changes to the $style_texi and
return a modified string, still with @-commands. The modified string
is formatted in the main program.
After that, for each of the floats with that style, first there is a
possibility to modify the float style and the float caption before they
are formatted in the main program, with the following function references:
- Function Reference: $float_style_texi_returned listoffloats_float_style $style_texi \%float
$style_texi is the style, and \%float is the structure described
above. This function reference returns a style to be formatted in the
main program.
- Function Reference: $caption_texi_returned listoffloats_caption \%float
\%float is the structure described
above. This function reference returns a caption to be formatted in the
main program.
Each entry is formatted by:
- Function Reference: $listoffloats_entry listoffloats_entry $style_texi \%float $float_style $caption $href
$style_texi is the style with @-commands, $float_style is the
style returned by the above function and formatted. $caption is the
caption returned by the above function formatted. \%float is the
structure corresponding with the float, and $href is an href pointing to
the float location.
Lastly, the whole @listoffloats is formatted by:
- Function Reference: $listoffloats listoffloats $style_texi $style \@listoffloats_entries
$style_texi is the style with @-commands, $style is the
style returned by the above function and formatted. The array reference
\@listoffloats_entries holds the entries formatted by the above
function.
Doku-Base
This document was created by Netzdino using texi2html.
|