Back to home page

MITgcm

 
 

    


Warning, /doc/old_doc/ldp.dsl is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit ad38444b on 2018-01-31 20:35:48 UTC
8eab949e1c Ed H*0001 <!DOCTYPE style-sheet PUBLIC
                0002           "-//James Clark//DTD DSSSL Style Sheet//EN" [
                0003 <!ENTITY % html "IGNORE">
                0004 <![%html;[
                0005 <!ENTITY % print "IGNORE">
                0006 <!ENTITY docbook.dsl PUBLIC
                0007          "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN"
                0008          CDATA dsssl>
                0009 ]]>
                0010 <!ENTITY % print "INCLUDE">
                0011 <![%print;[
                0012 <!ENTITY docbook.dsl PUBLIC
                0013          "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN"
                0014          CDATA dsssl>
                0015 ]]>
                0016 ]>
                0017 
                0018 <style-sheet>
                0019 
880d91dbcc Jean*0020 <!--
8eab949e1c Ed H*0021 ;; ------------------------------------------------------------------------
                0022 ;; ldp.dsl - LDP Customized DSSSL Stylesheet
                0023 ;; v1.11, 2003-02-03
                0024 ;; Copyright (C) 2000-2003
                0025 ;;
                0026 ;; This program is free software; you can redistribute it and/or modify
                0027 ;; it under the terms of the GNU General Public License as published by
                0028 ;; the Free Software Foundation; either version 2 of the License, or
                0029 ;; (at your option) any later version.
                0030 ;;
                0031 ;; This program is distributed in the hope that it will be useful,
                0032 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
                0033 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                0034 ;; GNU General Public License for more details.
                0035 ;;
                0036 ;; You should have received a copy of the GNU General Public License
                0037 ;; along with this program; if not, write to the Free Software
                0038 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
                0039 ;; ------------------------------------------------------------------------
