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: footnotes and their separators


Hi Norm, 

>You wrote
> / flo@abwesend.de was heard to say:
> | - using proper footnote separators
> |
> | How can I customize my stylesheets that a fo:leader occurs above every
> | first
> | footnote item at the bottom of the page?
> | I am at a point where the leader is created above every footnote
> | numbered
> | with "1".
> 
> That's interesting. Can you provide a sample document where you get
> one footnote with a leader separator and another without?

the formatted result (pdf) ???

> I think this is probably an FOP bug.

not everythig with FOP is a bug ;)

I customized it with:
(I am new to xsl so i know it is *not* a beauty solution, but it works so
far.
This is the rough c'n'p attempt. If anyone has a better one, let me hear!)
At every [...] the original code stays.

<xsl:template match="footnote">   
  <xsl:choose>
    <xsl:when test="ancestor::tgroup">
      [...]
    <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_inline"/>
            [...]                                 changed          ^^^^^^^^^
</xsl:template>


<xsl:template match="footnote" mode="footnote.number">  
  <xsl:choose>
    <xsl:when test="ancestor::tgroup">
[...]
    <xsl:otherwise>
      
      <xsl:variable name="pfoot" select="preceding::footnote"/>
      <xsl:variable name="ptfoot" select="preceding::tgroup//footnote"/>
      <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) +
1"/>
      <xsl:choose>
        <xsl:when test="string-length($footnote.number.symbols) &gt;=
$fnum">
        <xsl:choose>
-->        <xsl:when test="$fnum=1">
-->        <fo:block>
-->           <fo:leader leader-length.minimum="12pt"
leader-length.optimum="100pt"
-->                      leader-length.maximum="100%"
leader-pattern="rule"/> 
-->        </fo:block>       
--> 	 </xsl:when>
        <xsl:otherwise/></xsl:choose>
        <xsl:value-of select="substring($footnote.number.symbols, $fnum,
1)"/>        
        </xsl:when>
        <xsl:otherwise>
          <xsl:number value="$fnum" format="{$footnote.number.format}"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
<xsl:template match="footnote" mode="footnote.number_inline">

[as an exact c'n'p copy of the original template match="footnote"
mode="footnote.number"]
</xsl:template>

> | what about the flow xsl-footnote-separator? 

> If FOP supports xsl-footnote-separator, then the stylesheets need to
> be tweaked to use it. At the moment, they don't use it if FOP is being
> used because the last time I tried, FOP didn't understand it.
> 
> Your error makes me think it still doesn't. That'd be a FOP bug.

it is, but it will be solved with 0.20.5.rc3 afaik in the meantime (from
bugzilla)

If anyone has an idea to solve the footnote-seperator thing using my way to
get an fo:leader conditinoally, I'd acclaim!

Bye,
Florian

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!



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