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 at lists dot oasis-open dot org
- Cc: Rory Hunter <roryh at fenriz dot org>
- Date: Mon, 18 Feb 2002 08:23:01 +0100
- Subject: Re: DOCBOOK-APPS: Labelling of figures
- References: <3C7056E8.10907@fenriz.org>
I guess you have "sections" wrapped by an "Article".
you can copy this code from dbcommon.dsl to your
customization file :
------------------------------------------------------------------------------------------------
(define (section-autolabel-prefix nd)
(let* ((isep (gentext-intra-label-sep nd))
(haschn (not (node-list-empty? (ancestor (normalize "chapter") nd))))
(hasapn (not (node-list-empty? (ancestor (normalize "appendix") nd)))))
(cond
(haschn (string-append
(element-label (ancestor (normalize "chapter") nd)) isep))
(hasapn (string-append
(element-label (ancestor (normalize "appendix") nd)) isep))
(else ""))))
-----------------------------------------------------------------------------------------------
and add the needed lines for the case in which ancestor is "article".
I have no tried it, but I suppose "element-label" will do the right thing
also whit articles.
HTH.
Regards,
Juan R. Migoya
SPAIN
Rory Hunter wrote:
> Hi,
>
> In an <article>, I notice that any <figure>'s are labelled numerically,
> incrementing for each consectutive figure in the document. Is it possible
> to have numbering restart for each <section>, so that figures are labelled
> e.g. Figure 4.1 for the first figure in the fourth section, using DSSSL?
>
> Cheers,
>
> -- Rory Hunter