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