;; $Id: dbparam.dsl 0.91 1997/08/28 14:09:41 nwalsh Exp $

;; ------------------------------ Parameters ------------------------------

;; Visual acuity levels are "normal", "presbyopic", and "large-type"
;; Set the line following to choose the level
;;
(define %visual-acuity% "normal")
;; (define %visual-acuity% "presbyopic")
;; (define %visual-acuity% "large-type")

;; Select a paper size.  Only USletter and A4 are supported.  You
;; can support additional sizes below.  If you do, please pass
;; along your updates.
;;
;; (define %paper-type% "A4")
(define %paper-type% "USletter")

;; Select characteristics of the text on the printed page.  Margins,
;; line spacing, indents, etc.
;;

(define %line-spacing-factor% 1.1)
(define %head-before-factor% 0.75)
(define %head-after-factor% 0.5)

(define %body-start-indent% 4pi)
(define %para-sep% (/ %bf-size% 2.0))
(define %block-sep% (* %para-sep% 2.0))
(define %hsize-bump-factor% 1.2)
(define %ss-size-factor% 0.6)
(define %ss-shift-factor% 0.4)
(define %smaller-size-factor% 0.9)

;; Select how quadding should be done.  (Are paragraphs justified, 'justify,
;; or ragged-right, 'start.
;;
;; (define %default-quadding% 'justify)
(define %default-quadding% 'start)

;; Select fonts.  The values used here are system dependent (you have
;; to have the fonts you select) and backend dependent (the backend has
;; to know how to use them). 
;;
;; The values here work for the RTF backend under MS Windows.  YMMV
;;
(define %title-font-family% "Arial")
(define %body-font-family% "Times New Roman")
(define %mono-font-family% "Courier New")
(define %admon-font-family% "Arial")
(define %dingbat-font-family% "WingDings")

;; Refentry function indicates whether or not REFENTRYs are for functions.
;; If true, "()" is automatically generated after the title.
;;
(define %refentry-name-font-family%
  (if %refentry-function%
      %mono-font-family%
      %body-font-family%))

;; Page number restart - define to #t if page numbering should be
;; restarted when a new $component$ is started, define to #f if not.
;;
(define %page-number-restart% #f)

;; Refentry new page indicates whether or not each RefEntry should
;; start on a new page.
;;
(define %refentry-new-page% #f)

;; Refentry generate name indicates whether or not the word "NAME "
;; should be generated at the start of a REFNAME.
;;
(define %refentry-generate-name% #t)

;; Refentry function indicates whether or not REFENTRYs are for functions.
;; If true, "()" is automatically generated after the title.
;;
(define %refentry-function% #t)

;; Default section level for SimpleSects that occur directly within
;; chapter-level elements
;;
(define %default-simplesect-level% 4)

;; Generate titlepage indicates whether or not a title page should be
;; generated.  Ignored in documents that are not books or which do
;; not have a BOOKINFO.
;;
(define %generate-titlepage% #t)

;; Generate toc indicates whether or not an automatically generated TOC
;; should be included 
;;
(define %generate-toc% #t)

(define %generate-lot-list% (list "TABLE" "FIGURE" "EXAMPLE"))

;; If you're planning to print double-sided, set two-side to true,
;; otherwise make it false.  It controls how running heads are 
;; presented
;;
(define %two-side% #f)

;; Save the intended writing mode; we test it for setting lhs or rhs
;; when printing headers on page heads and feet.
;;
(define %writing-mode% 'left-to-right)

;; If chap-app-running-heads is #t, running heads will occur on 
;; most components (chapters, appendixes, prefaces, etc.)
;;
(define %chap-app-running-heads% #t)

;; If section-autolabel is true, unlabeled sections are automatically
;; numbered
;;
(define %section-autolabel% #f)

;; If chap-app-running-head-autolabel is #t, Chapters and Appendixes 
;; that do not specify a LABEL attribute will be treated as if they 
;; specified LABEL=AUTO.  If this is #f, Chapters and Appendixes
;; without a LABEL attribute will have only the title in the running head.
;;
(define %chap-app-running-head-autolabel% #t)

;;
;; ----------------------------------------------------------------------
;;
;; The following parameters are generated from/depend on selections made
;; above.
;;

(define %bf-size%
  (case %visual-acuity%
	(("normal") 10pt)
	(("presbyopic") 12pt)
	(("large-type") 24pt)))
(define-unit em %bf-size%)

(define %page-width%
  (case %paper-type%
	(("A4") 210mm)
	(("USletter") 8.5in)))

(define %page-height%
  (case %paper-type%
	(("A4") 297mm)
	(("USletter") 11in)))

(define %left-margin% 6pi)
(define %right-margin% 6pi)

(define %text-width% (- %page-width% (+ %left-margin% %right-margin%)))
(define %pgwide-start-indent% %body-start-indent%)
(define %body-width% (- %text-width% %body-start-indent%))

;;
;; ----------------------------------------------------------------------
;;
;; Declare initial values; perhaps more should be done this way...
;;

(declare-initial-value writing-mode 	%writing-mode%)

(declare-initial-value left-margin 	6pi)
(declare-initial-value right-margin 	6pi)
(declare-initial-value top-margin	(if (equal? %visual-acuity% "large-type") 7.5pi 6pi))
(declare-initial-value bottom-margin	(if (equal? %visual-acuity% "large-type") 7.5pi 6pi))
(declare-initial-value header-margin	(if (equal? %visual-acuity% "large-type") 4.5pi 3pi))
(declare-initial-value footer-margin	3pi)

(declare-initial-value page-width	%page-width%)
(declare-initial-value page-height	%page-height%)
