Commit cd1f4db4 authored by Peter Eisentraut's avatar Peter Eisentraut

Untabify DSSSL and XSL files and add to check-tabs target

Like with SGML files, using tabs in these files is confusing and
unnecessary.
parent 293ec33c
...@@ -357,7 +357,7 @@ endif # sqlmansectnum != 7 ...@@ -357,7 +357,7 @@ endif # sqlmansectnum != 7
# tabs are harmless, but it is best to avoid them in SGML files # tabs are harmless, but it is best to avoid them in SGML files
check-tabs: check-tabs:
@( ! grep ' ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files"; exit 1) @( ! grep ' ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml $(srcdir)/*.dsl $(srcdir)/*.xsl) ) || (echo "Tabs appear in SGML/XML files" 1>&2; exit 1)
## ##
## Clean ## Clean
......
<?xml version='1.0'?> <?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common" xmlns:exsl="http://exslt.org/common"
version='1.0' version='1.0'
exclude-result-prefixes="exsl"> exclude-result-prefixes="exsl">
...@@ -58,16 +58,16 @@ ...@@ -58,16 +58,16 @@
<xsl:otherwise> <xsl:otherwise>
<xsl:choose> <xsl:choose>
<xsl:when test="refmeta/refentrytitle"> <xsl:when test="refmeta/refentrytitle">
<xsl:call-template name="bold"> <xsl:call-template name="bold">
<xsl:with-param name="node" select="refmeta/refentrytitle"/> <xsl:with-param name="node" select="refmeta/refentrytitle"/>
<xsl:with-param name="context" select="."/> <xsl:with-param name="context" select="."/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:call-template name="bold"> <xsl:call-template name="bold">
<xsl:with-param name="node" select="refnamediv/refname[1]"/> <xsl:with-param name="node" select="refnamediv/refname[1]"/>
<xsl:with-param name="context" select="."/> <xsl:with-param name="context" select="."/>
</xsl:call-template> </xsl:call-template>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:apply-templates select="refmeta/manvolnum"/> <xsl:apply-templates select="refmeta/manvolnum"/>
...@@ -143,14 +143,14 @@ ...@@ -143,14 +143,14 @@
<xsl:with-param name="message-prolog">Note: </xsl:with-param> <xsl:with-param name="message-prolog">Note: </xsl:with-param>
<xsl:with-param name="message-epilog"> (soelim stub)</xsl:with-param> <xsl:with-param name="message-epilog"> (soelim stub)</xsl:with-param>
<xsl:with-param name="content"> <xsl:with-param name="content">
<xsl:choose> <xsl:choose>
<xsl:when test="$man.output.in.separate.dir = 0"> <xsl:when test="$man.output.in.separate.dir = 0">
<xsl:value-of select="concat('.so man', $section, '/')"/> <xsl:value-of select="concat('.so man', $section, '/')"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="'.so '"/> <!-- added case --> <xsl:value-of select="'.so '"/> <!-- added case -->
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:call-template name="make.adjusted.man.filename"> <xsl:call-template name="make.adjusted.man.filename">
<xsl:with-param name="name" select="$first.refname"/> <xsl:with-param name="name" select="$first.refname"/>
<xsl:with-param name="section" select="$section"/> <xsl:with-param name="section" select="$section"/>
......
...@@ -219,10 +219,10 @@ ...@@ -219,10 +219,10 @@
;; Returns the depth of auto TOC that should be made at the nd-level ;; Returns the depth of auto TOC that should be made at the nd-level
(define (toc-depth nd) (define (toc-depth nd)
(cond ((string=? (gi nd) (normalize "book")) 2) (cond ((string=? (gi nd) (normalize "book")) 2)
((string=? (gi nd) (normalize "set")) 2) ((string=? (gi nd) (normalize "set")) 2)
((string=? (gi nd) (normalize "part")) 2) ((string=? (gi nd) (normalize "part")) 2)
((string=? (gi nd) (normalize "chapter")) 2) ((string=? (gi nd) (normalize "chapter")) 2)
(else 1))) (else 1)))
;; Put a horizontal line in the set TOC (just like the book TOC looks) ;; Put a horizontal line in the set TOC (just like the book TOC looks)
(define (set-titlepage-separator side) (define (set-titlepage-separator side)
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
;; Add character encoding and time of creation into HTML header ;; Add character encoding and time of creation into HTML header
(define %html-header-tags% (define %html-header-tags%
(list (list "META" '("HTTP-EQUIV" "Content-Type") '("CONTENT" "text/html; charset=ISO-8859-1")) (list (list "META" '("HTTP-EQUIV" "Content-Type") '("CONTENT" "text/html; charset=ISO-8859-1"))
(list "META" '("NAME" "creation") (list "CONTENT" (time->string (time) #t))))) (list "META" '("NAME" "creation") (list "CONTENT" (time->string (time) #t)))))
;; Block elements are allowed in PARA in DocBook, but not in P in ;; Block elements are allowed in PARA in DocBook, but not in P in
...@@ -257,10 +257,10 @@ ...@@ -257,10 +257,10 @@
(make element gi: "TR" (make element gi: "TR"
(make element gi: "TD" (make element gi: "TD"
content))) content)))
(make sequence (make sequence
(para-check) (para-check)
content content
(para-check 'restart))))) (para-check 'restart)))))
;; ...and for notes. ;; ...and for notes.
(element note (element note
...@@ -287,83 +287,83 @@ ...@@ -287,83 +287,83 @@
;; dbcommon.dsl) ;; dbcommon.dsl)
(define (default-header-nav-tbl-ff elemnode prev next prevsib nextsib) (define (default-header-nav-tbl-ff elemnode prev next prevsib nextsib)
(let* ((r1? (nav-banner? elemnode)) (let* ((r1? (nav-banner? elemnode))
(r1-sosofo (make element gi: "TR" (r1-sosofo (make element gi: "TR"
(make element gi: "TH" (make element gi: "TH"
attributes: (list attributes: (list
(list "COLSPAN" "5") (list "COLSPAN" "5")
(list "ALIGN" "center") (list "ALIGN" "center")
(list "VALIGN" "bottom")) (list "VALIGN" "bottom"))
(make element gi: "A" (make element gi: "A"
attributes: (list attributes: (list
(list "HREF" (href-to (nav-home elemnode)))) (list "HREF" (href-to (nav-home elemnode))))
(nav-banner elemnode))))) (nav-banner elemnode)))))
(r2? (or (not (node-list-empty? prev)) (r2? (or (not (node-list-empty? prev))
(not (node-list-empty? next)) (not (node-list-empty? next))
(nav-context? elemnode))) (nav-context? elemnode)))
(r2-sosofo (make element gi: "TR" (r2-sosofo (make element gi: "TR"
(make element gi: "TD" (make element gi: "TD"
attributes: (list attributes: (list
(list "WIDTH" "10%") (list "WIDTH" "10%")
(list "ALIGN" "left") (list "ALIGN" "left")
(list "VALIGN" "top")) (list "VALIGN" "top"))
(if (node-list-empty? prev) (if (node-list-empty? prev)
(make entity-ref name: "nbsp") (make entity-ref name: "nbsp")
(make element gi: "A" (make element gi: "A"
attributes: (list attributes: (list
(list "TITLE" (element-title-string prev)) (list "TITLE" (element-title-string prev))
(list "HREF" (list "HREF"
(href-to (href-to
prev)) prev))
(list "ACCESSKEY" (list "ACCESSKEY"
"P")) "P"))
(gentext-nav-prev prev)))) (gentext-nav-prev prev))))
(make element gi: "TD" (make element gi: "TD"
attributes: (list attributes: (list
(list "WIDTH" "10%") (list "WIDTH" "10%")
(list "ALIGN" "left") (list "ALIGN" "left")
(list "VALIGN" "top")) (list "VALIGN" "top"))
(if (nav-up? elemnode) (if (nav-up? elemnode)
(nav-up elemnode) (nav-up elemnode)
(nav-home-link elemnode))) (nav-home-link elemnode)))
(make element gi: "TD" (make element gi: "TD"
attributes: (list attributes: (list
(list "WIDTH" "60%") (list "WIDTH" "60%")
(list "ALIGN" "center") (list "ALIGN" "center")
(list "VALIGN" "bottom")) (list "VALIGN" "bottom"))
(nav-context elemnode)) (nav-context elemnode))
(make element gi: "TD" (make element gi: "TD"
attributes: (list attributes: (list
(list "WIDTH" "20%") (list "WIDTH" "20%")
(list "ALIGN" "right") (list "ALIGN" "right")
(list "VALIGN" "top")) (list "VALIGN" "top"))
(if (node-list-empty? next) (if (node-list-empty? next)
(make entity-ref name: "nbsp") (make entity-ref name: "nbsp")
(make element gi: "A" (make element gi: "A"
attributes: (list attributes: (list
(list "TITLE" (element-title-string next)) (list "TITLE" (element-title-string next))
(list "HREF" (list "HREF"
(href-to (href-to
next)) next))
(list "ACCESSKEY" (list "ACCESSKEY"
"N")) "N"))
(gentext-nav-next next))))))) (gentext-nav-next next)))))))
(if (or r1? r2?) (if (or r1? r2?)
(make element gi: "DIV" (make element gi: "DIV"
attributes: '(("CLASS" "NAVHEADER")) attributes: '(("CLASS" "NAVHEADER"))
(make element gi: "TABLE" (make element gi: "TABLE"
attributes: (list attributes: (list
(list "SUMMARY" "Header navigation table") (list "SUMMARY" "Header navigation table")
(list "WIDTH" %gentext-nav-tblwidth%) (list "WIDTH" %gentext-nav-tblwidth%)
(list "BORDER" "0") (list "BORDER" "0")
(list "CELLPADDING" "0") (list "CELLPADDING" "0")
(list "CELLSPACING" "0")) (list "CELLSPACING" "0"))
(if r1? r1-sosofo (empty-sosofo)) (if r1? r1-sosofo (empty-sosofo))
(if r2? r2-sosofo (empty-sosofo))) (if r2? r2-sosofo (empty-sosofo)))
(make empty-element gi: "HR" (make empty-element gi: "HR"
attributes: (list attributes: (list
(list "ALIGN" "LEFT") (list "ALIGN" "LEFT")
(list "WIDTH" %gentext-nav-tblwidth%)))) (list "WIDTH" %gentext-nav-tblwidth%))))
(empty-sosofo)))) (empty-sosofo))))
;; Put index "quicklinks" (A | B | C | ...) at the top of the bookindex page. ;; Put index "quicklinks" (A | B | C | ...) at the top of the bookindex page.
...@@ -373,8 +373,8 @@ ...@@ -373,8 +373,8 @@
(children (current-node)) (children (current-node))
(list (normalize "indexentry")))) (list (normalize "indexentry"))))
(indexdivs (node-list-filter-by-gi (indexdivs (node-list-filter-by-gi
(children (current-node)) (children (current-node))
(list (normalize "indexdiv")))) (list (normalize "indexdiv"))))
(entries (node-list-filter-by-gi (entries (node-list-filter-by-gi
(children (current-node)) (children (current-node))
(list (normalize "indexentry"))))) (list (normalize "indexentry")))))
...@@ -385,12 +385,12 @@ ...@@ -385,12 +385,12 @@
attributes: (list (list "CLASS" (gi))) attributes: (list (list "CLASS" (gi)))
($component-separator$) ($component-separator$)
($component-title$) ($component-title$)
(if (node-list-empty? indexdivs) (if (node-list-empty? indexdivs)
(empty-sosofo) (empty-sosofo)
(make element gi: "P" (make element gi: "P"
attributes: (list (list "CLASS" "INDEXDIV-QUICKLINKS")) attributes: (list (list "CLASS" "INDEXDIV-QUICKLINKS"))
(with-mode indexdiv-quicklinks-mode (with-mode indexdiv-quicklinks-mode
(process-node-list indexdivs)))) (process-node-list indexdivs))))
(process-node-list preamble) (process-node-list preamble)
(if (node-list-empty? entries) (if (node-list-empty? entries)
(empty-sosofo) (empty-sosofo)
...@@ -402,11 +402,11 @@ ...@@ -402,11 +402,11 @@
(element indexdiv (element indexdiv
(make sequence (make sequence
(make element gi: "A" (make element gi: "A"
attributes: (list (list "HREF" (href-to (current-node)))) attributes: (list (list "HREF" (href-to (current-node))))
(element-title-sosofo)) (element-title-sosofo))
(if (not (last-sibling?)) (if (not (last-sibling?))
(literal " | ") (literal " | ")
(literal ""))))) (literal "")))))
;; Changed to strip and normalize index term content (overrides ;; Changed to strip and normalize index term content (overrides
...@@ -478,8 +478,8 @@ ...@@ -478,8 +478,8 @@
(define %graphic-default-extension% (define %graphic-default-extension%
(cond (tex-backend (if texpdf-output "pdf" "eps")) (cond (tex-backend (if texpdf-output "pdf" "eps"))
(rtf-backend "gif") (rtf-backend "gif")
(else "XXX"))) (else "XXX")))
;; Need to add pdf here so that the above works. Default setup ;; Need to add pdf here so that the above works. Default setup
;; doesn't know about PDF. ;; doesn't know about PDF.
...@@ -499,15 +499,15 @@ ...@@ -499,15 +499,15 @@
(mode book-titlepage-verso-mode (mode book-titlepage-verso-mode
(element (legalnotice para) (element (legalnotice para)
(make paragraph (make paragraph
use: book-titlepage-verso-style ;; alter this if ever it needs to appear elsewhere use: book-titlepage-verso-style ;; alter this if ever it needs to appear elsewhere
quadding: %default-quadding% quadding: %default-quadding%
line-spacing: (* 0.8 (inherited-line-spacing)) line-spacing: (* 0.8 (inherited-line-spacing))
font-size: (* 0.8 (inherited-font-size)) font-size: (* 0.8 (inherited-font-size))
space-before: (* 0.8 %para-sep%) space-before: (* 0.8 %para-sep%)
space-after: (* 0.8 %para-sep%) space-after: (* 0.8 %para-sep%)
first-line-start-indent: (if (is-first-para) first-line-start-indent: (if (is-first-para)
(* 0.8 %para-indent-firstpara%) (* 0.8 %para-indent-firstpara%)
(* 0.8 %para-indent%)) (* 0.8 %para-indent%))
(process-children)))) (process-children))))
...@@ -516,8 +516,8 @@ ...@@ -516,8 +516,8 @@
(element (varlistentry term) (element (varlistentry term)
(make paragraph (make paragraph
space-before: (if (first-sibling?) space-before: (if (first-sibling?)
%para-sep% %para-sep%
0pt) 0pt)
keep-with-next?: #t keep-with-next?: #t
(process-children))) (process-children)))
...@@ -560,13 +560,13 @@ ...@@ -560,13 +560,13 @@
(members (select-elements (children (current-node)) (normalize "member")))) (members (select-elements (children (current-node)) (normalize "member"))))
(cond (cond
((equal? type (normalize "inline")) ((equal? type (normalize "inline"))
(if (equal? (gi (parent (current-node))) (if (equal? (gi (parent (current-node)))
(normalize "para")) (normalize "para"))
(process-children) (process-children)
(make paragraph (make paragraph
space-before: %para-sep% space-before: %para-sep%
space-after: %para-sep% space-after: %para-sep%
start-indent: (inherited-start-indent)))) start-indent: (inherited-start-indent))))
((equal? type (normalize "vert")) ((equal? type (normalize "vert"))
(my-simplelist-vert members)) (my-simplelist-vert members))
((equal? type (normalize "horiz")) ((equal? type (normalize "horiz"))
...@@ -577,18 +577,18 @@ ...@@ -577,18 +577,18 @@
(cond (cond
((equal? type (normalize "inline")) ((equal? type (normalize "inline"))
(make sequence (make sequence
(process-children) (process-children)
(if (not (last-sibling?)) (if (not (last-sibling?))
(literal ", ") (literal ", ")
(literal "")))) (literal ""))))
((equal? type (normalize "vert")) ((equal? type (normalize "vert"))
(make paragraph (make paragraph
space-before: 0pt space-before: 0pt
space-after: 0pt)) space-after: 0pt))
((equal? type (normalize "horiz")) ((equal? type (normalize "horiz"))
(make paragraph (make paragraph
quadding: 'start quadding: 'start
(process-children)))))) (process-children))))))
;; Jadetex doesn't handle links to the content of tables, so ;; Jadetex doesn't handle links to the content of tables, so
...@@ -599,8 +599,8 @@ ...@@ -599,8 +599,8 @@
(define (find-parent-table nd) (define (find-parent-table nd)
(let ((table (ancestor-member nd ($table-element-list$)))) (let ((table (ancestor-member nd ($table-element-list$))))
(if (node-list-empty? table) (if (node-list-empty? table)
nd nd
table))) table)))
;; (The function below overrides the one in print/dbindex.dsl.) ;; (The function below overrides the one in print/dbindex.dsl.)
...@@ -635,173 +635,173 @@ ...@@ -635,173 +635,173 @@
(define (first-part?) (define (first-part?)
(let* ((book (ancestor (normalize "book"))) (let* ((book (ancestor (normalize "book")))
(nd (ancestor-member (current-node) (nd (ancestor-member (current-node)
(append (append
(component-element-list) (component-element-list)
(division-element-list)))) (division-element-list))))
(bookch (children book))) (bookch (children book)))
(let loop ((nl bookch)) (let loop ((nl bookch))
(if (node-list-empty? nl) (if (node-list-empty? nl)
#f #f
(if (equal? (gi (node-list-first nl)) (normalize "part")) (if (equal? (gi (node-list-first nl)) (normalize "part"))
(if (node-list=? (node-list-first nl) nd) (if (node-list=? (node-list-first nl) nd)
#t #t
#f) #f)
(loop (node-list-rest nl))))))) (loop (node-list-rest nl)))))))
(define (first-reference?) (define (first-reference?)
(let* ((book (ancestor (normalize "book"))) (let* ((book (ancestor (normalize "book")))
(nd (ancestor-member (current-node) (nd (ancestor-member (current-node)
(append (append
(component-element-list) (component-element-list)
(division-element-list)))) (division-element-list))))
(bookch (children book))) (bookch (children book)))
(let loop ((nl bookch)) (let loop ((nl bookch))
(if (node-list-empty? nl) (if (node-list-empty? nl)
#f #f
(if (equal? (gi (node-list-first nl)) (normalize "reference")) (if (equal? (gi (node-list-first nl)) (normalize "reference"))
(if (node-list=? (node-list-first nl) nd) (if (node-list=? (node-list-first nl) nd)
#t #t
#f) #f)
(loop (node-list-rest nl))))))) (loop (node-list-rest nl)))))))
(define (part-titlepage elements #!optional (side 'recto)) (define (part-titlepage elements #!optional (side 'recto))
(let ((nodelist (titlepage-nodelist (let ((nodelist (titlepage-nodelist
(if (equal? side 'recto) (if (equal? side 'recto)
(reference-titlepage-recto-elements) (reference-titlepage-recto-elements)
(reference-titlepage-verso-elements)) (reference-titlepage-verso-elements))
elements)) elements))
;; partintro is a special case... ;; partintro is a special case...
(partintro (node-list-first (partintro (node-list-first
(node-list-filter-by-gi elements (list (normalize "partintro")))))) (node-list-filter-by-gi elements (list (normalize "partintro"))))))
(if (part-titlepage-content? elements side) (if (part-titlepage-content? elements side)
(make simple-page-sequence (make simple-page-sequence
page-n-columns: %titlepage-n-columns% page-n-columns: %titlepage-n-columns%
;; Make sure that page number format is correct. ;; Make sure that page number format is correct.
page-number-format: ($page-number-format$) page-number-format: ($page-number-format$)
;; Make sure that the page number is set to 1 if this is the ;; Make sure that the page number is set to 1 if this is the
;; first part in the book ;; first part in the book
page-number-restart?: (first-part?) page-number-restart?: (first-part?)
input-whitespace-treatment: 'collapse input-whitespace-treatment: 'collapse
use: default-text-style use: default-text-style
;; This hack is required for the RTF backend. If an external-graphic ;; 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 ;; 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 ;; thing (the graphic winds up on the baseline of the first line
;; of the page, left justified). This "one point rule" fixes ;; of the page, left justified). This "one point rule" fixes
;; that problem. ;; that problem.
(make paragraph (make paragraph
line-spacing: 1pt line-spacing: 1pt
(literal "")) (literal ""))
(let loop ((nl nodelist) (lastnode (empty-node-list))) (let loop ((nl nodelist) (lastnode (empty-node-list)))
(if (node-list-empty? nl) (if (node-list-empty? nl)
(empty-sosofo) (empty-sosofo)
(make sequence (make sequence
(if (or (node-list-empty? lastnode) (if (or (node-list-empty? lastnode)
(not (equal? (gi (node-list-first nl)) (not (equal? (gi (node-list-first nl))
(gi lastnode)))) (gi lastnode))))
(part-titlepage-before (node-list-first nl) side) (part-titlepage-before (node-list-first nl) side)
(empty-sosofo)) (empty-sosofo))
(cond (cond
((equal? (gi (node-list-first nl)) (normalize "subtitle")) ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
(part-titlepage-subtitle (node-list-first nl) side)) (part-titlepage-subtitle (node-list-first nl) side))
((equal? (gi (node-list-first nl)) (normalize "title")) ((equal? (gi (node-list-first nl)) (normalize "title"))
(part-titlepage-title (node-list-first nl) side)) (part-titlepage-title (node-list-first nl) side))
(else (else
(part-titlepage-default (node-list-first nl) side))) (part-titlepage-default (node-list-first nl) side)))
(loop (node-list-rest nl) (node-list-first nl))))) (loop (node-list-rest nl) (node-list-first nl)))))
(if (and %generate-part-toc% (if (and %generate-part-toc%
%generate-part-toc-on-titlepage% %generate-part-toc-on-titlepage%
(equal? side 'recto)) (equal? side 'recto))
(make display-group (make display-group
(build-toc (current-node) (build-toc (current-node)
(toc-depth (current-node)))) (toc-depth (current-node))))
(empty-sosofo)) (empty-sosofo))
;; PartIntro is a special case ;; PartIntro is a special case
(if (and (equal? side 'recto) (if (and (equal? side 'recto)
(not (node-list-empty? partintro)) (not (node-list-empty? partintro))
%generate-partintro-on-titlepage%) %generate-partintro-on-titlepage%)
($process-partintro$ partintro #f) ($process-partintro$ partintro #f)
(empty-sosofo))) (empty-sosofo)))
(empty-sosofo)))) (empty-sosofo))))
(define (reference-titlepage elements #!optional (side 'recto)) (define (reference-titlepage elements #!optional (side 'recto))
(let ((nodelist (titlepage-nodelist (let ((nodelist (titlepage-nodelist
(if (equal? side 'recto) (if (equal? side 'recto)
(reference-titlepage-recto-elements) (reference-titlepage-recto-elements)
(reference-titlepage-verso-elements)) (reference-titlepage-verso-elements))
elements)) elements))
;; partintro is a special case... ;; partintro is a special case...
(partintro (node-list-first (partintro (node-list-first
(node-list-filter-by-gi elements (list (normalize "partintro")))))) (node-list-filter-by-gi elements (list (normalize "partintro"))))))
(if (reference-titlepage-content? elements side) (if (reference-titlepage-content? elements side)
(make simple-page-sequence (make simple-page-sequence
page-n-columns: %titlepage-n-columns% page-n-columns: %titlepage-n-columns%
;; Make sure that page number format is correct. ;; Make sure that page number format is correct.
page-number-format: ($page-number-format$) page-number-format: ($page-number-format$)
;; Make sure that the page number is set to 1 if this is the ;; Make sure that the page number is set to 1 if this is the
;; first part in the book ;; first part in the book
page-number-restart?: (first-reference?) page-number-restart?: (first-reference?)
input-whitespace-treatment: 'collapse input-whitespace-treatment: 'collapse
use: default-text-style use: default-text-style
;; This hack is required for the RTF backend. If an external-graphic ;; 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 ;; 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 ;; thing (the graphic winds up on the baseline of the first line
;; of the page, left justified). This "one point rule" fixes ;; of the page, left justified). This "one point rule" fixes
;; that problem. ;; that problem.
(make paragraph (make paragraph
line-spacing: 1pt line-spacing: 1pt
(literal "")) (literal ""))
(let loop ((nl nodelist) (lastnode (empty-node-list))) (let loop ((nl nodelist) (lastnode (empty-node-list)))
(if (node-list-empty? nl) (if (node-list-empty? nl)
(empty-sosofo) (empty-sosofo)
(make sequence (make sequence
(if (or (node-list-empty? lastnode) (if (or (node-list-empty? lastnode)
(not (equal? (gi (node-list-first nl)) (not (equal? (gi (node-list-first nl))
(gi lastnode)))) (gi lastnode))))
(reference-titlepage-before (node-list-first nl) side) (reference-titlepage-before (node-list-first nl) side)
(empty-sosofo)) (empty-sosofo))
(cond (cond
((equal? (gi (node-list-first nl)) (normalize "author")) ((equal? (gi (node-list-first nl)) (normalize "author"))
(reference-titlepage-author (node-list-first nl) side)) (reference-titlepage-author (node-list-first nl) side))
((equal? (gi (node-list-first nl)) (normalize "authorgroup")) ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
(reference-titlepage-authorgroup (node-list-first nl) side)) (reference-titlepage-authorgroup (node-list-first nl) side))
((equal? (gi (node-list-first nl)) (normalize "corpauthor")) ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
(reference-titlepage-corpauthor (node-list-first nl) side)) (reference-titlepage-corpauthor (node-list-first nl) side))
((equal? (gi (node-list-first nl)) (normalize "editor")) ((equal? (gi (node-list-first nl)) (normalize "editor"))
(reference-titlepage-editor (node-list-first nl) side)) (reference-titlepage-editor (node-list-first nl) side))
((equal? (gi (node-list-first nl)) (normalize "subtitle")) ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
(reference-titlepage-subtitle (node-list-first nl) side)) (reference-titlepage-subtitle (node-list-first nl) side))
((equal? (gi (node-list-first nl)) (normalize "title")) ((equal? (gi (node-list-first nl)) (normalize "title"))
(reference-titlepage-title (node-list-first nl) side)) (reference-titlepage-title (node-list-first nl) side))
(else (else
(reference-titlepage-default (node-list-first nl) side))) (reference-titlepage-default (node-list-first nl) side)))
(loop (node-list-rest nl) (node-list-first nl))))) (loop (node-list-rest nl) (node-list-first nl)))))
(if (and %generate-reference-toc% (if (and %generate-reference-toc%
%generate-reference-toc-on-titlepage% %generate-reference-toc-on-titlepage%
(equal? side 'recto)) (equal? side 'recto))
(make display-group (make display-group
(build-toc (current-node) (build-toc (current-node)
(toc-depth (current-node)))) (toc-depth (current-node))))
(empty-sosofo)) (empty-sosofo))
;; PartIntro is a special case ;; PartIntro is a special case
(if (and (equal? side 'recto) (if (and (equal? side 'recto)
(not (node-list-empty? partintro)) (not (node-list-empty? partintro))
%generate-partintro-on-titlepage%) %generate-partintro-on-titlepage%)
($process-partintro$ partintro #f) ($process-partintro$ partintro #f)
(empty-sosofo))) (empty-sosofo)))
(empty-sosofo)))) (empty-sosofo))))
]]> <!-- %output-print --> ]]> <!-- %output-print -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment