[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Labelling of figures
Redefine "block autolabel" (from common/dbcommon.dsl) to include "section" as ancestor: --------------------------------------------------------------------- (define (block-autolabel nd #!optional (force-label? #f)) (let* ((chn (element-label (ancestor (normalize "chapter") nd))) (apn (element-label (ancestor (normalize "appendix") nd))) (rfn (element-label (ancestor (normalize "refentry") nd))) ;; ************** Add this: ******************************* (secn (element-label (ancestor (normalize "section") nd))) ;; ******************************************************** (bkn (format-number (component-child-number nd (component-element-list)) (label-number-format nd)))) (if (equal? chn "") (if (equal? apn "") ;; *********************** Add this: ************************** (if (equal? secn "") ;; *********************************************************** (if (equal? rfn "") bkn (string-append rfn (gentext-intra-label-sep nd) bkn)) ;; *********************** Add this: ************************** (string-append secn (gentext-intra-label-sep nd) bkn)) ;; ************************************************************ (string-append apn (gentext-intra-label-sep nd) bkn)) (string-append chn (gentext-intra-label-sep nd) bkn)))) --------------------------------------------------------------------------- Keep in mind that this may be no good in all kind of documents. 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC