1 <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
2 <!ENTITY % html "IGNORE">
4 <!ENTITY % print "IGNORE">
5 <!ENTITY docbook.dsl SYSTEM "@SGML_SHARE@/dsssl/docbook/html/docbook.dsl" CDATA dsssl>
7 <!ENTITY % print "INCLUDE">
9 <!ENTITY docbook.dsl SYSTEM "@SGML_SHARE@/dsssl/docbook/print/docbook.dsl" CDATA dsssl>
15 <style-specification id="print" use="docbook">
16 <style-specification-body>
18 ;; ==============================
19 ;; customize the print stylesheet
20 ;; ==============================
22 (declare-characteristic preserve-sdata?
23 ;; this is necessary because right now jadetex does not understand
24 ;; symbolic entities, whereas things work well with numeric entities.
25 "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
28 (define %generate-article-toc%
29 ;; Should a Table of Contents be produced for Articles?
32 (define (toc-depth nd)
35 (define %generate-article-titlepage-on-separate-page%
36 ;; Should the article title page be on a separate page?
39 (define %section-autolabel%
40 ;; Are sections enumerated?
43 (define %footnote-ulinks%
44 ;; Generate footnotes for ULinks?
47 (define %bop-footnotes%
48 ;; Make "bottom-of-page" footnotes?
51 (define %body-start-indent%
52 ;; Default indent of body text
55 (define %para-indent-firstpara%
56 ;; First line start-indent for the first paragraph
60 ;; First line start-indent for paragraphs (other than the first)
63 (define %block-start-indent%
64 ;; Extra start-indent for block-elements
67 (define formal-object-float
68 ;; Do formal objects float?
72 ;; Allow automatic hyphenation?
75 (define %admon-graphics%
76 ;; Use graphics in admonitions?
79 </style-specification-body>
80 </style-specification>
84 ;; ===================================================
85 ;; customize the html stylesheet; borrowed from Cygnus
86 ;; at http://sourceware.cygnus.com/ (cygnus-both.dsl)
87 ;; ===================================================
90 <style-specification id="html" use="docbook">
91 <style-specification-body>
93 (declare-characteristic preserve-sdata?
94 ;; this is necessary because right now jadetex does not understand
95 ;; symbolic entities, whereas things work well with numeric entities.
96 "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
99 (define %generate-legalnotice-link%
100 ;; put the legal notice in a separate file
103 (define %admon-graphics-path%
104 ;; use graphics in admonitions, set their
107 (define %admon-graphics%
110 (define %funcsynopsis-decoration%
111 ;; make funcsynopsis look pretty
115 ;; when producing HTML files, use this extension
118 (define %generate-book-toc%
119 ;; Should a Table of Contents be produced for books?
122 (define %generate-article-toc%
123 ;; Should a Table of Contents be produced for articles?
126 (define %generate-part-toc%
127 ;; Should a Table of Contents be produced for parts?
130 (define %generate-book-titlepage%
131 ;; produce a title page for books
134 (define %generate-article-titlepage%
135 ;; produce a title page for articles
138 (define (chunk-skip-first-element-list)
139 ;; forces the Table of Contents on separate page
142 (define (list-element-list)
143 ;; fixes bug in Table of Contents generation
146 (define %root-filename%
147 ;; The filename of the root HTML document (e.g, "index").
150 (define %shade-verbatim%
151 ;; verbatim sections will be shaded if t(rue)
154 (define %use-id-as-filename%
155 ;; Use ID attributes as name for component HTML files?
158 (define %graphic-extensions%
159 ;; graphic extensions allowed
160 '("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
162 (define %graphic-default-extension%
165 (define %section-autolabel%
166 ;; For enumerated sections (1.1, 1.1.1, 1.2, etc.)
169 (define (toc-depth nd)
170 ;; more depth (2 levels) to toc; instead of flat hierarchy
175 ;; make role=strong equate to bold for emphasis tag
176 (if (equal? (attribute-string "role") "strong")
177 (make element gi: "STRONG" (process-children))
178 (make element gi: "EM" (process-children))))
180 (define (book-titlepage-recto-elements)
181 ;; elements on a book's titlepage
182 ;; note: added revhistory to the default list
183 (list (normalize "title")
184 (normalize "subtitle")
185 (normalize "graphic")
186 (normalize "mediaobject")
187 (normalize "corpauthor")
188 (normalize "authorgroup")
191 (normalize "copyright")
192 (normalize "revhistory")
193 (normalize "abstract")
194 (normalize "legalnotice")))
196 (define (article-titlepage-recto-elements)
197 ;; elements on an article's titlepage
198 ;; note: added othercredit to the default list
199 (list (normalize "title")
200 (normalize "subtitle")
201 (normalize "authorgroup")
203 (normalize "othercredit")
204 (normalize "releaseinfo")
205 (normalize "copyright")
206 (normalize "pubdate")
207 (normalize "revhistory")
208 (normalize "abstract")))
210 (mode article-titlepage-recto-mode
213 ;; print out with othercredit information; for translators, etc.
215 (make element gi: "SPAN"
216 attributes: (list (list "CLASS" (gi)))
217 (process-children))))
220 ;; print out othercredit information; for translators, etc.
221 (let ((author-name (author-string))
222 (author-contrib (select-elements (children (current-node))
223 (normalize "contrib"))))
224 (make element gi: "P"
225 attributes: (list (list "CLASS" (gi)))
226 (make element gi: "B"
227 (literal author-name)
229 (process-node-list author-contrib))))
232 (define (article-title nd)
233 (let* ((artchild (children nd))
234 (artheader (select-elements artchild (normalize "artheader")))
235 (artinfo (select-elements artchild (normalize "articleinfo")))
236 (ahdr (if (node-list-empty? artheader)
239 (ahtitles (select-elements (children ahdr)
240 (normalize "title")))
241 (artitles (select-elements artchild (normalize "title")))
242 (titles (if (node-list-empty? artitles)
245 (if (node-list-empty? titles)
247 (node-list-first titles))))
250 </style-specification-body>
251 </style-specification>
253 <external-specification id="docbook" document="docbook.dsl">