syncing up with 2.2
[Samba/gbeck.git] / docs / docbook / stylesheets / ldp.dsl.in
blobd6e06f4b6d12add6f81b4f9e69fc9a448f897fc6
1 <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
2 <!ENTITY % html "IGNORE">
3 <![%html;[
4 <!ENTITY % print "IGNORE">
5 <!ENTITY docbook.dsl SYSTEM "@SGML_SHARE@/dsssl/docbook/html/docbook.dsl" CDATA dsssl>
6 ]]>
7 <!ENTITY % print "INCLUDE">
8 <![%print;[
9 <!ENTITY docbook.dsl SYSTEM "@SGML_SHARE@/dsssl/docbook/print/docbook.dsl" CDATA dsssl>
10 ]]>
13 <style-sheet>
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?"
26   #f)
28 (define %generate-article-toc%
29   ;; Should a Table of Contents be produced for Articles?
30   #t)
32 (define (toc-depth nd)
33   2)
35 (define %generate-article-titlepage-on-separate-page%
36   ;; Should the article title page be on a separate page?
37   #t)
39 (define %section-autolabel%
40   ;; Are sections enumerated?
41   #t)
43 (define %footnote-ulinks%
44   ;; Generate footnotes for ULinks?
45   #f)
47 (define %bop-footnotes%
48   ;; Make "bottom-of-page" footnotes?
49   #f)
51 (define %body-start-indent%
52   ;; Default indent of body text
53   0pi)
55 (define %para-indent-firstpara%
56   ;; First line start-indent for the first paragraph
57   0pt)
59 (define %para-indent%
60   ;; First line start-indent for paragraphs (other than the first)
61   0pt)
63 (define %block-start-indent%
64   ;; Extra start-indent for block-elements
65   0pt)
67 (define formal-object-float
68   ;; Do formal objects float?
69   #t)
71 (define %hyphenation%
72   ;; Allow automatic hyphenation?
73   #t)
75 (define %admon-graphics%
76   ;; Use graphics in admonitions?
77   #f)
79 </style-specification-body>
80 </style-specification>
83 <!--
84 ;; ===================================================
85 ;; customize the html stylesheet; borrowed from Cygnus
86 ;; at http://sourceware.cygnus.com/ (cygnus-both.dsl)
87 ;; ===================================================
88 -->
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?"
97   #f)
99 (define %generate-legalnotice-link%
100   ;; put the legal notice in a separate file
101   #t)
103 (define %admon-graphics-path%
104   ;; use graphics in admonitions, set their
105   "../images/")
107 (define %admon-graphics%
108   #f)
110 (define %funcsynopsis-decoration%
111   ;; make funcsynopsis look pretty
112   #t)
114 (define %html-ext%
115   ;; when producing HTML files, use this extension
116   ".html")
118 (define %generate-book-toc%
119   ;; Should a Table of Contents be produced for books?
120   #t)
122 (define %generate-article-toc% 
123   ;; Should a Table of Contents be produced for articles?
124   #t)
126 (define %generate-part-toc%
127   ;; Should a Table of Contents be produced for parts?
128   #t)
130 (define %generate-book-titlepage%
131   ;; produce a title page for books
132   #t)
134 (define %generate-article-titlepage%
135   ;; produce a title page for articles
136   #t)
138 (define (chunk-skip-first-element-list)
139   ;; forces the Table of Contents on separate page
140   '())
142 (define (list-element-list)
143   ;; fixes bug in Table of Contents generation
144   '())
146 (define %root-filename%
147   ;; The filename of the root HTML document (e.g, "index").
148   "index")
150 (define %shade-verbatim%
151   ;; verbatim sections will be shaded if t(rue)
152   #t)
154 (define %use-id-as-filename%
155   ;; Use ID attributes as name for component HTML files?
156   #t)
158 (define %graphic-extensions%
159   ;; graphic extensions allowed
160   '("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
162 (define %graphic-default-extension% 
163   "gif")
165 (define %section-autolabel%
166   ;; For enumerated sections (1.1, 1.1.1, 1.2, etc.)
167   #t)
169 (define (toc-depth nd)
170   ;; more depth (2 levels) to toc; instead of flat hierarchy
171   ;; 2)
172   4)
174 (element emphasis
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")
189         (normalize "author")
190         (normalize "editor")
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")
202         (normalize "author")
203         (normalize "othercredit")
204         (normalize "releaseinfo")
205         (normalize "copyright")
206         (normalize "pubdate")
207         (normalize "revhistory")
208         (normalize "abstract")))
210 (mode article-titlepage-recto-mode
212  (element contrib
213   ;; print out with othercredit information; for translators, etc.
214   (make sequence
215     (make element gi: "SPAN"
216           attributes: (list (list "CLASS" (gi)))
217           (process-children))))
219  (element othercredit
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)
228               (literal " - "))
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)
237                    artinfo
238                    artheader))
239          (ahtitles  (select-elements (children ahdr)
240                                      (normalize "title")))
241          (artitles  (select-elements artchild (normalize "title")))
242          (titles    (if (node-list-empty? artitles)
243                         ahtitles
244                         artitles)))
245     (if (node-list-empty? titles)
246         ""
247         (node-list-first titles))))
250 </style-specification-body>
251 </style-specification>
253 <external-specification id="docbook" document="docbook.dsl">
255 </style-sheet>