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] Adding elements to TOC - FO output


Hi,
1. Regarding the List of Tables and such in the bookmarks panel, there is no 
stylesheet parameter that controls adding those.  It requires a 
customization that depends on the XSL-FO processor.  That's because 
bookmarks were not a standard feature of XSL-FO 1.0 and were added using 
extensions by each processor.  Are you using FOP? If so, you can see how the 
regular TOC entry is generated in fo/fop1.xsl in this template:

<xsl:template match="set|book|part|reference|
                     preface|chapter|appendix|article
                     |glossary|bibliography|index|setindex
                     |refentry
                     |sect1|sect2|sect3|sect4|sect5|section"
              mode="fop1.outline">

2.  To add glossdiv to the TOC (here I'm presuming the front-of-book TOC, 
not the bookmarks), you can customize this template:

  <xsl:template match="bibliography|glossary"  mode="toc">

in fo/autotoc.xsl.  That template makes a call to 'toc.line' for the current 
element and stops.  You could customize it to apply-templates in mode="toc" 
with select="glossdiv". Take a look at the template named "qandaset.toc" for 
an example, as it handles qandadiv elements inside a qandaset.

3.  To make List of Tables conditional, you could customize the template 
named "make.book.tocs" in fo/division.xsl.  Change this line:

<xsl:if test="contains($toc.params,'table') and .//table">

to this:

<xsl:if test="contains($toc.params,'table') and count(.//table) &gt; 4">


Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Bergfrid Skaara" <bergfrid.digitaldias@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, May 05, 2009 1:40 AM
Subject: [docbook-apps] Adding elements to TOC - FO output


Hi,
I'm trying to add some elements to the TOC as described in chapter 10
of DocBook XSL - The Complete Guide, but I cannot find a good
implementation of the following:

1. How do you add List of Tables and List of Figures to the TOC (they
must show up in the left panel of PDF viewers below the "Table of
Contents" entry and before "Preface". ?

2. How do ˙ou add glossdiv titles to the TOC (that is, which toc
template to override) ? The document's hierarchy is
book/glossary/glossdiv etc. and it may have an introductory chapter
before the glossary element.

and another TOC related question:

3. is it possible to conditionally include/exclude List of Tables and
List of Figures in the front matter based on a minimum length? For
example, if there are less than 5 tables then the List of Tables will
be omitted. Maybe count all table elements and check the LoT parameter
(but where do you add the condition)?

Im using the DocBook 5.0 stylesheets shipped with oXygen 10.0


Best regards,
Bergfrid Skaara

---------------------------------------------------------------------
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]