1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
|
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
(define %stylesheet%
#f)
(define %stylesheet-type%
"text/css")
(define %html40%
#t)
(define %generate-legalnotice-link%
;; put the legal notice in a separate file
#f)
(define %admon-graphics-path%
;; use graphics in admonitions, set their
"../images/")
(define %admon-graphics%
#f)
(define %funcsynopsis-decoration%
;; make funcsynopsis look pretty
#t)
(define %html-ext%
;; when producing HTML files, use this extension
".html")
(define %generate-book-toc%
;; Should a Table of Contents be produced for books?
#t)
(define %generate-article-toc%
;; Should a Table of Contents be produced for articles?
#t)
(define %generate-part-toc%
;; Should a Table of Contents be produced for parts?
#t)
(define %generate-book-titlepage%
;; produce a title page for books
#t)
(define %generate-article-titlepage%
;; produce a title page for articles
#t)
(define (chunk-skip-first-element-list)
;; forces the Table of Contents on separate page
'())
(define (list-element-list)
;; fixes bug in Table of Contents generation
'())
(define %root-filename%
;; The filename of the root HTML document (e.g, "index").
"index")
(define %shade-verbatim%
;; verbatim sections will be shaded if t(rue)
#t)
(define %use-id-as-filename%
;; Use ID attributes as name for component HTML files?
#t)
(define %graphic-extensions%
;; graphic extensions allowed
'("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
(define %graphic-default-extension%
"gif")
(define %section-autolabel%
;; For enumerated sections (1.1, 1.1.1, 1.2, etc.)
#t)
(define (toc-depth nd)
;; more depth (2 levels) to toc; instead of flat hierarchy
;; 2)
4)
(element emphasis
;; make role=strong equate to bold for emphasis tag
(if (equal? (attribute-string "role") "strong")
(make element gi: "STRONG" (process-children))
(make element gi: "EM" (process-children))))
(define (book-titlepage-recto-elements)
;; elements on a book's titlepage
;; note: added revhistory to the default list
(list (normalize "title")
(normalize "subtitle")
(normalize "graphic")
(normalize "mediaobject")
(normalize "corpauthor")
(normalize "authorgroup")
(normalize "author")
(normalize "editor")
(normalize "copyright")
(normalize "revhistory")
(normalize "abstract")
(normalize "legalnotice")))
(define (article-titlepage-recto-elements)
;; elements on an article's titlepage
;; note: added othercredit to the default list
(list (normalize "title")
(normalize "subtitle")
(normalize "authorgroup")
(normalize "author")
(normalize "othercredit")
(normalize "releaseinfo")
(normalize "copyright")
(normalize "pubdate")
(normalize "revhistory")
(normalize "abstract")))
(mode article-titlepage-recto-mode
(element contrib
;; print out with othercredit information; for translators, etc.
(make sequence
(make element gi: "SPAN"
attributes: (list (list "CLASS" (gi)))
(process-children))))
(element othercredit
;; print out othercredit information; for translators, etc.
(let ((author-name (author-string))
(author-contrib (select-elements (children (current-node))
(normalize "contrib"))))
(make element gi: "P"
attributes: (list (list "CLASS" (gi)))
(make element gi: "B"
(literal author-name)
(literal " - "))
(process-node-list author-contrib))))
)
(define (article-title nd)
(let* ((artchild (children nd))
(artheader (select-elements artchild (normalize "artheader")))
(artinfo (select-elements artchild (normalize "articleinfo")))
(ahdr (if (node-list-empty? artheader)
artinfo
artheader))
(ahtitles (select-elements (children ahdr)
(normalize "title")))
(artitles (select-elements artchild (normalize "title")))
(titles (if (node-list-empty? artitles)
ahtitles
artitles)))
(if (node-list-empty? titles)
""
(node-list-first titles))))
;; Redefinition of $verbatim-display$
;; Origin: dbverb.dsl
;; Different foreground and background colors for verbatim elements
;; Author: Philippe Martin (feloy@free.fr) 2001-04-07
(define ($verbatim-display$ indent line-numbers?)
(let ((verbatim-element (gi))
(content (make element gi: "PRE"
attributes: (list
(list "CLASS" (gi)))
(if (or indent line-numbers?)
($verbatim-line-by-line$ indent line-numbers?)
(process-children)))))
(if %shade-verbatim%
(make element gi: "TABLE"
attributes: (shade-verbatim-attr-element verbatim-element)
(make element gi: "TR"
(make element gi: "TD"
(make element gi: "FONT"
attributes: (list
(list "COLOR" (car (shade-verbatim-element-colors
verbatim-element))))
content))))
content)))
;;
;; Customize this function
;; to change the foreground and background colors
;; of the different verbatim elements
;; Return (list "foreground color" "background color")
;;
(define (shade-verbatim-element-colors element)
(case element
(("SYNOPSIS") (list "#000000" "#6495ed"))
(("PROGRAMLISTING") (list "#000000" "#E0E0E0"))
;; ...
;; Add your verbatim elements here
;; ...
(else (list "#32CD32" "#000000"))))
(define (shade-verbatim-attr-element element)
(list
(list "BORDER" "0")
(list "BGCOLOR" (car (cdr (shade-verbatim-element-colors element))))
(list "WIDTH" ($table-width$))))
;; End of $verbatim-display$ redefinition
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>
|