This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Labelling of figures
- From: "Juan R. Migoya" <jmigoya at ingeteam dot es>
- To: Docbook Apps <docbook-apps at lists dot oasis-open dot org>
- Cc: Rory Hunter <roryh at fenriz dot org>
- Date: Tue, 19 Feb 2002 08:06:43 +0100
- Subject: Re: DOCBOOK-APPS: Labelling of figures
- References: <3C7056E8.10907@fenriz.org> <3C710C82.188C8C52@ingeteam.es><3C718F30.4030008@fenriz.org>
The most straightforward solution would be to use <sect1> for the top
level section, and <section> for the rest, and then include <sect1> as
ancestor in block-autolabel, instead of <section>.
If you can't make this change I'd suggest selecting the first <section>
ancestor of the current <section> and make it the "object" to extract
the element-label from. You will have:
(secn (element-label object))
instead of:
(secn (element-label (ancestor (normalize "section") nd)))
But FIRST you need to get this "object":
(let * ....
( object ?????
but I'm lost here. I'm sure somebody in the list could help here. It's
just to get the first <section> ancestor of the current <section>. If null,
the current <section> is what you are looking for.
Sorry If this isn't of too much help.
Regards,
Juan R. Migoya
SPAIN
Rory Hunter wrote:
> Hi,
>
> Redefining "block autolabel" (from common/dbcommon.dsl) to include
> "section" as an ancestor works as expected. However, I have nested
> <section>s in my <article>, and I'd like it if <figure>s, etc, were
> labelled according to the most top-level section they were in. Currenty I
> get numberings like "Figure 2.3-1" whereas I'd rather have "Figure 2-1".
>
> Is this possible?
>
> Thanks for your help already,
>
> Regards,
>
> -- Rory Hunter