|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
]]>
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
]]>
|
|
|
4e9952 |
]>
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;#######################################################################
|
|
|
4e9952 |
;;# #
|
|
|
4e9952 |
;;# The GNOME Documentation Project's #
|
|
|
4e9952 |
;;# Custion DocBook Stylesheet Layer #
|
|
|
4e9952 |
;;# by Dave Mason dcm@redhat.com #
|
|
|
4e9952 |
;;# Based on Norman Walsh's Modular Stylesheets #
|
|
|
4e9952 |
;;# #
|
|
|
4e9952 |
;;# This is intended as a drop-in replacement for #
|
|
|
4e9952 |
;;# the cygnus-both.dsl file in DocBook Tools. #
|
|
|
4e9952 |
;;# Just copy it to the location dbtools created #
|
|
|
4e9952 |
;;# and rename it cygnus-both.dsl #
|
|
|
4e9952 |
;;# #
|
|
|
4e9952 |
;;# This is Version 1.0-4 #
|
|
|
4e9952 |
;;# patched to fix RTF output (#49677) #
|
|
|
4e9952 |
;;# patched to work with docbook-dsssl-1.72 #
|
|
|
4e9952 |
;;# patched for ADDRESS output (#50605) #
|
|
|
4e9952 |
;;# removed comment and remark #
|
|
|
4e9952 |
;;# disabled use-id-as-filename #
|
|
|
4e9952 |
;;# don't define %graphic-default-extension% #
|
|
|
4e9952 |
;;#######################################################################
|
|
|
4e9952 |
-->
|
|
|
4e9952 |
|
|
|
4e9952 |
<style-sheet>
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
<style-specification id="print" use="docbook">
|
|
|
4e9952 |
<style-specification-body>
|
|
|
4e9952 |
|
|
|
4e9952 |
;;==========================================================================
|
|
|
4e9952 |
;; PRINT
|
|
|
4e9952 |
;;==========================================================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;General Options
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want to print on both sides of the paper?
|
|
|
4e9952 |
(define %two-side%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want enumerated sections? (E.g, 1.1, 1.1.1, 1.2, etc.)
|
|
|
4e9952 |
(define %section-autolabel%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Show URL links? If the text of the link and the URL are identical,
|
|
|
4e9952 |
;;the parenthetical URL is suppressed.
|
|
|
4e9952 |
(define %show-ulinks%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;Make Ulinks footnotes to stop bleeding in the edges - this increases
|
|
|
4e9952 |
;'jade --> print' time tremendously keep this in mind before
|
|
|
4e9952 |
;complaining!
|
|
|
4e9952 |
(define %footnote-ulinks%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Tex Backend on
|
|
|
4e9952 |
(define tex-backend
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Define Line Spacing
|
|
|
4e9952 |
(define %line-spacing-factor% 1.1)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Define the Paragraph Style
|
|
|
4e9952 |
(define para-style
|
|
|
4e9952 |
(style
|
|
|
4e9952 |
font-size: %bf-size%
|
|
|
4e9952 |
font-weight: 'medium
|
|
|
4e9952 |
font-posture: 'upright
|
|
|
4e9952 |
font-family-name: %body-font-family%
|
|
|
4e9952 |
line-spacing: (* %bf-size% %line-spacing-factor%)))
|
|
|
4e9952 |
|
|
|
4e9952 |
(define ($object-titles-after$)
|
|
|
4e9952 |
(list (normalize "figure")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Book Options
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a title page for a Book?
|
|
|
4e9952 |
(define %generate-book-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a separate page for the title?
|
|
|
4e9952 |
(define %generate-book-titlepage-on-separate-page%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Generate Book TOC?
|
|
|
4e9952 |
(define %generate-book-toc%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What depth should the TOC generate?
|
|
|
4e9952 |
;;!Only top level of appendixes!
|
|
|
4e9952 |
(define (toc-depth nd)
|
|
|
4e9952 |
(if (string=? (gi nd) (normalize "book"))
|
|
|
4e9952 |
3
|
|
|
4e9952 |
(if (string=? (gi nd) (normalize "appendix"))
|
|
|
4e9952 |
0
|
|
|
4e9952 |
1)))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a TOC for the element part?
|
|
|
4e9952 |
(define %generate-part-toc%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want the part toc on the part titlepage or separate?
|
|
|
4e9952 |
(define %generate-part-toc-on-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Generate Part Title Page?
|
|
|
4e9952 |
(define %generate-part-titlepage%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want the Part intro on the part title page?
|
|
|
4e9952 |
(define %generate-partintro-on-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What elements should have a LOT?
|
|
|
4e9952 |
(define ($generate-book-lot-list$)
|
|
|
4e9952 |
(list (normalize "equation")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want chapters enumerated?
|
|
|
4e9952 |
(define %chapter-autolabel%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want Chapter's and Appendix's
|
|
|
4e9952 |
;;to have automatic labels?
|
|
|
4e9952 |
(define %chap-app-running-head-autolabel%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Article Options
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a title page for an Article?
|
|
|
4e9952 |
(define %generate-article-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Generate Article TOC?
|
|
|
4e9952 |
(define %generate-article-toc%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a separate page for the title?
|
|
|
4e9952 |
(define %generate-article-titlepage-on-separate-page%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want the article toc on the titlepage or separate?
|
|
|
4e9952 |
(define %generate-article-toc-on-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want to start new page numbers with each article?
|
|
|
4e9952 |
(define %article-page-number-restart%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Titlepage Separate?
|
|
|
4e9952 |
(define (chunk-skip-first-element-list)
|
|
|
4e9952 |
'())
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Titlepage Not Separate
|
|
|
4e9952 |
;(define (chunk-skip-first-element-list)
|
|
|
4e9952 |
; (list (normalize "sect1")
|
|
|
4e9952 |
; (normalize "section")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Columns
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How many columns do you want?
|
|
|
4e9952 |
(define %page-n-columns%
|
|
|
4e9952 |
1)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How much space between columns?
|
|
|
4e9952 |
(define %page-column-sep%
|
|
|
4e9952 |
0.2in)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How many Columns on the titlepage?
|
|
|
4e9952 |
(define %titlepage-n-columns%
|
|
|
4e9952 |
1)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Balance columns?
|
|
|
4e9952 |
(define %page-balance-colums%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Fonts
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Defines the general size of the text in the document. normal(10),
|
|
|
4e9952 |
;;presbyopic(12), and large-type(24).
|
|
|
4e9952 |
(define %visual-acuity%
|
|
|
4e9952 |
"normal")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What font would you like for titles?
|
|
|
4e9952 |
(define %title-font-family%
|
|
|
4e9952 |
"Helvetica")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What font would you like for the body?
|
|
|
4e9952 |
(define %body-font-family%
|
|
|
4e9952 |
"Palatino")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What font would you like for mono-seq?
|
|
|
4e9952 |
(define %mono-font-family%
|
|
|
4e9952 |
"Courier New")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;If the base fontsize is 10pt, and '%hsize-bump-factor%' is
|
|
|
4e9952 |
;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc
|
|
|
4e9952 |
(define %hsize-bump-factor%
|
|
|
4e9952 |
1.1)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What size do you want the body fonts?
|
|
|
4e9952 |
(define %bf-size%
|
|
|
4e9952 |
(case %visual-acuity%
|
|
|
4e9952 |
(("tiny") 8pt)
|
|
|
4e9952 |
(("normal") 10pt)
|
|
|
4e9952 |
(("presbyopic") 12pt)
|
|
|
4e9952 |
(("large-type") 24pt)))
|
|
|
4e9952 |
|
|
|
4e9952 |
(define-unit em %bf-size%)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Margins
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
(define %left-right-margin% 6pi)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How much indentation for the body?
|
|
|
4e9952 |
(define %body-start-indent%
|
|
|
4e9952 |
4pi)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How big is the left margin? (relative to physical page)
|
|
|
4e9952 |
(define %left-margin%
|
|
|
4e9952 |
8pi) ;white-paper-column
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How big is the right margin? (relative to physical page)
|
|
|
4e9952 |
(define %right-margin%
|
|
|
4e9952 |
8pi) ;white-paper-column
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How big do you want the margin at the top?
|
|
|
4e9952 |
(define %top-margin%
|
|
|
4e9952 |
(if (equal? %visual-acuity% "large-type")
|
|
|
4e9952 |
7.5pi
|
|
|
4e9952 |
6pi))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How big do you want the margin at the bottom?
|
|
|
4e9952 |
(define %bottom-margin%
|
|
|
4e9952 |
(if (equal? %visual-acuity% "large-type")
|
|
|
4e9952 |
7.5pi
|
|
|
4e9952 |
5pi))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Define the text width. (Change the elements in the formula rather
|
|
|
4e9952 |
;;than the formula itself)
|
|
|
4e9952 |
;(define %text-width% (- %page-width% (* %left-right-margin% 2)))
|
|
|
4e9952 |
(define %text-width% (- %page-width% (+ %left-margin% %right-margin%)))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Define the body width. (Change the elements in the formula rather
|
|
|
4e9952 |
;;than the formula itself)
|
|
|
4e9952 |
(define %body-width%
|
|
|
4e9952 |
(- %text-width% %body-start-indent%))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Define distance between paragraphs
|
|
|
4e9952 |
(define %para-sep%
|
|
|
4e9952 |
(/ %bf-size% 2.0))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Define distance between block elements (figures, tables, etc.).
|
|
|
4e9952 |
(define %block-sep%
|
|
|
4e9952 |
(* %para-sep% 2.0))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Indent block elements?
|
|
|
4e9952 |
(define %block-start-indent%
|
|
|
4e9952 |
0pt)
|
|
|
4e9952 |
;0pt
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Admon Graphics
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want admon graohics on?
|
|
|
4e9952 |
(define %admon-graphics%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Where are the admon graphics?
|
|
|
4e9952 |
(define %admon-graphics-path%
|
|
|
4e9952 |
"../images/")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Quadding
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding do you want by default; start, center, justify, or end?
|
|
|
4e9952 |
(define %default-quadding%
|
|
|
4e9952 |
'justify)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding for component titles(Chapter, Appendix, etc)?
|
|
|
4e9952 |
(define %component-title-quadding%
|
|
|
4e9952 |
'start)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding for section titles?
|
|
|
4e9952 |
(define %section-title-quadding%
|
|
|
4e9952 |
'start)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding for section sub-titles?
|
|
|
4e9952 |
(define %section-subtitle-quadding%
|
|
|
4e9952 |
'start)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding for article title?
|
|
|
4e9952 |
(define %article-title-quadding%
|
|
|
4e9952 |
'center)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding for article sub-titles?
|
|
|
4e9952 |
(define %article-subtitle-quadding%
|
|
|
4e9952 |
'center)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding for division subtitles?
|
|
|
4e9952 |
(define %division-subtitle-quadding%
|
|
|
4e9952 |
'start)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What quadding for component subtitles?
|
|
|
4e9952 |
(define %component-subtitle-quadding%
|
|
|
4e9952 |
'start)
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Paper Options
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What size paper do you need? A4, USletter, USlandscape, or RedHat?
|
|
|
4e9952 |
(define %paper-type%
|
|
|
4e9952 |
"USletter")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Now define those paper types' width
|
|
|
4e9952 |
(define %page-width%
|
|
|
4e9952 |
(case %paper-type%
|
|
|
4e9952 |
(("A4") 210mm)
|
|
|
4e9952 |
(("USletter") 8.5in)
|
|
|
4e9952 |
(("USlandscape") 11in)))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Now define those paper types' height
|
|
|
4e9952 |
(define %page-height%
|
|
|
4e9952 |
(case %paper-type%
|
|
|
4e9952 |
(("A4") 297mm)
|
|
|
4e9952 |
(("USletter") 11in)
|
|
|
4e9952 |
(("USlandscape") 8.5in)))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Functions
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
(define (OLSTEP)
|
|
|
4e9952 |
(case
|
|
|
4e9952 |
(modulo (length (hierarchical-number-recursive "ORDEREDLIST")) 4)
|
|
|
4e9952 |
((1) 1.2em)
|
|
|
4e9952 |
((2) 1.2em)
|
|
|
4e9952 |
((3) 1.6em)
|
|
|
4e9952 |
((0) 1.4em)))
|
|
|
4e9952 |
|
|
|
4e9952 |
(define (ILSTEP) 1.0em)
|
|
|
4e9952 |
|
|
|
4e9952 |
(define (PROCSTEP ilvl)
|
|
|
4e9952 |
(if (> ilvl 1) 1.8em 1.4em))
|
|
|
4e9952 |
|
|
|
4e9952 |
(define (PROCWID ilvl)
|
|
|
4e9952 |
(if (> ilvl 1) 1.8em 1.4em))
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
(define ($comptitle$)
|
|
|
4e9952 |
(make paragraph
|
|
|
4e9952 |
font-family-name: %title-font-family%
|
|
|
4e9952 |
font-weight: 'bold
|
|
|
4e9952 |
font-size: (HSIZE 2)
|
|
|
4e9952 |
line-spacing: (* (HSIZE 2) %line-spacing-factor%)
|
|
|
4e9952 |
space-before: (* (HSIZE 2) %head-before-factor%)
|
|
|
4e9952 |
space-after: (* (HSIZE 2) %head-after-factor%)
|
|
|
4e9952 |
start-indent: 0pt
|
|
|
4e9952 |
first-line-start-indent: 0pt
|
|
|
4e9952 |
quadding: 'start
|
|
|
4e9952 |
keep-with-next?: #t
|
|
|
4e9952 |
(process-children-trim)))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Callouts are confusing in Postscript... fix them.
|
|
|
4e9952 |
(define %callout-fancy-bug%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;By default perils are centered and dropped into a box with a really
|
|
|
4e9952 |
;;big border - I have simply decreased the border thickness -
|
|
|
4e9952 |
;;unfortunately it takes all this to do it - sigh.
|
|
|
4e9952 |
(define ($peril$)
|
|
|
4e9952 |
(let* ((title (select-elements
|
|
|
4e9952 |
(children (current-node)) (normalize "title")))
|
|
|
4e9952 |
(has-title (not (node-list-empty? title)))
|
|
|
4e9952 |
(adm-title (if has-title
|
|
|
4e9952 |
(make sequence
|
|
|
4e9952 |
(with-mode title-sosofo-mode
|
|
|
4e9952 |
(process-node-list (node-list-first title))))
|
|
|
4e9952 |
(literal
|
|
|
4e9952 |
(gentext-element-name
|
|
|
4e9952 |
(current-node)))))
|
|
|
4e9952 |
(hs (HSIZE 2)))
|
|
|
4e9952 |
(if %admon-graphics%
|
|
|
4e9952 |
($graphical-admonition$)
|
|
|
4e9952 |
(make display-group
|
|
|
4e9952 |
space-before: %block-sep%
|
|
|
4e9952 |
space-after: %block-sep%
|
|
|
4e9952 |
font-family-name: %admon-font-family%
|
|
|
4e9952 |
font-size: (- %bf-size% 1pt)
|
|
|
4e9952 |
font-weight: 'medium
|
|
|
4e9952 |
font-posture: 'upright
|
|
|
4e9952 |
line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
|
|
|
4e9952 |
(make box
|
|
|
4e9952 |
display?: #t
|
|
|
4e9952 |
box-type: 'border
|
|
|
4e9952 |
line-thickness: .5pt
|
|
|
4e9952 |
start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt)
|
|
|
4e9952 |
end-indent: (inherited-end-indent)
|
|
|
4e9952 |
(make paragraph
|
|
|
4e9952 |
space-before: %para-sep%
|
|
|
4e9952 |
space-after: %para-sep%
|
|
|
4e9952 |
start-indent: 1em
|
|
|
4e9952 |
end-indent: 1em
|
|
|
4e9952 |
font-family-name: %title-font-family%
|
|
|
4e9952 |
font-weight: 'bold
|
|
|
4e9952 |
font-size: hs
|
|
|
4e9952 |
line-spacing: (* hs %line-spacing-factor%)
|
|
|
4e9952 |
quadding: 'center
|
|
|
4e9952 |
keep-with-next?: #t
|
|
|
4e9952 |
adm-title)
|
|
|
4e9952 |
(process-children))))))
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Non-printing Elements
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
(element TITLEABBREV (empty-sosofo))
|
|
|
4e9952 |
(element SUBTITLE (empty-sosofo))
|
|
|
4e9952 |
(element SETINFO (empty-sosofo))
|
|
|
4e9952 |
(element BOOKINFO (empty-sosofo))
|
|
|
4e9952 |
(element BIBLIOENTRY (empty-sosofo))
|
|
|
4e9952 |
(element BIBLIOMISC (empty-sosofo))
|
|
|
4e9952 |
(element BOOKBIBLIO (empty-sosofo))
|
|
|
4e9952 |
(element SERIESINFO (empty-sosofo))
|
|
|
4e9952 |
(element DOCINFO (empty-sosofo))
|
|
|
4e9952 |
(element ARTHEADER (empty-sosofo))
|
|
|
4e9952 |
;;(element ADDRESS (empty-sosofo))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Show comment element?
|
|
|
4e9952 |
(define %show-comments%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Formalpara titles
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Change the way Formal Paragraph titles are displayed. The commented
|
|
|
4e9952 |
;;out section will run the titles in the paragraphs.
|
|
|
4e9952 |
(element (formalpara title)
|
|
|
4e9952 |
;(make sequence
|
|
|
4e9952 |
;font-weight: 'bold
|
|
|
4e9952 |
;($runinhead$))
|
|
|
4e9952 |
($lowtitle$ 5 7))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
;;Inlines
|
|
|
4e9952 |
;;======================================
|
|
|
4e9952 |
|
|
|
4e9952 |
(element application ($mono-seq$))
|
|
|
4e9952 |
(element command ($bold-seq$))
|
|
|
4e9952 |
(element filename ($mono-seq$))
|
|
|
4e9952 |
(element function ($mono-seq$))
|
|
|
4e9952 |
(element guibutton ($bold-seq$))
|
|
|
4e9952 |
(element guiicon ($bold-seq$))
|
|
|
4e9952 |
(element guilabel ($italic-seq$))
|
|
|
4e9952 |
(element guimenu ($bold-seq$))
|
|
|
4e9952 |
(element guimenuitem ($bold-seq$))
|
|
|
4e9952 |
(element hardware ($bold-mono-seq$))
|
|
|
4e9952 |
(element keycap ($bold-seq$))
|
|
|
4e9952 |
(element literal ($mono-seq$))
|
|
|
4e9952 |
(element parameter ($italic-mono-seq$))
|
|
|
4e9952 |
(element prompt ($mono-seq$))
|
|
|
4e9952 |
(element symbol ($charseq$))
|
|
|
4e9952 |
(element emphasis ($italic-seq$))
|
|
|
4e9952 |
|
|
|
4e9952 |
</style-specification-body>
|
|
|
4e9952 |
</style-specification>
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;===========================================================================
|
|
|
4e9952 |
;; HTML
|
|
|
4e9952 |
;;===========================================================================
|
|
|
4e9952 |
-->
|
|
|
4e9952 |
|
|
|
4e9952 |
<style-specification id="html" use="docbook">
|
|
|
4e9952 |
<style-specification-body>
|
|
|
4e9952 |
|
|
|
4e9952 |
;; this is necessary because right now jadetex does not understand
|
|
|
4e9952 |
;; symbolic entities, whereas things work well with numeric entities.
|
|
|
4e9952 |
(declare-characteristic preserve-sdata?
|
|
|
4e9952 |
"UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;;Header HTML 4.0.1
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
(define %html-pubid% "-//W3C//DTD HTML 4.01//EN")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;;Common Stuff
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should there be a link to the legalnotice?
|
|
|
4e9952 |
(define %generate-legalnotice-link%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What graphics extensions allowed?
|
|
|
4e9952 |
(define %graphic-extensions%
|
|
|
4e9952 |
'("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What is the default extension for images?
|
|
|
4e9952 |
(define %graphic-default-extension% "png")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Use element ids as filenames?
|
|
|
4e9952 |
(define %use-id-as-filename%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;;Book Stuff
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a TOC for Books?
|
|
|
4e9952 |
(define %generate-book-toc%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What depth should the TOC generate?
|
|
|
4e9952 |
;;!Only top level of appendixes!
|
|
|
4e9952 |
(define (toc-depth nd)
|
|
|
4e9952 |
(if (string=? (gi nd) (normalize "book"))
|
|
|
4e9952 |
3
|
|
|
4e9952 |
(if (string=? (gi nd) (normalize "appendix"))
|
|
|
4e9952 |
0
|
|
|
4e9952 |
1)))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What elements should have an LOT?
|
|
|
4e9952 |
(define ($generate-book-lot-list$)
|
|
|
4e9952 |
(list (normalize "equation")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a title page for your Book?
|
|
|
4e9952 |
(define %generate-book-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;;Part Stuff
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should parts have TOCs?
|
|
|
4e9952 |
(define %generate-part-toc%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should part TOCs be on their titlepages?
|
|
|
4e9952 |
(define %generate-part-toc-on-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want a title page for your part?
|
|
|
4e9952 |
(define %generate-part-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should the Part intro be on the part title page?
|
|
|
4e9952 |
(define %generate-partintro-on-titlepage%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
(define %para-autolabel%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;========================
|
|
|
4e9952 |
;;Chapter Stuff
|
|
|
4e9952 |
;;=======================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;No TOCs in Chapters
|
|
|
4e9952 |
(define $generate-chapter-toc$
|
|
|
4e9952 |
(lambda ()
|
|
|
4e9952 |
#f))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;;Navigation
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should there be navigation at top?
|
|
|
4e9952 |
(define %header-navigation%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should there be navigation at bottom?
|
|
|
4e9952 |
(define %footer-navigation%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Use tables to create the navigation?
|
|
|
4e9952 |
(define %gentext-nav-use-tables%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;If tables are used for navigation,
|
|
|
4e9952 |
;;how wide should they be?
|
|
|
4e9952 |
(define %gentext-nav-tblwidth%
|
|
|
4e9952 |
"100%")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Add arrows to navigation (comment these
|
|
|
4e9952 |
;;out if you want admon graphics here)
|
|
|
4e9952 |
(define (gentext-en-nav-prev prev)
|
|
|
4e9952 |
(make sequence (literal "<<< Previous")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Add arrows to navigation (comment these
|
|
|
4e9952 |
;;out if you want admon graphics here)
|
|
|
4e9952 |
(define (gentext-en-nav-next next)
|
|
|
4e9952 |
(make sequence (literal "Next >>>")))
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;;Tables and Lists
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should Variable lists be tables?
|
|
|
4e9952 |
(define %always-format-variablelist-as-table%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What is the length of the 'Term' in a variablelist?
|
|
|
4e9952 |
(define %default-variablelist-termlength%
|
|
|
4e9952 |
20)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;When true | If the terms are shorter than
|
|
|
4e9952 |
;;the termlength above then the variablelist
|
|
|
4e9952 |
;;will be formatted as a table.
|
|
|
4e9952 |
(define %may-format-variablelist-as-table%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;This overrides the tgroup definition
|
|
|
4e9952 |
;;(copied from 1.20, dbtable.dsl).
|
|
|
4e9952 |
;;It changes the table background color,
|
|
|
4e9952 |
;;cell spacing and cell padding.
|
|
|
4e9952 |
;;This is based on gtk-doc additions - thanks!
|
|
|
4e9952 |
|
|
|
4e9952 |
(element tgroup
|
|
|
4e9952 |
(let* ((wrapper (parent (current-node)))
|
|
|
4e9952 |
(frameattr (attribute-string (normalize "frame") wrapper))
|
|
|
4e9952 |
(pgwide (attribute-string (normalize "pgwide") wrapper))
|
|
|
4e9952 |
(footnotes (select-elements (descendants (current-node))
|
|
|
4e9952 |
(normalize "footnote")))
|
|
|
4e9952 |
(border (if (equal? frameattr (normalize "none"))
|
|
|
4e9952 |
'(("BORDER" "0"))
|
|
|
4e9952 |
'(("BORDER" "1"))))
|
|
|
4e9952 |
(bgcolor '(("BGCOLOR" "#E0E0E0")))
|
|
|
4e9952 |
(width (if (equal? pgwide "1")
|
|
|
4e9952 |
(list (list "WIDTH" ($table-width$)))
|
|
|
4e9952 |
'()))
|
|
|
4e9952 |
(head (select-elements (children (current-node)) (normalize "thead")))
|
|
|
4e9952 |
(body (select-elements (children (current-node)) (normalize "tbody")))
|
|
|
4e9952 |
(feet (select-elements (children (current-node)) (normalize "tfoot"))))
|
|
|
4e9952 |
(make element gi: "TABLE"
|
|
|
4e9952 |
attributes: (append
|
|
|
4e9952 |
border
|
|
|
4e9952 |
width
|
|
|
4e9952 |
bgcolor
|
|
|
4e9952 |
'(("CELLSPACING" "0"))
|
|
|
4e9952 |
'(("CELLPADDING" "4"))
|
|
|
4e9952 |
(if %cals-table-class%
|
|
|
4e9952 |
(list (list "CLASS" %cals-table-class%))
|
|
|
4e9952 |
'()))
|
|
|
4e9952 |
(process-node-list head)
|
|
|
4e9952 |
(process-node-list body)
|
|
|
4e9952 |
(process-node-list feet)
|
|
|
4e9952 |
(make-table-endnotes))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;===================
|
|
|
4e9952 |
;; Admon Graphics
|
|
|
4e9952 |
;;===================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should Admon Graphics be used?
|
|
|
4e9952 |
(define %admon-graphics%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Where are those admon graphics?
|
|
|
4e9952 |
(define %admon-graphics-path%
|
|
|
4e9952 |
"./stylesheet-images/")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Given an admonition node, returns the
|
|
|
4e9952 |
;;name of the graphic that should
|
|
|
4e9952 |
;;be used for that admonition.
|
|
|
4e9952 |
;;Define admon graphics usage
|
|
|
4e9952 |
;;NOTE these will change to pngs
|
|
|
4e9952 |
;;soon in the GDP when Tigert gets
|
|
|
4e9952 |
;;the time to make special ones for us!
|
|
|
4e9952 |
(define ($admon-graphic$ #!optional (nd (current-node)))
|
|
|
4e9952 |
(cond ((equal? (gi nd) (normalize "tip"))
|
|
|
4e9952 |
(string-append %admon-graphics-path% "tip.gif"))
|
|
|
4e9952 |
((equal? (gi nd) (normalize "note"))
|
|
|
4e9952 |
(string-append %admon-graphics-path% "note.gif"))
|
|
|
4e9952 |
((equal? (gi nd) (normalize "important"))
|
|
|
4e9952 |
(string-append %admon-graphics-path% "important.gif"))
|
|
|
4e9952 |
((equal? (gi nd) (normalize "caution"))
|
|
|
4e9952 |
(string-append %admon-graphics-path% "caution.gif"))
|
|
|
4e9952 |
((equal? (gi nd) (normalize "warning"))
|
|
|
4e9952 |
(string-append %admon-graphics-path% "warning.gif"))
|
|
|
4e9952 |
(else (error (string-append (gi nd) " is not an admonition.")))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Given an admonition node, returns
|
|
|
4e9952 |
;;the width of the graphic that will
|
|
|
4e9952 |
;;be used for that admonition.
|
|
|
4e9952 |
(define ($admon-graphic-width$ #!optional (nd (current-node)))
|
|
|
4e9952 |
"25")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;;Labels
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Enumerate Chapters?
|
|
|
4e9952 |
(define %chapter-autolabel%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Enumerate Sections?
|
|
|
4e9952 |
(define %section-autolabel%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
;; HTML Attributes
|
|
|
4e9952 |
;;=========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;What attributes should be hung off
|
|
|
4e9952 |
;;of 'body'?
|
|
|
4e9952 |
(define %body-attr%
|
|
|
4e9952 |
(list
|
|
|
4e9952 |
(list "BGCOLOR" "#FFFFFF")
|
|
|
4e9952 |
(list "TEXT" "#000000")
|
|
|
4e9952 |
(list "LINK" "#0000FF")
|
|
|
4e9952 |
(list "VLINK" "#840084")
|
|
|
4e9952 |
(list "ALINK" "#0000FF")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Default extension for filenames?
|
|
|
4e9952 |
(define %html-ext%
|
|
|
4e9952 |
".html")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Use a CSS stylesheet?
|
|
|
4e9952 |
;;Which one? Should work on
|
|
|
4e9952 |
;;this one soon
|
|
|
4e9952 |
;(define %stylesheet%
|
|
|
4e9952 |
; "./gnome.css")
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Use it
|
|
|
4e9952 |
;(define %stylesheet-type%
|
|
|
4e9952 |
;"text/css")
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;========================
|
|
|
4e9952 |
;;Title Pages for Books
|
|
|
4e9952 |
;;=======================
|
|
|
4e9952 |
|
|
|
4e9952 |
(define (book-titlepage-recto-elements)
|
|
|
4e9952 |
(list (normalize "title")
|
|
|
4e9952 |
(normalize "subtitle")
|
|
|
4e9952 |
(normalize "corpauthor")
|
|
|
4e9952 |
(normalize "authorgroup")
|
|
|
4e9952 |
(normalize "author")
|
|
|
4e9952 |
(normalize "orgname")
|
|
|
4e9952 |
(normalize "graphic")
|
|
|
4e9952 |
(normalize "copyright")
|
|
|
4e9952 |
(normalize "legalnotice")
|
|
|
4e9952 |
(normalize "releaseinfo")
|
|
|
4e9952 |
(normalize "publisher")
|
|
|
4e9952 |
(normalize "isbn")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;========================
|
|
|
4e9952 |
;;Title Pages for Articles
|
|
|
4e9952 |
;;========================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should Articles have a TOC?
|
|
|
4e9952 |
(define %generate-article-toc%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Which elements should appear
|
|
|
4e9952 |
;;on title page?
|
|
|
4e9952 |
(define (article-titlepage-recto-elements)
|
|
|
4e9952 |
(list (normalize "title")
|
|
|
4e9952 |
(normalize "subtitle")
|
|
|
4e9952 |
(normalize "authorgroup")
|
|
|
4e9952 |
(normalize "copyright")
|
|
|
4e9952 |
(normalize "legalnotice")
|
|
|
4e9952 |
(normalize "abstract")))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;How should elements on title page look?
|
|
|
4e9952 |
(mode article-titlepage-recto-mode
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Author name is too big - change it!
|
|
|
4e9952 |
(element author
|
|
|
4e9952 |
(let ((author-name (author-string))
|
|
|
4e9952 |
(author-affil (select-elements (children (current-node))
|
|
|
4e9952 |
(normalize "affiliation"))))
|
|
|
4e9952 |
(make sequence
|
|
|
4e9952 |
(make element gi: "H4"
|
|
|
4e9952 |
attributes: (list (list "CLASS" (gi)))
|
|
|
4e9952 |
(make element gi: "A"
|
|
|
4e9952 |
attributes: (list (list "NAME" (element-id)))
|
|
|
4e9952 |
(literal author-name)))
|
|
|
4e9952 |
(process-node-list author-affil))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Address?
|
|
|
4e9952 |
(element address
|
|
|
4e9952 |
(make sequence
|
|
|
4e9952 |
(make element gi: "DIV"
|
|
|
4e9952 |
attributes: (list (list "CLASS" (gi)))
|
|
|
4e9952 |
(process-children))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Get rid of spam-producing "mailto" links
|
|
|
4e9952 |
;;and get rid of email indentation
|
|
|
4e9952 |
(element email
|
|
|
4e9952 |
(make sequence
|
|
|
4e9952 |
(make element gi: "DIV"
|
|
|
4e9952 |
attributes: (list (list "CLASS" (gi)))
|
|
|
4e9952 |
(process-children))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Point Abstract to custom table function
|
|
|
4e9952 |
;;(See $dcm-abstract-object$ below. For default
|
|
|
4e9952 |
;;use $semiformal-object$
|
|
|
4e9952 |
(element abstract
|
|
|
4e9952 |
(make element gi: "DIV"
|
|
|
4e9952 |
($dcm-abstract-object$)))
|
|
|
4e9952 |
|
|
|
4e9952 |
(element (abstract title) (empty-sosofo))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;subtitle sizing
|
|
|
4e9952 |
(element subtitle
|
|
|
4e9952 |
(make element gi: "H4"
|
|
|
4e9952 |
attributes: (list (list "CLASS" (gi)))
|
|
|
4e9952 |
(process-children-trim))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;=================
|
|
|
4e9952 |
;; INLINES
|
|
|
4e9952 |
;;=================
|
|
|
4e9952 |
|
|
|
4e9952 |
;Define my own series of fonts for various elements
|
|
|
4e9952 |
(element application ($mono-seq$))
|
|
|
4e9952 |
(element command ($bold-seq$))
|
|
|
4e9952 |
(element filename ($mono-seq$))
|
|
|
4e9952 |
(element function ($mono-seq$))
|
|
|
4e9952 |
(element guibutton ($bold-seq$))
|
|
|
4e9952 |
(element guiicon ($bold-seq$))
|
|
|
4e9952 |
(element guilabel ($bold-mono-seq$))
|
|
|
4e9952 |
(element guimenu ($bold-seq$))
|
|
|
4e9952 |
(element guimenuitem ($bold-seq$))
|
|
|
4e9952 |
(element guisubmenu ($bold-seq$))
|
|
|
4e9952 |
(element hardware ($bold-mono-seq$))
|
|
|
4e9952 |
(element keycap ($bold-seq$))
|
|
|
4e9952 |
(element literal ($mono-seq$))
|
|
|
4e9952 |
(element parameter ($italic-mono-seq$))
|
|
|
4e9952 |
(element prompt ($mono-seq$))
|
|
|
4e9952 |
(element symbol ($charseq$))
|
|
|
4e9952 |
(element emphasis ($italic-seq$))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Show comment element?
|
|
|
4e9952 |
(define %show-comments%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;====================
|
|
|
4e9952 |
;; General Formatting
|
|
|
4e9952 |
;;====================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Formal Paras are ugly by default!
|
|
|
4e9952 |
;;Make the title run in - otherwise
|
|
|
4e9952 |
;;you should use a sect!
|
|
|
4e9952 |
(element formalpara
|
|
|
4e9952 |
(make element gi: "DIV"
|
|
|
4e9952 |
attributes: (list
|
|
|
4e9952 |
(list "CLASS" (gi)))
|
|
|
4e9952 |
(make element gi: "P"
|
|
|
4e9952 |
(process-children))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;This is the old one
|
|
|
4e9952 |
;(element (formalpara title)
|
|
|
4e9952 |
;($lowtitle$ 5))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;This is the new one
|
|
|
4e9952 |
(element (formalpara title)
|
|
|
4e9952 |
(make element gi: "B"
|
|
|
4e9952 |
($runinhead$)))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Make captions come after objects in the list
|
|
|
4e9952 |
(define ($object-titles-after$)
|
|
|
4e9952 |
(list (normalize "figure")))
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;; Handle qanda labelling with Q: A:
|
|
|
4e9952 |
(define (qanda-defaultlabel)
|
|
|
4e9952 |
(normalize "qanda"))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;From FreeBSD Sheets (Thanks!) Display Q and A in bigger bolder fonts
|
|
|
4e9952 |
|
|
|
4e9952 |
(element question
|
|
|
4e9952 |
(let* ((chlist (children (current-node)))
|
|
|
4e9952 |
(firstch (node-list-first chlist))
|
|
|
4e9952 |
(restch (node-list-rest chlist)))
|
|
|
4e9952 |
(make element gi: "DIV"
|
|
|
4e9952 |
attributes: (list (list "CLASS" (gi)))
|
|
|
4e9952 |
(make element gi: "P"
|
|
|
4e9952 |
(make element gi: "BIG"
|
|
|
4e9952 |
(make element gi: "A"
|
|
|
4e9952 |
attributes: (list
|
|
|
4e9952 |
(list "NAME" (element-id)))
|
|
|
4e9952 |
(empty-sosofo))
|
|
|
4e9952 |
(make element gi: "B"
|
|
|
4e9952 |
(literal (question-answer-label
|
|
|
4e9952 |
(current-node)) " ")
|
|
|
4e9952 |
(process-node-list (children firstch)))))
|
|
|
4e9952 |
(process-node-list restch))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Literal Elements
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Indent Literal layouts?
|
|
|
4e9952 |
(define %indent-literallayout-lines%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Indent Programlistings?
|
|
|
4e9952 |
(define %indent-programlisting-lines%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Number lines in Programlistings?
|
|
|
4e9952 |
(define %number-programlisting-lines%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Should verbatim items be 'shaded' with a table?
|
|
|
4e9952 |
(define %shade-verbatim%
|
|
|
4e9952 |
#t)
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Define shade-verbatim attributes
|
|
|
4e9952 |
(define ($shade-verbatim-attr$)
|
|
|
4e9952 |
(list
|
|
|
4e9952 |
(list "BORDER" "0")
|
|
|
4e9952 |
(list "BGCOLOR" "#E0E0E0")
|
|
|
4e9952 |
(list "WIDTH" ($table-width$))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;===================
|
|
|
4e9952 |
;; Entities
|
|
|
4e9952 |
;;===================
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Netscape doesn't handle trademark
|
|
|
4e9952 |
;;entity right at all!! Get rid of it.
|
|
|
4e9952 |
;;Make a TM in a superscipt font.
|
|
|
4e9952 |
(element trademark
|
|
|
4e9952 |
(make sequence
|
|
|
4e9952 |
(process-children)
|
|
|
4e9952 |
(make element gi: "sup"
|
|
|
4e9952 |
(literal "TM"))))
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;===================
|
|
|
4e9952 |
;; New Definitions
|
|
|
4e9952 |
;;==================
|
|
|
4e9952 |
|
|
|
4e9952 |
(define ($dcm-abstract-object$)
|
|
|
4e9952 |
(make element gi: "TABLE"
|
|
|
4e9952 |
attributes: '(("BORDER" "0")
|
|
|
4e9952 |
("BGCOLOR" "#E0E0E0")
|
|
|
4e9952 |
("WIDTH" "50%")
|
|
|
4e9952 |
("CELLSPACING" "0")
|
|
|
4e9952 |
("CELLPADDING" "0")
|
|
|
4e9952 |
("ALIGN" "CENTER"))
|
|
|
4e9952 |
(make element gi: "TR"
|
|
|
4e9952 |
(make element gi: "TD"
|
|
|
4e9952 |
attributes: '(("VALIGN" "TOP"))
|
|
|
4e9952 |
(make element gi: "B"
|
|
|
4e9952 |
(literal "Abstract"))))
|
|
|
4e9952 |
(make element gi: "TR"
|
|
|
4e9952 |
(make element gi: "TD"
|
|
|
4e9952 |
attributes: '(("VALIGN" "TOP"))
|
|
|
4e9952 |
(process-children)))))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Redefine Titlepage Separator on Articles
|
|
|
4e9952 |
|
|
|
4e9952 |
(define (article-titlepage-separator side)
|
|
|
4e9952 |
(make empty-element gi: "HR"
|
|
|
4e9952 |
attributes: '(("WIDTH" "75%")
|
|
|
4e9952 |
("ALIGN" "CENTER")
|
|
|
4e9952 |
("COLOR" "#000000")
|
|
|
4e9952 |
("SIZE" "1"))))
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
(define (chunk-element-list)
|
|
|
4e9952 |
(list (normalize "preface")
|
|
|
4e9952 |
(normalize "chapter")
|
|
|
4e9952 |
(normalize "appendix")
|
|
|
4e9952 |
(normalize "article")
|
|
|
4e9952 |
(normalize "glossary")
|
|
|
4e9952 |
(normalize "bibliography")
|
|
|
4e9952 |
(normalize "index")
|
|
|
4e9952 |
(normalize "colophon")
|
|
|
4e9952 |
(normalize "setindex")
|
|
|
4e9952 |
(normalize "reference")
|
|
|
4e9952 |
(normalize "refentry")
|
|
|
4e9952 |
(normalize "part")
|
|
|
4e9952 |
(normalize "sect1")
|
|
|
4e9952 |
(normalize "section")
|
|
|
4e9952 |
(normalize "book") ;; just in case nothing else matches...
|
|
|
4e9952 |
(normalize "set") ;; sets are definitely chunks...
|
|
|
4e9952 |
))
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Do you want Callouts to be graphics?
|
|
|
4e9952 |
(define %callout-graphics%
|
|
|
4e9952 |
#f)
|
|
|
4e9952 |
|
|
|
4e9952 |
|
|
|
4e9952 |
;;Make Callout graphics PNGs
|
|
|
4e9952 |
(define %callout-graphics-path%
|
|
|
4e9952 |
"./imagelib/callouts/")
|
|
|
4e9952 |
|
|
|
4e9952 |
;; Redefine $callout-bug$ to support the %callout-graphic-ext%
|
|
|
4e9952 |
;; variable.
|
|
|
4e9952 |
(define ($callout-bug$ conumber)
|
|
|
4e9952 |
(let ((number (if conumber (format-number conumber "1") "0")))
|
|
|
4e9952 |
(if conumber
|
|
|
4e9952 |
(if %callout-graphics%
|
|
|
4e9952 |
(if (<= conumber %callout-graphics-number-limit%)
|
|
|
4e9952 |
(make empty-element gi: "IMG"
|
|
|
4e9952 |
attributes: (list (list "SRC"
|
|
|
4e9952 |
(root-rel-path
|
|
|
4e9952 |
(string-append
|
|
|
4e9952 |
%callout-graphics-path%
|
|
|
4e9952 |
number
|
|
|
4e9952 |
%callout-graphics-ext%)))
|
|
|
4e9952 |
(list "HSPACE" "0")
|
|
|
4e9952 |
(list "VSPACE" "0")
|
|
|
4e9952 |
(list "BORDER" "0")
|
|
|
4e9952 |
(list "ALT"
|
|
|
4e9952 |
(string-append
|
|
|
4e9952 |
"(" number ")"))))
|
|
|
4e9952 |
(make element gi: "B"
|
|
|
4e9952 |
(literal "(" (format-number conumber "1") ")")))
|
|
|
4e9952 |
(make element gi: "B"
|
|
|
4e9952 |
(literal "(" (format-number conumber "1") ")")))
|
|
|
4e9952 |
(make element gi: "B"
|
|
|
4e9952 |
(literal "(??)")))))
|
|
|
4e9952 |
|
|
|
4e9952 |
</style-specification-body>
|
|
|
4e9952 |
</style-specification>
|
|
|
4e9952 |
|
|
|
4e9952 |
<external-specification id="docbook" document="docbook.dsl">
|
|
|
4e9952 |
|
|
|
4e9952 |
</style-sheet>
|