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] Formatting footnote in list-block


That worked, thanks Bob.

On 21-10-11 9:43 AM, Bob Stayton wrote:
Hi Dave,
Yes, the xsl:apply-templates is triggering that extra footnote number.  It is coming from the application of this template from fo/footnote.xsl:
 
<xsl:template match="footnote/para[1]
                     |footnote/simpara[1]
                     |footnote/formalpara[1]"
              priority="2">
...
 
This template adds the superscript footnote number at the start of the para block.  You'll need to copy and customize this template as well to turn that off.
 
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Thursday, October 20, 2011 1:51 AM
Subject: [docbook-apps] Formatting footnote in list-block

I have  a customisation to format footnotes at the bottom of a page by using a list-block. It applies a margin indent to the footnote text, but also repeats the footnote mark within the fo:list-item-body. I suspect that the last xsl:apply-templates in the code is reprocessing the fo:list-item-label block which generates the footnote mark. Do I need to do something with the apply-templates?
Output is attached in the Word doc, and customisation is as follows:
<xsl:param name= "footnotealign"> 1 </xsl:param> <!--select "1" to apply a
    margin indent for footnote text; select "0" to wrap text with no
    margin indent-->
<xsl:template match= "d:footnote" >
   
<xsl:choose>
     
<xsl:when test ="ancestor::d:table or ancestor::d:informaltable">
       
<xsl:call-template name="format.footnote.mark">
         
<xsl:with-param name="mark">
           
<xsl:apply-templates select="." mode="footnote.number"/>
         
</xsl:with-param>
       
</xsl:call-template>
     
</xsl:when>
     
<xsl:otherwise>
       
<!--coding to select footnote text alignment -->
       
<xsl:choose>
         
<xsl:when test="$footnotealign != '0'">
           
<fo:footnote>
             
<fo:inline/>
             
<fo:footnote-body xsl:use-attribute-sets= "footnote.properties">
                 
<fo:list-block space-before="4pt"> <!--space-before: leading between
                      each footnote ****works 19/10/11-->
                   
<fo:list-item>
                     
<fo:list-item-label end-indent="label-end()">
                       
<fo:block>
                         
<xsl:call-template name="format.footnote.mark">
                            
<xsl:with-param name="mark">
                             
<xsl:apply-templates select="." mode="footnote.number"/>
                           
</xsl:with-param>
                         
</xsl:call-template>
                       
</fo:block>
                     
</fo:list-item-label> <!--retain fo:list-item-label-->
                     
                     
<fo:list-item-body margin-left="0mm"
                        start-indent="3mm"> <!--indent for footnote text-->
                        
<!--keep margin-left="0mm", value ineffective; keep
                          start-indent="3mm", works; left margin indent for whole footnote ****works
                        20/10/11-->
                       
<xsl:apply-templates/>
                      
</fo:list-item-body>
                   
</fo:list-item>
                 
</fo:list-block>
             
</fo:footnote-body>                    
           
</fo:footnote>
         
</xsl:when>
         
         
<xsl:otherwise>
           
<fo:footnote>
             
<fo:inline>
               
<xsl:call-template name="format.footnote.mark">
                 
<xsl:with-param name="mark">
                   
<xsl:apply-templates select="." mode="footnote.number"/>
                 
</xsl:with-param>
               
</xsl:call-template>
             
</fo:inline>
             
<fo:footnote-body xsl:use-attribute-sets= "footnote.properties">
               
<xsl:apply-templates/>
             
</fo:footnote-body>
           
</fo:footnote>            
          
</xsl:otherwise>
       
</xsl:choose>
       
<!--end workaround-->
     
</xsl:otherwise>
   
</xsl:choose>
 
</xsl:template>
 
I am using DB 1.76 ns stylesheets. Thanks.
 
Dave Gardiner



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

--



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