Formatting footnotes in print

Footnotes are rendered in XSL-FO output as follows:

<fo:footnote><fo:inline font-size="75%" 
  <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%" 
      The footnote text.

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 attribute-set is applied to the fo:footnote-body, and the 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. There is a separate attribute-set for table footnotes named See the section “Attribute sets” to learn how to customize attribute-sets.

The baseline-shift property is not in the attribute-set, because it is not supported by the previous version of FOP (0.20.5). So the footnote template has to insert a different property that the old 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:leader xsl:use-attribute-sets=""/>

The content consists of a block containing an fo:leader, which is what draws the line. You can customize the 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.