Whitespace change only.

This commit is contained in:
Murray Stokely 2001-09-11 08:56:52 +00:00
parent 116d17104e
commit f0a4faa9b7
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10654

View file

@ -1,4 +1,4 @@
<!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.55 2001/09/11 02:31:50 murray Exp $ --> <!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.56 2001/09/11 08:47:53 murray Exp $ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % output.html "IGNORE"> <!ENTITY % output.html "IGNORE">
@ -210,132 +210,113 @@
<!-- Two-sided Print output ....................................... --> <!-- Two-sided Print output ....................................... -->
<![ %output.print.twoside; [ <![ %output.print.twoside; [
;; From an email by Ian Castle to the DocBook-apps list ;; From an email by Ian Castle to the DocBook-apps list
(define (first-part?) (define (first-part?)
(let* (let* ((book (ancestor (normalize "book")))
( (nd (ancestor-member (current-node)
(book (append
(ancestor (component-element-list)
(normalize "book") (division-element-list))))
) (bookch (children book)))
) (let loop ((nl bookch))
(nd (if (node-list-empty? nl)
(ancestor-member #f
(current-node) (if (equal? (gi (node-list-first nl)) (normalize "part"))
(append (if (node-list=? (node-list-first nl) nd)
(component-element-list) #t
(division-element-list) #f)
) (loop (node-list-rest nl)))))))
)
)
(bookch ;; From an email by Ian Castle to the DocBook-apps list
(children book)
) (define (first-chapter?)
) ;; Returns #t if the current-node is in the first chapter of a book
(let loop ((nl bookch)) (if (has-ancestor-member? (current-node) (division-element-list))
(if (node-list-empty? nl)
#f #f
(if (equal? (gi (node-list-first nl)) (normalize "part")) (let* ((book (ancestor (normalize "book")))
(if (node-list=? (node-list-first nl) nd) (nd (ancestor-member (current-node)
#t (append (component-element-list)
#f) (division-element-list))))
(loop (node-list-rest nl))))))) (bookch (children book))
(bookcomp (expand-children bookch (list (normalize "part")))))
(let loop ((nl bookcomp))
(if (node-list-empty? nl)
#f
(if (equal? (gi (node-list-first nl)) (normalize "chapter"))
(if (node-list=? (node-list-first nl) nd)
#t
#f)
(loop (node-list-rest nl))))))))
;; From an email by Ian Castle to the DocBook-apps list ; By default, the Part I title page will be given a roman numeral,
; which is wrong so we have to fix it
(define (first-chapter?) (define (part-titlepage elements #!optional (side 'recto))
;; Returns #t if the current-node is in the first chapter of a book (let ((nodelist (titlepage-nodelist
(if (if (equal? side 'recto)
(has-ancestor-member? (current-node) (division-element-list)) (part-titlepage-recto-elements)
#f (part-titlepage-verso-elements))
(let* ((book (ancestor (normalize "book"))) elements))
(nd (ancestor-member ;; partintro is a special case...
(current-node) (partintro (node-list-first
(append (component-element-list) (node-list-filter-by-gi elements (list (normalize "partintro"))))))
(division-element-list)))) (if (part-titlepage-content? elements side)
(bookch (children book)) (make simple-page-sequence
(bookcomp (expand-children bookch (list (normalize "part"))))) page-n-columns: %titlepage-n-columns%
(let loop ((nl bookcomp)) ;; Make sure that page number format is correct.
(if (node-list-empty? nl) page-number-format: ($page-number-format$)
#f ;; Make sure that the page number is set to 1 if this is the first part
(if (equal? (gi (node-list-first nl)) (normalize "chapter")) ;; in the book
(if (node-list=? (node-list-first nl) nd) page-number-restart?: (first-part?)
#t input-whitespace-treatment: 'collapse
#f) use: default-text-style
(loop (node-list-rest nl)))))
)
)
)
;; This hack is required for the RTF backend. If an
;; external-graphic is the first thing on the page,
;; RTF doesn't seem to do the right thing (the graphic
;; winds up on the baseline of the first line of the
;; page, left justified). This "one point rule" fixes
;; that problem.
(make paragraph
line-spacing: 1pt
(literal ""))
; By default, the Part I title page will be given a roman numeral, (let loop ((nl nodelist) (lastnode (empty-node-list)))
; which is wrong so we have to fix it (if (node-list-empty? nl)
(define (part-titlepage elements #!optional (side 'recto)) (empty-sosofo)
(let ((nodelist (titlepage-nodelist (make sequence
(if (equal? side 'recto) (if (or (node-list-empty? lastnode)
(part-titlepage-recto-elements) (not (equal? (gi (node-list-first nl))
(part-titlepage-verso-elements)) (gi lastnode))))
elements)) (part-titlepage-before (node-list-first nl) side)
;; partintro is a special case... (empty-sosofo))
(partintro (node-list-first (cond
(node-list-filter-by-gi elements (list (normalize "partintro")))))) ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
(if (part-titlepage-content? elements side) (part-titlepage-subtitle (node-list-first nl) side))
(make simple-page-sequence ((equal? (gi (node-list-first nl)) (normalize "title"))
page-n-columns: %titlepage-n-columns% (part-titlepage-title (node-list-first nl) side))
;; Make sure that page number format is correct. (else
page-number-format: ($page-number-format$) (part-titlepage-default (node-list-first nl) side)))
;; Make sure that the page number is set to 1 if this is the first part (loop (node-list-rest nl) (node-list-first nl)))))
;; in the book (if (and %generate-part-toc%
page-number-restart?: (first-part?) %generate-part-toc-on-titlepage%
input-whitespace-treatment: 'collapse (equal? side 'recto))
use: default-text-style (make display-group
(build-toc (current-node)
;; This hack is required for the RTF backend. If an external-graphic (toc-depth (current-node))))
;; is the first thing on the page, RTF doesn't seem to do the right (empty-sosofo))
;; thing (the graphic winds up on the baseline of the first line
;; of the page, left justified). This "one point rule" fixes
;; that problem.
(make paragraph
line-spacing: 1pt
(literal ""))
(let loop ((nl nodelist) (lastnode (empty-node-list)))
(if (node-list-empty? nl)
(empty-sosofo)
(make sequence
(if (or (node-list-empty? lastnode)
(not (equal? (gi (node-list-first nl))
(gi lastnode))))
(part-titlepage-before (node-list-first nl) side)
(empty-sosofo))
(cond
((equal? (gi (node-list-first nl)) (normalize "subtitle"))
(part-titlepage-subtitle (node-list-first nl) side))
((equal? (gi (node-list-first nl)) (normalize "title"))
(part-titlepage-title (node-list-first nl) side))
(else
(part-titlepage-default (node-list-first nl) side)))
(loop (node-list-rest nl) (node-list-first nl)))))
(if (and %generate-part-toc%
%generate-part-toc-on-titlepage%
(equal? side 'recto))
(make display-group
(build-toc (current-node)
(toc-depth (current-node))))
(empty-sosofo))
;; PartIntro is a special case
(if (and (equal? side 'recto)
(not (node-list-empty? partintro))
%generate-partintro-on-titlepage%)
($process-partintro$ partintro #f)
(empty-sosofo)))
(empty-sosofo))))
;; PartIntro is a special case
(if (and (equal? side 'recto)
(not (node-list-empty? partintro))
%generate-partintro-on-titlepage%)
($process-partintro$ partintro #f)
(empty-sosofo)))
(empty-sosofo))))
]]> ]]>