OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[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 
			     (label-number-format nd))))
    (if (equal? chn "")
	(if (equal? apn "")
	;; *********************** Add this: **************************
      	(if (equal? secn "")
	;; ***********************************************************
	    (if (equal? rfn "")
		(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.


Juan R. Migoya

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