This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Difficulties creating own page layout: headers/footers and page dimension problems !!!
- From: Peter Biechele <Peter dot Biechele at bextec dot de>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Fri, 7 Nov 2003 13:21:46 +0100
- Subject: [docbook-apps] Difficulties creating own page layout: headers/footers and page dimension problems !!!
- Organization: beXtec GmbH
I am trying to do some custom layout of the pages in a print document (PS)
using openjade 1.3 and DSSSL stylsheets 1.78:
My aim is:
########################
Chapter 1.1: blaBla PICTURE
-------------------------------------------------------------------------(rule)
text body
-------------------------------------------------------------------------(rule)
Copyright by me 17 (Page Number)
#########################
My page layout looks like:
-----------------------------------------------------------------
;;; PAGE Layout !!!
;;;
(define %paper-type%
;; Name of paper type
"A4"
)
;;;; PAPER Dimensions !!!!!
(define %left-margin%
;; Width of left margin
3pi
)
(define %right-margin%
;; Width of the right margin
3.5pi
)
(define %top-margin%
;; Height of top margin
4cm
)
(define %bottom-margin%
;; Height of bottom margin
4cm
)
;;; PAGE HEADER !!!
;;;
(define ($custom-header-inner$)
(make sequence
( literal "Kapitel: " )
( literal (element-title-string (current-node)) )
( make rule
;; Escapement makes it an inlined object.
orientation: 'escapement
;; Length is page size less our left and right margins.
length: %text-width%
line-thickness: 1pt
start-indent: 0pt
;; Render it after all the other things in the header have been
;;rendered.
layer: 1
)
)
)
(define ($custom-header-outer$)
(make sequence
font-size: 2.54cm
(make external-graphic
display?: #f
entity-system-id: "picture.eps"
notation-system-id: "EPS"
scale: 0.5
position-point-y: -30pt
)
)
)
(define (page-inner-header gi)
($custom-header-inner$)
)
(define (page-center-header gi)
(empty-sosofo))
(define (page-outer-header gi)
(cond
((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
((equal? (normalize gi) (normalize "lot")) (empty-sosofo))
((equal? (normalize gi) (normalize "part")) (empty-sosofo))
((equal? (normalize gi) (normalize "toc")) (empty-sosofo))
(else
($custom-header-outer$)
)
)
)
;;; Headers for first pages like Chapter start
(define (first-page-inner-header gi)
(empty-sosofo))
(define (first-page-center-header gi)
(empty-sosofo))
(define (first-page-outer-header gi)
(cond
((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
((equal? (normalize gi) (normalize "lot")) (empty-sosofo))
((equal? (normalize gi) (normalize "part")) (empty-sosofo))
((equal? (normalize gi) (normalize "toc")) (empty-sosofo))
(else
($custom-header-outer$)
)
)
)
;;; PAGE FOOTER !!!
;;;
(define ($custom-footer-inner$)
(make sequence
font-posture: 'italic
font-family-name: "Helvetica"
font-size: 12pt
(make rule
;; Escapement makes it an inlined object.
orientation: 'escapement
;; Length is page size less our left and right margins.
length: %text-width%
line-thickness: 1pt
start-indent: 0pt
;; Render it after all the other things in the footer have been
;; rendered.
layer: 1
)
(literal "Copyright by me, - Version A -")
)
)
(define ($custom-footer-outer$)
(make sequence
font-posture: 'italic
font-family-name: "Helvetica"
font-size: 12pt
($page-number-header-footer$)
)
)
(define (first-page-inner-footer gi)
($custom-footer-inner$)
)
(define (first-page-center-footer gi)
(empty-sosofo)
)
(define (first-page-outer-footer gi)
(cond
((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
((equal? (normalize gi) (normalize "part")) (empty-sosofo))
(else
($custom-footer-outer$)
)
)
)
(define (page-inner-footer gi)
($custom-footer-inner$)
)
(define (page-center-footer gi)
(empty-sosofo))
(define (page-outer-footer gi)
(cond
((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
((equal? (normalize gi) (normalize "part")) (empty-sosofo))
(else
($custom-footer-outer$)
)
)
)
---------------------------------
That works to a certain amount, BUT
1) The page number in the footer is set above the rule in the footer !
2) I need the chapter number to put into the header, how do i get it ??
3) The page size seems to be different for the first-pages and the "normal
pages". The first pages (chapter starts) are correctly layouted with header
and footer. BUT the "normal pages" are shifted downwards, so they even shift
the footer out of the visible page size. Is that due to the
"position-point-y: -30pt" attribute ??
How can I fix this ??
4) The first-page-headers are not used for the TOC and TableOfFigures/Tables ?
The page-header is used for the second TOC page by the way. How can i switch
on the first-page-headers in the Content Tables ??
Thank you very much for any suggestions or help !!!!!
Peter Biechele
#####################################################
Dr. Peter Biechele, E-Mail: Peter.Biechele@beXtec.de
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.