]]> ]]> ]> ;; ============================== ;; customize the print stylesheet ;; ============================== ;;*print (declare-characteristic preserve-sdata? ;; this is necessary because right now jadetex does not understand ;; symbolic entities, whereas things work well with numeric entities. "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" #f) ;;lrs (element beginpage (make simple-page-sequence page-n-columns: %page-n-columns% page-number-restart?: (or %page-number-restart% (book-start?) (first-chapter?)) page-number-format: ($page-number-format$) use: default-text-style left-header: ($left-header$) center-header: ($center-header$) right-header: ($right-header$) left-footer: ($left-footer$) center-footer: ($center-footer$) right-footer: ($right-footer$) start-indent: %body-start-indent% input-whitespace-treatment: 'collapse quadding: %default-quadding% (make sequence (process-children)))) (define %titlepage-in-info-order% ;;lrs #t) (define %generate-article-toc% ;; Should a Table of Contents be produced for Articles? #t) (define (toc-depth nd) 2) (define %generate-article-titlepage-on-separate-page% ;; Should the article title page be on a separate page? #t) (define %section-autolabel% ;; Are sections enumerated? #t) (define %footnote-ulinks% ;; Generate footnotes for ULinks? #f) (define %bop-footnotes% ;; Make "bottom-of-page" footnotes? #f) (define %body-start-indent% ;; Default indent of body text 0pi) (define %para-indent-firstpara% ;; First line start-indent for the first paragraph 0pt) (define %para-indent% ;; First line start-indent for paragraphs (other than the first) 0pt) (define %block-start-indent% ;; Extra start-indent for block-elements 0pt) (define formal-object-float ;; Do formal objects float? #t) (define %hyphenation% ;; Allow automatic hyphenation? #t) (define %admon-graphics% ;; Use graphics in admonitions? #f) (define %generate-article-toc-on-titlepage% ;; Should the Article TOC appear on the Article title page? #f) (define %two-side% ;; Is two-sided output being produced? #t) (define (article-titlepage-recto-elements) (list (normalize "title") (normalize "subtitle") (normalize "pubdate") (normalize "corpauthor") (normalize "authorgroup") (normalize "author") (normalize "authorblurb") (normalize "affiliation") (normalize "honorific") ; (normalize "copyright") (normalize "mediaobject") )) (define (article-titlepage-verso-elements) (list (normalize "legalnotice") (normalize "abstract") )) (define ($page-number-format$ #!optional (gi (gi))) (cond ((equal? (normalize gi) (normalize "toc")) "I") ((equal? (normalize gi) (normalize "lot")) "I") ((equal? (normalize gi) (normalize "preface")) "I") (else "1"))) (define %body-font-family% ;; REFENTRY body-font-family ;; PURP The font family used in body text ;; DESC ;; The name of the font family used in body text ;; (Times New Roman by default). ;; ;; The values used here are system dependent (you have ;; to have the fonts you select) and backend dependent (the backend has ;; to know how to use them). ;; ;; The values here work for the RTF backend under MS Windows. YMMV. ;; /DESC ;; AUTHOR N/A ;; /REFENTRY "Arial") (define %visual-acuity% ;; REFENTRY visual-acuity ;; PURP General measure of document text size ;; DESC ;; This parameter controls the general size of the text in the document. ;; Several other values (body font size and margins) have default values that ;; vary depending on the setting of '%visual-acuity%'. There ;; are three legal values: 'normal', ;; the normal, standard document size (10pt body text); ;; 'tiny', ;; a small text size (8pt body text); ;; 'presbyopic', ;; a slightly more generous size (12pt body text); and ;; 'large-type', ;; quite large (24pt body text). ;; /DESC ;; AUTHOR N/A ;; /REFENTRY ;; "tiny" ;; "presbyopic" "presbyopic" ) ;; "normal") ; "presbyopic") (define %hsize-bump-factor% ;; REFENTRY hsize-bump-factor ;; PURP Font scaling factor ;; DESC ;; Internally, the stylesheet refers to font sizes in purely relative ;; terms. This is done by defining a scaled set of fonts ;; (sizes 1, 2, 3, etc.) ;; based at the default text font size (e.g. 10pt). The '%hsize-bump-factor%' ;; describes the ratio between scaled sizes. The default is 1.2. ;; ;; Each hsize is '%hsize-bump-factor%' times larger than ;; the previous hsize. For example, if the base size is 10pt, and ;; '%hsize-bump-factor%' ;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc. ;; /DESC ;; AUTHOR N/A ;; /REFENTRY 1.2) ;;*html (declare-characteristic preserve-sdata? ;; this is necessary because right now jadetex does not understand ;; symbolic entities, whereas things work well with numeric entities. "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" #f) (declare-flow-object-class element ;; for redhat "UNREGISTERED::James Clark//Flow Object Class::element") (define %generate-legalnotice-link% ;; put the legal notice in a separate file #t) (define %admon-graphics-path% ;; use graphics in admonitions, set their "../images/") (define %admon-graphics% #t) (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 %titlepage-in-info-order% ;;lrs #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) (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 "authorblurb") (normalize "editor") (normalize "copyright") (normalize "pubdate") (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 "authorblurb") (normalize "othercredit") (normalize "releaseinfo") (normalize "copyright") (normalize "pubdate") (normalize "revhistory") (normalize "abstract") (normalize "legalnotice") (normalize "honorific") (normalize "affiliation") (normalize "mediaobject") )) (define (article-titlepage-verso-elements) ;; elements on an article's titlepage ;; note: added othercredit to the default list (list (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)))) (mode subtitle-mode ;; do not print subtitle on subsequent pages (element subtitle (empty-sosofo))) ;; 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")) ;; ... ;; Add your verbatim elements here ;; ... (else (list "#000000" "#E0E0E0")))) (define (shade-verbatim-attr-element element) (list (list "BORDER" (cond ((equal? element (normalize "SCREEN")) "1") (else "0"))) (list "BGCOLOR" (car (cdr (shade-verbatim-element-colors element)))) (list "WIDTH" ($table-width$)))) ;; End of $verbatim-display$ redefinition