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: titles of <sect1> into the headers in PDF


Hello,

i have document with following structure:

<article>
<sect1>

<sect2>
</sect2>

<sect2>
</sect2>

</sect1>


<sect1>

<sect2>
</sect2>

<sect2>
</sect2>

</sect1>
</article>

I produce PDF output. What i need is generating titles of relevant 
<sect1> in page header (every <sect1> starts on new page).

I manipulated with retrieve-position a retrieve-boundary in 
header.content template but it didn't work for me, it generated 
<sect2> titles instead, until Jirka Kosek sent me this template:

<xsl:template name="section.heading">
   <xsl:param name="level" select="1"/>
   <xsl:param name="marker" select="1"/>
   <xsl:param name="title"/>
   <xsl:param name="titleabbrev"/>

   <fo:block
xsl:use-attribute-sets="section.title.properties">
     <xsl:if test="($marker != 0) and ($level = 1)">
       <fo:marker
marker-class-name="section.head.marker">
         <xsl:choose>
           <xsl:when test="$titleabbrev = ''">
             <xsl:value-of select="$title"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:value-of select="$titleabbrev"/>
           </xsl:otherwise>
         </xsl:choose>
       </fo:marker>
     </xsl:if>
     <xsl:choose>
       <xsl:when test="$level=1">
         <fo:block
xsl:use-attribute-sets="section.title.level1.properties">
           <xsl:copy-of select="$title"/>
         </fo:block>
       </xsl:when>
       <xsl:when test="$level=2">
         <fo:block
xsl:use-attribute-sets="section.title.level2.properties">
           <xsl:copy-of select="$title"/>
         </fo:block>
       </xsl:when>
       <xsl:when test="$level=3">
         <fo:block
xsl:use-attribute-sets="section.title.level3.properties">
           <xsl:copy-of select="$title"/>
         </fo:block>
       </xsl:when>
       <xsl:when test="$level=4">
         <fo:block
xsl:use-attribute-sets="section.title.level4.properties">
           <xsl:copy-of select="$title"/>
         </fo:block>
       </xsl:when>
       <xsl:when test="$level=5">
         <fo:block
xsl:use-attribute-sets="section.title.level5.properties">
           <xsl:copy-of select="$title"/>
         </fo:block>
       </xsl:when>
       <xsl:otherwise>
         <fo:block
xsl:use-attribute-sets="section.title.level6.properties">
           <xsl:copy-of select="$title"/>
         </fo:block>
       </xsl:otherwise>
     </xsl:choose>
   </fo:block>
</xsl:template>

It works much better, i really have <sect1> titles in headers, but 
there are still some bug - in headers there are renderred titles of 
NEXT <sect1> not of CURRENT ONE. Only headers of last <sect1> are OK. 

Did somebody solved rederring of section's titles into the headers?

Thank very much,
Petr Rajsky


--------------------
MMS telefon Nokia 6100 již od 5577 Kč. http://user.centrum.cz/redir.php?url=http://www.oskarmobil.cz/services/whatsnew.php#moje






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