home *** CD-ROM | disk | FTP | other *** search
/ XML Bible (2nd Edition) / XML_Bible_Second_Edition_Hungry_Minds_2001.iso / mac / examples / religion / common / t2.dsl < prev    next >
Text File  |  1998-09-28  |  3KB  |  101 lines

  1. ;; specific styles for two-level testaments (like Old Testament,
  2. ;;   New Testament, Book of Mormon; note that the last has suras!)
  3.  
  4. (element BOOK ($booklevel-division$))
  5. (element SURA ($booklevel-division$))
  6.  
  7. (define ($booklevel-division$)
  8.  (let ((page-header-left
  9.     (make sequence
  10.           use: headerfooter-style
  11.           font-posture: 'italic
  12.           (with-mode hf-mode
  13.         (process-node-list
  14.          (select-elements
  15.           (descendants (ancestor "TSTMT"))
  16.           "TITLE")))))
  17.        (page-header-right
  18.     (make sequence
  19.           use: headerfooter-style
  20.           font-posture: 'italic
  21.           (with-mode hf-mode (process-first-descendant "BKTSHORT"))))
  22.        (page-folio
  23.     (make sequence
  24.           use: headerfooter-style
  25.           font-posture: 'upright
  26.           (page-number-sosofo))))
  27.    (make simple-page-sequence
  28.        page-number-restart?: (absolute-first-sibling?)
  29.        use: page-style
  30.        page-n-columns: (if large 1 2)
  31.        page-balance-columns?: #t
  32.        left-header: page-header-left
  33.        right-header: page-header-right
  34.        center-footer: page-folio
  35.        input-whitespace-treatment: 'collapse
  36.        quadding: 'justify)))
  37.  
  38. (element CHAPTER (process-children))
  39.  
  40. (element BKTLONG
  41.   (make paragraph
  42.     space-before: 0pt
  43.     space-after: %bktitle-size%
  44.     font-size: %bktitle-size%
  45.     line-spacing: (* %bktitle-size% %line-spacing-factor%)
  46.     font-family-name: %title-font-family%
  47.     font-weight: 'bold
  48.     quadding: 'center
  49.     (process-children)))
  50.  
  51. (element BKTSHORT (empty-sosofo))
  52.  
  53. (element CHTITLE
  54.   (make paragraph
  55.     quadding: 'center
  56.     keep-with-next?: #t
  57.     space-before: (/ (* %chtitle-size% 5) 3)
  58.     space-after: %chtitle-size%
  59.     font-size: %chtitle-size%
  60.     font-family-name: %title-font-family%
  61.     font-weight: 'bold))
  62.  
  63. (element CHSTITLE
  64.   (make paragraph
  65.     quadding: 'center
  66.     keep-with-next?: #t
  67.     space-before: %chstitle-size%
  68.     space-after: %chstitle-size%
  69.     font-size: %chstitle-size%
  70.     font-family-name: %title-font-family%))
  71.  
  72. (element (BKSUM P) ($summary-para$))
  73. (element (CHSUM P) ($summary-para$))
  74.  
  75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  76. ;; the table of contents
  77. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  78.  
  79. (element BOOKCOLL
  80.  (sosofo-append
  81.   (make simple-page-sequence
  82.     use: page-style
  83.     page-n-columns: 1
  84.     page-number-restart?: #t
  85.     (make paragraph
  86.           quadding: 'center
  87.           keep-with-next?: #t
  88.           font-family-name: %title-font-family%
  89.           font-weight: 'bold
  90.           font-size: %title2-size%
  91.           line-spacing: (* %title2-size% %line-spacing-factor%)
  92.           space-after: (* %title2-size% 1.5)
  93.           (literal "Table of Contents"))
  94.     (with-mode toc ;; defined in base.dsl
  95.            (sosofo-append
  96.             (process-node-list
  97.              (select-elements
  98.               (descendants (ancestor "TSTMT"))
  99.               "BKTLONG")))))
  100.   (process-children)))
  101.