/[MITgcm]/MITgcm/doc/ldp.dsl
ViewVC logotype

Contents of /MITgcm/doc/ldp.dsl

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Aug 4 21:09:05 2003 UTC (18 years, 10 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint51k_post, checkpoint57t_post, checkpoint57o_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint58e_post, checkpoint57v_post, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint51o_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint57s_post, checkpoint51n_pre, checkpoint54a_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint51l_post, checkpoint57g_post, checkpoint51q_post, checkpoint60, checkpoint61, checkpoint62, checkpoint57b_post, checkpoint57c_pre, checkpoint51j_post, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, hrcube_1, checkpoint57e_post, branch-netcdf, checkpoint52d_pre, checkpoint52l_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint58x_post, checkpoint52k_post, checkpoint52b_pre, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint54d_post, checkpoint56c_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint51f_pre, checkpoint58q_post, checkpoint54f_post, checkpoint53b_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint51o_post, checkpoint51p_post, checkpoint58j_post, checkpoint52a_pre, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint51i_post, checkpoint53, checkpoint52, checkpoint51f_post, checkpoint52d_post, eckpoint57e_pre, checkpoint52a_post, checkpoint57h_done, checkpoint58f_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, branchpoint-genmake2, checkpoint57x_post, checkpoint57n_post, checkpoint52c_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint51h_pre, checkpoint51l_pre, checkpoint58i_post, checkpoint57q_post, checkpoint51g_post, checkpoint58g_post, ecco_c52_e35, hrcube5, checkpoint58o_post, checkpoint57z_post, checkpoint62a, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint52i_post, checkpoint52j_pre, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint51t_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint51n_post, checkpoint57j_post, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58b_post, checkpoint57h_pre, checkpoint51i_pre, checkpoint58m_post, checkpoint57l_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, checkpoint57h_post, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint51m_post, checkpoint51s_post, checkpoint55d_post
Branch point for: branch-nonh, branch-genmake2, tg2-branch, checkpoint51n_branch, netcdf-sm0
Initial version -- just a rough draft!

1 <!DOCTYPE style-sheet PUBLIC
2 "-//James Clark//DTD DSSSL Style Sheet//EN" [
3 <!ENTITY % html "IGNORE">
4 <![%html;[
5 <!ENTITY % print "IGNORE">
6 <!ENTITY docbook.dsl PUBLIC
7 "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN"
8 CDATA dsssl>
9 ]]>
10 <!ENTITY % print "INCLUDE">
11 <![%print;[
12 <!ENTITY docbook.dsl PUBLIC
13 "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN"
14 CDATA dsssl>
15 ]]>
16 ]>
17
18 <style-sheet>
19
20 ;; ------------------------------------------------------------------------
21 ;; ldp.dsl - LDP Customized DSSSL Stylesheet
22 ;; v1.11, 2003-02-03
23 ;; Copyright (C) 2000-2003
24 ;;
25 ;; This program is free software; you can redistribute it and/or modify
26 ;; it under the terms of the GNU General Public License as published by
27 ;; the Free Software Foundation; either version 2 of the License, or
28 ;; (at your option) any later version.
29 ;;
30 ;; This program is distributed in the hope that it will be useful,
31 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;; GNU General Public License for more details.
34 ;;
35 ;; You should have received a copy of the GNU General Public License
36 ;; along with this program; if not, write to the Free Software
37 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38 ;; ------------------------------------------------------------------------
39
40 <style-specification id="print" use="docbook">
41 <style-specification-body>
42
43 ;; customize the print stylesheet
44
45 (declare-characteristic preserve-sdata?
46 ;; this is necessary because right now jadetex does not understand
47 ;; symbolic entities, whereas things work well with numeric entities.
48 "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
49 #f)
50
51 (define %generate-article-toc%
52 ;; Should a Table of Contents be produced for Articles?
53 #t)
54
55 (define (toc-depth nd)
56 4)
57
58 (define %generate-article-titlepage-on-separate-page%
59 ;; Should the article title page be on a separate page?
60 #t)
61
62 (define %section-autolabel%
63 ;; Are sections enumerated?
64 #t)
65
66 (define %footnote-ulinks%
67 ;; Generate footnotes for ULinks?
68 #f)
69
70 (define %bop-footnotes%
71 ;; Make "bottom-of-page" footnotes?
72 #f)
73
74 (define %body-start-indent%
75 ;; Default indent of body text
76 0pi)
77
78 (define %para-indent-firstpara%
79 ;; First line start-indent for the first paragraph
80 0pt)
81
82 (define %para-indent%
83 ;; First line start-indent for paragraphs (other than the first)
84 0pt)
85
86 (define %block-start-indent%
87 ;; Extra start-indent for block-elements
88 0pt)
89
90 (define formal-object-float
91 ;; Do formal objects float?
92 #t)
93
94 (define %hyphenation%
95 ;; Allow automatic hyphenation?
96 #t)
97
98 (define %admon-graphics%
99 ;; Use graphics in admonitions?
100 #f)
101
102 (define %default-quadding%
103 ;; Full justification.
104 'justify)
105
106 (define (book-titlepage-verso-elements)
107 ;;added publisher, releaseinfo to the default list
108 (list (normalize "title")
109 (normalize "subtitle")
110 (normalize "corpauthor")
111 (normalize "authorgroup")
112 (normalize "author")
113 (normalize "publisher")
114 (normalize "releaseinfo")
115 (normalize "editor")
116 (normalize "edition")
117 (normalize "pubdate")
118 (normalize "copyright")
119 (normalize "abstract")
120 (normalize "legalnotice")
121 (normalize "revhistory")))
122
123 </style-specification-body>
124 </style-specification>
125
126
127 <!--
128 ;; customize the html stylesheet; parts borrowed from
129 ;; Cygnus at http://sourceware.cygnus.com/ (cygnus-both.dsl)
130 -->
131
132 <style-specification id="html" use="docbook">
133 <style-specification-body>
134
135 (declare-characteristic preserve-sdata?
136 ;; this is necessary because right now jadetex does not understand
137 ;; symbolic entities, whereas things work well with numeric entities.
138 "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
139 #f)
140
141 (declare-flow-object-class element
142 ;; for redhat
143 "UNREGISTERED::James Clark//Flow Object Class::element")
144
145 (define %generate-legalnotice-link%
146 ;; put the legal notice in a separate file
147 #t)
148
149 (define %admon-graphics-path%
150 ;; use graphics in admonitions, set their
151 "../images/")
152
153 (define %admon-graphics%
154 #t)
155
156 (define %funcsynopsis-decoration%
157 ;; make funcsynopsis look pretty
158 #t)
159
160 (define %html-ext%
161 ;; when producing HTML files, use this extension
162 ".html")
163
164 (define %generate-book-toc%
165 ;; Should a Table of Contents be produced for books?
166 #t)
167
168 (define %generate-article-toc%
169 ;; Should a Table of Contents be produced for articles?
170 #t)
171
172 (define %generate-part-toc%
173 ;; Should a Table of Contents be produced for parts?
174 #t)
175
176 (define %generate-book-titlepage%
177 ;; produce a title page for books
178 #t)
179
180 (define %generate-article-titlepage%
181 ;; produce a title page for articles
182 #t)
183
184 (define (chunk-skip-first-element-list)
185 ;; forces the Table of Contents on separate page
186 '())
187
188 (define (list-element-list)
189 ;; fixes bug in Table of Contents generation
190 '())
191
192 (define %root-filename%
193 ;; The filename of the root HTML document (e.g, "index").
194 "index")
195
196 (define %shade-verbatim%
197 ;; verbatim sections will be shaded if t(rue)
198 #t)
199
200 (define %use-id-as-filename%
201 ;; Use ID attributes as name for component HTML files?
202 #t)
203
204 (define %graphic-extensions%
205 ;; graphic extensions allowed
206 '("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
207
208 (define %graphic-default-extension%
209 "gif")
210
211 (define %section-autolabel%
212 ;; For enumerated sections (1.1, 1.1.1, 1.2, etc.)
213 #t)
214
215 (define (toc-depth nd)
216 ;; more depth (2 levels) to toc; instead of flat hierarchy
217 2)
218
219 (element emphasis
220 ;; make role=strong equate to bold for emphasis tag
221 (if (equal? (attribute-string "role") "strong")
222 (make element gi: "STRONG" (process-children))
223 (make element gi: "EM" (process-children))))
224
225 (define (book-titlepage-recto-elements)
226 ;; elements on a book's titlepage
227 (list (normalize "title")
228 (normalize "subtitle")
229 (normalize "graphic")
230 (normalize "mediaobject")
231 (normalize "corpauthor")
232 (normalize "authorgroup")
233 (normalize "author")
234 (normalize "othercredit")
235 (normalize "edition")
236 (normalize "releaseinfo")
237 (normalize "publisher")
238 (normalize "editor")
239 (normalize "copyright")
240 (normalize "pubdate")
241 (normalize "revhistory")
242 (normalize "abstract")
243 (normalize "legalnotice")))
244
245 (define (article-titlepage-recto-elements)
246 ;; elements on an article's titlepage
247 (list (normalize "title")
248 (normalize "subtitle")
249 (normalize "authorgroup")
250 (normalize "author")
251 (normalize "othercredit")
252 (normalize "releaseinfo")
253 (normalize "copyright")
254 (normalize "pubdate")
255 (normalize "revhistory")
256 (normalize "abstract")
257 (normalize "legalnotice")))
258
259 (define (process-contrib #!optional (sosofo (process-children)))
260 ;; print out with othercredit information; for translators, etc.
261 (make sequence
262 (make element gi: "SPAN"
263 attributes: (list (list "CLASS" (gi)))
264 (process-children))))
265
266 (define (process-othercredit #!optional (sosofo (process-children)))
267 ;; print out othercredit information; for translators, etc.
268 (let ((author-name (author-string))
269 (author-contrib (select-elements (children (current-node))
270 (normalize "contrib"))))
271 (make element gi: "P"
272 attributes: (list (list "CLASS" (gi)))
273 (make element gi: "B"
274 (literal author-name)
275 (literal " - "))
276 (process-node-list author-contrib))))
277
278 (mode article-titlepage-recto-mode
279 (element contrib (process-contrib))
280 (element othercredit (process-othercredit))
281 )
282
283 (mode book-titlepage-recto-mode
284 (element contrib (process-contrib))
285 (element othercredit (process-othercredit))
286 )
287
288 (define (article-title nd)
289 (let* ((artchild (children nd))
290 (artheader (select-elements artchild (normalize "artheader")))
291 (artinfo (select-elements artchild (normalize "articleinfo")))
292 (ahdr (if (node-list-empty? artheader)
293 artinfo
294 artheader))
295 (ahtitles (select-elements (children ahdr)
296 (normalize "title")))
297 (artitles (select-elements artchild (normalize "title")))
298 (titles (if (node-list-empty? artitles)
299 ahtitles
300 artitles)))
301 (if (node-list-empty? titles)
302 ""
303 (node-list-first titles))))
304
305 (mode subtitle-mode
306 ;; do not print subtitle on subsequent pages
307 (element subtitle (empty-sosofo)))
308
309 ;; Redefinition of $verbatim-display$
310 ;; Origin: dbverb.dsl
311 ;; Different foreground and background colors for verbatim elements
312 ;; Author: Philippe Martin (feloy@free.fr) 2001-04-07
313
314 (define ($verbatim-display$ indent line-numbers?)
315 (let ((verbatim-element (gi))
316 (content (make element gi: "PRE"
317 attributes: (list
318 (list "CLASS" (gi)))
319 (if (or indent line-numbers?)
320 ($verbatim-line-by-line$ indent line-numbers?)
321 (process-children)))))
322 (if %shade-verbatim%
323 (make element gi: "TABLE"
324 attributes: (shade-verbatim-attr-element verbatim-element)
325 (make element gi: "TR"
326 (make element gi: "TD"
327 (make element gi: "FONT"
328 attributes: (list
329 (list "COLOR" (car (shade-verbatim-element-colors
330 verbatim-element))))
331 content))))
332 content)))
333
334 ;;
335 ;; Customize this function
336 ;; to change the foreground and background colors
337 ;; of the different verbatim elements
338 ;; Return (list "foreground color" "background color")
339 ;;
340 (define (shade-verbatim-element-colors element)
341 (case element
342 (("SYNOPSIS") (list "#000000" "#6495ED"))
343 ;; ...
344 ;; Add your verbatim elements here
345 ;; ...
346 (else (list "#000000" "#E0E0E0"))))
347
348 (define (shade-verbatim-attr-element element)
349 (list
350 (list "BORDER"
351 (cond
352 ((equal? element (normalize "SCREEN")) "1")
353 (else "0")))
354 (list "BGCOLOR" (car (cdr (shade-verbatim-element-colors element))))
355 (list "WIDTH" ($table-width$))))
356
357 ;; End of $verbatim-display$ redefinition
358
359 </style-specification-body>
360 </style-specification>
361
362 <external-specification id="docbook" document="docbook.dsl">
363
364 </style-sheet>

  ViewVC Help
Powered by ViewVC 1.1.22