Re: Numbering and TOC

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
  • Re: Modular Docbook v1.13 bug, (continued)
        • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA11993Thu, 17 Sep 1998 10:41:46 -0400 (EDT)
        • Lionel Mallet - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id EAA22268Fri, 18 Sep 1998 04:18:54 -0400 (EDT)
        • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id GAA25145Fri, 18 Sep 1998 06:45:24 -0400 (EDT)
        • Lionel Mallet - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id HAA26076Fri, 18 Sep 1998 07:52:10 -0400 (EDT)
        • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id IAA26683Fri, 18 Sep 1998 08:15:55 -0400 (EDT) <=
    • Pawson, David - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA08778Thu, 17 Sep 1998 09:36:30 -0400 (EDT)
      • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA09085Thu, 17 Sep 1998 09:43:19 -0400 (EDT)