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] List of titles within table of contents

Hi Bob,

It worked out of the box. Thank you very much.

Best regards,


From: bobs@sagehill.net
To: lord_ship@hotmail.com; docbook-apps@lists.oasis-open.org
Date: Wed, 30 Jan 2013 15:46:23 -0800
Subject: Re: [docbook-apps] List of titles within table of contents

Hi Marius,
Your basic assessment of the problem is correct, the list of figures is not a node in the document that can be processed like section.  I would suggest a customization along these lines:
1.  Customize the template named 'component.toc' from fo/autotoc.xsl to add a call to a new template for your new TOC item:
  <xsl:if test="$nodes">
    <fo:block id="toc...{$id}"
      <xsl:if test="$toc.title.p">
        <xsl:call-template name="table.of.contents.titlepage"/>
      <!-- Add something like this line here -->
      <xsl:call-template name="figure.list.toc.line"/>

      <xsl:apply-templates select="$nodes" mode="toc">
        <xsl:with-param name="toc-context" select="$toc-context"/>
2.  Then create a new template by that name by copying the template named 'toc.line', which handles generating one line in a TOC.  In that customized template, you will need to customize the variable named 'id' to match the id of the fo:block containing the list of figures, as it is generated in the 'list.of.titles' template:
  <fo:block id="lot...{$titles}...{$id}"
where $titles in your case is 'figure'.  The $id reference will still be good, because the context is still the article element.  So your custom template would have:
<xsl:variable name="id">
  <xsl:call-template name="object.id"/>
Then you need to replace the line that applies templates in mode="titleabbrev.markup" with a call to gentext:
<xsl:call-template name="gentext">
  <xsl:with-param name="key">ListofFigures</xsl:with-param>
I haven't tested this, but that should get you started.
Bob Stayton
Sagehill Enterprises

Sent: Wednesday, January 30, 2013 7:45 AM
Subject: [docbook-apps] List of titles within table of contents


I tried to find a way to have the title of list of figures within the table of contents. I guess the main problem is I do not have a node-name for the list of figures. Perhaps I am completely wrong with this guess. However I feel lost somewhere inbetween make.component.tocs, component.toc and component.list.of.titles.

The document is an article, the output is pdf and the stylesheet version is 1.77.1.

I expect the result to be as follows:


List of Figures ...
Section 1 ...
Section 2 ...

Any kind of help would be appreciated.

Best regards,


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