Blame SOURCES/gdp-both.dsl

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