Subject: Re: Numbering and TOC From: Norman Walsh <ndw@xxxxxxxxxx> Date: Fri, 18 Sep 1998 08:19:34 -0400 |
| First I'm not sure component-number-restart-list and | component-number-ignore-list are really orthogonal. Especially reading your | comment: I'm not sure they are either ;-) | | > ;; Basically, if you skip up past a component/division element in | > ;; the restart list, you better put the element(s) you skipped in | > ;; the ignore list or the stylesheet may never see your component | > ;; when it's trying to do the numbering. | | it seems that those functions will most often return the same list. Actually I | don't really understand the difference between both functions. I think an example will help. For the current default case, where chapters are numbered sequentially through a book without respect to parts: (chapter-number-restart-list) is '("book") (chapter-number-sibling-list) is '() ;; with your suggestion below (chapter-number-ignore-list is '("part") This says that chapters are numbered sequentially in books ignoring parts. If you said (chapter-number-restart-list) is '("book" "part") (chapter-number-sibling-list) is '("reference") (reference-number-sibling-list) is '("chapter") (chapter-number-ignore-list is '() Then chapters would be numbered sequentially within parts (or books). Chapters and references would be numbered together. And since you're restarting in parts, you don't want to ignore them (though algorithmically it wouldn't matter if you did). Does that help? | Finally, I think you simplify a little bit the user interface for the | following customisations: | | > (define (chapter-number-sibling-list cmp) | > (list (gi cmp) (normalize "reference"))) | > (define (reference-number-sibling-list cmp) | > (list (gi cmp) (normalize "chapter"))) | | I would hope that in any case the elements of the same type as the component | are considered as siblings. So I would rather write: | | (define (chapter-number-sibling-list cmp) | (list (normalize "reference"))) | | (define (reference-number-sibling-list cmp) | (list (normalize "chapter"))) Done. | listing only the additions to the current type. | | As you can see those are rather minor points. And they would lead to | simplifying your code. Or yours, anyway ;-) Cheers, norm -- Norman Walsh <ndw@xxxxxxxxxx> | Those parts of the system that you http://nwalsh.com/ | can hit with a hammer are called | hardware; those parts that you can | only curse at are called software. DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Numbering and TOC, Lionel Mallet | Thread | RE: Modular Docbook v1.13 bug, Pawson, David |
Re: Numbering and TOC, Lionel Mallet | Date | DocBook Stylesheet 1.18, Norman Walsh |
Month |