XML technologies / XSL-FO / Reference / Attributes in XSL-FO / baseline-shift
(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.3
Category: 7.14 Area Alignment Properties
Description
This attribute positions the baseline of an inline element relative to the baseline of its parent.
Values
baseline | This value uses the parent element’s baseline position. |
sub | This value lowers the inline area’s baseline relative to the parent. The displacement depends on both the font and the output medium. |
super | This value raises the inline area’s baseline relative to the parent. The displacement depends on both the font and the output medium. |
percentage | This value adjusts an inline object’s baseline relative to the parent’s baseline and line height. Specify a number followed by the percent sign (%). Positive values raise the object; negative values with a leading minus sign lower it. |
length | This value adjusts an inline object’s baseline relative to the parent’s baseline and line height using an absolute measurement. Positive values raise it; negative values with a leading minus sign lower it. |
Inherited: | yes |
Default value: baseline
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>
4
<fo:inline baseline-shift="super">
√2
</fo:inline>
</fo:block>
<fo:block>
N
<fo:inline baseline-shift="baseline">
o
</fo:inline>
rmal
</fo:block>
<fo:block>
H
<fo:inline baseline-shift="sub">
2
</fo:inline>
O
</fo:block>
<fo:block>
Grundlinienposition um
<fo:inline baseline-shift="30%">
30%
</fo:inline>
erhöht.
</fo:block>
<fo:block>
Grundlinienposition um
<fo:inline baseline-shift="-30%">
30%
</fo:inline>
tiefer gestellt
</fo:block>
<fo:block>
Grundlinienposition um
<fo:inline baseline-shift="3pt">
3pt
</fo:inline>
erhöht
</fo:block>
<fo:block>
Grundlinienposition um
<fo:inline baseline-shift="-3pt">
3pt
</fo:inline>
tiefer gestellt
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>In the output:
Excerpt from the W3C Recommendation: