This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: page numbering
- From: Ian Castle <ian dot castle at coldcomfortfarm dot net>
- To: Baurjan Ismagulov <ibr at gantek dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 22 Apr 2002 18:24:02 +0100
- Subject: Re: DOCBOOK-APPS: page numbering
- References: <20020422110455.GA1648@gantek.com>
Conventionally, you should use
titlepage recto <no number>
legalnotice <no number>
abstract 1 iii
abstract 2 iv
toc v
There are patches around on the mailing list which will fix this (search
for "preface" and "page number").
If you are still stuck I may be able to help a bit further... but not
until tomorrow!
On Mon, 2002-04-22 at 12:04, Baurjan Ismagulov wrote:
> Hello,
>
> I'm using DSSSL to render DocBook SGML source into pdf. I have bookinfo
> with legalnotice and two abstracts. I want the numbering to start from
> the first abstract, like this:
>
> titlepage recto <no number>
> legalnotice <no number>
> abstract 1 i
> abstract 2 ii
> toc iii
>
>
> What I get with the default stylesheets is:
>
> titlepage recto <no number>
> legalnotice <no number>
> abstract 1 <no number>
> abstract 2 <no number>
> toc v
>
> i.e., there are two problems:
>
> 1. numbering starts from the titlepage recto;
>
> 2. abstract page numbers are not shown.
>
>
> To work around the former, I put the following into the customization
> layer:
>
> ;; Returns #t if the current-node is in the first abstract of a bookinfo
> ;; from common/dbcommon.dsl.
> (define (first-abstract?)
> (let* ((bi (ancestor (normalize "bookinfo")))
> (nd (ancestor-member
> (current-node)
> (append (component-element-list) (division-element-list))))
> (bich (children bi)))
> (let loop ((nl bich))
> (if (node-list-empty? nl)
> #f
> (if (equal? (gi (node-list-first nl)) (normalize "abstract"))
> (if (node-list=? (node-list-first nl) nd)
> #t
> #f)
> (loop (node-list-rest nl)))))))
>
> (mode book-titlepage-verso-mode
> (element (bookinfo abstract)
> (make display-group
> break-before: 'page
> (make sequence
> page-number-restart?: (first-abstract?)
> ($component-title$)
> (process-children)))))
>
> This didn't work for me. Could anyone please help me with these two
> problems?
>
>
> Thanks in advance,
> Baurjan.