This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
autolabel problem
- To: docbook at lists dot oasis-open dot org
- Subject: DOCBOOK: autolabel problem
- From: Karlheinz Eckmeier 46372 <Karlheinz dot Eckmeier dot extern at ae3 dot hypo dot de>
- Date: Fri, 10 Mar 2000 14:37:36 +0100
- Reply-To: docbook at lists dot oasis-open dot org
I've used the following settings in my stylesheet customization:
(define %chapter-autolabel% #f)
(define %section-autolabel% #t)
The resulting section labels all have a leading dot, i.e. ".x" ".x.x"
while I expected to get "x" "x.x". This occurs both in the html and
tex output.
The code below is a hacked version of a function originating from
common/dbcommon.dsl which I put into my customization file to work
around this.
--------- snip ------------------------------------------------------
(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))))
(hasprf (not (node-list-empty? (ancestor (normalize "preface") nd)))))
(cond
;; (haschn (string-append
;; (element-label (ancestor (normalize "chapter") nd)) isep))
(haschn (let* ((mylabel (element-label (ancestor (normalize "chapter") nd))
))
(if (equal? mylabel "")
""
(string-append mylabel isep))))
(hasapn (string-append
(element-label (ancestor (normalize "appendix") nd)) isep))
(else ""))))
--------- snip ------------------------------------------------------
Regards
Karlheinz
--
Karlheinz Eckmeier ConSol* Software GmbH
Karlheinz.Eckmeier@consol.de Franziskanerstr. 38, D-81669 Muenchen
##### ConSol* 1998 unter "Europe's 500 fastest growing companies" ######
z.Zt.: HypoVereinsbank Muenchen, Hohenlindener Str. 1, D-81677 Muenchen
Karlheinz.Eckmeier.extern@ae3.hypo.de Phone: +49 89 378-46372