This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Labelling of figures


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]