OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] footnotes author

Hi Jean-Marie,
Changing the footnote mark in a footnote is a little tricky because the mark has to be generated within the same formatting block as the para, so it is on the same line as the footnote's text. The stylesheets each have a template written specifically to handle this case.

For fo output, there is a template in fo/footnote.xsl that starts with:

<xsl:template match="d:footnote/d:para[1]

That template formats the footnote mark within the fo:block of the first para. To add the role, you'll need something like:

    <xsl:if test="../@role">
      <xsl:text> [</xsl:text>
      <xsl:value-of select="../@role"/>
      <xsl:text>] </xsl:text>

Since this template's context is para, you'll need to use ../@role to refer to the role attribute on the footnote. You can add inline formatting as needed.

For HTML and epub, there is a similar template in footnote.xsl that starts with:

<xsl:template match="d:footnote/d:para[1]|d:footnote/d:simpara[1]" priority="2">

These templates assume the first element in a footnote is a para. If it isn't then you have more work to do.

If you need any additional help, feel free to ask.

Bob Stayton
Sagehill Enterprises

On 10/23/2014 3:08 AM, jmt wrote:
Hello list,

I have a document with notes from different authors, e.g.

     some text
     <footnote role='author'>bla bla</footnote>
     another sentence
     <footnote role='translator'>glop glop</footnote>

The document is to be rendered in html, epub and pdf. How do I attribute the
notes according to the role, e.g.

[1] [author] bla la
[2] [translator] glop glop

Thanks in advance !


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]