Footnotes are rendered in XSL-FO output as follows:
<fo:footnote><fo:inline font-size="75%" baseline-shift="super">1</fo:inline> <fo:footnote-body font-family="serif,Symbol,ZapfDingbats" font-size="8pt" font-weight="normal" font-style="normal" text-align="justify" margin-left="0pc"> <fo:block><fo:inline font-size="75%" baseline-shift="super">1</fo:inline> The footnote text. </fo:block> </fo:footnote-body> </fo:footnote>
The fo:footnote-body
element contains the text of the footnote, including its own copy of the footnote mark. The content before fo:footnote-body
is the mark that is placed in the text paragraph to reference the footnote. So both the mark and the text of the footnote are contained in the fo:footnote
element. The XSL-FO processor handles placing the mark and moving the text to the bottom of the page.
Most of the formatting properties you see here are added by attribute-sets that you can customize. The footnote.properties
attribute-set is applied to the fo:footnote-body
, and the footnote.mark.properties
attribute-set is applied to the inline mark. These
attribute-sets are also applied to ulink
footnotes when the ulink.footnotes
parameter is turned on. See
the section “Attribute sets” to learn how to customize
attribute-sets. These two attribute-sets were added in version 1.68
of the stylesheets. Before that, the properties were hard wired in
the footnote templates.
The baseline-shift
property is not in the footnote.mark.properties
attribute-set, because it is not supported by the
current version of FOP (0.20.5). So the footnote template has to
insert a different property that FOP does support.
If all you want to change is the footnote font size, then that is controlled by a separate parameter, the footnote.font.size
parameter. By default it is set to 75%
, but for some fonts that looks too large. You can set it
to a percentage or to a fixed point size.
If you need to further customize footnotes for print, you can customize the template with match="footnote"
in fo/footnote.xsl
. It also calls the template named format.footnote.mark
to format the footnote symbol. It actually calls it twice to format the mark in both the reference and the footnote text.
There is one other feature of print footnotes that you can customize: the rule line separating the footnotes from the body text. The rule is actually a fo:static-content
element in XSL-FO. It is defined in the stylesheet in fo/pagesetup.xsl
as the following:
<xsl:template name="footnote-separator">
<fo:static-content flow-name="xsl-footnote-separator">
<fo:block>
<fo:leader xsl:use-attribute-sets="footnote.sep.leader.properties"/>
</fo:block>
</fo:static-content>
</xsl:template>
The content consists of a block containing an fo:leader
, which is what draws the line. You can customize the footnote.sep.leader.properties
attribute-set to set the line length, weight, color, and style.
If you want to change more than just the leader properties, then you can customize the template named footnote-separtor
that is shown above, to put something else inside the static-content
.
DocBook XSL: The Complete Guide - 3rd Edition | PDF version available | Copyright © 2002-2005 Sagehill Enterprises |