Floats and footnotes are used to render distinctive information that is supplemental to the information found in the flow, making it easy for the reader to find it because of its predetermined location on the page. These constructs are defined "in line" of the flow of information being paginated, but are rendered "out of line" of the flow of information being paginated . Such information is considered auxiliary enough not to disturb the flow itself for the reader, so that the reader can choose to examine a float or footnote at leisure without interrupting the reading of the flow in which it is referenced.
These constructs are dynamically rendered on the page where detected by the formatter in the flow, or perhaps on the immediately following page should it not fit where referenced. They can only be defined in the flow filling the body region of a page, though not in an absolutely positioned area, and are stacked in a different reference area than the main reference area. Floats are moved to either the before, start, or end edges within the body region (not in the perimeter regions ). Footnotes are two-part constructs: the footnote citation that is rendered inline in the flow and the footnote body is rendered at the after edge within the body region. An after float is accomplished using a footnote without a footnote citation, but can only be used when not using footnotes since this kind of after float cannot be distinguished from other footnotes on the same page.
Note that the labeling of footnotes is up to the transformation process producing the XSL-FO instance and cannot be generated by the formatter. A feature that is commonly requested but unavailable in XSL-FO 1.0 is numbering the footnotes on a per-page basis. Since the transformation process is unaware of where the page breaks are, yet is responsible for the labeling of the footnote references, this feature cannot yet be realized.
There are no endnote layout constructs in XSL-FO. An endnote is a two-part footnote-like construct with a citation and a definition, but all endnote definitions are collected at the end of a page sequence (e.g. chapter) rather than at the bottom of pages. To render endnotes, it would be the responsibility of transformation to cite the endnotes inline in the flow of the scope and then collect and render endnotes at the end of the scope. You could then choose to render the citations as part of the flow on the body, or use empty citations to take advantage of the XSL-FO footnote construct to sink the collection of endnotes to the bottom of the last page.
Judicious use of floats can keep the main flow of information continuous without unseemly breaks at the bottom of pages. The formatter moves the floating object to the perimeter and flows subsequent information in the main flow without interruption, as if the flow had not been present. If the construct is too large to fit on the page, it can be rendered on the next page and the subsequent information continues on the previous page in a seamless fashion.
There are many candidate uses of floating constructs. You can use float to float images to the side of a page, e.g. to present sidebar portions of content, or to format lists where the item bodies are indented relative to the corresponding item label's formatted length. It can also be used to implement a multi-line drop initial cap in a paragraph. You can use footnote to sink content to the bottom of a page, e.g. for traditional footnotes, acronym expansions, glossary definitions, or images floating to the bottom of a page (using an empty inline construct).
The name of the construct shouldn't prejudice how the construct is used. Consider the need to format a disclaimer at the bottom of the last page of a document. You can flow the disclaimer in the body of a footnote with an empty citation in an empty block at the end of the document. The disclaimer isn't a footnote, yet you'll get the desired effect of the out-of-line placement.
Every page's body region has two sub-regions that are rendered only if necessary. Before floats and footnotes are stacked in the body region with other block level constructs, but the reader needs some separation rendered to distinguish content belonging in a float or footnote from the content belonging in the body. The body region is separated into the before-float reference area, main reference area, and footnote reference area portions, as shown in Figure 8-1.
Figure 8-1. Conditional areas and sub-regions
The act of defining these visual separators does not affect their rendering, as they are only rendered on a page if the floated information is being rendered on the page. Static content defines the rendering of a separator. When needed, the static content associated with xsl-before-float-separator is rendered inside and at the end of the before-float reference area. When needed, the static content associated with xsl-footnote-separator is rendered inside and at the start of the footnote reference area.
Static content for these sub-regions should always be defined as a contingency if floats and footnotes are being used, for the chance that a given page may have such a construct.
Remember from Figure 4-2 the incursion of the perimeter regions into the body: all reference areas shown above are within the body region's margins and not part of the perimeters .
Included in this chapter. This chapter includes discussion of the following XSL-FO objects: