Thu, 27 Sep 2018 23:13:41 +0200
Added new recipe screens and wizzard.
0 | 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 PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl> | |
6 | ]]> | |
7 | <!ENTITY % print "INCLUDE"> | |
8 | <![%print;[ | |
9 | <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl> | |
10 | ]]> | |
11 | ]> | |
12 | ||
13 | <!-- | |
14 | ;;####################################################################### | |
15 | ;;# # | |
16 | ;;# The GNOME Documentation Project's # | |
17 | ;;# Custion DocBook Stylesheet Layer # | |
18 | ;;# by Dave Mason dcm@redhat.com # | |
19 | ;;# Based on Norman Walsh's Modular Stylesheets # | |
20 | ;;# # | |
21 | ;;# This is intended as a drop-in replacement for # | |
22 | ;;# the cygnus-both.dsl file in DocBook Tools. # | |
23 | ;;# Just copy it to the location dbtools created # | |
24 | ;;# and rename it cygnus-both.dsl # | |
25 | ;;# # | |
26 | ;;# This is Version 1.0-4 # | |
27 | ;;# patched to fix RTF output (#49677) # | |
28 | ;;# patched to work with docbook-dsssl-1.72 # | |
29 | ;;# patched for ADDRESS output (#50605) # | |
30 | ;;# removed comment and remark # | |
31 | ;;# disabled use-id-as-filename # | |
32 | ;;# don't define %graphic-default-extension% # | |
33 | ;;####################################################################### | |
34 | --> | |
35 | ||
36 | <style-sheet> | |
37 | ||
38 | ||
39 | <style-specification id="print" use="docbook"> | |
40 | <style-specification-body> | |
41 | ||
42 | ;;========================================================================== | |
43 | ||
44 | ;;========================================================================== | |
45 | ||
46 | ;;====================================== | |
47 | ;;General Options | |
48 | ;;====================================== | |
49 | ||
50 | ;;Do you want to print on both sides of the paper? | |
51 | (define %two-side% #t) | |
52 | ||
53 | ;;Do you want enumerated sections? (E.g, 1.1, 1.1.1, 1.2, etc.) | |
54 | (define %section-autolabel% #t) | |
55 | ||
56 | ;;Show URL links? If the text of the link and the URL are identical, | |
57 | ;;the parenthetical URL is suppressed. | |
58 | (define %show-ulinks% #t) | |
59 | ||
60 | ;Make Ulinks footnotes to stop bleeding in the edges - this increases | |
61 | ;'jade --> print' time tremendously keep this in mind before | |
62 | ;complaining! | |
63 | (define %footnote-ulinks% #f) | |
64 | ||
65 | ;;Tex Backend on | |
66 | (define tex-backend #t) | |
67 | ||
68 | ;;Define Line Spacing | |
69 | (define %line-spacing-factor% 1.1) | |
70 | ||
71 | ;;Define the Paragraph Style | |
72 | (define para-style | |
73 | (style | |
74 | font-size: %bf-size% | |
75 | font-weight: 'medium | |
76 | font-posture: 'upright | |
77 | font-family-name: %body-font-family% | |
78 | line-spacing: (* %bf-size% %line-spacing-factor%))) | |
79 | ||
80 | (define ($object-titles-after$) | |
81 | (list (normalize "figure"))) | |
82 | ||
83 | ;;====================================== | |
84 | ;;Book Options | |
85 | ;;====================================== | |
86 | ||
87 | ||
88 | ;;Do you want a title page for a Book? | |
89 | (define %generate-book-titlepage% #t) | |
90 | ||
91 | ;;Do you want a separate page for the title? | |
92 | (define %generate-book-titlepage-on-separate-page% #t) | |
93 | ||
94 | ;;Generate Book TOC? | |
95 | (define %generate-book-toc% #t) | |
96 | ||
97 | ;;What depth should the TOC generate? | |
98 | ;;!Only top level of appendixes! | |
99 | (define (toc-depth nd) | |
100 | (if (string=? (gi nd) (normalize "book")) | |
101 | 3 | |
102 | (if (string=? (gi nd) (normalize "appendix")) | |
103 | 0 | |
104 | 1))) | |
105 | ||
106 | ;;Do you want a TOC for the element part? | |
107 | (define %generate-part-toc% #f) | |
108 | ||
109 | ;;Do you want the part toc on the part titlepage or separate? | |
110 | (define %generate-part-toc-on-titlepage% #t) | |
111 | ||
112 | ;;Generate Part Title Page? | |
113 | (define %generate-part-titlepage% #f) | |
114 | ||
115 | ;;Do you want the Part intro on the part title page? | |
116 | (define %generate-partintro-on-titlepage% #t) | |
117 | ||
118 | ;;What elements should have a LOT? | |
119 | (define ($generate-book-lot-list$) (list (normalize "equation"))) | |
120 | ||
121 | ;;Do you want chapters enumerated? | |
122 | (define %chapter-autolabel% #t) | |
123 | ||
124 | ;;Do you want Chapter's and Appendix's | |
125 | ;;to have automatic labels? | |
126 | (define %chap-app-running-head-autolabel% #t) | |
127 | ||
128 | ||
129 | ;;====================================== | |
130 | ;;Article Options | |
131 | ;;====================================== | |
132 | ||
133 | ;;Do you want a title page for an Article? | |
134 | (define %generate-article-titlepage% #t) | |
135 | ||
136 | ;;Generate Article TOC? | |
137 | (define %generate-article-toc% #t) | |
138 | ||
139 | ;;Do you want a separate page for the title? | |
140 | (define %generate-article-titlepage-on-separate-page% #t) | |
141 | ||
142 | ;;Do you want the article toc on the titlepage or separate? | |
143 | (define %generate-article-toc-on-titlepage% #t) | |
144 | ||
145 | ;;Do you want to start new page numbers with each article? | |
146 | (define %article-page-number-restart% #f) | |
147 | ||
148 | ;;Titlepage Separate? | |
149 | (define (chunk-skip-first-element-list) '()) | |
150 | ||
151 | ;;Titlepage Not Separate | |
152 | ;(define (chunk-skip-first-element-list) | |
153 | ; (list (normalize "sect1") | |
154 | ; (normalize "section"))) | |
155 | ||
156 | ;;====================================== | |
157 | ;;Columns | |
158 | ;;====================================== | |
159 | ||
160 | ;;How many columns do you want? | |
161 | (define %page-n-columns% 1) | |
162 | ||
163 | ;;How much space between columns? | |
164 | (define %page-column-sep% 0.2in) | |
165 | ||
166 | ;;How many Columns on the titlepage? | |
167 | (define %titlepage-n-columns% 1) | |
168 | ||
169 | ;;Balance columns? | |
170 | (define %page-balance-colums% #t) | |
171 | ||
172 | ;;====================================== | |
173 | ;;Fonts | |
174 | ;;====================================== | |
175 | ||
176 | ;;Defines the general size of the text in the document. normal(10), | |
177 | ;;presbyopic(12), and large-type(24). | |
178 | (define %visual-acuity% "normal") | |
179 | ||
180 | ;;What font would you like for titles? | |
181 | (define %title-font-family% "Helvetica") | |
182 | ||
183 | ;;What font would you like for the body? | |
184 | (define %body-font-family% "Palatino") | |
185 | ||
186 | ;;What font would you like for mono-seq? | |
187 | (define %mono-font-family% "Courier New") | |
188 | ||
189 | ;;If the base fontsize is 10pt, and '%hsize-bump-factor%' is | |
190 | ;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc | |
191 | (define %hsize-bump-factor% 1.1) | |
192 | ||
193 | ;;What size do you want the body fonts? | |
194 | (define %bf-size% | |
195 | (case %visual-acuity% | |
196 | (("tiny") 8pt) | |
197 | (("normal") 10pt) | |
198 | (("presbyopic") 12pt) | |
199 | (("large-type") 24pt))) | |
200 | ||
201 | (define-unit em %bf-size%) | |
202 | ||
203 | ;;====================================== | |
204 | ;;Margins | |
205 | ;;====================================== | |
206 | ||
207 | (define %left-right-margin% 6pi) | |
208 | ||
209 | ;;How much indentation for the body? | |
210 | (define %body-start-indent% 4pi) | |
211 | ||
212 | ;;How big is the left margin? (relative to physical page) | |
213 | (define %left-margin% 8pi) ;white-paper-column | |
214 | ||
215 | ;;How big is the right margin? (relative to physical page) | |
216 | (define %right-margin% 8pi) ;white-paper-column | |
217 | ||
218 | ;;How big do you want the margin at the top? | |
219 | (define %top-margin% | |
220 | (if (equal? %visual-acuity% "large-type") | |
221 | 7.5pi | |
222 | 6pi)) | |
223 | ||
224 | ;;How big do you want the margin at the bottom? | |
225 | (define %bottom-margin% | |
226 | (if (equal? %visual-acuity% "large-type") | |
227 | 7.5pi | |
228 | 5pi)) | |
229 | ||
230 | ;;Define the text width. (Change the elements in the formula rather | |
231 | ;;than the formula itself) | |
232 | ;(define %text-width% (- %page-width% (* %left-right-margin% 2))) | |
233 | (define %text-width% (- %page-width% (+ %left-margin% %right-margin%))) | |
234 | ||
235 | ;;Define the body width. (Change the elements in the formula rather | |
236 | ;;than the formula itself) | |
237 | (define %body-width% (- %text-width% %body-start-indent%)) | |
238 | ||
239 | ;;Define distance between paragraphs | |
240 | (define %para-sep% (/ %bf-size% 2.0)) | |
241 | ||
242 | ;;Define distance between block elements (figures, tables, etc.). | |
243 | (define %block-sep% (* %para-sep% 2.0)) | |
244 | ||
245 | ;;Indent block elements? | |
246 | (define %block-start-indent% 0pt) | |
247 | ;0pt | |
248 | ||
249 | ;;====================================== | |
250 | ;;Admon Graphics | |
251 | ;;====================================== | |
252 | ||
253 | ;;Do you want admon graohics on? | |
254 | (define %admon-graphics% #f) | |
255 | ||
256 | ;;Where are the admon graphics? | |
257 | (define %admon-graphics-path% "../images/") | |
258 | ||
259 | ;;====================================== | |
260 | ;;Quadding | |
261 | ;;====================================== | |
262 | ||
263 | ;;What quadding do you want by default; start, center, justify, or end? | |
264 | (define %default-quadding% 'justify) | |
265 | ||
266 | ;;What quadding for component titles(Chapter, Appendix, etc)? | |
267 | (define %component-title-quadding% 'start) | |
268 | ||
269 | ;;What quadding for section titles? | |
270 | (define %section-title-quadding% 'start) | |
271 | ||
272 | ;;What quadding for section sub-titles? | |
273 | (define %section-subtitle-quadding% 'start) | |
274 | ||
275 | ;;What quadding for article title? | |
276 | (define %article-title-quadding% 'center) | |
277 | ||
278 | ;;What quadding for article sub-titles? | |
279 | (define %article-subtitle-quadding% 'center) | |
280 | ||
281 | ;;What quadding for division subtitles? | |
282 | (define %division-subtitle-quadding% 'start) | |
283 | ||
284 | ;;What quadding for component subtitles? | |
285 | (define %component-subtitle-quadding% 'start) | |
286 | ||
287 | ||
288 | ||
289 | ||
290 | ;;====================================== | |
291 | ;;Paper Options | |
292 | ;;====================================== | |
293 | ||
294 | ;;What size paper do you need? A4, USletter, USlandscape, or RedHat? | |
295 | (define %paper-type% "A4") | |
296 | ||
297 | ;;Now define those paper types' width | |
298 | (define %page-width% | |
299 | (case %paper-type% | |
300 | (("A4") 210mm) | |
301 | (("USletter") 8.5in) | |
302 | (("USlandscape") 11in))) | |
303 | ||
304 | ;;Now define those paper types' height | |
305 | (define %page-height% | |
306 | (case %paper-type% | |
307 | (("A4") 297mm) | |
308 | (("USletter") 11in) | |
309 | (("USlandscape") 8.5in))) | |
310 | ||
311 | ;;====================================== | |
312 | ;;Functions | |
313 | ;;====================================== | |
314 | ||
315 | (define (OLSTEP) | |
316 | (case | |
317 | (modulo (length (hierarchical-number-recursive "ORDEREDLIST")) 4) | |
318 | ((1) 1.2em) | |
319 | ((2) 1.2em) | |
320 | ((3) 1.6em) | |
321 | ((0) 1.4em))) | |
322 | ||
323 | (define (ILSTEP) 1.0em) | |
324 | ||
325 | (define (PROCSTEP ilvl) | |
326 | (if (> ilvl 1) 1.8em 1.4em)) | |
327 | ||
328 | (define (PROCWID ilvl) | |
329 | (if (> ilvl 1) 1.8em 1.4em)) | |
330 | ||
331 | ||
332 | (define ($comptitle$) | |
333 | (make paragraph | |
334 | font-family-name: %title-font-family% | |
335 | font-weight: 'bold | |
336 | font-size: (HSIZE 2) | |
337 | line-spacing: (* (HSIZE 2) %line-spacing-factor%) | |
338 | space-before: (* (HSIZE 2) %head-before-factor%) | |
339 | space-after: (* (HSIZE 2) %head-after-factor%) | |
340 | start-indent: 0pt | |
341 | first-line-start-indent: 0pt | |
342 | quadding: 'start | |
343 | keep-with-next?: #t | |
344 | (process-children-trim))) | |
345 | ||
346 | ;;Callouts are confusing in Postscript... fix them. | |
347 | (define %callout-fancy-bug% #f) | |
348 | ||
349 | ||
350 | ;;By default perils are centered and dropped into a box with a really | |
351 | ;;big border - I have simply decreased the border thickness - | |
352 | ;;unfortunately it takes all this to do it - sigh. | |
353 | (define ($peril$) | |
354 | (let* ((title (select-elements | |
355 | (children (current-node)) (normalize "title"))) | |
356 | (has-title (not (node-list-empty? title))) | |
357 | (adm-title (if has-title | |
358 | (make sequence | |
359 | (with-mode title-sosofo-mode | |
360 | (process-node-list (node-list-first title)))) | |
361 | (literal | |
362 | (gentext-element-name | |
363 | (current-node))))) | |
364 | (hs (HSIZE 2))) | |
365 | (if %admon-graphics% | |
366 | ($graphical-admonition$) | |
367 | (make display-group | |
368 | space-before: %block-sep% | |
369 | space-after: %block-sep% | |
370 | font-family-name: %admon-font-family% | |
371 | font-size: (- %bf-size% 1pt) | |
372 | font-weight: 'medium | |
373 | font-posture: 'upright | |
374 | line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%) | |
375 | (make box | |
376 | display?: #t | |
377 | box-type: 'border | |
378 | line-thickness: .5pt | |
379 | start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt) | |
380 | end-indent: (inherited-end-indent) | |
381 | (make paragraph | |
382 | space-before: %para-sep% | |
383 | space-after: %para-sep% | |
384 | start-indent: 1em | |
385 | end-indent: 1em | |
386 | font-family-name: %title-font-family% | |
387 | font-weight: 'bold | |
388 | font-size: hs | |
389 | line-spacing: (* hs %line-spacing-factor%) | |
390 | quadding: 'center | |
391 | keep-with-next?: #t | |
392 | adm-title) | |
393 | (process-children)))))) | |
394 | ||
395 | ||
396 | ;;====================================== | |
397 | ;;Non-printing Elements | |
398 | ;;====================================== | |
399 | (element TITLEABBREV (empty-sosofo)) | |
400 | (element SUBTITLE (empty-sosofo)) | |
401 | (element SETINFO (empty-sosofo)) | |
402 | (element BOOKINFO (empty-sosofo)) | |
403 | (element BIBLIOENTRY (empty-sosofo)) | |
404 | (element BIBLIOMISC (empty-sosofo)) | |
405 | (element BOOKBIBLIO (empty-sosofo)) | |
406 | (element SERIESINFO (empty-sosofo)) | |
407 | (element DOCINFO (empty-sosofo)) | |
408 | (element ARTHEADER (empty-sosofo)) | |
409 | ;;(element ADDRESS (empty-sosofo)) | |
410 | ||
411 | ;;Show comment element? | |
412 | (define %show-comments% #t) | |
413 | ||
414 | ;;====================================== | |
415 | ;;Formalpara titles | |
416 | ;;====================================== | |
417 | ||
418 | ||
419 | ;;Change the way Formal Paragraph titles are displayed. The commented | |
420 | ;;out section will run the titles in the paragraphs. | |
421 | (element (formalpara title) | |
422 | ;(make sequence | |
423 | ;font-weight: 'bold | |
424 | ;($runinhead$)) | |
425 | ($lowtitle$ 5 7)) | |
426 | ||
427 | ;;====================================== | |
428 | ;;Inlines | |
429 | ;;====================================== | |
430 | ||
431 | (element application ($mono-seq$)) | |
432 | (element command ($bold-seq$)) | |
433 | (element filename ($mono-seq$)) | |
434 | (element function ($mono-seq$)) | |
435 | (element guibutton ($bold-seq$)) | |
436 | (element guiicon ($bold-seq$)) | |
437 | (element guilabel ($italic-seq$)) | |
438 | (element guimenu ($bold-seq$)) | |
439 | (element guimenuitem ($bold-seq$)) | |
440 | (element hardware ($bold-mono-seq$)) | |
441 | (element keycap ($bold-seq$)) | |
442 | (element literal ($mono-seq$)) | |
443 | (element parameter ($italic-mono-seq$)) | |
444 | (element prompt ($mono-seq$)) | |
445 | (element symbol ($charseq$)) | |
446 | (element emphasis ($italic-seq$)) | |
447 | ||
448 | </style-specification-body> | |
449 | </style-specification> | |
450 | ||
451 | ||
452 | <!-- | |
453 | ;;=========================================================================== | |
454 | ;; HTML | |
455 | ;;=========================================================================== | |
456 | --> | |
457 | ||
458 | <style-specification id="html" use="docbook"> | |
459 | <style-specification-body> | |
460 | ||
461 | ;; this is necessary because right now jadetex does not understand | |
462 | ;; symbolic entities, whereas things work well with numeric entities. | |
463 | (declare-characteristic preserve-sdata? | |
464 | "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" | |
465 | #f) | |
466 | ||
467 | ||
468 | ;;========================= | |
469 | ;;Header HTML 4.0.1 | |
470 | ;;========================= | |
471 | ||
472 | (define %html-pubid% "-//W3C//DTD HTML 4.01//EN") | |
473 | ||
474 | ;;========================= | |
475 | ;;Common Stuff | |
476 | ;;========================= | |
477 | ||
478 | ;;Should there be a link to the legalnotice? | |
479 | (define %generate-legalnotice-link% #t) | |
480 | ||
481 | ;;What graphics extensions allowed? | |
482 | (define %graphic-extensions% '("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" )) | |
483 | ||
484 | ;;What is the default extension for images? | |
485 | (define %graphic-default-extension% "png") | |
486 | ||
487 | ;;Use element ids as filenames? | |
488 | (define %use-id-as-filename% #f) | |
489 | ||
490 | ||
491 | ;;========================= | |
492 | ;;Book Stuff | |
493 | ;;========================= | |
494 | ||
495 | ;;Do you want a TOC for Books? | |
496 | (define %generate-book-toc% #t) | |
497 | ||
498 | ;;What depth should the TOC generate? | |
499 | ;;!Only top level of appendixes! | |
500 | (define (toc-depth nd) | |
501 | (if (string=? (gi nd) (normalize "book")) | |
502 | 3 | |
503 | (if (string=? (gi nd) (normalize "appendix")) | |
504 | 0 | |
505 | 1))) | |
506 | ||
507 | ;;What elements should have an LOT? | |
508 | (define ($generate-book-lot-list$) (list (normalize "equation"))) | |
509 | ||
510 | ;;Do you want a title page for your Book? | |
511 | (define %generate-book-titlepage% #t) | |
512 | ||
513 | ;;========================= | |
514 | ;;Part Stuff | |
515 | ;;========================= | |
516 | ||
517 | ;;Should parts have TOCs? | |
518 | (define %generate-part-toc% #t) | |
519 | ||
520 | ;;Should part TOCs be on their titlepages? | |
521 | (define %generate-part-toc-on-titlepage% #t) | |
522 | ||
523 | ;;Do you want a title page for your part? | |
524 | (define %generate-part-titlepage% #t) | |
525 | ||
526 | ;;Should the Part intro be on the part title page? | |
527 | (define %generate-partintro-on-titlepage% #t) | |
528 | ||
529 | (define %para-autolabel% #t) | |
530 | ||
531 | ;;======================== | |
532 | ;;Chapter Stuff | |
533 | ;;======================= | |
534 | ||
535 | ;;No TOCs in Chapters | |
536 | (define $generate-chapter-toc$ (lambda () #f)) | |
537 | ||
538 | ;;========================= | |
539 | ;;Navigation | |
540 | ;;========================= | |
541 | ||
542 | ;;Should there be navigation at top? | |
543 | (define %header-navigation% #t) | |
544 | ||
545 | ;;Should there be navigation at bottom? | |
546 | (define %footer-navigation% #t) | |
547 | ||
548 | ;;Use tables to create the navigation? | |
549 | (define %gentext-nav-use-tables% #t) | |
550 | ||
551 | ;;If tables are used for navigation, | |
552 | ;;how wide should they be? | |
553 | (define %gentext-nav-tblwidth% "100%") | |
554 | ||
555 | ;;Add arrows to navigation (comment these | |
556 | ;;out if you want admon graphics here) | |
557 | (define (gentext-en-nav-prev prev) (make sequence (literal "<<< Previous"))) | |
558 | ||
559 | ;;Add arrows to navigation (comment these | |
560 | ;;out if you want admon graphics here) | |
561 | (define (gentext-en-nav-next next) (make sequence (literal "Next >>>"))) | |
562 | ||
563 | ||
564 | ;;========================= | |
565 | ;;Tables and Lists | |
566 | ;;========================= | |
567 | ||
568 | ;;Should Variable lists be tables? | |
569 | (define %always-format-variablelist-as-table% #f) | |
570 | ||
571 | ;;What is the length of the 'Term' in a variablelist? | |
572 | (define %default-variablelist-termlength% 20) | |
573 | ||
574 | ;;When true | If the terms are shorter than | |
575 | ;;the termlength above then the variablelist | |
576 | ;;will be formatted as a table. | |
577 | (define %may-format-variablelist-as-table% #f) | |
578 | ||
579 | ;;This overrides the tgroup definition | |
580 | ;;(copied from 1.20, dbtable.dsl). | |
581 | ;;It changes the table background color, | |
582 | ;;cell spacing and cell padding. | |
583 | ;;This is based on gtk-doc additions - thanks! | |
584 | ||
585 | (element tgroup | |
586 | (let* ((wrapper (parent (current-node))) | |
587 | (frameattr (attribute-string (normalize "frame") wrapper)) | |
588 | (pgwide (attribute-string (normalize "pgwide") wrapper)) | |
589 | (footnotes (select-elements (descendants (current-node)) | |
590 | (normalize "footnote"))) | |
591 | (border (if (equal? frameattr (normalize "none")) | |
592 | '(("BORDER" "0")) | |
593 | '(("BORDER" "1")))) | |
594 | (bgcolor '(("BGCOLOR" "#E0E0E0"))) | |
595 | (width (if (equal? pgwide "1") | |
596 | (list (list "WIDTH" ($table-width$))) | |
597 | '())) | |
598 | (head (select-elements (children (current-node)) (normalize "thead"))) | |
599 | (body (select-elements (children (current-node)) (normalize "tbody"))) | |
600 | (feet (select-elements (children (current-node)) (normalize "tfoot")))) | |
601 | (make element gi: "TABLE" | |
602 | attributes: (append | |
603 | border | |
604 | width | |
605 | bgcolor | |
606 | '(("CELLSPACING" "0")) | |
607 | '(("CELLPADDING" "4")) | |
608 | (if %cals-table-class% | |
609 | (list (list "CLASS" %cals-table-class%)) | |
610 | '())) | |
611 | (process-node-list head) | |
612 | (process-node-list body) | |
613 | (process-node-list feet) | |
614 | (make-table-endnotes)))) | |
615 | ||
616 | ;;=================== | |
617 | ;; Admon Graphics | |
618 | ;;=================== | |
619 | ||
620 | ;;Should Admon Graphics be used? | |
621 | (define %admon-graphics% #t) | |
622 | ||
623 | ;;Where are those admon graphics? | |
624 | (define %admon-graphics-path% "./stylesheet-images/") | |
625 | ||
626 | ;;Given an admonition node, returns the | |
627 | ;;name of the graphic that should | |
628 | ;;be used for that admonition. | |
629 | ;;Define admon graphics usage | |
630 | ;;NOTE these will change to pngs | |
631 | ;;soon in the GDP when Tigert gets | |
632 | ;;the time to make special ones for us! | |
633 | (define ($admon-graphic$ #!optional (nd (current-node))) | |
634 | (cond ((equal? (gi nd) (normalize "tip")) | |
635 | (string-append %admon-graphics-path% "tip.gif")) | |
636 | ((equal? (gi nd) (normalize "note")) | |
637 | (string-append %admon-graphics-path% "note.gif")) | |
638 | ((equal? (gi nd) (normalize "important")) | |
639 | (string-append %admon-graphics-path% "important.gif")) | |
640 | ((equal? (gi nd) (normalize "caution")) | |
641 | (string-append %admon-graphics-path% "caution.gif")) | |
642 | ((equal? (gi nd) (normalize "warning")) | |
643 | (string-append %admon-graphics-path% "warning.gif")) | |
644 | (else (error (string-append (gi nd) " is not an admonition."))))) | |
645 | ||
646 | ;;Given an admonition node, returns | |
647 | ;;the width of the graphic that will | |
648 | ;;be used for that admonition. | |
649 | (define ($admon-graphic-width$ #!optional (nd (current-node))) "25") | |
650 | ||
651 | ;;========================= | |
652 | ;;Labels | |
653 | ;;========================= | |
654 | ||
655 | ;;Enumerate Chapters? | |
656 | (define %chapter-autolabel% #t) | |
657 | ||
658 | ;;Enumerate Sections? | |
659 | (define %section-autolabel% #f) | |
660 | ||
661 | ;;========================= | |
662 | ;; HTML Attributes | |
663 | ;;========================= | |
664 | ||
665 | ;;What attributes should be hung off | |
666 | ;;of 'body'? | |
667 | (define %body-attr% | |
668 | (list | |
669 | (list "BGCOLOR" "#FFFFFF") | |
670 | (list "TEXT" "#000000") | |
671 | (list "LINK" "#0000FF") | |
672 | (list "VLINK" "#840084") | |
673 | (list "ALINK" "#0000FF"))) | |
674 | ||
675 | ;;Default extension for filenames? | |
676 | (define %html-ext% ".html") | |
677 | ||
678 | ;;Use a CSS stylesheet? | |
679 | ;;Which one? Should work on | |
680 | ;;this one soon | |
681 | ;(define %stylesheet% | |
682 | ; "./gnome.css") | |
683 | ||
684 | ;;Use it | |
685 | ;(define %stylesheet-type% | |
686 | ;"text/css") | |
687 | ||
688 | ||
689 | ;;======================== | |
690 | ;;Title Pages for Books | |
691 | ;;======================= | |
692 | ||
693 | (define (book-titlepage-recto-elements) | |
694 | (list (normalize "title") | |
695 | (normalize "subtitle") | |
696 | (normalize "corpauthor") | |
697 | (normalize "authorgroup") | |
698 | (normalize "author") | |
699 | (normalize "orgname") | |
700 | (normalize "graphic") | |
701 | (normalize "copyright") | |
702 | (normalize "legalnotice") | |
703 | (normalize "releaseinfo") | |
704 | (normalize "publisher") | |
705 | (normalize "isbn"))) | |
706 | ||
707 | ;;======================== | |
708 | ;;Title Pages for Articles | |
709 | ;;======================== | |
710 | ||
711 | ;;Should Articles have a TOC? | |
712 | (define %generate-article-toc% #t) | |
713 | ||
714 | ;;Which elements should appear | |
715 | ;;on title page? | |
716 | (define (article-titlepage-recto-elements) | |
717 | (list (normalize "title") | |
718 | (normalize "subtitle") | |
719 | (normalize "authorgroup") | |
720 | (normalize "copyright") | |
721 | (normalize "legalnotice") | |
722 | (normalize "abstract"))) | |
723 | ||
724 | ;;How should elements on title page look? | |
725 | (mode article-titlepage-recto-mode | |
726 | ||
727 | ;;Author name is too big - change it! | |
728 | (element author | |
729 | (let ((author-name (author-string)) | |
730 | (author-affil (select-elements (children (current-node)) | |
731 | (normalize "affiliation")))) | |
732 | (make sequence | |
733 | (make element gi: "H4" | |
734 | attributes: (list (list "CLASS" (gi))) | |
735 | (make element gi: "A" | |
736 | attributes: (list (list "NAME" (element-id))) | |
737 | (literal author-name))) | |
738 | (process-node-list author-affil)))) | |
739 | ||
740 | ;;Address? | |
741 | (element address | |
742 | (make sequence | |
743 | (make element gi: "DIV" | |
744 | attributes: (list (list "CLASS" (gi))) | |
745 | (process-children)))) | |
746 | ||
747 | ;;Get rid of spam-producing "mailto" links | |
748 | ;;and get rid of email indentation | |
749 | (element email | |
750 | (make sequence | |
751 | (make element gi: "DIV" | |
752 | attributes: (list (list "CLASS" (gi))) | |
753 | (process-children)))) | |
754 | ||
755 | ;;Point Abstract to custom table function | |
756 | ;;(See $dcm-abstract-object$ below. For default | |
757 | ;;use $semiformal-object$ | |
758 | (element abstract | |
759 | (make element gi: "DIV" | |
760 | ($dcm-abstract-object$))) | |
761 | ||
762 | (element (abstract title) (empty-sosofo)) | |
763 | ||
764 | ;;subtitle sizing | |
765 | (element subtitle | |
766 | (make element gi: "H4" | |
767 | attributes: (list (list "CLASS" (gi))) | |
768 | (process-children-trim)))) | |
769 | ||
770 | ;;================= | |
771 | ;; INLINES | |
772 | ;;================= | |
773 | ||
774 | ;Define my own series of fonts for various elements | |
775 | (element application ($mono-seq$)) | |
776 | (element command ($bold-seq$)) | |
777 | (element filename ($mono-seq$)) | |
778 | (element function ($mono-seq$)) | |
779 | (element guibutton ($bold-seq$)) | |
780 | (element guiicon ($bold-seq$)) | |
781 | (element guilabel ($bold-mono-seq$)) | |
782 | (element guimenu ($bold-seq$)) | |
783 | (element guimenuitem ($bold-seq$)) | |
784 | (element guisubmenu ($bold-seq$)) | |
785 | (element hardware ($bold-mono-seq$)) | |
786 | (element keycap ($bold-seq$)) | |
787 | (element literal ($mono-seq$)) | |
788 | (element parameter ($italic-mono-seq$)) | |
789 | (element prompt ($mono-seq$)) | |
790 | (element symbol ($charseq$)) | |
791 | (element emphasis ($italic-seq$)) | |
792 | ||
793 | ;;Show comment element? | |
794 | (define %show-comments% #t) | |
795 | ||
796 | ;;==================== | |
797 | ;; General Formatting | |
798 | ;;==================== | |
799 | ||
800 | ;;Formal Paras are ugly by default! | |
801 | ;;Make the title run in - otherwise | |
802 | ;;you should use a sect! | |
803 | (element formalpara | |
804 | (make element gi: "DIV" | |
805 | attributes: (list | |
806 | (list "CLASS" (gi))) | |
807 | (make element gi: "P" | |
808 | (process-children)))) | |
809 | ||
810 | ;;This is the old one | |
811 | ;(element (formalpara title) | |
812 | ;($lowtitle$ 5)) | |
813 | ||
814 | ;;This is the new one | |
815 | (element (formalpara title) | |
816 | (make element gi: "B" | |
817 | ($runinhead$))) | |
818 | ||
819 | ;;Make captions come after objects in the list | |
820 | (define ($object-titles-after$) | |
821 | (list (normalize "figure"))) | |
822 | ||
823 | ||
824 | ;; Handle qanda labelling with Q: A: | |
825 | (define (qanda-defaultlabel) | |
826 | (normalize "qanda")) | |
827 | ||
828 | ;;From FreeBSD Sheets (Thanks!) Display Q and A in bigger bolder fonts | |
829 | ||
830 | (element question | |
831 | (let* ((chlist (children (current-node))) | |
832 | (firstch (node-list-first chlist)) | |
833 | (restch (node-list-rest chlist))) | |
834 | (make element gi: "DIV" | |
835 | attributes: (list (list "CLASS" (gi))) | |
836 | (make element gi: "P" | |
837 | (make element gi: "BIG" | |
838 | (make element gi: "A" | |
839 | attributes: (list | |
840 | (list "NAME" (element-id))) | |
841 | (empty-sosofo)) | |
842 | (make element gi: "B" | |
843 | (literal (question-answer-label | |
844 | (current-node)) " ") | |
845 | (process-node-list (children firstch))))) | |
846 | (process-node-list restch)))) | |
847 | ||
848 | ;;Literal Elements | |
849 | ||
850 | ;;Indent Literal layouts? | |
851 | (define %indent-literallayout-lines% #f) | |
852 | ||
853 | ;;Indent Programlistings? | |
854 | (define %indent-programlisting-lines% #f) | |
855 | ||
856 | ;;Number lines in Programlistings? | |
857 | (define %number-programlisting-lines% #f) | |
858 | ||
859 | ;;Should verbatim items be 'shaded' with a table? | |
860 | (define %shade-verbatim% #t) | |
861 | ||
862 | ;;Define shade-verbatim attributes | |
863 | (define ($shade-verbatim-attr$) | |
864 | (list | |
865 | (list "BORDER" "0") | |
866 | (list "BGCOLOR" "#E0E0E0") | |
867 | (list "WIDTH" ($table-width$)))) | |
868 | ||
869 | ;;=================== | |
870 | ;; Entities | |
871 | ;;=================== | |
872 | ||
873 | ;;Netscape doesn't handle trademark | |
874 | ;;entity right at all!! Get rid of it. | |
875 | ;;Make a TM in a superscipt font. | |
876 | (element trademark | |
877 | (make sequence | |
878 | (process-children) | |
879 | (make element gi: "sup" | |
880 | (literal "TM")))) | |
881 | ||
882 | ||
883 | ;;=================== | |
884 | ;; New Definitions | |
885 | ;;================== | |
886 | ||
887 | (define ($dcm-abstract-object$) | |
888 | (make element gi: "TABLE" | |
889 | attributes: '(("BORDER" "0") | |
890 | ("BGCOLOR" "#E0E0E0") | |
891 | ("WIDTH" "50%") | |
892 | ("CELLSPACING" "0") | |
893 | ("CELLPADDING" "0") | |
894 | ("ALIGN" "CENTER")) | |
895 | (make element gi: "TR" | |
896 | (make element gi: "TD" | |
897 | attributes: '(("VALIGN" "TOP")) | |
898 | (make element gi: "B" | |
899 | (literal "Abstract")))) | |
900 | (make element gi: "TR" | |
901 | (make element gi: "TD" | |
902 | attributes: '(("VALIGN" "TOP")) | |
903 | (process-children))))) | |
904 | ||
905 | ;;Redefine Titlepage Separator on Articles | |
906 | ||
907 | (define (article-titlepage-separator side) | |
908 | (make empty-element gi: "HR" | |
909 | attributes: '(("WIDTH" "75%") | |
910 | ("ALIGN" "CENTER") | |
911 | ("COLOR" "#000000") | |
912 | ("SIZE" "1")))) | |
913 | ||
914 | ||
915 | ||
916 | ||
917 | (define (chunk-element-list) | |
918 | (list (normalize "preface") | |
919 | (normalize "chapter") | |
920 | (normalize "appendix") | |
921 | (normalize "article") | |
922 | (normalize "glossary") | |
923 | (normalize "bibliography") | |
924 | (normalize "index") | |
925 | (normalize "colophon") | |
926 | (normalize "setindex") | |
927 | (normalize "reference") | |
928 | (normalize "refentry") | |
929 | (normalize "part") | |
930 | (normalize "sect1") | |
931 | (normalize "section") | |
932 | (normalize "book") ;; just in case nothing else matches... | |
933 | (normalize "set") ;; sets are definitely chunks... | |
934 | )) | |
935 | ||
936 | ;;Do you want Callouts to be graphics? | |
937 | (define %callout-graphics% #f) | |
938 | ||
939 | ||
940 | ;;Make Callout graphics PNGs | |
941 | (define %callout-graphics-path% "./imagelib/callouts/") | |
942 | ||
943 | ;; Redefine $callout-bug$ to support the %callout-graphic-ext% | |
944 | ;; variable. | |
945 | (define ($callout-bug$ conumber) | |
946 | (let ((number (if conumber (format-number conumber "1") "0"))) | |
947 | (if conumber | |
948 | (if %callout-graphics% | |
949 | (if (<= conumber %callout-graphics-number-limit%) | |
950 | (make empty-element gi: "IMG" | |
951 | attributes: (list (list "SRC" | |
952 | (root-rel-path | |
953 | (string-append | |
954 | %callout-graphics-path% | |
955 | number | |
956 | %callout-graphics-ext%))) | |
957 | (list "HSPACE" "0") | |
958 | (list "VSPACE" "0") | |
959 | (list "BORDER" "0") | |
960 | (list "ALT" | |
961 | (string-append | |
962 | "(" number ")")))) | |
963 | (make element gi: "B" | |
964 | (literal "(" (format-number conumber "1") ")"))) | |
965 | (make element gi: "B" | |
966 | (literal "(" (format-number conumber "1") ")"))) | |
967 | (make element gi: "B" | |
968 | (literal "(??)"))))) | |
969 | ||
970 | </style-specification-body> | |
971 | </style-specification> | |
972 | ||
973 | <external-specification id="docbook" document="docbook.dsl"> | |
974 | ||
975 | </style-sheet> |