axf:float-y

(Auszug aus "XSL-FO ― Die Referenz" von Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Category Float Extension Properties >> axf:float-x / CSS -ah-float-x

Specifies vertical (or horizontal if writing-mode is vertical) float alignment.

Value:none | before | after | top | bottom | left | right | center | inside | outside
Initial:none
Applies to:fo:float / floated elements
Inherited:no
Percentages:N/A

Values have the following meanings.

none Not floated vertically (or horizontally if writing-mode is vertical).
before Floated to the before side. Same as top in horizontal left-to-right writing-mode.
after Floated to the after side. Same as bottom in horizontal left-to-right writing-mode.
top Floated to the top. Used only for horizontal writing. It cannot be specified for vertical writing.
bottom Floated to the bottom. Used only for horizontal writing. It cannot be specified for vertical writing.
left Floated to the left side. Used only for vertical writing. It cannot be specified for horizontal writing.
right Floated to the right side. Used only for vertical writing. It cannot be specified for horizontal writing.
center Floated to the center vertically (or horizontally if writing-mode is vertical).
inside Floated to the inside (left side on a right page, right side on a left page). Used only for vertical writing. It cannot be specified for horizontal writing.
outside Floated to the outside (right side on a right page, left side on a left page). Used only for vertical writing. It cannot be specified for horizontal writing.

XSL-FO sample:

<fo:root xml:lang="en" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">

Antenna House, Inc.

Page float settings

AH Formatter extends the float feature to arrange the float in any positions on the page or arrange it across multiple columns. The reference area where the float is arranged can be specified by axf:float-reference, available values are auto, normal, page, multicol and column. Specify axf:float-x for arranging the float in horizontal direction, specify axf:float-y in vertical direction. This sample shows the page float specified by axf:float-reference="page".

You can also use the shorthand property, axf:float, to specify the float-related extended properties at once. The following shows the same result but the different approach of using individual properties and using shorthand property.

Using individual extended properties (Arrange the float on top of the page.)

<fo:float axf:float-reference="page" axf:float-x="none" axf:float-y="top">

Using the shorthand property (Arrange the float on top of the page.)

<fo:float axf:float="page top">

<fo:float axf:float-reference="page" axf:float-x="none" axf:float-y="top"> (Arrange the float on top of the page.)

<fo:float axf:float-reference="page" axf:float-x="right" axf:float-y="top"> (Arrange the float on the upper right of the page.)

<fo:float axf:float-reference="page" axf:float-x="left" axf:float-y="bottom"> (Arrange the float on the upper right of the page.)

<fo:float axf:float-reference="page" axf:float-x="outside" axf:float-y="center"> (Arrange the float outside of the page, center of the page.)

<fo:float axf:float-reference="page" axf:float-x="inside" axf:float-y="center"> (Arrange the float inside of the page, center of the page.)

<fo:float axf:float-reference="page" axf:float-x="none" axf:float-y="bottom"> (Arrange the float at the bottom of the page.)

Download der Beispiele

Output:

Tipp der data2type-Redaktion:
Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: