Blame SOURCES/gdp-both.dsl

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