This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] List of figures
- From: Kai Hagemeister <kh at planoweb dot de>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Thu, 25 Nov 2004 17:11:05 +0100
- Subject: [docbook-apps] List of figures
Hello,
>> This is a good question, and not necessarily an easy one to answer.
I would
>> like to request that you post this to the docbook-apps mailing list
so that
>> the resolution is recorded in the docbook-apps archive.
I implemented a half-assed solution. It is quite ugly and I'm not
content with it at all but it works.
I inserted the following tags in the xml-sourcecode
<sect1 renderas="listoffigures"><title>List of figures</title></sect1>
I need the attribut renderas="listoffigures" to ignore the complete
string by the tex-stylesheets.
The element title is neccessary because I developed a fold-out menu
(JavaScript) which should include the listoffigures. It looks like chm
output.
In the tex stylesheets I'm ignoring the statement because there exists a
special command which is placed in the xml-source:
<xsl:template match="sect1[@renderas='listoffigures']"></xsl:template>
In the chunk-html stylesheet I wrote:
<xsl:template match="sect1[@renderas='listoffigures']">
<xsl:call-template name="sect1.titlepage.intern"/>
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'figure'"/>
<xsl:with-param name="nodes" select="/book//figure"/>
<xsl:call-template name="process.chunk.footnotes"/>
</xsl:template>
<xsl:template name="sect1.titlepage.intern">
<!-- I removed the output of the title because gentext which is called
by list.of.titles, generates the wanted heading -->
<div class="titlepage">
<div>
<xsl:call-template name="sect1.titlepage.before.recto"/>
</div>
<div>
<xsl:call-template name="sect1.titlepage.before.verso"/>
<xsl:call-template name="sect1.titlepage.verso"/>
</div>
<xsl:call-template name="sect1.titlepage.separator"/>
</div>
</xsl:template>
List.of.titles calls the docbook template figure which writes the list
of figures surrounded by the html-list elements.
As i said, it's a gross solution. It would be a great move if there were
tags like <listOfFigures/>, <listOfTables/> ... which works the same way
as index does.
In my solution I surrounded the listoffigures by a sect1. It was the
only possibility to get the result inside the chunked document to a
desired position. Otherwise the result (listoffigures) was written at
the end of the first chunk :-( .
Well it would be great if somebody could explain how to prevent the use
of the tag sect and achieve the same result. I don't understand the
chunk-process (where the chunk, header and foooter is generated). If I
would it would be a quite easy task to solve the issue in a much better way.
Regards
Kai
>>>>>>When you say you want
>>>>>>the list of figures at the end of a chunked book, do you mean
that the
>>>>>>list
>>>>>>is to be appended to whatever content is in the last chunk? So
if your
>>>>>>last
>>>>>>HTML chunk contains the last section of an appendix, do you want the
>
>>
>> list
>>
>
>>>>>>of
>>>>>>figures to appear after the last paragraph of that section in that
>
>>
>> chunk?
>>
>
>>>>NO, i tried it this way because I couldn't find any solution the other
>
>>
>> way.
>>
>
>>>>>>Or do you want the list of figure to be put into their own chunk?
>>
>>>>
>>>>Yes, i wrote a template which calls the template list.of.titles in
>>>>autotoc.xsl. The important of the docbook-Stylesheet seems to be:
>>>>
>>>><xsl:element name="{$toc.list.type}">
>>>> <xsl:apply-templates select="$nodes" mode="toc">
>>>> <xsl:with-param name="toc-context" select="$toc-context"/>
>>>> </xsl:apply-templates>
>>>></xsl:element>
>>>>
>>>>So, it generates the html list-tag and calls the template that matches
>>>>figure.
>>>>As a result i've got the list of figures but at the end of the
first chunk
>>>>or as a sepearte file without navigation and of course not included
in to
>>>>the rest of the document.
>>>>
>>>>
>>
>>>>>>In that
>>>>>>case, making it appear at the end just means appending it to the
end of
>>>>>>the
>>>>>>book's table of contents, and having its chunk appear in the "Next"
>
>>
>> field
>>
>
>>>>>>of
>>>>>>that last section chunk's header/footer.
>>
>>>>
>>>>I want the list of figures to appeare at the and but before the
index or
>>>>glossar as a seperate chunk.
>>>>I'm stumped. I've no idea how to create the list of figures as a
seperate
>>>>chunk with navigation and insert it to the right place.
>>>>
>>>>Regards and thanks a lot for your reply
>>>>Kai & Conny
>>>>
>>>>
>>>>
>
>>
>>
>>
>>