[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Re: Theorems and xref
Yes, it is possible. Take a look at the 'list.of.titles' template in autotoc.xsl (both html and fo). That template is called by the book element's template to generate a list of figures, tables, etc. It processes whatever it selects in mode="toc", so you would need to add a template like that for your formalparas. Then you need to modify the book template to call the list.of.titles template again for your new list of titles. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Michal Duda" <duda.michal@centrum.cz> To: <docbook-apps@lists.oasis-open.org> Sent: Friday, February 18, 2005 7:36 AM Subject: [docbook-apps] Re: Theorems and xref > Thank you very much. It works! > > I have another one question: Is it possible to do some simple TOC of all > theorems?. > > > Bob Stayton wrote: > > > You can add a template in mode="xref-to". That mode is used by the > > template > > for the xref element to generate the link text. For example: > > > > <xsl:template match="formalpara[@role='theorem']" mode="xref-to"> > > <xsl:text>Theorem </xsl:text> > > <xsl:number count="formalpara[@role = 'theorem']" level="any" /> > > </xsl:template> > > > > This generates the text "Theorem " and then the number. Just make sure > > your template that processes the formalpara[@role='theorem'] in normal > > mode outputs its id attribute on the block that it generates, so that the > > xref has that id to connect with in the output. > > > > Bob Stayton > > Sagehill Enterprises > > DocBook Consulting > > bobs@sagehill.net > > > > > > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]