880d91dbcc Jean*0040 -->
8eab949e1c Ed H*0041 
                0042 <style-specification id="print" use="docbook">
                0043 <style-specification-body> 
                0044 
                0045 ;; customize the print stylesheet
                0046 
                0047 (declare-characteristic preserve-sdata?
                0048   ;; this is necessary because right now jadetex does not understand
                0049   ;; symbolic entities, whereas things work well with numeric entities.
                0050   "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
                0051   #f)
                0052 
                0053 (define %generate-article-toc%
                0054   ;; Should a Table of Contents be produced for Articles?
                0055   #t)
                0056 
                0057 (define (toc-depth nd)
                0058   4)
                0059 
                0060 (define %generate-article-titlepage-on-separate-page%
                0061   ;; Should the article title page be on a separate page?
                0062   #t)
                0063 
                0064 (define %section-autolabel%
                0065   ;; Are sections enumerated?
                0066   #t)
                0067 
                0068 (define %footnote-ulinks%
                0069   ;; Generate footnotes for ULinks?
                0070   #f)
                0071 
                0072 (define %bop-footnotes%
                0073   ;; Make "bottom-of-page" footnotes?
                0074   #f)
                0075 
                0076 (define %body-start-indent%
                0077   ;; Default indent of body text
                0078   0pi)
                0079 
                0080 (define %para-indent-firstpara%
                0081   ;; First line start-indent for the first paragraph
                0082   0pt)
                0083 
                0084 (define %para-indent%
                0085   ;; First line start-indent for paragraphs (other than the first)
                0086   0pt)
                0087 
                0088 (define %block-start-indent%
                0089   ;; Extra start-indent for block-elements
                0090   0pt)
                0091 
                0092 (define formal-object-float
                0093   ;; Do formal objects float?
                0094   #t)
                0095 
                0096 (define %hyphenation%
                0097   ;; Allow automatic hyphenation?
                0098   #t)
                0099 
                0100 (define %admon-graphics%
                0101   ;; Use graphics in admonitions?
                0102   #f)
                0103 
                0104 (define %default-quadding%
                0105   ;; Full justification.
                0106   'justify)
                0107 
                0108 (define (book-titlepage-verso-elements)
                0109   ;;added publisher, releaseinfo to the default list
                0110   (list (normalize "title")
                0111         (normalize "subtitle")
                0112         (normalize "corpauthor")
                0113         (normalize "authorgroup")
                0114         (normalize "author")
                0115         (normalize "publisher")
                0116         (normalize "releaseinfo")
                0117         (normalize "editor")
                0118         (normalize "edition")
                0119         (normalize "pubdate")
                0120         (normalize "copyright")
                0121         (normalize "abstract")
                0122         (normalize "legalnotice")
                0123         (normalize "revhistory")))
                0124 
                0125 </style-specification-body>
                0126 </style-specification>
                0127 
                0128 
                0129 <!--
                0130 ;; customize the html stylesheet; parts borrowed from 
                0131 ;; Cygnus at http://sourceware.cygnus.com/ (cygnus-both.dsl)
                0132 -->
                0133 
                0134 <style-specification id="html" use="docbook">
                0135 <style-specification-body> 
                0136 
                0137 (declare-characteristic preserve-sdata?
                0138   ;; this is necessary because right now jadetex does not understand
                0139   ;; symbolic entities, whereas things work well with numeric entities.
                0140   "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
                0141   #f)
                0142 
                0143 (declare-flow-object-class element
                0144   ;; for redhat
                0145   "UNREGISTERED::James Clark//Flow Object Class::element")
                0146 
                0147 (define %generate-legalnotice-link%
                0148   ;; put the legal notice in a separate file
                0149   #t)
                0150 
                0151 (define %admon-graphics-path%
                0152   ;; use graphics in admonitions, set their
                0153   "../images/")
                0154 
                0155 (define %admon-graphics%
                0156   #t)
                0157 
                0158 (define %funcsynopsis-decoration%
                0159   ;; make funcsynopsis look pretty
                0160   #t)
                0161 
                0162 (define %html-ext%
                0163   ;; when producing HTML files, use this extension
                0164   ".html")
                0165 
                0166 (define %generate-book-toc%
                0167   ;; Should a Table of Contents be produced for books?
                0168   #t)
                0169 
                0170 (define %generate-article-toc% 
                0171   ;; Should a Table of Contents be produced for articles?
                0172   #t)
                0173 
                0174 (define %generate-part-toc%
                0175   ;; Should a Table of Contents be produced for parts?
                0176   #t)
                0177 
                0178 (define %generate-book-titlepage%
                0179   ;; produce a title page for books
                0180   #t)
                0181 
                0182 (define %generate-article-titlepage%
                0183   ;; produce a title page for articles
                0184   #t)
                0185 
                0186 (define (chunk-skip-first-element-list)
                0187   ;; forces the Table of Contents on separate page
                0188   '())
                0189 
                0190 (define (list-element-list)
                0191   ;; fixes bug in Table of Contents generation
                0192   '())
                0193 
                0194 (define %root-filename%
                0195   ;; The filename of the root HTML document (e.g, "index").
                0196   "index")
                0197 
                0198 (define %shade-verbatim%
                0199   ;; verbatim sections will be shaded if t(rue)
                0200   #t)
                0201 
                0202 (define %use-id-as-filename%
                0203   ;; Use ID attributes as name for component HTML files?
                0204   #t)
                0205 
                0206 (define %graphic-extensions%
                0207   ;; graphic extensions allowed
                0208   '("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
                0209 
                0210 (define %graphic-default-extension% 
                0211   "gif")
                0212 
                0213 (define %section-autolabel%
                0214   ;; For enumerated sections (1.1, 1.1.1, 1.2, etc.)
                0215   #t)
                0216 
                0217 (define (toc-depth nd)
                0218   ;; more depth (2 levels) to toc; instead of flat hierarchy
                0219   2)
                0220 
                0221 (element emphasis
                0222   ;; make role=strong equate to bold for emphasis tag
                0223   (if (equal? (attribute-string "role") "strong")
                0224      (make element gi: "STRONG" (process-children))
                0225      (make element gi: "EM" (process-children))))
                0226 
                0227 (define (book-titlepage-recto-elements)
                0228   ;; elements on a book's titlepage
                0229   (list (normalize "title")
                0230         (normalize "subtitle")
                0231         (normalize "graphic")
                0232         (normalize "mediaobject")
                0233         (normalize "corpauthor")
                0234         (normalize "authorgroup")
                0235         (normalize "author")
                0236         (normalize "othercredit")
                0237         (normalize "edition")
                0238         (normalize "releaseinfo")
                0239         (normalize "publisher")
                0240         (normalize "editor")
                0241         (normalize "copyright")
                0242         (normalize "pubdate")
                0243         (normalize "revhistory")
                0244         (normalize "abstract")
                0245         (normalize "legalnotice")))
                0246 
                0247 (define (article-titlepage-recto-elements)
                0248   ;; elements on an article's titlepage
                0249   (list (normalize "title")
                0250         (normalize "subtitle")
                0251         (normalize "authorgroup")
                0252         (normalize "author")
                0253         (normalize "othercredit")
                0254         (normalize "releaseinfo")
                0255         (normalize "copyright")
                0256         (normalize "pubdate")
                0257         (normalize "revhistory")
                0258         (normalize "abstract")
                0259         (normalize "legalnotice")))
                0260 
                0261 (define (process-contrib #!optional (sosofo (process-children)))
                0262   ;; print out with othercredit information; for translators, etc.
                0263   (make sequence
                0264     (make element gi: "SPAN"
                0265           attributes: (list (list "CLASS" (gi)))
                0266           (process-children))))
                0267 
                0268 (define (process-othercredit #!optional (sosofo (process-children)))
                0269   ;; print out othercredit information; for translators, etc.
                0270   (let ((author-name  (author-string))
                0271         (author-contrib (select-elements (children (current-node))
                0272                                           (normalize "contrib"))))
                0273     (make element gi: "P"
                0274          attributes: (list (list "CLASS" (gi)))
                0275          (make element gi: "B"
                0276               (literal author-name)
                0277               (literal " - "))
                0278          (process-node-list author-contrib))))
                0279 
                0280 (mode article-titlepage-recto-mode
                0281   (element contrib (process-contrib))
                0282   (element othercredit (process-othercredit))
                0283 )
                0284 
                0285 (mode book-titlepage-recto-mode
                0286   (element contrib (process-contrib))
                0287   (element othercredit (process-othercredit))
                0288 )
                0289 
                0290 (define (article-title nd)
                0291   (let* ((artchild  (children nd))
                0292          (artheader (select-elements artchild (normalize "artheader")))
                0293          (artinfo   (select-elements artchild (normalize "articleinfo")))
                0294          (ahdr (if (node-list-empty? artheader)
                0295                    artinfo
                0296                    artheader))
                0297          (ahtitles  (select-elements (children ahdr)
                0298                                      (normalize "title")))
                0299          (artitles  (select-elements artchild (normalize "title")))
                0300          (titles    (if (node-list-empty? artitles)
                0301                         ahtitles
                0302                         artitles)))
                0303     (if (node-list-empty? titles)
                0304         ""
                0305         (node-list-first titles))))
                0306 
                0307 (mode subtitle-mode
                0308   ;; do not print subtitle on subsequent pages
                0309   (element subtitle (empty-sosofo)))
                0310 
                0311 ;; Redefinition of $verbatim-display$
                0312 ;; Origin: dbverb.dsl
                0313 ;; Different foreground and background colors for verbatim elements
                0314 ;; Author: Philippe Martin (feloy@free.fr) 2001-04-07
                0315 
                0316 (define ($verbatim-display$ indent line-numbers?)
                0317   (let ((verbatim-element (gi))
                0318         (content (make element gi: "PRE"
                0319                        attributes: (list
                0320                                     (list "CLASS" (gi)))
                0321                        (if (or indent line-numbers?)
                0322                            ($verbatim-line-by-line$ indent line-numbers?)
                0323                            (process-children)))))
                0324     (if %shade-verbatim%
                0325         (make element gi: "TABLE"
                0326               attributes: (shade-verbatim-attr-element verbatim-element)
                0327               (make element gi: "TR"
                0328                     (make element gi: "TD"
                0329                           (make element gi: "FONT" 
                0330                                 attributes: (list
                0331                                              (list "COLOR" (car (shade-verbatim-element-colors
                0332                                                                  verbatim-element))))
                0333                                 content))))
                0334         content)))
                0335 
                0336 ;;
                0337 ;; Customize this function
                0338 ;; to change the foreground and background colors
                0339 ;; of the different verbatim elements
                0340 ;; Return (list "foreground color" "background color")
                0341 ;;
                0342 (define (shade-verbatim-element-colors element)
                0343   (case element
                0344     (("SYNOPSIS") (list "#000000" "#6495ED"))
                0345     ;; ...
                0346     ;; Add your verbatim elements here
                0347     ;; ...
                0348     (else (list "#000000" "#E0E0E0"))))
                0349 
                0350 (define (shade-verbatim-attr-element element)
                0351   (list
                0352    (list "BORDER" 
                0353         (cond
                0354                 ((equal? element (normalize "SCREEN")) "1")
                0355                 (else "0")))
                0356    (list "BGCOLOR" (car (cdr (shade-verbatim-element-colors element))))
                0357    (list "WIDTH" ($table-width$))))
                0358 
                0359 ;; End of $verbatim-display$ redefinition
                0360 
                0361 </style-specification-body>
                0362 </style-specification>
                0363 
                0364 <external-specification id="docbook" document="docbook.dsl">
                0365 
                0366 </style-sheet>
                0367