This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: page numbering


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]