Inline graphics

An inline graphic is one that appears within a paragraph of text, inline with the words. You use an inlinemediaobject (or the deprecated inlinegraphic in DocBook 4) to place a graphic in a line of text. These elements output the graphic without first breaking the line before or after the graphic.

Usually an inline graphic is small, such as an icon illustration, so as to not disrupt the paragraph format too much. When an inline graphic is taller than the text, however, the text line it is sitting on must be provided extra space to avoid having the graphic intrude into the line of text above it. In HTML output, this is handled automatically by the browser. In XSL-FO output, it is the default behavior as well. But in XSL-FO output, you can override the default extra space by changing the property line-stacking-strategy from its default value of max-height to font-height. That leads to evenly spaced lines based on the font size, regardless of any taller elements. You may have to add scaling attributes to your inline graphic elements to keep them from intruding into the line above.

An inline graphic is normally placed with the bottom of the graphic on the baseline of the text. If you prefer that your inline graphics extend below the baseline a bit, then put each one inside a subscript element. If you want a little extra space around an inline graphic, then add a width attribute, and perhaps an align="center" attribute to center the graphic in the extra space.