XML technologies / DocBook / Generating FO (PDF) / Modifying typography / Changing font style
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
The DocBook stylesheets provide several templates for changing the font style of an inline element. The table Font styles as format-independent template names lists the available options.
For example, to display an application element in italics, the following customization is sufficient:
<xsl:template match="application">
<xsl:call-template name="inline.italicseq"/>
</xsl:template>To use a sans-serif font as well, you need the attribute font-family:
<xsl:template match="application">
<fo:inline font-family="{$sans.font.family}">
<xsl:call-template name="inline.italicseq"/>
</fo:inline>
</xsl:template>The parameter sans.font.family contains the name of the sans-serif font.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top