XML technologies / XSL-FO / Reference / Attributes in XSL-FO / alignment-adjust

(Excerpt from "XSL-FO ― Die Referenz" by 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

Recommendation section: 7.14.1

Category: 7.14 Area Alignment Properties

Description

This attribute fine-tunes the baseline position set by alignment-baseline. It accepts the same values as alignment-baseline, including percentages (percentage) and absolute measurements (length).

Values

auto

The behavior depends on the element carrying the attribute. The baseline position comes from the font used by the parent element. Only on <fo:character> does it instead follow the font from which the character was taken.

baseline

The baseline position is taken from the font used by the parent element.

before-edge

The baseline aligns with the maximum ascent in the character’s baseline table, stored in the font or computed. No inline area may extend above that maximum ascent, and its height is also limited by the enclosing area’s top edge.

text-before-edge

The baseline aligns with the text ascent in the character’s baseline table, stored in the font or computed. Inline areas may extend above this text ascent.

central

The baseline position comes from the parent element’s font. The value central is midway between text-before-edge (the character’s maximum ascent) and text-after-edge (its maximum descent).

middle

The baseline position is determined by half the height of "x" in the font used.

text-after-edge

The baseline aligns with the text descent in the character’s baseline table, stored in the font or computed. Inline areas may extend beyond this text-after edge.

after-edge

The baseline aligns with the maximum descent in the character’s baseline table, stored in the font or computed. No inline area may extend below that maximum descent; it is also limited by the enclosing area’s bottom edge.

ideographic

The baseline comes from the parent element’s font. The value ideographic specifies a baseline appropriate to an ideographic or symbol script, such as Chinese, Korean, or Braille.

alphabetic

The baseline comes from the parent element’s font. The value alphabetic specifies a baseline appropriate to an alphabetic script, such as Arabic, Hebrew, or Latin.

hanging

The baseline comes from the parent element’s font. The value hanging specifies a baseline appropriate to a script with hanging characters, found mainly in Indian scripts such as Devanagari and Gurmukhi.

mathematical

The baseline position is determined by the baselines of mathematical symbols.

percentage

The baseline is shifted by the specified value relative to the area’s total height. The value must be a number (possibly negative or decimal) followed by the percent sign (%).

length

The baseline is shifted by the specified value. It must be a number (possibly negative or decimal) followed by a unit (em, ex, px, pt, in, cm, mm, pc).

Inherited:

yes

Default value: auto

XSL-FO version: 1.0

Allowed in:

<fo:basic-link> , <fo:character> , <fo:external-graphic> , <fo:inline> , <fo:inline-container> , <fo:instream-foreign-object> , <fo:leader> , <fo:page-number> , <fo:page-number-citation> , <fo:page-number-citation-last> and <fo:scaling-value-citation>

Support:

Conformance level

Antenna House

FOP

RenderX XEP

Altsoft XML2PDF

Compart DocBridge

Basic

Y

Y

Y

Y

P

XSL-FO example:

<fo:root font-family="Arial" font-size="10pt" line-height="1.2em" 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">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm
                      0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="26mm 55mm 41mm
                        55mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten">
<fo:flow flow-name="xsl-region-body">
<fo:block text-align-last="justify" text-decoration="underline">

                alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="auto"/>
"auto" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">
 alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="baseline"/>
"baseline" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">

                alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="before-edge"/>
"before-edge"
              
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">
 alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="text-before-edge"/>
"text-before-edge" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">

                alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="central"/>
"central" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">
 alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="middle"/>
"middle" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">

                alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="after-edge"/>
"after-edge" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">
 alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="text-after-edge"/>
"text-after-edge" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">

                alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="ideographic"/>
"ideographic"
              
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">
 alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="alphabetic"/>
"alphabetic" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">

                alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="hanging"/>
"hanging" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">
 alignment-baseline
<fo:leader leader-pattern="rule" alignment-adjust="mathematical"/>
"mathematical" 
</fo:block>
<fo:block text-align-last="justify" text-decoration="underline">
alignment-baseline 
<fo:leader leader-pattern="rule"/>
<fo:inline font-family="Arial Unicode
                    MS" alignment-baseline="hanging" alignment-adjust="22%">
णअउएऊ
</fo:inline>
<fo:leader leader-pattern="rule"/>
<fo:inline font-family="Arial Unicode MS">
"hanging"
</fo:inline>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download the examples

In the output:

Excerpt from the W3C Recommendation:

More information online about

Rendering of the property in the XSL-FO reference

back to top