[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Adding a PDF bookmark for List of Figures
Hi Jeff,
Well, you aren't selecting the List of Figures,
because it isn't an element because it is generated. In fo/fop1.xsl, the
template that matches on book and other elements has these lines that generate
the bookmark for the TOC:
<xsl:variable
name="toc.params">
<xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if
test="contains($toc.params,
'toc')
and (book|part|reference|preface|chapter|appendix|article |glossary|bibliography|index|setindex |refentry |sect1|sect2|sect3|sect4|sect5|section)"> <fo:bookmark internal-destination="toc...{$id}"> <fo:bookmark-title> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'TableofContents'"/> </xsl:call-template> </fo:bookmark-title> </fo:bookmark> </xsl:if> Copy the xsl:if block and change a few things for a
list of figures:
<xsl:if
test="contains($toc.params,
'figure')
and (//figure)"> <fo:bookmark internal-destination="toc...figure...{$id}"> <fo:bookmark-title> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofFigures'"/> </xsl:call-template> </fo:bookmark-title> </fo:bookmark> </xsl:if> I got the $toc.params value from the $generate.toc
parameter in fo/param.xsl, and changed it to check for the existance of any
figure in the document. I got the figure list id from the "list.of.titles"
template in fo/autotoc.xsl. That template generates all of the "List of
..." lists. I got the gentext key from common/en.xml.
Hope this works. I didn't actually test it,
so let me know if it does or does not. 8^)
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]