[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: first page of chapter top margin
[It's too early in the morning to think hard.. so I may have made some errors below - hopefully someone else will spot them] Each chapter is a simple-page-sequence. The top-margin is the same on every page in the s-p-s. So you can't have a different top-margin for just the first page of the set. A different approach is required. Each chapter (and appendix) begins with a title. So what we can do is increase the space-before of the paragraph that contains the title. This is all done in print/dbcompon.dsl The funtion $define-component-title$ starts at line 250 in print/dbcompon.dsl. The paragraph for the title is constructed at line 269. You can see that it does: space-before: (* (HSIZE 4) %head-before-factor%) This means that the size will actually varying according to bf-size and head before-factor. What you probably want is a constant - so that the title begins somewhere down the page. For example: space-before: 72pt So, you will need to copy the entire function and paste it into your customisation layer and make the appropriate change. Here is something from one of my own stylesheets which I think tackles that same problem (I can't remember why a bit of it is commented out!). Anyway, have a play and see what happens: ---- 8< ------------------------------- (define ($component-title$) (let* ((info (cond ((equal? (gi) (normalize "appendix")) (select-elements (children (current-node)) (normalize "docinfo"))) ((equal? (gi) (normalize "article")) (node-list-filter-by-gi (children (current-node)) (list (normalize "artheader") (normalize "articleinfo")))) ((equal? (gi) (normalize "bibliography")) (select-elements (children (current-node)) (normalize "docinfo"))) ((equal? (gi) (normalize "chapter")) (select-elements (children (current-node)) (normalize "docinfo"))) ((equal? (gi) (normalize "dedication")) (empty-node-list)) ((equal? (gi) (normalize "glossary")) (select-elements (children (current-node)) (normalize "docinfo"))) ((equal? (gi) (normalize "index")) (select-elements (children (current-node)) (normalize "docinfo"))) ((equal? (gi) (normalize "preface")) (select-elements (children (current-node)) (normalize "docinfo"))) ((equal? (gi) (normalize "reference")) (select-elements (children (current-node)) (normalize "docinfo"))) ((equal? (gi) (normalize "setindex")) (select-elements (children (current-node)) (normalize "docinfo"))) (else (empty-node-list)))) (exp-children (if (node-list-empty? info) (empty-node-list) (expand-children (children info) (list (normalize "bookbiblio") (normalize "bibliomisc") (normalize "biblioset"))))) (parent-titles (select-elements (children (current-node)) (normalize "title"))) (info-titles (select-elements exp-children (normalize "title"))) (titles (if (node-list-empty? parent-titles) info-titles parent-titles)) (subtitles (select-elements exp-children (normalize "subtitle")))) (make sequence (make paragraph font-family-name: %title-font-family% font-weight: 'bold font-size: (HSIZE 4) line-spacing: (* (HSIZE 4) %line-spacing-factor%) space-before: 72pt space-after: 24pt start-indent: %body-start-indent% first-line-start-indent: %body-start-indent% quadding: %component-title-quadding% heading-level: (if %generate-heading-level% 1 0) keep-with-next?: #t (if (string=? (element-label) "") (empty-sosofo) (literal (gentext-element-name-space (current-node)) (element-label) (gentext-label-title-sep (gi)))) (if (node-list-empty? titles) (element-title-sosofo) ;; get a default! (with-mode component-title-mode (make sequence (process-node-list titles))))) ;; (make paragraph ;; font-family-name: %title-font-family% ;; font-weight: 'bold ;; font-posture: 'italic ;; font-size: (HSIZE 3) ;; line-spacing: (* (HSIZE 3) %line-spacing-factor%) ;; space-before: (* 0.5 (* (HSIZE 3) %head-before-factor%)) ;; space-after: (* (HSIZE 4) %head-after-factor%) ;; start-indent: 0pt ;; first-line-start-indent: 0pt ;; quadding: %component-subtitle-quadding% ;; keep-with-next?: #t ;; ;; (with-mode component-title-mode ;; (make sequence ;; (process-node-list subtitles)))) ))) On Fri, 2002-02-08 at 04:09, Tammy Fox wrote: > How do I change the top margin of the first page of each chapter and > appendix? > > I tried setting the head-after-factor in the component-title > definition, but that didn't seem to have any effect. > > I'm using DSSSL stylesheets. > > Thanks, > Tammy
This is a digitally signed message part
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC