[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Problem with sgml document processed with openjade
Le 24 févr. 2005, à 10:50, Jirka Kosek a écrit : > Michèle Garoche wrote: >> Is this the right place to ask a question about problems encountered >> when customizing stylesheets for producing a pdf output from an sgml >> book document processed with openjade? > > Yes, go on. I'm processing a docbook 4.1 sgml document book format with openjade. I've tried to customize some parts of title pages recto and verso mode. 1 - I wanted the first page recto mode with authorgroup at the right end and with a reduced top margin, title in huge font centered at the bottom of the page, subtitle with a smaller font italic centered below the title. So far, it works but I cannot find a way to reduce the top margin before the authorgroup about half of its current height. Is there a way to customize this margin? The current customization for this part is as follows: ;; Change the default fonts (define %body-font-family% "Computer-Modern") (define %mono-font-family% "Computer-Modern-Typewriter") (define %title-font-family% "Computer-Modern-Sans") (define %title-font-family-recto-mode% "Arial") (define %admon-font-family% "Computer-Modern-Sans") (define %guilabel-font-family% "Computer-Modern-Sans") ;; Pages customization (define %two-side% #t) (define %paper-type% "A4") (define %left-margin% 2pi) (define %right-margin% 2.5pi) (define %top-margin% 3pi) (define %bottom-margin% 4pi) (define %header-margin% 1pi) (define %footer-margin% 3pi) (define %body-start-indent% 0pi) (define %min-leading% 0pt) ;;Titlepages customization ;;This allows you to define what elements you ;;wish to have on the book titlepage. (define (book-titlepage-recto-elements) (list (normalize "authorgroup") (normalize "author") (normalize "title") (normalize "subtitle") (normalize "othercredit"))) ;; Redefine style for titlepage recto mode elements (mode book-titlepage-recto-mode ;; first the authors normal font as defined by titlepage recto style font (element authorgroup (make display-group (process-children))) (element author (let ((author-name (author-string)) (author-affil (select-elements (children (current-node)) (normalize "affiliation")))) (make sequence (make paragraph use: book-titlepage-recto-style font-size: (HSIZE 2) font-weight: 'bold line-spacing: (* (HSIZE 2) %line-spacing-factor%) space-before: 0pt quadding: 'end keep-with-next?: #t (literal author-name)) (process-node-list author-affil)))) ;; title at the bottom of the page centered with huge font (element title (make paragraph use: book-titlepage-recto-style font-size: (* (HSIZE 1) 4.4) space-before: (* (HSIZE 1) 30) space-after: (HSIZE 1) quadding: %division-title-quadding% keep-with-next?: #t heading-level: (if %generate-heading-level% 1 0) (with-mode title-mode (process-children-trim)))) ;; subtitle italic centered (element subtitle (make paragraph use: book-titlepage-recto-style font-size: (HSIZE 6) quadding: %division-title-quadding% font-posture: 'italic keep-with-next?: #t (process-children-trim)))) 2 - For the title page verso mode I wanted to get the title and subtitle on the same line centered on top. I did not succeed in doing so, just to get them on different lines. Is there a way to get them on the same line, when the fonts are different? Customization is as follows: ;; Redefine style for titlepage verso mode elements (mode book-titlepage-verso-mode ;; title center with higher font than normal title font (element title (make paragraph quadding: %division-title-quadding% (literal "\no-break-space;") (make sequence font-family-name: %title-font-family% font-size: (HSIZE 1) font-weight: 'bold (with-mode title-mode (process-children))))) ;; subtitle centered below the title (wanted it on the same line) (element subtitle (make paragraph quadding: %division-title-quadding% (literal "\no-break-space;") (make sequence font-family-name: %title-font-family% font-weight: 'bold (process-children)))) ... ) PS. : I must admit that my knowledge of docbook stylesheets and scheme language is near zero level. Michèle <http://micmacfr.homeunix.org>
=?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]