This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Reference element and chapter numbering
- To: docbook-apps at lists dot oasis-open dot org
- Subject: Re: DOCBOOK-APPS: Reference element and chapter numbering
- From: Vladimir Ivanovic <ivanovic at parc dot xerox dot com>
- Date: Wed, 20 Jun 2001 11:25:55 -0700 (PDT)
- Cc: Andrew Westcombe <asw at getsystems dot com>
Norm,
Thanks very much. I had to modify your suggestion slightly (see below).
It seems to work in all my tests.
-- Vladimir
(define (en-label-number-format-list)
(list
(list (normalize "set") "1")
(list (normalize "book") "1")
(list (normalize "prefix") "1")
(list (normalize "part") "I")
(list (normalize "chapter") "1")
(list (normalize "appendix") "A")
;(list (normalize "reference") "1") ; references-as-chapters
(list (normalize "reference") "A") ; references-as-appendices
(list (normalize "example") "1")
(list (normalize "figure") "1")
(list (normalize "table") "1")
(list (normalize "procedure") "1")
(list (normalize "step") "1")
(list (normalize "refsect1") "1")
(list (normalize "refsect2") "1")
(list (normalize "refsect3") "1")
(list (normalize "sect1") "1")
(list (normalize "sect2") "1")
(list (normalize "sect3") "1")
(list (normalize "sect4") "1")
(list (normalize "sect5") "1")
(list (normalize "section") "1")
))
;;; for references-as-appendices
(define (reference-number-sibling-list cmp) (list (normalize "appendix")))
(define (appendix-number-sibling-list cmp) (list (normalize "reference")))
;;; for references-as-chapters
;;(define (reference-number-sibling-list cmp) (list (normalize "chapter")))
;;(define (chapter-number-sibling-list cmp) (list (normalize "reference")))
--------
"NW" == Norman Walsh <ndw@nwalsh.com> writes:
NW> / Vladimir Ivanovic <ivanovic@parc.xerox.com> was heard to say:
>> I replaced Appendix A with a Reference. Now my chapters are numbered 1,
>> 2, 3, I, A whereas they were formerly numbered 1, 2, 3, A, B.
>>
>> I could live with 1, 2, 3, 4, A, but where does "I" come from? I've
>> never seen roman numerals as chapter-like numbers in a book when arabic
>> numerals exist.
NW> Parts are often numbered with roman numbers (Part I, Part II, etc.) and
NW> the stylesheets treat References like Parts.
>> To "fix" this, I tried using
NW> Use this instead:
NW> (define (en-label-number-format-list)
NW> (list
NW> (list (normalize "set") "1")
NW> (list (normalize "book") "1")
NW> (list (normalize "prefix") "1")
NW> (list (normalize "part") "I")
NW> (list (normalize "chapter") "1")
NW> (list (normalize "appendix") "A")
NW> (list (normalize "reference") "A") ;; or 1
NW> (list (normalize "example") "1")
NW> (list (normalize "figure") "1")
NW> (list (normalize "table") "1")
NW> (list (normalize "procedure") "1")
NW> (list (normalize "step") "1")
NW> (list (normalize "refsect1") "1")
NW> (list (normalize "refsect2") "1")
NW> (list (normalize "refsect3") "1")
NW> (list (normalize "sect1") "1")
NW> (list (normalize "sect2") "1")
NW> (list (normalize "sect3") "1")
NW> (list (normalize "sect4") "1")
NW> (list (normalize "sect5") "1")
NW> (list (normalize "section") "1")
NW> ))
NW> But now that I think about it, this will generate 1, 2, 3, A, A, ...
NW> So you probably need this as well:
NW> (define (reference-number-sibling-list cmp) (normalize "appendix"))
NW> (define (appendix-number-sibling-list cmp) (normalize "reference"))
NW> Be seeing you,
NW> norm
NW> --
NW> Norman Walsh <ndw@nwalsh.com> | The man with ten children is
NW> http://www.oasis-open.org/docbook/ | better off than the one with ten
NW> Chair, DocBook Technical Committee | thousand fonts of type, because
>> the man with ten children doesn't
>> want any more.