5. Inline formatting

The <fo:inline> element differs from <fo:block> because no paragraphs are made but contents are inserted in the line. Therefore almost all attributes being valid for the <fo:block> element are also applicable for <fo:inline>.

One exception are the margin attributes which are not permitted for <fo:inline> and do not make sense here. Since inline contents are also formatted in inline blocks, other spacing attributes such as space-after, space-end, padding etc. can be used.

Typically, the <fo:inline> element is used in order to highlight individual characters, words and word orders. In this book examples for highlighting are the element and attribute names which are displayed in a monospace font but also emphases by bold, italic or underlined words.

An important note has to be made regarding the line break within <fo:inline>. Contents being inserted with <fo:inline> are not automatically broken between the lines! For this purpose it is required to insert the keep-together.within-line="no" attribute because the default value for this attribute is yes.

<< back next >>

Copyright © dpunkt.verlag GmbH 2004
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "XSL-FO in der Praxis" ("XSL-FO in practice") is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.

dpunkt.verlag GmbH, Ringstraße 19B, 69115 Heidelberg, fon 06221-14830, fax 06221-148399, hallo@dpunkt.de