web analytics

XSL-FO footnotes

Options

codeling 1602 - 6666
@2017-09-25 12:54:26

An XSL-FO footnote is an out-of-line formatting object. To generate a footnote and its citation the <fo:footnote> formatting object is used. The <fo:footnote> has 2 children:

  • <fo:inline> used to generate a footnote's citation and
  • <fo:footnote-body> used to generate a footnote's content.

Footnotes usually are devided from the rest of the text by a separator. A separator is created in xsl-footnote-separator that can be placed into the <fo:static-content> element.

Here is a simple example:

<fo:static-content flow-name="xsl-footnote-separator">
       <fo:block>
         <fo:leader leader-pattern="rule" leader-length="50%"
                    rule-style="dashed" rule-thickness="0.5pt"/>
       </fo:block>
     </fo:static-content> 
 
 <fo:flow flow-name="xsl-region-body">
  <fo:block font-size="13pt" font-weight="bold">Examples for using XSL Fomatting Objects</fo:block>
  <fo:block>
   <fo:leader leader-length="1em"/>
  </fo:block>
  <fo:block>This is the first footnote exmaple<fo:footnote>
      <fo:inline baseline-shift="super" font-size="10pt">
     [1]
      </fo:inline>
      <fo:footnote-body>
     <fo:block font-size="7pt">
       [1] This is the first footnote boby
     </fo:block>
      </fo:footnote-body>
    </fo:footnote>
  </fo:block>
  <fo:block>This is the second footnote exmaple<fo:footnote>
      <fo:inline baseline-shift="super" font-size="10pt">
     [2]
      </fo:inline>
      <fo:footnote-body>
     <fo:block font-size="7pt">
       [2] This is the second footnote body
     </fo:block>
      </fo:footnote-body>
    </fo:footnote>
  </fo:block>
 </fo:flow>
</fo:page-sequence>

The above content will be rendered as:

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com