Footnotes

Top Previous Topic Next Topic  Print this topic

A footnote is an out-of-line object composed from two elements: an fo:inline element used to insert a symbol in the document and a fo:footnote-body containing the text that the symbol is referring to.

 

Example of usage:

 

 

<?xml version="1.0" encoding="utf-8" ?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

       <fo:layout-master-set>

               <fo:simple-page-master master-name="all-pages" page-width="5in" page-height="5in">

                       <fo:region-body region-name="Content" margin="0.2in" column-gap="0.25in" column-count="2"/> (1)

               </fo:simple-page-master>

               <fo:page-sequence-master master-name="default-sequence">

                       <fo:repeatable-page-master-reference master-reference="all-pages"/>

               </fo:page-sequence-master>

       </fo:layout-master-set>

       <fo:page-sequence master-reference="default-sequence">

               <fo:static-content flow-name="xsl-footnote-separator" font-family="Arial" font-size="10pt">(2)

                       <fo:block>

                       -------------------

               </fo:block>

               </fo:static-content>

               <fo:flow flow-name="Content" font-family="Verdana" font-size="10pt" text-align="justify">

                       <fo:block>

                       The body region's content flows in two columns.

                       ...............................................        

                       The body region's content flows in two columns.

                       The body<fo:footnote><fo:inline baseline-shift="super" font-size="8pt" color="red">(3)

                                                       (1)</fo:inline><fo:footnote-body>

                                               <fo:block font="8pt Verdana" text-align="justify" space-after="5pt">(4)

                                               1)

                                               This is the first footnote. The referenced

                                               text is colored in red.

                                       </fo:block>

                                       </fo:footnote-body></fo:footnote>

                                       region's content flows in two columns.

                       The body region's content flows in two columns.

                       The body region's content flows in two columns.

                       The<fo:footnote><fo:inline baseline-shift="super" font-size="8pt" color="blue">(2)</fo:inline><fo:footnote-body>

                                               <fo:block font="8pt Verdana" text-align="justify">

                                               2)

                                               The second footnote.

                                               The footnotes can also be split across

                                               multiple columns, and even multiple pages.

                                               The referenced text is colored in blue.

                               </fo:block>

                                       </fo:footnote-body></fo:footnote>

                                       body region's content flows in two columns.

                       The body region's content flows in two columns.

                       ...............................................        

                       The body region's content flows in two columns.

               </fo:block>

               </fo:flow>

       </fo:page-sequence>

</fo:root>

 

 

Output:

 

footnotes

 

Key observations:

 

(1) The number of columns for the main flow has been set to 2.

(2) A special area ("xsl-footnote-separator" is a reserved name) is created to hold the separator between the footnotes and the document's body. This region is optional.

(3) The footnote object is declared, inline with the text. The first child element, fo:inline is used to format the number/symbol of the footnote.

(4) Footnote's body is defined.