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