Search code examples
xslt-2.0xsl-fo

XSL-FO two separate footnote blocks (XEP)


XSL-FO (XEP), XSLT 2.0

In academic editions of texts we often have the need for two separate sets of footnotes, one series using letters (a, b, c, etc.) and a series using numbers (1, 2, 3, etc.).

Getting the relative footnote letters and numbers inline in the text with xsl:number inside fo:footnote/fo:inline works fine.

Now I need to get the footnote content into two separate blocks at the bottom of the text, to look like this example: Footnotes in two blocks

But I can't identify a way with fo:footnote/fo:footnote-body to create two separate blocks, lettered notes first, numbered notes second.

Thanks in advance for any ideas.


Solution

  • I do not believe that the structure you show is possible at all, or at least with custom code to manipulate the resulting area tree (intermediate format also called XEPOUT).

    1) The first set of "footnotes" you show as inline. I would assume these could run one, two maybe three lines. That alone I could not see how to build properly, without maybe some hack. Such a structure could be possibly accomplished by surrounding each footnote with a marker with fo:inline's and pull those to the footer. In other words, not make them footnotes.

    Since they are separate in the document you would need something like make marker A, make marker B, as they occur on the page ... and a footer that would pull the universe of all markers but only on that page (first starting on page without carryover). Now if those markers did not exist, it would pull nothing. So that could be possible to do if you knew for instance that you would never have more than F markers, then pull A through F in the footer.

    2) The second part is just footnotes

    3) However, the two areas would be out of sequence as the footer with A, B ... would be below the numbered. So you would have to then develop custom XSL to flip those areas.

    And last, since you cannot dynamically size a footer area, it is unclear that even that would work out acceptably well especially it is such that the A, B type footnotes could be one line or six lines. You would only be able to do it if a fixed space was known to work.