This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Theorems and xref
- From: "Bob Stayton" <bobs at sagehill dot net>
- To: <docbook-apps at lists dot oasis-open dot org>, "Michal Duda" <duda dot michal at centrum dot cz>
- Date: Thu, 17 Feb 2005 15:07:25 -0800
- Subject: Re: [docbook-apps] Theorems and xref
- References: <cv329m$o2v$1@sea.gmane.org>
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
----- Original Message -----
From: "Michal Duda" <duda.michal@centrum.cz>
To: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, February 17, 2005 1:31 PM
Subject: [docbook-apps] Theorems and xref
> Hi,
>
> I saw about two weeks ago at docbook.misc group this thread:
>
http://article.gmane.org/gmane.text.docbook.misc/4329/match=something+like+latex+theorems
>
> I'd like to know if it's possible to use xref so the autogenerated number
> can appear somewhere later as a hyperlink to that theorem?
>
> Which stylesheet template I must change?
>
>
> Thanks.
>
>
>
>