| 1 |
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ |
| 2 |
<!ENTITY html-ss |
| 3 |
PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl> |
| 4 |
<!ENTITY print-ss |
| 5 |
PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl> |
| 6 |
]> |
| 7 |
<style-sheet> |
| 8 |
<style-specification id="print" use="print-stylesheet"> |
| 9 |
<style-specification-body> |
| 10 |
|
| 11 |
;; This draws in version 1.74b of the module docbook DSSSL stylesheets |
| 12 |
;; together with sourceforge patch #502637 |
| 13 |
|
| 14 |
;; customize the print stylesheet |
| 15 |
|
| 16 |
(define %hsize-bump-factor% 1.1) |
| 17 |
|
| 18 |
(define %chapter-autolabel% |
| 19 |
;; Are chapters enumerated? |
| 20 |
#f) |
| 21 |
|
| 22 |
(define %two-side% #t) |
| 23 |
|
| 24 |
(define %graphic-extensions% |
| 25 |
;; List of graphic filename extensions |
| 26 |
'("pdf" "eps" "epsf" "gif" "tif" "tiff" "jpg" "jpeg" "png")) |
| 27 |
|
| 28 |
|
| 29 |
(define preferred-mediaobject-notations |
| 30 |
(list "PDF" "EPS" "PS" "JPG" "JPEG" "PNG" "linespecific")) |
| 31 |
|
| 32 |
(define preferred-mediaobject-extensions |
| 33 |
(list "pdf" "eps" "ps" "jpg" "jpeg" "png")) |
| 34 |
|
| 35 |
(define %titlepage-in-info-order% #f) |
| 36 |
|
| 37 |
;; Fix bug in numbering of the preface |
| 38 |
|
| 39 |
(define ($component$) |
| 40 |
(make simple-page-sequence |
| 41 |
page-n-columns: %page-n-columns% |
| 42 |
page-number-restart?: (or %page-number-restart% |
| 43 |
(first-chapter?)) |
| 44 |
page-number-format: ($page-number-format$) |
| 45 |
use: default-text-style |
| 46 |
left-header: ($left-header$) |
| 47 |
center-header: ($center-header$) |
| 48 |
right-header: ($right-header$) |
| 49 |
left-footer: ($left-footer$) |
| 50 |
center-footer: ($center-footer$) |
| 51 |
right-footer: ($right-footer$) |
| 52 |
start-indent: %body-start-indent% |
| 53 |
input-whitespace-treatment: 'collapse |
| 54 |
quadding: %default-quadding% |
| 55 |
(make sequence |
| 56 |
($component-title$) |
| 57 |
(process-children)) |
| 58 |
(make-endnotes))) |
| 59 |
|
| 60 |
;; Customise the title page |
| 61 |
(element book |
| 62 |
(let* ((bookinfo (select-elements (children (current-node)) |
| 63 |
(normalize "bookinfo"))) |
| 64 |
(dedication (select-elements (children (current-node)) |
| 65 |
(normalize "dedication"))) |
| 66 |
(nl (titlepage-info-elements (current-node) bookinfo))) |
| 67 |
(make sequence |
| 68 |
(if %generate-book-titlepage% |
| 69 |
(make simple-page-sequence |
| 70 |
page-n-columns: %titlepage-n-columns% |
| 71 |
input-whitespace-treatment: 'collapse |
| 72 |
use: default-text-style |
| 73 |
bottom-margin: 144pt |
| 74 |
right-footer: ($title-right-footer$) |
| 75 |
(book-titlepage nl 'recto) |
| 76 |
(make display-group |
| 77 |
break-before: 'page |
| 78 |
(book-titlepage nl 'verso))) |
| 79 |
(empty-sosofo)) |
| 80 |
|
| 81 |
(if (node-list-empty? dedication) |
| 82 |
(empty-sosofo) |
| 83 |
(with-mode dedication-page-mode |
| 84 |
(process-node-list dedication))) |
| 85 |
|
| 86 |
(if (not (generate-toc-in-front)) |
| 87 |
(process-children) |
| 88 |
(empty-sosofo)) |
| 89 |
|
| 90 |
(if %generate-book-toc% |
| 91 |
(make simple-page-sequence |
| 92 |
page-n-columns: %page-n-columns% |
| 93 |
page-number-format: ($page-number-format$ (normalize "toc")) |
| 94 |
use: default-text-style |
| 95 |
left-header: ($left-header$ (normalize "toc")) |
| 96 |
center-header: ($center-header$ (normalize "toc")) |
| 97 |
right-header: ($right-header$ (normalize "toc")) |
| 98 |
left-footer: ($left-footer$ (normalize "toc")) |
| 99 |
center-footer: ($center-footer$ (normalize "toc")) |
| 100 |
right-footer: ($right-footer$ (normalize "toc")) |
| 101 |
input-whitespace-treatment: 'collapse |
| 102 |
(build-toc (current-node) |
| 103 |
(toc-depth (current-node)))) |
| 104 |
(empty-sosofo)) |
| 105 |
|
| 106 |
(let loop ((gilist ($generate-book-lot-list$))) |
| 107 |
(if (null? gilist) |
| 108 |
(empty-sosofo) |
| 109 |
(if (not (node-list-empty? |
| 110 |
(select-elements (descendants (current-node)) |
| 111 |
(car gilist)))) |
| 112 |
(make simple-page-sequence |
| 113 |
page-n-columns: %page-n-columns% |
| 114 |
page-number-format: ($page-number-format$ (normalize "lot")) |
| 115 |
use: default-text-style |
| 116 |
left-header: ($left-header$ (normalize "lot")) |
| 117 |
center-header: ($center-header$ (normalize "lot")) |
| 118 |
right-header: ($right-header$ (normalize "lot")) |
| 119 |
left-footer: ($left-footer$ (normalize "lot")) |
| 120 |
center-footer: ($center-footer$ (normalize "lot")) |
| 121 |
right-footer: ($right-footer$ (normalize "lot")) |
| 122 |
input-whitespace-treatment: 'collapse |
| 123 |
(build-lot (current-node) (car gilist)) |
| 124 |
(loop (cdr gilist))) |
| 125 |
(loop (cdr gilist))))) |
| 126 |
|
| 127 |
(if (generate-toc-in-front) |
| 128 |
(process-children) |
| 129 |
(empty-sosofo))))) |
| 130 |
|
| 131 |
(define %openjade-logo% |
| 132 |
;; The nice look systems logo |
| 133 |
"logo.png" ) |
| 134 |
|
| 135 |
(define ($title-right-footer$) |
| 136 |
(if-first-page |
| 137 |
(make external-graphic |
| 138 |
scale: 1.0 |
| 139 |
entity-system-id: %openjade-logo% |
| 140 |
notation-system-id: "PDF" |
| 141 |
display?: #f) |
| 142 |
(empty-sosofo))) |
| 143 |
|
| 144 |
(define (book-titlepage-recto-elements) |
| 145 |
(list (normalize "corpauthor") |
| 146 |
(normalize "subtitle") |
| 147 |
(normalize "title") |
| 148 |
(normalize "graphic"))) |
| 149 |
|
| 150 |
(define (book-titlepage-verso-elements) |
| 151 |
(list (normalize "legalnotice") |
| 152 |
(normalize "copyright") |
| 153 |
(normalize "edition") |
| 154 |
(normalize "pubdate") |
| 155 |
(normalize "abstract") |
| 156 |
(normalize "revhistory"))) |
| 157 |
|
| 158 |
(define (book-titlepage-before node side) |
| 159 |
(empty-sosofo) |
| 160 |
) |
| 161 |
|
| 162 |
(mode book-titlepage-recto-mode |
| 163 |
|
| 164 |
(element graphic |
| 165 |
(make display-group |
| 166 |
(make external-graphic |
| 167 |
entity-system-id: (attribute-string "fileref") |
| 168 |
display?: #t |
| 169 |
) |
| 170 |
) |
| 171 |
) |
| 172 |
(element title |
| 173 |
(make paragraph |
| 174 |
font-size: 36pt |
| 175 |
font-family-name: "Palatino" |
| 176 |
font-weight: 'bold |
| 177 |
space-before: 12pt |
| 178 |
line-spacing: 36pt |
| 179 |
(make rule |
| 180 |
space-after: 4pt |
| 181 |
line-thickness: 1pt) |
| 182 |
(process-children) |
| 183 |
) |
| 184 |
) |
| 185 |
(element subtitle |
| 186 |
(make paragraph |
| 187 |
font-size: 24pt |
| 188 |
line-spacing: 24pt |
| 189 |
font-family-name: "Palatino" |
| 190 |
font-weight: 'bold |
| 191 |
(process-children) |
| 192 |
) |
| 193 |
) |
| 194 |
(element corpauthor |
| 195 |
(make paragraph |
| 196 |
font-size: 24pt |
| 197 |
line-spacing: 24pt |
| 198 |
space-after: 6pt |
| 199 |
font-family-name: "Palatino" |
| 200 |
font-weight: 'normal |
| 201 |
(process-children) |
| 202 |
) |
| 203 |
) |
| 204 |
) |
| 205 |
|
| 206 |
|
| 207 |
</style-specification-body> |
| 208 |
</style-specification> |
| 209 |
|
| 210 |
<style-specification id="html" use="html-stylesheet"> |
| 211 |
<style-specification-body> |
| 212 |
|
| 213 |
;; customize the html stylesheet |
| 214 |
|
| 215 |
|
| 216 |
;; customize the html stylesheet |
| 217 |
(define %body-attr% |
| 218 |
;; What attributes should be hung off of BODY? |
| 219 |
(list |
| 220 |
(list "BGCOLOR" "#FFFFFF") |
| 221 |
(list "TEXT" "#000000"))) |
| 222 |
|
| 223 |
</style-specification-body> |
| 224 |
</style-specification> |
| 225 |
<external-specification id="print-stylesheet" document="print-ss"> |
| 226 |
<external-specification id="html-stylesheet" document="html-ss"> |
| 227 |
</style-sheet> |