OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


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.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC