8.1 Floats

8.1.1 Float definition

Using the float object, you can position out-of-line information at the before, start, or end sides of a page.

  • The before floats are flowed in the before-float reference area (see Figure 8-1).

  • A float creates a dimensionless anchor area in the area tree.

  • The anchor is tied to the information that precedes the float in the flow.

  • Out-if-line information is placed relative to the anchor

    • typically at the top or sides of the page in which the anchor is flowed.

  • The content of the float is always a set of block-level constructs.

Information can be defined at the block level or at the inline level of the flow.

  • The anchor is treated as a block if defined at the block level.

  • The anchor is typically treated as an inline construct if defined at the inline level.

    • It is treated as a block object if the line area created by the inline constructs consists only of anchors.

  • It must be defined in the body region of the page.

  • It must be defined as a descendant of a relatively positioned block.

    • Absolutely positioned areas cannot have float descendants.

  • It cannot have any float , footnote , or marker descendants.

The blocks of the float definition are positioned in the area tree accordingly .

  • The before floats are stacked in the before-float reference area.

  • The side floats are stacked in a side-float reference area.

    • This is a child of the specifying block's ancestral span reference area.

  • Float content that does not float is flowed as normal content.

    • This may be the result of a faulty definition or placement.

    • A float is an area that is not normally flowed and cannot be defined within any other area that is not normally flowed (e.g. another float, a footnote, a perimeter region, an absolutely positioned block container, etc.).

  • Float lengths cannot be preset and are always derived from the content of the float.

The block areas that float have no border or padding.

  • Padding, border, and content rectangles are coincident.

Side floats do not overlap and are typically placed beside each other.

  • They make a further incursion into the inline-progression dimension of the block.

  • They can be forced to not be placed beside each other by using the clear property.

    • Different values control which floats are clear of other floats.

8.1.2 The float object

Purpose
  • This is the content to be rendered towards either the before, start, or end edges of the body region regardless of where in the region the content is defined.

Content
  • ( 6.10.2 ) ( %block;)+,

  • child object:

    • %block; ( 6.2 ; 69).

Optional properties
  • clear ( 7.18.1 ; 368),

  • float ( 7.18.2 ; 376).

8.1.3 The interaction of blocks and floats

The clear property is used to prevent two side floats from being beside each other or a block-level object from being beside a float.

  • It is not documented as a property within the individual block-level object descriptions.

    • It applies to all such constructs as documented in the property definition.

  • The default is for side floats to continue intruding into the main reference area.

    • Use clear to start a side float back at the edge, clear of any previous float.

  • The default is for the lines of a block to contour around the accumulation of side floats.

    • Use clear to start a block back at the edge, clear of any previous float.

  • Those constructs with the clear value clear the float they would otherwise be beside.

Consider three situations in Figure 8-2 that illustrate the use of clear on each of floats and blocks;

  • the numbers reflect the order in which the constructs are flowed;

  • the thick-lined blocks with "F-" prefixes are floats;

  • the thin-lined blocks with "B-" prefixes are blocks.

Figure 8-2. The clearing of slide floats by new constructs

graphics/08fig02.gif

Of note in the diagram:

  • the left-most page fragment shows the default situation where side floats intrude and blocks flow around floats;

    • the second float ("F-3") is to the right of the first float ("F-1");

    • the second block ("B-4") wraps around both floats;

  • the center page fragment shows the second float being clear of the first float;

    • the second block ("B-4") starts abutted to the first block ("B-2");

  • the right-most page fragment shows the second block being clear of all floats;

    • the second float ("F-3") is to the right of the first float ("F-1");

    • the second block ("B-4") is clear of both floats.

The intrusion- displace property indicates the strategy of locating the start (or end) edges and indents of the lines of the block being intruded upon.

  • Note that displacing the edge of a block necessarily displaces all lines in that block.

Consider three situations in Figure 8-3 that illustrate the use of intrusion-displace on a block with both text-indent and start-indent .

  • " indent " respects text-indent and start-indent ;

  • " block " respects text-indent but limits all lines by the width of the float;

  • " line " ignores text-indent if occupied by the float, and respects start-indent .

Figure 8-3. The behavior of lines in a block next to a float

graphics/08fig03.gif



Definitive XSL-FO
Definitive XSL-FO
ISBN: 0131403745
EAN: 2147483647
Year: 2002
Pages: 99
Authors: G. Ken Holman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net