This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
page numbering
- From: Baurjan Ismagulov <ibr at gantek dot com>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 22 Apr 2002 14:04:57 +0300
- Subject: DOCBOOK-APPS: page numbering
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.