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] Table of content, list of tables, list of figures numbering (as chapter) and placement in TOC


You didn't mention if this was for HTML or PDF or both, but the approach 
would be the same.  You would need to customize the handling of the titles 
for the TOC and LOTs, and then alter the numbering of chapters to advance 
them to one more than normal.

The TOC title templates can be found in the autotoc.xsl module for either 
output.  For PDF, there is a call to the template named 
'table.of.contents.titlepage', the original of which is in 
titlepage.templates.xsl (generated from the spec file).  Similarly for the 
'list.of.figures.titlepage' et al.  Instead, you could customize the toc 
template to call your own template that generates the title with the number. 
For the LOTs, you will need a count of chapters, which can be had with 
xsl:value-of select="count(//chapter)".

For altering chapter numbering, you'll need to customize the template with 
match="chapter" and mode="label.markup" from common/labels.xsl.  You would 
need to replace the xsl:number element with an xsl:value-of 
select="count(//chapter) + 1" to get the extra count.  That change will 
alter all instances of the chapter number.

A possibly easier approach is to preprocess your document to generate 
chapter elements for the extra items, inserting <toc/> and <lot 
role="figure"/> elements in them, and then customizing the templates to 
handle those elements inside a chapter.  I don't know if that would be much 
easier, though.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: <Jacek.Lewandowski@ifb-group.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Saturday, December 06, 2008 4:40 AM
Subject: [docbook-apps] Table of content, list of tables, list of figures 
numbering (as chapter) and placement in TOC


>
> Hallo!
>
> I am trying to work out how to add numbering of TOC, List of figures and
> List of Tables as it happen with chapters (e.g.
>
> 1. Table of content
> 2. First chapter
> 3.Second chapter
> ...
> ...
> n-1. List of figures
> n. List of Tables
>
> and place all of them in TOC (e.g my toc will look like;
>
> 1.Table of Content (//title)
>
> 1. Table of content
> 2. First chapter
> 3.Second chapter
> ...
> ...
> n-1. List of figures
> n. List of Tables
>
> Many thanks in advance!
>
>
> Jacek Lewandowski
> Software development
> ifb-group, Cologne, Germany
>
>
>
> ---------------------------------------------------------------------
> 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]