summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
Diffstat (limited to 'print')
-rw-r--r--print/ChangeLog327
-rw-r--r--print/XREF2
-rw-r--r--print/catalog3
-rw-r--r--print/dbadmon.dsl161
-rw-r--r--print/dbautoc.dsl179
-rw-r--r--print/dbbibl.dsl868
-rw-r--r--print/dbblock.dsl689
-rw-r--r--print/dbcallou.dsl221
-rw-r--r--print/dbcompon.dsl520
-rw-r--r--print/dbdivis.dsl224
-rw-r--r--print/dbefsyn.dsl588
-rw-r--r--print/dbgloss.dsl117
-rw-r--r--print/dbgraph.dsl134
-rw-r--r--print/dbindex.dsl156
-rw-r--r--print/dbinfo.dsl1012
-rw-r--r--print/dbinline.dsl263
-rw-r--r--print/dblink.dsl457
-rw-r--r--print/dblists.dsl515
-rw-r--r--print/dblot.dsl24
-rw-r--r--print/dbmath.dsl92
-rw-r--r--print/dbmsgset.dsl51
-rw-r--r--print/dbparam.dsl2085
-rw-r--r--print/dbprint.dsl205
-rw-r--r--print/dbprocdr.dsl38
-rw-r--r--print/dbqanda.dsl126
-rw-r--r--print/dbrfntry.dsl215
-rw-r--r--print/dbsect.dsl208
-rw-r--r--print/dbsynop.dsl224
-rw-r--r--print/dbtable.dsl587
-rw-r--r--print/dbtitle.dsl52
-rw-r--r--print/dbttlpg.dsl6772
-rw-r--r--print/dbverb.dsl222
-rw-r--r--print/docbook.dsl197
-rw-r--r--print/notoc.dsl29
-rw-r--r--print/plain.dsl37
-rw-r--r--print/version.dsl14
36 files changed, 17614 insertions, 0 deletions
diff --git a/print/ChangeLog b/print/ChangeLog
new file mode 100644
index 0000000..17e1726
--- /dev/null
+++ b/print/ChangeLog
@@ -0,0 +1,327 @@
+2004-10-10 <petere78@users.sourceforge.net>
+
+ * dbadmon.dsl: Fix for bug #522140: Keep admonition titles and contents together when
+ graphics are used.
+
+ * dbcallou.dsl: Synchronized $callout-verbatim-display$ with $verbatim-display$; fixes
+ bug #517520 (callout ignores width of programlisting)
+
+ * dbttlpg.dsl: Give othercredit some useful rendering in print output, by copying over the
+ author rendering. Fix author-list-string for authorgroups that contain
+ both authors and othercredits. (bug #1038081)
+
+2004-10-09 <petere78@users.sourceforge.net>
+
+ * dbprint.dsl, dbverb.dsl: Patch #571688: Fixes excessive after spacing when a listitem contains
+ multiple paras or verbatim environments. Patches originally by Tim Waugh
+ and Tammy Fox.
+
+ * docbook.dsl: New Bulgarian translation by Viktor Vasilev (SF patch #1040075)
+
+2004-09-17 <petere78@users.sourceforge.net>
+
+ * docbook.dsl: Bosnian translation by Kemal Skripic
+
+2004-09-14 <petere78@users.sourceforge.net>
+
+ * dbblock.dsl: Fix for bug #502066: Empty ulinks don't generate footnotes, so they should
+ be omitted from the footnote counting. Patch by Bruce A. Mah.
+
+ * dbprint.dsl: Fix for bug #529969: Make italic monospace and strong monospace inherit
+ verbatim-size-factor. Patch by David Aumueller.
+
+2004-07-11 <nyraghu@users.sourceforge.net>
+
+ * version.dsl: Closes Bug 912831: the last character of VERSION was being cut off.
+
+2003-12-05 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbdivis.dsl: fix a bug when multiple elements in $generate-book-lot-list$ had content; whitespace and comment updates
+
+2003-04-29 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbcompon.dsl: Finding the subtitle for a component should use the parent title if
+ set; this is consistent with how the title is already set;
+ closes SF bug 613773.
+
+ * dbcompon.dsl: Suppress some cases where components were restarting page numbering,
+ fix from Ian Castle; closes SF bug 439751.
+
+ * dbparam.dsl: Correct reference to undefined variable
+ "admon-graphic-default-extension".
+
+ * dbttlpg.dsl: Add elements to print version of article-titlepage-recto-elements so
+ that it matches the HTML version, fixes SF bug 626909.
+
+2003-04-26 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbparam.dsl: rename parameter admon-graphic-default-extension to
+ %admon-graphics-extension% for consistency
+
+ * dbparam.dsl: Note that %admon-graphics-path% requires the trailing directory separator
+ --
+
+ * dbparam.dsl: %admon-graphics-extension% will use the old name,
+ admon-graphic-default-extension, if set
+
+2003-03-25 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * db31.dsl, dbblock.dsl, dbcompon.dsl, dbgraph.dsl, dbinline.dsl, dbqanda.dsl, dbsect.dsl, docbook.dsl:
+ move data from db31 into its proper component files
+
+2003-03-24 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * dbttlpg.dsl: Added support for revdescription inside revison on titlepages
+
+2003-03-21 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * Makefile: Don't hardcode DSSSL file list, use $(wildcard *.dsl); clean is cleaner
+
+2003-02-17 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbblock.dsl, dbtitle.dsl: More cases where process-children-trim should be used.
+
+ * dbcompon.dsl: Add some comments in the ARTICLE element.
+
+ * dblists.dsl: In process-listitem-content replace (process-node-list (children
+ (current-node))) with (process-children-trim) -- we need to be
+ trimming whitespace. Some retabbing.
+
+ * dbprint.dsl: $paragraph$ should use (process-children-trim); this fixes a space
+ indent in RTF output on all PARAs marked up like:
+ <para>
+ Content ...
+
+ * dbtable.dsl: Remove the %cals-cell-before-column-margin% hack for TeX backend, it's
+ not needed anymore.
+
+2003-02-13 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbblock.dsl: element footnote/para uses default-text-style; set lines: wrap for the
+ case of endnotes within verbatim 'asis' environments, but it doesn't
+ seem to actually help (cf test programlisting.004)
+
+2003-02-07 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbttlpg.dsl: some space over copyright; fixes Bug #542681
+
+2003-01-21 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbparam.dsl: correct discussion of possible settings for %paper-type% and %visual-acuity%
+
+2003-01-15 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbadmon.dsl, dbautoc.dsl, dbblock.dsl, dbcallou.dsl, dbdivis.dsl, dbefsyn.dsl, dbgloss.dsl, dbgraph.dsl, dbindex.dsl, dbinfo.dsl, dbinline.dsl, dblink.dsl, dblists.dsl, dblot.dsl, dbmath.dsl, dbmsgset.dsl, dbprint.dsl, dbprocdr.dsl, dbrfntry.dsl, dbsect.dsl, dbsynop.dsl, dbtable.dsl, dbtitle.dsl, dbverb.dsl, docbook.dsl, notoc.dsl, plain.dsl:
+ update docbook URL to http://docbook.sourceforge.net/projects/dsssl/;
+ N.B.: credit for the group option and repeating goes to John Daily
+
+ * dbblock.dsl, dbparam.dsl: parameters for %formal-object-title-font-weight%
+ %table-title-font-weight%, reviewed and tested, sourceforge patch #599366
+
+ * dblink.dsl: xref to varlistentry using the term, patch from Jens Emmerich; closes
+ bug 520561
+
+ * dbsect.dsl: make <section> appear correctly in the PDF bookmark hierarchy; also
+ fix font size selection for section titles
+
+ corrects sourceforge bugs 589247 and 524028; patch from Carsten Haese
+ appreciated
+
+ * dbsynop.dsl: Patch #562401 <group choice="opt" rep="repeat">, elipsis should be
+ outside of group, reference test cmdsynopsis.003
+
+2002-12-16 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * dbblock.dsl, dbparam.dsl: %epigraph-start-indent% and %epigraph-end-indent% parameters allows
+ customization of epigraph positioning; %blockquote-start-indent% and
+ %blockquote-end-indent% parameters allows customization control of the
+ blockquote positioning
+
+2002-08-08 Adam Di Carlo <adicarlo@users.sourceforge.net>
+
+ * Makefile: clean rule
+
+2002-06-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbblock.dsl: Patch #473114: Footnote inherit font family
+
+2002-06-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbbibl.dsl, dbttlpg.dsl: Fix bug #502337: remove 'by' from copyright statements
+
+2002-05-22 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbblock.dsl: Support attribution on blockquote
+
+ * dbinfo.dsl: Support chapterinfo, prefaceinfo, and appendixinfo
+
+2002-05-12 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbttlpg.dsl: Bug #494693: bad formalpara formatting on title pages
+
+ * dbverb.dsl: Bugs #429663 and #474328 fixed (allow external linespecific content to be indented and numbered). Eight bit or unicode external linespecific content may be problematic though.
+
+2002-05-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dblink.dsl: Allow xref to refnamediv
+
+ * dblists.dsl: Bug #469318: fix variablelist indents
+
+2002-04-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbefsyn.dsl, dbverb.dsl: Format synopsis elements correctly outside of classsynopsis
+
+2002-03-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbautoc.dsl: Find titles in any context
+
+2002-03-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbefsyn.dsl: Support freestanding {method,field,constructor,destructor}synopsis
+
+2002-02-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbblock.dsl: Bug #429331: center figure title if image is centered
+
+2002-02-11 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbdivis.dsl, dbttlpg.dsl: Patch #502637: avoid blank page between title page recto/verso
+
+ * dbsect.dsl: Add section-info function
+
+2001-12-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbindex.dsl: Patch #468644: Fix font sizes in index
+
+ * dbprint.dsl: Bug #465133: Insufficient conditions on is-first-para
+
+ * dbttlpg.dsl: Bug #465136: Verso authorgroup broken for editors--still broken but a little better
+
+ * dbttlpg.dsl: Patch #470589: Abstracts indents should be relative
+
+2001-11-30 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dblink.dsl: Patch #473113: No footnote ulink when text matches
+
+ * dbsect.dsl: Patch #473116: Section levels
+
+ * dbttlpg.dsl: Patch #473115: Heading levels for parts
+
+ * docbook.dsl: Fix typo that causes the print stylesheet to break.
+
+ * docbook.dsl: New file.
+
+2001-11-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbgloss.dsl, dbindex.dsl: Attempt to handle glossary and index in article correctly
+
+2001-11-14 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.dsl: branches: 1.5.2;
+ Added Basque, Nynorsk, Ukranian, and Xhosa
+
+2001-11-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbinline.dsl: Support pubwork=article on citetitle
+
+2001-10-13 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * dbinline.dsl: Fixed bug #470840 - added support for methodname.
+
+2001-10-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbverb.dsl: Support linenumbering attribute on verbatim environments
+
+2001-09-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbadmon.dsl: Bug #449775: remove broken keep-with-next properties
+
+ * dbcallou.dsl: Bug #449494: make callouts work even if they appear on the last line of a verbatim environment
+
+2001-09-23 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dblink.dsl: Patch #461352, fix bug with ulink-footnotes and bop-footnotes simultaneously
+
+2001-08-30 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * db31.dsl: Fix XML/SGML discrepancy wrt normalization of notation names; move some common stuff into dbcommon
+
+2001-08-06 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbadmon.dsl: Patches #441806, keep with next in admonitions
+
+ * dbinline.dsl: Support 'bold' and 'strong' roles on emphasis in the expected way, added %{emphasis,phrase}-propagates-style% parameters
+
+ * docbook.dsl: Patches #439975, support OpenJade two-sided characteristics
+
+2001-08-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbttlpg.dsl: Don't suppress keywordset if it's put on the title page
+
+2001-07-07 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbdivis.dsl: Don't restart page numbering on ToC pages
+
+ * notoc.dsl: Bug #439065, use correct parameters
+
+2001-07-05 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbparam.dsl: Patch #420012, Add colon to content-title-end-punct
+
+2001-07-04 <uid48421@users.sourceforge.net>
+
+ * db31.dsl: Bug #426745, don't make first para of question and answer bold
+
+ * dbblock.dsl: Bug #436220, fix table footnotes when bop-footnotes is #t
+
+ * dbgloss.dsl, dblists.dsl, dbrfntry.dsl, dbtitle.dsl:
+ Bug #420015: set heading-level appropriately in glossary
+
+ * dblists.dsl: Bug #418633, attempt to fix indentation in variablelists
+
+ * docbook.dsl: Added Afrikaans and Turkish
+
+2001-05-11 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.dsl: Support Serbian and Traditional Chinese
+
+2001-05-03 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * dbinline.dsl: Added support for class="xmlpi" and class="emptytag" in <sgmltag>.
+ Element and attribute names displayed in monospace, same way as in HTML by XSL.
+
+2001-04-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * db31.dsl: Handle display? property correctly on imagedata graphics
+
+2001-04-24 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * db31.dsl: Bug #418474: only output a space after the qanda label if the label isn't empty
+
+2001-04-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbautoc.dsl: Make top-level entries in the TOC 'keep-with-next'
+
+2001-04-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbttlpg.dsl: Bug #414681: add heading-level to set and book titles
+
+2001-04-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * dbblock.dsl: Force upright posture and default quadding in footnote text
+
+ * dblists.dsl: Format variablelist title in the table when a variablelist is formatted with a table
+
+2001-04-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * Makefile: New file.
+
+2001-04-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * db31.dsl: Fix bug 412548, allow WMF in media objects
+
+2001-04-02 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * .cvsignore, catalog, db31.dsl, dbadmon.dsl, dbautoc.dsl, dbbibl.dsl, dbblock.dsl, dbcallou.dsl, dbcompon.dsl, dbdivis.dsl, dbefsyn.dsl, dbgloss.dsl, dbgraph.dsl, dbindex.dsl, dbinfo.dsl, dbinline.dsl, dblink.dsl, dblists.dsl, dblot.dsl, dbmath.dsl, dbmsgset.dsl, dbparam.dsl, dbprint.dsl, dbprocdr.dsl, dbrfntry.dsl, dbsect.dsl, dbsynop.dsl, dbtable.dsl, dbtitle.dsl, dbttlpg.dsl, dbverb.dsl, docbook.dsl, notoc.dsl, plain.dsl, version.dsl:
+ Initial checkins
+
diff --git a/print/XREF b/print/XREF
new file mode 100644
index 0000000..3ec54e8
--- /dev/null
+++ b/print/XREF
@@ -0,0 +1,2 @@
+Symbol Defined In Used In
+================== ============================= =============================
diff --git a/print/catalog b/print/catalog
new file mode 100644
index 0000000..f5ce23a
--- /dev/null
+++ b/print/catalog
@@ -0,0 +1,3 @@
+CATALOG "../catalog"
+
+
diff --git a/print/dbadmon.dsl b/print/dbadmon.dsl
new file mode 100644
index 0000000..a765847
--- /dev/null
+++ b/print/dbadmon.dsl
@@ -0,0 +1,161 @@
+;; $Id: dbadmon.dsl,v 1.5 2004/10/10 14:18:40 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================ ADMONITIONS =============================
+
+(define ($graphical-admonition$)
+ (let* ((adm (current-node))
+ (title (select-elements (children adm)
+ (normalize "title")))
+ (title? (not (node-list-empty? title)))
+ (adm-title (if title?
+ (with-mode title-sosofo-mode
+ (process-node-list (node-list-first title)))
+ (literal (gentext-element-name adm))))
+ (graphic (make external-graphic
+ display?: #f
+ entity-system-id: ($admon-graphic$)))
+ (f-child (node-list-first (children (current-node))))
+ (r-child (node-list-rest (children (current-node)))))
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ start-indent: (+ (inherited-start-indent) ($admon-graphic-width$))
+ font-family-name: %admon-font-family%
+ font-size: (- %bf-size% 1pt)
+ font-weight: 'medium
+ font-posture: 'upright
+ line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+ (if title?
+ (make display-group
+ (make paragraph
+ first-line-start-indent: (- ($admon-graphic-width$))
+ keep-with-next?: #t
+ (make line-field
+ field-width: ($admon-graphic-width$)
+ graphic)
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ adm-title))
+ (process-children))
+ (make display-group
+ (make paragraph
+ first-line-start-indent: (- ($admon-graphic-width$))
+ (make line-field
+ field-width: ($admon-graphic-width$)
+ graphic)
+ (process-node-list (children f-child)))
+ (process-node-list r-child))))))
+
+(define ($admonition$)
+ (if %admon-graphics%
+ ($graphical-admonition$)
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ start-indent: (if %admon-graphics%
+ (inherited-start-indent)
+ (+ (inherited-start-indent) (* (ILSTEP) 2)))
+ font-size: (- %bf-size% 1pt)
+ font-weight: 'medium
+ font-posture: 'upright
+ font-family-name: %admon-font-family%
+ line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+ (process-children))))
+
+(define ($admonpara$)
+ (let* ((title (select-elements
+ (children (parent (current-node))) (normalize "title")))
+ (has-title (not (node-list-empty? title)))
+ (adm-title (if has-title
+ (make sequence
+ (with-mode title-sosofo-mode
+ (process-node-list (node-list-first title)))
+ (literal (gentext-label-title-sep
+ (gi (parent (current-node))))))
+ (literal
+ (gentext-element-name
+ (parent (current-node)))
+ (gentext-label-title-sep
+ (gi (parent (current-node))))))))
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ (if (and (not %admon-graphics%) (= (child-number) 1))
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ adm-title)
+ (empty-sosofo))
+ (process-children-trim))))
+
+(element important ($admonition$))
+(element (important title) (empty-sosofo))
+(element (important para) ($admonpara$))
+(element (important simpara) ($admonpara$))
+
+(element note ($admonition$))
+(element (note title) (empty-sosofo))
+(element (note para) ($admonpara$))
+(element (note simpara) ($admonpara$))
+
+(element tip ($admonition$))
+(element (tip title) (empty-sosofo))
+(element (tip para) ($admonpara$))
+(element (tip simpara) ($admonpara$))
+
+;; perils are given special treatment by generating a centered title
+;; and throwing a box around them
+;; note that the paragraph indents are set by the box characteristics
+;;
+(define ($peril$)
+ (let* ((title (select-elements
+ (children (current-node)) (normalize "title")))
+ (has-title (not (node-list-empty? title)))
+ (adm-title (if has-title
+ (make sequence
+ (with-mode title-sosofo-mode
+ (process-node-list (node-list-first title))))
+ (literal
+ (gentext-element-name
+ (current-node)))))
+ (hs (HSIZE 2)))
+ (if %admon-graphics%
+ ($graphical-admonition$)
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ font-family-name: %admon-font-family%
+ font-size: (- %bf-size% 1pt)
+ font-weight: 'medium
+ font-posture: 'upright
+ line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+ (make box
+ display?: #t
+ box-type: 'border
+ line-thickness: 2pt
+ start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt)
+ end-indent: (inherited-end-indent)
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: 1em
+ end-indent: 1em
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ quadding: 'center
+ keep-with-next?: #t
+ adm-title)
+ (process-children))))))
+
+(element caution ($peril$))
+(element (caution title) (empty-sosofo))
+
+(element warning ($peril$))
+(element (warning title) (empty-sosofo))
diff --git a/print/dbautoc.dsl b/print/dbautoc.dsl
new file mode 100644
index 0000000..2197c4a
--- /dev/null
+++ b/print/dbautoc.dsl
@@ -0,0 +1,179 @@
+;; $Id: dbautoc.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================== TABLE OF CONTENTS =========================
+
+(define %toc-indent% 2pi)
+(define %toc-spacing-factor% 0.4)
+
+;; Returns the depth of auto TOC that should be made at the nd-level
+(define (toc-depth nd)
+ (if (string=? (gi nd) (normalize "book"))
+ 7
+ 1))
+
+(define (format-page-number)
+ (current-node-page-number-sosofo))
+
+;; Prints the TOC title if first? is true, otherwise does nothing
+(define (toc-title first?)
+ (let ((hsize (if (or (equal? (gi (current-node)) (normalize "article"))
+ (equal? (gi (current-node)) (normalize "part")))
+ (HSIZE 3)
+ (HSIZE 4))))
+ (if first?
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: hsize
+ line-spacing: (* hsize %line-spacing-factor%)
+ space-before: (* hsize %head-before-factor%)
+ space-after: (* hsize %head-after-factor%)
+ start-indent: 0pt
+ first-line-start-indent: 0pt
+ quadding: %component-title-quadding%
+ heading-level: (if %generate-heading-level% 1 0)
+ keep-with-next?: #t
+ (literal (gentext-element-name (normalize "toc"))))
+ (empty-sosofo))))
+
+;; Prints the TOC title if first? is true, otherwise does nothing
+(define (lot-title first? lotgi)
+ (if first?
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 4)
+ line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+ space-before: (* (HSIZE 4) %head-before-factor%)
+ space-after: (* (HSIZE 4) %head-after-factor%)
+ start-indent: 0pt
+ first-line-start-indent: 0pt
+ quadding: %component-title-quadding%
+ heading-level: (if %generate-heading-level% 1 0)
+ keep-with-next?: #t
+ (literal ($lot-title$ lotgi)))
+ (empty-sosofo)))
+
+;; Print the TOC entry for tocentry
+(define ($toc-entry$ tocentry level)
+ (make paragraph
+ start-indent: (+ %body-start-indent%
+ (* %toc-indent% level))
+ first-line-start-indent: (* -1 %toc-indent%)
+ font-weight: (if (= level 1) 'bold 'medium)
+ space-before: (if (= level 1) (* %toc-spacing-factor% 6pt) 0pt)
+ space-after: (if (= level 1) (* %toc-spacing-factor% 6pt) 0pt)
+ keep-with-next?: (if (= level 1) #t #f)
+ quadding: 'start
+ (make link
+ destination: (node-list-address tocentry)
+ (make sequence
+ (if (equal? (element-label tocentry) "")
+ (empty-sosofo)
+ (make sequence
+ (element-label-sosofo tocentry)
+ (literal (gentext-label-title-sep (gi tocentry)))))
+ (element-title-sosofo tocentry)))
+ (if (and (= level 1)
+ ;; ??? %chapter-title-page-separate%
+ %page-number-restart%)
+ (empty-sosofo) ;; Don't need the leader etc then
+ (make sequence
+ (make leader (literal "."))
+ (make link
+ destination: (node-list-address tocentry)
+ (make sequence
+ (if %page-number-restart%
+ (literal
+ (string-append
+ (if (= level 1)
+ (element-label tocentry #t)
+ (substring (element-label tocentry #t)
+ 0 (string-index (element-label tocentry #t) ".")))
+ (gentext-intra-label-sep "_pagenumber")))
+ (empty-sosofo))
+ (with-mode toc-page-number-mode
+ (process-node-list tocentry))))))))
+
+;; Build a TOC starting at nd reaching down depth levels.
+;; The optional arguments are used on recursive calls to build-toc
+;; and shouldn't be set by the initial caller...
+;;
+(define (build-toc nd depth #!optional (first? #t) (level 1))
+ (let* ((toclist (toc-list-filter
+ (node-list-filter-by-gi (children nd)
+ (append (division-element-list)
+ (component-element-list)
+ (section-element-list))))))
+ (if (or (<= depth 0)
+ (node-list-empty? toclist))
+ (empty-sosofo)
+ (make sequence
+ (toc-title first?)
+ (let loop ((nl toclist))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (sosofo-append
+ ($toc-entry$ (node-list-first nl) level)
+ (build-toc (node-list-first nl) (- depth 1) #f (+ level 1))
+ (loop (node-list-rest nl)))))))))
+
+;; Print the LOT entry
+(define ($lot-entry$ tocentry)
+ (make paragraph
+ start-indent: (+ %body-start-indent% %toc-indent%)
+ first-line-start-indent: (* -1 %toc-indent%)
+ font-weight: 'medium
+ space-before: 0pt
+ space-after: 0pt
+ quadding: 'start
+ (make link
+ destination: (node-list-address tocentry)
+ (make sequence
+ (if (equal? (element-label tocentry) "")
+ (empty-sosofo)
+ (make sequence
+ (element-label-sosofo tocentry #t)
+ (literal (gentext-label-title-sep (gi tocentry)))))
+ (element-title-sosofo tocentry)))
+ (make leader (literal "."))
+ (make link
+ destination: (node-list-address tocentry)
+ (make sequence
+ (if %page-number-restart%
+ (make sequence
+ (literal (substring (element-label tocentry #t)
+ 0 (string-index (element-label tocentry #t) "-")))
+ (literal (gentext-intra-label-sep "_pagenumber")))
+ (empty-sosofo))
+ (with-mode toc-page-number-mode
+ (process-node-list tocentry))))))
+
+;; Build a LOT starting at nd for all the lotgi's it contains.
+;; The optional arguments are used on recursive calls to build-toc
+;; and shouldn't be set by the initial caller...
+;;
+(define (build-lot nd lotgi #!optional (first? #t))
+ (let* ((lotlist (select-elements (descendants nd)
+ (normalize lotgi))))
+ (if (node-list-empty? lotlist)
+ (empty-sosofo)
+ (make sequence
+ (lot-title first? lotgi)
+ (let loop ((nl lotlist))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (if (string=? (gi (node-list-first nl)) lotgi)
+ ($lot-entry$ (node-list-first nl))
+ (empty-sosofo))
+ (build-lot (node-list-first nl) lotgi #f)
+ (loop (node-list-rest nl)))))))))
+
+(mode toc-page-number-mode
+ (default
+ (format-page-number)))
diff --git a/print/dbbibl.dsl b/print/dbbibl.dsl
new file mode 100644
index 0000000..38340a9
--- /dev/null
+++ b/print/dbbibl.dsl
@@ -0,0 +1,868 @@
+;; $Id: dbbibl.dsl,v 1.2 2002/06/09 12:04:09 nwalsh Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ......................... BIBLIOGRAPHY PARAMS .........................
+
+;; these should be in dbparam...
+(define %biblsep% ", ")
+(define %biblend% ".")
+
+(define %biblioentry-in-entry-order% #t)
+
+;; .................... BIBLIOGRAPHY and BIBLIODIV ......................
+
+(define (bibliography-content)
+ ;; Note that the code below works for both the case where the bibliography
+ ;; has BIBLIODIVs and the case where it doesn't, by the slightly subtle
+ ;; fact that if it does, then allentries will be (empty-node-list).
+ (let* ((allbibcontent (children (current-node)))
+ (prebibcontent (node-list-filter-by-not-gi
+ allbibcontent
+ (list (normalize "biblioentry")
+ (normalize "bibliomixed"))))
+ (allentries (node-list-filter-by-gi
+ allbibcontent
+ (list (normalize "biblioentry")
+ (normalize "bibliomixed"))))
+ (entries (if biblio-filter-used
+ (biblio-filter allentries)
+ allentries)))
+ (make sequence
+ (process-node-list prebibcontent)
+ (process-node-list entries))))
+
+(element (book bibliography)
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-restart?: (or %page-number-restart%
+ (book-start?)
+ (first-chapter?))
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ start-indent: %body-start-indent%
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+ (make sequence
+ ($component-title$)
+ (bibliography-content))
+ (make-endnotes)))
+
+(element bibliography
+ ;; A bibliography that's inside something else...
+ (let* ((sect (ancestor-member (current-node)
+ (append (section-element-list)
+ (component-element-list))))
+ (hlevel (+ (SECTLEVEL sect) 1))
+ (hs (HSIZE (- 4 hlevel))))
+ (make sequence
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: (if (< hlevel 5) 'bold 'medium)
+ font-posture: (if (< hlevel 5) 'upright 'italic)
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: (* hs %head-before-factor%)
+ space-after: (* hs %head-after-factor%)
+ start-indent: (if (or (>= hlevel 3)
+ (member (gi) (list (normalize "refsect1")
+ (normalize "refsect2")
+ (normalize "refsect3"))))
+ %body-start-indent%
+ 0pt)
+ first-line-start-indent: 0pt
+ quadding: %section-title-quadding%
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% (+ hlevel 1) 0)
+ (element-title-sosofo (current-node)))
+ (bibliography-content))))
+
+(element (bibliography title) (empty-sosofo))
+
+(element bibliodiv
+ (let* ((allentries (node-list-filter-by-gi (children (current-node))
+ (list (normalize "biblioentry")
+ (normalize "bibliomixed"))))
+ (entries (if biblio-filter-used
+ (biblio-filter allentries)
+ allentries)))
+ (if (and biblio-filter-used (node-list-empty? entries))
+ (empty-sosofo)
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ start-indent: %body-start-indent%
+ (make sequence
+ ($section-title$)
+ (process-node-list entries))))))
+
+(element (bibliodiv title) (empty-sosofo))
+
+;; ..................... BIBLIOGRAPHY ENTRIES .........................
+
+(define (biblioentry-inline-sep node rest)
+ ;; Output the character that should separate inline node from rest
+ (cond
+ ((and (equal? (gi node) (normalize "title"))
+ (equal? (gi (node-list-first rest)) (normalize "subtitle")))
+ (make sequence
+ font-posture: 'italic
+ (literal ": ")))
+ (else
+ (literal %biblsep%))))
+
+(define (biblioentry-inline-end blocks)
+ ;; Output the character that should occur at the end of inline
+ (literal %biblend%))
+
+(define (biblioentry-block-sep node rest)
+ ;; Output the character that should separate block node from rest
+ (empty-sosofo))
+
+(define (biblioentry-block-end)
+ ;; Output the character that should occur at the end of block
+ (empty-sosofo))
+
+(element biblioentry
+ (let* ((expanded-children (expand-children
+ (children (current-node))
+ (biblioentry-flatten-elements)))
+ (all-inline-children (if %biblioentry-in-entry-order%
+ (titlepage-gi-list-by-nodelist
+ (biblioentry-inline-elements)
+ expanded-children)
+ (titlepage-gi-list-by-elements
+ (biblioentry-inline-elements)
+ expanded-children)))
+ (block-children (if %biblioentry-in-entry-order%
+ (titlepage-gi-list-by-nodelist
+ (biblioentry-block-elements)
+ expanded-children)
+ (titlepage-gi-list-by-elements
+ (biblioentry-block-elements)
+ expanded-children)))
+ (leading-abbrev (if (equal? (normalize "abbrev")
+ (gi (node-list-first
+ all-inline-children)))
+ (node-list-first all-inline-children)
+ (empty-node-list)))
+ (inline-children (if (node-list-empty? leading-abbrev)
+ all-inline-children
+ (node-list-rest all-inline-children)))
+ (has-leading-abbrev? (not (node-list-empty? leading-abbrev)))
+ (xreflabel (if (or has-leading-abbrev? biblio-number)
+ #f
+ (attribute-string (normalize "xreflabel")))))
+ (make display-group
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: (+ (inherited-start-indent) 2pi)
+ first-line-start-indent: -2pi
+
+ (if (or biblio-number xreflabel has-leading-abbrev?)
+ (make sequence
+ (literal "[")
+
+ (if biblio-number
+ (literal (number->string (bibentry-number (current-node))))
+ (empty-sosofo))
+
+ (if xreflabel
+ (literal xreflabel)
+ (empty-sosofo))
+
+ (if has-leading-abbrev?
+ (with-mode biblioentry-inline-mode
+ (process-node-list leading-abbrev))
+ (empty-sosofo))
+
+ (literal "]\no-break-space;"))
+ (empty-sosofo))
+
+ (let loop ((nl inline-children))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (with-mode biblioentry-inline-mode
+ (process-node-list (node-list-first nl)))
+ (if (node-list-empty? (node-list-rest nl))
+ (biblioentry-inline-end block-children)
+ (biblioentry-inline-sep (node-list-first nl)
+ (node-list-rest nl)))
+ (loop (node-list-rest nl))))))
+
+ (make display-group
+ start-indent: (+ (inherited-start-indent) 2pi)
+ (let loop ((nl block-children))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (with-mode biblioentry-block-mode
+ (process-node-list (node-list-first nl)))
+ (if (node-list-empty? (node-list-rest nl))
+ (biblioentry-block-end)
+ (biblioentry-block-sep (node-list-first nl)
+ (node-list-rest nl)))
+ (loop (node-list-rest nl)))))))))
+
+(mode biblioentry-inline-mode
+ (element abbrev
+ (make sequence
+ (process-children)))
+
+ (element affiliation
+ (let ((inline-children (node-list-filter-by-not-gi
+ (children (current-node))
+ (list (normalize "address")))))
+ (let loop ((nl inline-children))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (process-node-list (node-list-first nl))
+ (if (node-list-empty? (node-list-rest nl))
+ (empty-sosofo)
+ (literal ", "))
+ (loop (node-list-rest nl)))))))
+
+ (element artpagenums
+ (make sequence
+ (process-children)))
+
+ (element author
+ (literal (author-list-string)))
+
+ (element authorgroup
+ (process-children))
+
+ (element authorinitials
+ (make sequence
+ (process-children)))
+
+ (element collab
+ (let* ((nl (children (current-node)))
+ (collabname (node-list-first nl))
+ (affil (node-list-rest nl)))
+ (make sequence
+ (process-node-list collabname)
+ (if (node-list-empty? affil)
+ (empty-sosofo)
+ (let loop ((nl affil))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (literal ", ")
+ (process-node-list (node-list-first nl))
+ (loop (node-list-rest nl)))))))))
+
+ (element (collab collabname)
+ (process-children))
+
+ (element confgroup
+ (let ((inline-children (node-list-filter-by-not-gi
+ (children (current-node))
+ (list (normalize "address")))))
+ (let loop ((nl inline-children))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (process-node-list (node-list-first nl))
+ (if (node-list-empty? (node-list-rest nl))
+ (empty-sosofo)
+ (literal ", "))
+ (loop (node-list-rest nl)))))))
+
+ (element contractnum
+ (process-children))
+
+ (element contractsponsor
+ (process-children))
+
+ (element contrib
+ (process-children))
+
+ (element copyright
+ ;; Just print the year(s)
+ (let ((years (select-elements (children (current-node))
+ (normalize "year"))))
+ (process-node-list years)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (empty-sosofo))))
+
+ (element corpauthor
+ (make sequence
+ (process-children)))
+
+ (element corpname
+ (make sequence
+ (process-children)))
+
+ (element date
+ (make sequence
+ (process-children)))
+
+ (element edition
+ (make sequence
+ (process-children)))
+
+ (element editor
+ (make sequence
+ (literal (gentext-edited-by))
+ (literal " ")
+ (literal (author-list-string))))
+
+ (element firstname
+ (make sequence
+ (process-children)))
+
+ (element honorific
+ (make sequence
+ (process-children)))
+
+ (element invpartnumber
+ (make sequence
+ (process-children)))
+
+ (element isbn
+ (make sequence
+ (process-children)))
+
+ (element issn
+ (make sequence
+ (process-children)))
+
+ (element issuenum
+ (make sequence
+ (process-children)))
+
+ (element lineage
+ (make sequence
+ (process-children)))
+
+ (element orgname
+ (make sequence
+ (process-children)))
+
+ (element othercredit
+ (literal (author-list-string)))
+
+ (element othername
+ (make sequence
+ (process-children)))
+
+ (element pagenums
+ (make sequence
+ (process-children)))
+
+ (element productname
+ (make sequence
+ ($charseq$)
+; this is actually a problem since "trade" is the default value for
+; the class attribute. we can put this back in in DocBook 5.0, when
+; class becomes #IMPLIED
+; (if (equal? (attribute-string "class") (normalize "trade"))
+; (literal "\trade-mark-sign;")
+; (empty-sosofo))
+ ))
+
+ (element productnumber
+ (make sequence
+ (process-children)))
+
+ (element pubdate
+ (make sequence
+ (process-children)))
+
+ (element publisher
+ (let ((pubname (select-elements (children (current-node))
+ (normalize "publishername")))
+ (cities (select-elements (descendants (current-node))
+ (normalize "city"))))
+ (make sequence
+ (process-node-list pubname)
+ (if (node-list-empty? cities)
+ (empty-sosofo)
+ (literal ", "))
+ (process-node-list cities))))
+
+ (element publishername
+ (make sequence
+ (process-children)))
+
+ (element (publisher address city)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (empty-sosofo))))
+
+ (element pubsnumber
+ (make sequence
+ (process-children)))
+
+ (element releaseinfo
+ (make sequence
+ (process-children)))
+
+ (element seriesvolnums
+ (make sequence
+ (process-children)))
+
+ (element subtitle
+ (make sequence
+ font-posture: 'italic
+ (process-children)))
+
+ (element surname
+ (make sequence
+ (process-children)))
+
+ (element title
+ (make sequence
+ font-posture: 'italic
+ (process-children)))
+
+ (element titleabbrev
+ (make sequence
+ (process-children)))
+
+ (element volumenum
+ (make sequence
+ (process-children)))
+
+ (element (bibliomixed title)
+ (make sequence
+ font-posture: 'italic
+ (process-children)))
+
+
+ (element (bibliomixed subtitle)
+ (make sequence
+ font-posture: 'italic
+ (process-children)))
+
+ (element (biblioset title)
+ (let ((rel (case-fold-up
+ (inherited-attribute-string (normalize "relation")))))
+ (cond
+ ((equal? rel "ARTICLE") (make sequence
+ (literal (gentext-start-quote))
+ (process-children)
+ (literal (gentext-end-quote))))
+ (else (make sequence
+ font-posture: 'italic
+ (process-children))))))
+
+ (element (bibliomset title)
+ (let ((rel (case-fold-up
+ (inherited-attribute-string (normalize "relation")))))
+ (cond
+ ((equal? rel "ARTICLE") (make sequence
+ (literal (gentext-start-quote))
+ (process-children)
+ (literal (gentext-end-quote))))
+ (else (make sequence
+ font-posture: 'italic
+ (process-children))))))
+)
+
+(mode biblioentry-block-mode
+ (element abstract
+ (make display-group
+ (process-children)))
+
+ (element (abstract title)
+ (make paragraph
+ font-weight: 'bold
+ (process-children)))
+
+ (element address
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))
+
+ (element authorblurb
+ (make display-group
+ (process-children)))
+
+ (element printhistory
+ (make display-group
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ font-weight: 'bold
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (make table-column
+ column-number: 1
+ width: (/ (- %body-width% (inherited-start-indent)) 3))
+ (make table-column
+ column-number: 2
+ width: (/ (- %body-width% (inherited-start-indent)) 3))
+ (make table-column
+ column-number: 3
+ width: (/ (- %body-width% (inherited-start-indent)) 3))
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (node-list-filter-by-gi
+ (descendants (current-node))
+ (list (normalize "revremark")
+ (normalize "revdescription")))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ (make sequence
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber)))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ (make sequence
+ (literal (gentext-revised-by))
+ (process-node-list revauthor)))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revremark))
+ (make paragraph
+ space-after: %block-sep%
+ (process-node-list revremark))
+ (empty-sosofo)))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesinfo
+ ;; This is a nearly biblioentry recursively...
+ (let* ((expanded-children (expand-children
+ (children (current-node))
+ (biblioentry-flatten-elements)))
+ (all-inline-children (if %biblioentry-in-entry-order%
+ (titlepage-gi-list-by-nodelist
+ (biblioentry-inline-elements)
+ expanded-children)
+ (titlepage-gi-list-by-elements
+ (biblioentry-inline-elements)
+ expanded-children)))
+ (block-children (if %biblioentry-in-entry-order%
+ (titlepage-gi-list-by-nodelist
+ (biblioentry-block-elements)
+ expanded-children)
+ (titlepage-gi-list-by-elements
+ (biblioentry-block-elements)
+ expanded-children)))
+ (inline-children all-inline-children))
+ (make display-group
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: (+ (inherited-start-indent) 2pi)
+ first-line-start-indent: -2pi
+
+ (let loop ((nl inline-children))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (with-mode biblioentry-inline-mode
+ (process-node-list (node-list-first nl)))
+ (if (node-list-empty? (node-list-rest nl))
+ (biblioentry-inline-end block-children)
+ (biblioentry-inline-sep (node-list-first nl)
+ (node-list-rest nl)))
+ (loop (node-list-rest nl))))))
+
+ (make display-group
+ start-indent: (+ (inherited-start-indent) 2pi)
+ (let loop ((nl block-children))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (with-mode biblioentry-block-mode
+ (process-node-list (node-list-first nl)))
+ (if (node-list-empty? (node-list-rest nl))
+ (biblioentry-block-end)
+ (biblioentry-block-sep (node-list-first nl)
+ (node-list-rest nl)))
+ (loop (node-list-rest nl)))))))))
+)
+
+(element bibliomixed
+ (let* ((all-inline-children (children (current-node)))
+ (leading-abbrev (if (equal? (normalize "abbrev")
+ (gi (node-list-first
+ all-inline-children)))
+ (node-list-first all-inline-children)
+ (empty-node-list)))
+ (inline-children (if (node-list-empty? leading-abbrev)
+ all-inline-children
+ (node-list-rest all-inline-children)))
+ (has-leading-abbrev? (not (node-list-empty? leading-abbrev)))
+ (xreflabel (if (or has-leading-abbrev? biblio-number)
+ #f
+ (attribute-string (normalize "xreflabel")))))
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: (+ (inherited-start-indent) 2pi)
+ first-line-start-indent: -2pi
+
+ (if (or biblio-number xreflabel has-leading-abbrev?)
+ (make sequence
+ (literal "[")
+
+ (if biblio-number
+ (literal (number->string (bibentry-number (current-node))))
+ (empty-sosofo))
+
+ (if xreflabel
+ (literal xreflabel)
+ (empty-sosofo))
+
+ (if has-leading-abbrev?
+ (with-mode biblioentry-inline-mode
+ (process-node-list leading-abbrev))
+ (empty-sosofo))
+
+ (literal "]\no-break-space;"))
+ (empty-sosofo))
+
+ (with-mode biblioentry-inline-mode
+ (process-children)))))
+
+;; ....................... BIBLIOGRAPHY ELEMENTS .......................
+
+;; These are element construction rules for bibliography elements that
+;; may occur outside of a BIBLIOENTRY or BIBLIOMIXED.
+
+(element bibliomisc (process-children))
+(element bibliomset (process-children))
+(element biblioset (process-children))
+(element bookbiblio (process-children))
+
+(element street ($charseq$))
+(element pob ($charseq$))
+(element postcode ($charseq$))
+(element city ($charseq$))
+(element state ($charseq$))
+(element country ($charseq$))
+(element phone ($charseq$))
+(element fax ($charseq$))
+(element otheraddr ($charseq$))
+(element affiliation ($charseq$))
+(element shortaffil ($charseq$))
+(element jobtitle ($charseq$))
+(element orgdiv ($charseq$))
+(element artpagenums ($charseq$))
+
+(element author
+ (make sequence
+ (literal (author-list-string))))
+
+(element authorgroup (process-children))
+
+(element collab (process-children))
+(element collabname ($charseq$))
+(element authorinitials ($charseq$))
+(element confgroup (process-children))
+(element confdates ($charseq$))
+(element conftitle ($charseq$))
+(element confnum ($charseq$))
+(element confsponsor ($charseq$))
+(element contractnum ($charseq$))
+(element contractsponsor ($charseq$))
+
+(element copyright
+ (make paragraph
+ (make sequence
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children-trim))))
+
+(element year
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+(element holder ($charseq$))
+
+(element corpauthor
+ (make sequence
+ (literal (author-list-string))))
+
+(element corpname ($charseq$))
+(element date ($charseq$))
+(element edition ($charseq$))
+(element editor ($charseq$))
+(element isbn ($charseq$))
+(element issn ($charseq$))
+(element invpartnumber ($charseq$))
+(element issuenum ($charseq$))
+
+(element legalnotice ($semiformal-object$))
+(element (legalnotice title) (empty-sosofo))
+
+(element modespec (empty-sosofo))
+
+(element orgname ($charseq$))
+
+(element othercredit
+ (make sequence
+ (literal (author-list-string))))
+
+(element pagenums ($charseq$))
+(element contrib ($charseq$))
+
+(element firstname ($charseq$))
+(element honorific ($charseq$))
+(element lineage ($charseq$))
+(element othername ($charseq$))
+(element surname ($charseq$))
+
+(element printhistory (empty-sosofo))
+
+(element productname
+ (make sequence
+ ($charseq$)
+; this is actually a problem since "trade" is the default value for
+; the class attribute. we can put this back in in DocBook 5.0, when
+; class becomes #IMPLIED
+; (if (equal? (attribute-string "class") (normalize "trade"))
+; (literal "\trade-mark-sign;")
+; (empty-sosofo))
+))
+
+(element productnumber ($charseq$))
+(element pubdate ($charseq$))
+(element publisher (process-children))
+(element publishername ($charseq$))
+(element pubsnumber ($charseq$))
+(element releaseinfo (empty-sosofo))
+(element revision ($charseq$))
+(element revnumber ($charseq$))
+(element revremark ($charseq$))
+(element revdescription ($block-container$))
+(element seriesvolnums ($charseq$))
+(element volumenum ($charseq$))
+
+;; The (element (bookinfo revhistory)) construction rule is in dbinfo.dsl
+;; It calls $book-revhistory$...
+(define ($book-revhistory$)
+ (make sequence
+ (make paragraph
+ use: title-style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (* (HSIZE 1) %head-before-factor%)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+(element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (node-list-filter-by-gi
+ (descendants (current-node))
+ (list (normalize "revremark")
+ (normalize "revdescription")))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ (make sequence
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber)))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ (make sequence
+ (literal (gentext-revised-by))
+ (process-node-list revauthor)))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ (if (not (node-list-empty? revremark))
+ (make paragraph
+ space-after: %block-sep%
+ (process-node-list revremark))
+ (empty-sosofo)))))))
+
+(element (revision revnumber) (process-children-trim))
+(element (revision date) (process-children-trim))
+(element (revision authorinitials) (process-children-trim))
+(element (revision revremark) (process-children-trim))
+(element (revision revdescription) (process-children))
diff --git a/print/dbblock.dsl b/print/dbblock.dsl
new file mode 100644
index 0000000..4ee4912
--- /dev/null
+++ b/print/dbblock.dsl
@@ -0,0 +1,689 @@
+;; $Id: dbblock.dsl,v 1.13 2004/09/14 09:49:58 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(element revhistory ($book-revhistory$))
+
+(element highlights ($block-container$))
+
+(element (para blockquote)
+ (let* ((attrib (select-elements (children (current-node))
+ (normalize "attribution")))
+ (paras (node-list-filter-by-not-gi
+ (children (current-node))
+ (list (normalize "attribution")))))
+ (make sequence
+ (make paragraph
+ first-line-start-indent: 0pt ;; workaround a bug/feature?
+ ;; W/o the preceding line, the first-line-start-indent of the enclosing
+ ;; paragraph will apply to the paragraphs in this blockquote which is
+ ;; probably not wanted..
+ font-size: (* %bf-size% %smaller-size-factor%)
+ line-spacing: (* %bf-size% %line-spacing-factor%
+ %smaller-size-factor%)
+ space-before: %para-sep%
+ start-indent: (+ (inherited-start-indent) %blockquote-start-indent%)
+ end-indent: %blockquote-end-indent%
+ (process-node-list paras))
+ (if (node-list-empty? attrib)
+ (empty-sosofo)
+ (make paragraph
+ font-size: (* %bf-size% %smaller-size-factor%)
+ line-spacing: (* %bf-size% %line-spacing-factor%
+ %smaller-size-factor%)
+ space-before: 0pt
+ end-indent: 1em
+ quadding: 'end
+ (make sequence
+ (literal "\em-dash;")
+ (process-node-list attrib)))))))
+
+(element blockquote
+ (let* ((attrib (select-elements (children (current-node))
+ (normalize "attribution")))
+ (paras (node-list-filter-by-not-gi
+ (children (current-node))
+ (list (normalize "attribution")))))
+ (make sequence
+ (make paragraph
+ font-size: (* %bf-size% %smaller-size-factor%)
+ line-spacing: (* %bf-size% %line-spacing-factor%
+ %smaller-size-factor%)
+ space-before: %para-sep%
+ start-indent: (+ (inherited-start-indent) %blockquote-start-indent%)
+ end-indent: %blockquote-end-indent%
+ (process-node-list paras))
+ (if (node-list-empty? attrib)
+ (empty-sosofo)
+ (make paragraph
+ font-size: (* %bf-size% %smaller-size-factor%)
+ line-spacing: (* %bf-size% %line-spacing-factor%
+ %smaller-size-factor%)
+ space-before: 0pt
+ end-indent: 1em
+ quadding: 'end
+ (make sequence
+ (literal "\em-dash;")
+ (process-node-list attrib)))))))
+
+(element (blockquote para)
+ (if (absolute-last-sibling? (current-node))
+ (make paragraph
+ space-before: %para-sep%
+ space-after: 0pt
+ quadding: %default-quadding%
+ (process-children-trim))
+ ($paragraph$)))
+
+(element epigraph
+ (let* ((addln-indent %epigraph-start-indent%)
+ (attrib (select-elements (children (current-node))
+ (normalize "attribution")))
+ (paras (node-list-filter-by-not-gi
+ (children (current-node))
+ (list (normalize "attribution")))))
+ (make display-group
+ start-indent: (+ %body-start-indent% addln-indent)
+ end-indent: %epigraph-end-indent%
+ font-posture: 'italic
+ (process-node-list paras)
+ (if (node-list-empty? attrib)
+ (empty-sosofo)
+ (make paragraph
+ space-before: 0pt
+ quadding: 'end
+ (process-node-list attrib))))))
+
+(element attribution
+ ($charseq$))
+
+(element (epigraph para)
+ (if (absolute-last-sibling? (current-node))
+ (make paragraph
+ space-before: %para-sep%
+ space-after: 0pt
+ quadding: %default-quadding%
+ (process-children-trim))
+ ($paragraph$)))
+
+(element para ($paragraph$))
+(element simpara ($paragraph$))
+
+(element formalpara ($para-container$))
+
+(element (formalpara title) ($runinhead$))
+(element (formalpara para) (make sequence (process-children-trim)))
+
+(element sidebar
+ (make box
+ display?: #t
+ box-type: 'border
+ line-thickness: 1pt
+ start-indent: (inherited-start-indent)
+ end-indent: (inherited-end-indent)
+ (if (node-list-empty? (select-elements (children (current-node))
+ (normalize "title")))
+ (make display-group
+ start-indent: 2pt
+ end-indent: 2pt
+ space-before: %block-sep%
+ space-after: %block-sep%
+ (process-children))
+ (make display-group
+ start-indent: 2pt
+ end-indent: 2pt
+ space-before: 0pt
+ space-after: %block-sep%
+ (make sequence
+ (let* ((object (current-node))
+ (title (select-elements (children object)
+ (normalize "title")))
+ (nsep (gentext-label-title-sep (gi object))))
+ (make paragraph
+ font-weight: 'bold
+ space-before: %block-sep%
+ space-after: %para-sep%
+ keep-with-next?: #t
+ (literal (gentext-element-name object))
+ (if (string=? (element-label object) "")
+ (literal nsep)
+ (literal " " (element-label object) nsep))
+ (process-node-list (children title))))
+ (process-children))))))
+
+(element (sidebar title) (empty-sosofo))
+
+(element abstract
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ start-indent: %body-start-indent%
+ (process-children)))
+
+(element authorblurb ($block-container$))
+
+(element ackno ($paragraph$))
+
+(define ($inline-object$)
+ (process-children))
+
+(define ($informal-object$ #!optional (rule-before? #f) (rule-after? #f))
+ (make display-group
+ start-indent: (+ %block-start-indent% (inherited-start-indent))
+ space-before: %block-sep%
+ space-after: %block-sep%
+ (if rule-before?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-after: (/ %block-sep% 2)
+ keep-with-next?: #t)
+ (empty-sosofo))
+ (process-children)
+ (if rule-after?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-before: (/ %block-sep% 2)
+ keep-with-previous?: #t)
+ (empty-sosofo))))
+
+(define (object-title-after #!optional (node (current-node)))
+ (if (member (gi node) ($object-titles-after$))
+ #t
+ #f))
+
+(define (float-object node)
+ ;; you could redefine this to make only figures float, or only tables,
+ ;; or whatever...
+ #t)
+
+(define (named-formal-objects)
+ (list (normalize "figure")
+ (normalize "table")
+ (normalize "example")
+ (normalize "equation")))
+
+(define ($formal-object$ #!optional (rule-before? #f) (rule-after? #f))
+ (let* ((object-sosofo (make paragraph
+ space-before: 0pt
+ space-after: 0pt
+ start-indent: (+ %block-start-indent%
+ (inherited-start-indent))
+ keep-with-next?: (object-title-after)
+ (process-children)))
+ (title-sosofo (with-mode formal-object-title-mode
+ (process-node-list
+ (select-elements (children (current-node))
+ (normalize "title")))))
+ (sosofo (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ (if rule-before?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-after: (/ %block-sep% 2)
+ keep-with-next?: #t)
+ (empty-sosofo))
+ (if (object-title-after)
+ (make sequence
+ object-sosofo
+ title-sosofo)
+ (make sequence
+ title-sosofo
+ object-sosofo))
+ (if rule-after?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-before: (/ %block-sep% 2)
+ keep-with-previous?: #t)
+ (empty-sosofo)))))
+ (if (and (equal? (print-backend) 'tex)
+ formal-object-float
+ (float-object (current-node)))
+ (make page-float
+ sosofo)
+ sosofo)))
+
+(define ($semiformal-object$)
+ (if (node-list-empty? (select-elements (children (current-node))
+ (normalize "title")))
+ ($informal-object$)
+ ($formal-object$)))
+
+(mode formal-object-title-mode
+ (element title
+ (let* ((object (parent (current-node)))
+ (nsep (gentext-label-title-sep (gi object))))
+ (make paragraph
+ font-weight: %formal-object-title-font-weight%
+ space-before: (if (object-title-after (parent (current-node)))
+ %para-sep%
+ 0pt)
+ space-after: (if (object-title-after (parent (current-node)))
+ 0pt
+ %para-sep%)
+ start-indent: (+ %block-start-indent% (inherited-start-indent))
+ keep-with-next?: (not (object-title-after (parent (current-node))))
+ (if (member (gi object) (named-formal-objects))
+ (make sequence
+ (literal (gentext-element-name object))
+ (if (string=? (element-label object) "")
+ (literal nsep)
+ (literal " " (element-label object) nsep)))
+ (empty-sosofo))
+ (process-children))))
+)
+
+(element example
+ ($formal-object$ %example-rules% %example-rules%))
+
+(element (example title) (empty-sosofo)) ; don't show caption below example
+
+(element informalexample
+ ($informal-object$ %informalexample-rules% %informalexample-rules%))
+
+(element informalfigure
+ ($informal-object$ %informalfigure-rules% %informalfigure-rules%))
+
+(element (figure title) (empty-sosofo)) ; don't show caption below figure
+
+(element figure
+ ;; FIXME: this is a bit crude...
+ (let* ((mediaobj (select-elements (children (current-node))
+ (normalize "mediaobject")))
+ (imageobj (select-elements (children mediaobj)
+ (normalize "imageobject")))
+ (image (select-elements (children imageobj)
+ (normalize "imagedata")))
+ (graphic (select-elements (children (current-node))
+ (normalize "graphic")))
+ (align (if (node-list-empty? image)
+ (if (node-list-empty? graphic)
+ #f
+ (attribute-string (normalize "align")
+ (node-list-first graphic)))
+ (attribute-string (normalize "align") (node-list-first image))))
+ (dalign (cond ((equal? align (normalize "center"))
+ 'center)
+ ((equal? align (normalize "right"))
+ 'end)
+ (else
+ 'start))))
+ (if align
+ (make display-group
+ quadding: dalign
+ ($formal-object$ %figure-rules% %figure-rules%))
+ ($formal-object$ %figure-rules% %figure-rules%))))
+
+(element informaltable
+ ($informal-object$ %informaltable-rules% %informaltable-rules%))
+
+(element table
+ ;; can't be a "formal-object" because it requires special handling for
+ ;; the PGWIDE attribute
+ (let* ((nsep (gentext-label-title-sep (gi)))
+ (pgwide (attribute-string (normalize "pgwide")))
+ (indent (lambda () (if (not (equal? pgwide "1"))
+ (+ %block-start-indent%
+ (inherited-start-indent))
+ %cals-pgwide-start-indent%)))
+ (rule-before? %table-rules%)
+ (rule-after? %table-rules%)
+ (title-sosofo (make paragraph
+ font-weight: %table-title-font-weight%
+ space-before: (if (object-title-after)
+ %para-sep%
+ 0pt)
+ space-after: (if (object-title-after)
+ 0pt
+ %para-sep%)
+ start-indent: (indent)
+ keep-with-next?: (not (object-title-after))
+ (literal (gentext-element-name (current-node)))
+ (if (string=? (element-label) "")
+ (literal nsep)
+ (literal " " (element-label) nsep))
+ (element-title-sosofo)))
+ (table-sosofo (make display-group
+ font-weight: 'bold
+ space-before: 0pt
+ space-after: 0pt
+ start-indent: (indent)
+ keep-with-next?: (object-title-after)
+ (process-children)))
+ (table (make display-group
+ start-indent: (+ %block-start-indent%
+ (inherited-start-indent))
+ space-before: %block-sep%
+ space-after: %block-sep%
+ (if rule-before?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-after: (/ %block-sep% 2)
+ keep-with-next?: #t)
+ (empty-sosofo))
+ (if (object-title-after)
+ (make sequence
+ table-sosofo
+ title-sosofo)
+ (make sequence
+ title-sosofo
+ table-sosofo))
+ (if rule-after?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-before: (/ %block-sep% 2)
+ keep-with-previous?: #t)
+ (empty-sosofo)))))
+ (if (and (equal? (print-backend) 'tex)
+ formal-object-float
+ (float-object (current-node)))
+ (make page-float
+ table)
+ table)))
+
+(element (table title) (empty-sosofo))
+
+(element comment
+ (if %show-comments%
+ (make paragraph
+ start-indent: 0pt
+ first-line-start-indent: -10pt
+ font-posture: 'italic
+ font-size: (* (inherited-font-size) 0.9)
+ (make sequence
+ (make line-field
+ field-width: 10pt
+ quadding: 'end
+ (literal "*"))
+ (process-children)))
+ (empty-sosofo)))
+
+;; In DocBook V4.0 comment became remark
+(element remark
+ (if %show-comments%
+ (make paragraph
+ start-indent: 0pt
+ first-line-start-indent: -10pt
+ font-posture: 'italic
+ font-size: (* (inherited-font-size) 0.9)
+ (make sequence
+ (make line-field
+ field-width: 10pt
+ quadding: 'end
+ (literal "*"))
+ (process-children)))
+ (empty-sosofo)))
+
+;; ======================================================================
+;; Handle footnotes in the body...
+
+(define %footnote-field-width% 1.6em)
+(define %footnote-number-restarts% #t)
+(define %footnote-endnote-break% #f)
+
+(define (count-footnote? footnote)
+ ;; don't count footnotes in comments (unless you're showing comments)
+ ;; or footnotes in tables which are handled locally in the table
+ ;; or footnotes for empty ulinks which don't need a footnote
+ (if (or (and (has-ancestor-member? footnote (list (normalize "comment")))
+ (not %show-comments%))
+ (has-ancestor-member? footnote (list (normalize "tgroup")))
+ (and (has-ancestor-member? footnote (list (normalize "ulink")))
+ (node-list-empty? (children footnote))
+ %footnote-ulinks%))
+ #f
+ #t))
+
+(define (footnote-number footnote)
+ ;; This is more complex than it at first appears because footnotes
+ ;; can be in Comments which may be suppressed.
+ (let* ((root-list (if %footnote-number-restarts%
+ (component-element-list)
+ (list (normalize "book"))))
+ (footnotes (if %footnote-ulinks%
+ (component-list-descendant-node-list
+ footnote
+ (list (normalize "ulink") (normalize "footnote"))
+ root-list)
+ (component-descendant-node-list
+ footnote
+ root-list)))
+ (fn-number (let loop ((nl footnotes) (num 1))
+ (if (node-list-empty? nl)
+ 0
+ (if (node-list=? (node-list-first nl) footnote)
+ num
+ (if (count-footnote? (node-list-first nl))
+ (loop (node-list-rest nl) (+ num 1))
+ (loop (node-list-rest nl) num)))))))
+ (format-number fn-number "1")))
+
+(element footnote
+ (if (and (equal? (print-backend) 'tex) bop-footnotes)
+ (make sequence
+ ($ss-seq$ + (literal (footnote-number (current-node))))
+ (make page-footnote (process-children)))
+ ($ss-seq$ + (literal (footnote-number (current-node))))))
+
+(element (footnote para)
+ ;; Note: this can only get called if the backend is 'tex
+ ;; If the backend is anything else, footnote never calls process
+ ;; children except in endnote-mode, so this doesn't get called.
+ (let ((fnnum (footnote-number (parent (current-node)))))
+ (if (= (child-number) 1)
+ (make paragraph
+ use: default-text-style
+ font-size: (* %footnote-size-factor% %bf-size%)
+ quadding: %default-quadding%
+ line-spacing: (* (* %footnote-size-factor% %bf-size%)
+ %line-spacing-factor%)
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: %footnote-field-width%
+ first-line-start-indent: (- %footnote-field-width%)
+ lines: 'wrap ; doesn't seem to work
+ (make line-field
+ field-width: %footnote-field-width%
+ (literal fnnum
+ (gentext-label-title-sep (normalize "footnote"))))
+ (process-children-trim))
+ (make paragraph
+ use: default-text-style
+ font-size: (* %footnote-size-factor% %bf-size%)
+ quadding: %default-quadding%
+ line-spacing: (* (* %footnote-size-factor% %bf-size%)
+ %line-spacing-factor%)
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: %footnote-field-width%
+ lines: 'wrap ; doesn't seem to work
+ (process-children-trim)))))
+
+(define (non-table-footnotes footnotenl)
+ (let loop ((nl footnotenl) (result (empty-node-list)))
+ (if (node-list-empty? nl)
+ result
+ (if (has-ancestor-member? (node-list-first nl)
+ (list (normalize "tgroup")))
+ (loop (node-list-rest nl)
+ result)
+ (loop (node-list-rest nl)
+ (node-list result (node-list-first nl)))))))
+
+(define (make-endnote-header)
+ (let ((headsize (if (equal? (gi) (normalize "refentry"))
+ (HSIZE 2)
+ (HSIZE 3)))
+ (indent (lambda () (if (equal? (gi) (normalize "refentry"))
+ %body-start-indent%
+ 0pt))))
+ (make paragraph
+ break-before: %footnote-endnote-break%
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: headsize
+ line-spacing: (* headsize %line-spacing-factor%)
+ space-before: (* headsize %head-before-factor%)
+ space-after: (* headsize %head-after-factor%)
+ start-indent: (indent)
+ quadding: 'start
+ keep-with-next?: #t
+ (literal (gentext-endnotes)))))
+
+(define (make-endnotes #!optional (node (current-node)))
+ (let* ((allfootnotes (if %footnote-ulinks%
+ (node-list-filter-by-gi
+ (descendants node)
+ (list (normalize "footnote") (normalize "ulink")))
+ (select-elements (descendants node)
+ (normalize "footnote"))))
+ (footnotes (let loop ((nl (non-table-footnotes allfootnotes))
+ (fnlist (empty-node-list)))
+ (if (node-list-empty? nl)
+ fnlist
+ (if (count-footnote? (node-list-first nl))
+ (loop (node-list-rest nl)
+ (node-list fnlist (node-list-first nl)))
+ (loop (node-list-rest nl)
+ fnlist))))))
+ (if (or (node-list-empty? footnotes)
+ (and (equal? (print-backend) 'tex)
+ bop-footnotes))
+ (empty-sosofo)
+ (if (or (equal? (gi node) (normalize "reference"))
+ (equal? (gi node) (normalize "part")))
+ (empty-sosofo) ;; Each RefEntry/Component does its own...
+ (make sequence
+ (make-endnote-header)
+ (with-mode endnote-mode
+ (process-node-list footnotes)))))))
+
+(mode endnote-mode
+ (element footnote
+ (make sequence
+ start-indent: %body-start-indent%
+ (process-children)))
+
+ (element (footnote para)
+ (let ((fnnum (footnote-number (parent (current-node)))))
+ (if (= (child-number) 1)
+ (make paragraph
+; I'm not sure this really makes sense in the endnote case...
+; font-size: (* %footnote-size-factor% %bf-size%)
+; line-spacing: (* (* %footnote-size-factor% %bf-size%)
+; %line-spacing-factor%)
+ space-before: %para-sep%
+ start-indent: (+ (inherited-start-indent) %footnote-field-width%)
+ first-line-start-indent: (- %footnote-field-width%)
+ (make line-field
+ field-width: %footnote-field-width%
+ (literal fnnum
+ (gentext-label-title-sep (normalize "footnote"))))
+ (process-children-trim))
+ (make paragraph
+ font-size: (* %footnote-size-factor% %bf-size%)
+ line-spacing: (* (* %footnote-size-factor% %bf-size%)
+ %line-spacing-factor%)
+ start-indent: (+ (inherited-start-indent) %footnote-field-width%)
+ space-before: %para-sep%
+ (process-children-trim)))))
+
+ (element ulink
+ (if %footnote-ulinks%
+ (let ((fnnum (footnote-number (current-node))))
+ (make paragraph
+; font-size: (* %footnote-size-factor% %bf-size%)
+; line-spacing: (* (* %footnote-size-factor% %bf-size%)
+; %line-spacing-factor%)
+ space-before: %para-sep%
+ start-indent: (+ (inherited-start-indent) %footnote-field-width%)
+ first-line-start-indent: (- %footnote-field-width%)
+ (make line-field
+ field-width: %footnote-field-width%
+ (literal fnnum
+ (gentext-label-title-sep (normalize "footnote"))))
+ (literal (attribute-string "url"))))
+ (next-match))))
+
+;; ======================================================================
+;; Handle table footnotes
+
+(define (table-footnote-number footnote)
+ (format-number (component-child-number footnote
+ ($table-element-list$)) "a"))
+
+(element (entry footnote)
+ ($ss-seq$ + (literal (table-footnote-number (current-node)))))
+
+(element (entry para footnote)
+ ($ss-seq$ + (literal (table-footnote-number (current-node)))))
+
+(define (make-table-endnote-header)
+ (make paragraph
+ font-family-name: %body-font-family%
+ font-weight: 'medium
+ font-size: %bf-size%
+ start-indent: 0pt
+ quadding: 'start
+ (literal (gentext-table-endnotes))))
+
+(define (make-table-endnotes)
+ (let* ((footnotes (select-elements (descendants (current-node))
+ (normalize "footnote")))
+ (headsize (HSIZE 3))
+ (tgroup (ancestor-member (current-node) (list (normalize "tgroup"))))
+ (cols (string->number (attribute-string (normalize "cols") tgroup))))
+ (if (node-list-empty? footnotes)
+ (empty-sosofo)
+ (make table-row
+ (make table-cell
+ n-columns-spanned: cols
+ cell-before-row-margin: %cals-cell-before-row-margin%
+ cell-after-row-margin: %cals-cell-after-row-margin%
+ cell-before-column-margin: %cals-cell-before-column-margin%
+ cell-after-column-margin: %cals-cell-after-column-margin%
+ start-indent: %cals-cell-content-start-indent%
+ end-indent: %cals-cell-content-end-indent%
+ (make-table-endnote-header)
+ (with-mode table-footnote-mode
+ (process-node-list footnotes)))))))
+
+(mode table-footnote-mode
+ (element footnote
+ (make display-group
+ font-family-name: %body-font-family%
+ font-weight: 'medium
+ font-size: %bf-size%
+ start-indent: 0pt
+ quadding: 'start
+ (process-children)))
+
+ (element (footnote para)
+ (let ((fnnum (table-footnote-number (parent (current-node)))))
+ (if (= (child-number) 1)
+ (make paragraph
+ start-indent: %footnote-field-width%
+ first-line-start-indent: (- %footnote-field-width%)
+ (make line-field
+ field-width: %footnote-field-width%
+ (literal fnnum
+ (gentext-label-title-sep (normalize "footnote"))))
+ (process-children-trim))
+ (make paragraph
+ start-indent: %footnote-field-width%
+ (process-children-trim))))))
+
diff --git a/print/dbcallou.dsl b/print/dbcallou.dsl
new file mode 100644
index 0000000..e16f1c0
--- /dev/null
+++ b/print/dbcallou.dsl
@@ -0,0 +1,221 @@
+;; $Id: dbcallou.dsl,v 1.4 2004/10/10 14:04:48 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; The support provided below is a little primitive because there's no way
+;; to do line-addressing in Jade.
+;;
+;; CO's are supported with the CO element or, in SCREENCO and
+;; PROGRAMLISTINGCO only, AREAs.
+;;
+;; Notes on the use of AREAs:
+;;
+;; - Processing is very slow. Jade loops through each AREA for
+;; every column on every line.
+;; - Only the LINECOLUMN units are supported, and they are #IMPLIED
+;; - If a COORDS only specifies a line, the %callout-default-col% will
+;; be used for the column.
+;; - If the column is beyond the end of the line, that will work OK, but
+;; if more than one callout has to get placed beyond the end of the same
+;; line, that doesn't work so well.
+;; - Embedded tabs foul up the column counting.
+;; - Embedded markup fouls up the column counting.
+;; - Embedded markup with embedded line breaks fouls up the line counting.
+;; - The callout bugs occur immediately before the LINE COLUMN specified.
+;; - You can't point to an AREASET, that doesn't make any sense
+;; since it would imply a one-to-many link
+;;
+;; There's still no support for a stylesheet drawing the callouts on a
+;; GRAPHIC, and I don't think there ever will be.
+;;
+
+(element areaspec (empty-sosofo))
+(element area (empty-sosofo))
+(element areaset (empty-sosofo))
+
+(element co
+ ($callout-mark$ (current-node)))
+
+(element programlistingco ($informal-object$))
+(element screenco ($informal-object$))
+(element graphicco ($informal-object$))
+
+(element (screenco screen)
+ ($callout-verbatim-display$ %indent-screen-lines% %number-screen-lines%))
+
+(element (programlistingco programlisting)
+ ($callout-verbatim-display$ %indent-programlisting-lines%
+ %number-programlisting-lines%))
+
+;; ----------------------------------------------------------------------
+
+(define ($callout-bug$ conumber)
+ (if (and conumber %callout-fancy-bug%)
+ (case conumber
+ ((1) (literal "\dingbat-negative-circled-sans-serif-digit-one;"))
+ ((2) (literal "\dingbat-negative-circled-sans-serif-digit-two;"))
+ ((3) (literal "\dingbat-negative-circled-sans-serif-digit-three;"))
+ ((4) (literal "\dingbat-negative-circled-sans-serif-digit-four;"))
+ ((5) (literal "\dingbat-negative-circled-sans-serif-digit-five;"))
+ ((6) (literal "\dingbat-negative-circled-sans-serif-digit-six;"))
+ ((7) (literal "\dingbat-negative-circled-sans-serif-digit-seven;"))
+ ((8) (literal "\dingbat-negative-circled-sans-serif-digit-eight;"))
+ ((9) (literal "\dingbat-negative-circled-sans-serif-digit-nine;"))
+ (else (make sequence
+ font-weight: 'bold
+ (literal "(" (format-number conumber "1") ")"))))
+ (make sequence
+ font-weight: 'bold
+ (if conumber
+ (literal "(" (format-number conumber "1") ")")
+ (literal "(??)")))))
+
+(define ($callout-mark$ co)
+ ;; Print the callout mark for co
+ (if (equal? (gi co) (normalize "co"))
+ ($callout-bug$ (if (node-list-empty? co)
+ #f
+ (child-number co)))
+ (let ((areanum (if (node-list-empty? co)
+ #f
+ (if (equal? (gi (parent co)) (normalize "areaset"))
+ (absolute-child-number (parent co))
+ (absolute-child-number co)))))
+ ($callout-bug$ (if (node-list-empty? co)
+ #f
+ areanum)))))
+
+(define ($look-for-callout$ line col #!optional (eol? #f))
+ ;; Look to see if a callout should be printed at line col, and print
+ ;; it if it should
+ (let* ((areaspec (select-elements (children (parent (current-node)))
+ (normalize "areaspec")))
+ (areas (expand-children (children areaspec)
+ (list (normalize "areaset")))))
+ (let loop ((areanl areas))
+ (if (node-list-empty? areanl)
+ (empty-sosofo)
+ (make sequence
+ (if ($callout-area-match$ (node-list-first areanl) line col eol?)
+ ($callout-area-format$ (node-list-first areanl) line col eol?)
+ (empty-sosofo))
+ (loop (node-list-rest areanl)))))))
+
+(define ($callout-area-match$ area line col eol?)
+ ;; Does AREA area match line col?
+ (let* ((coordlist (split (attribute-string (normalize "coords") area)))
+ (aline (string->number (car coordlist)))
+ (acol (if (null? (cdr coordlist))
+ #f
+ (string->number (car (cdr coordlist)))))
+ (units (if (inherited-attribute-string (normalize "units") area)
+ (inherited-attribute-string (normalize "units") area)
+ (normalize "linecolumn"))))
+ (and (equal? units (normalize "linecolumn"))
+ (or
+ (and (equal? line aline)
+ (equal? col acol))
+ (and (equal? line aline)
+ eol?
+ (or (not acol) (> acol col)))))))
+
+(define ($callout-area-format$ area line col eol?)
+ ;; Format AREA area at the appropriate place
+ (let* ((coordlist (split (attribute-string (normalize "coords") area)))
+ (aline (string->number (car coordlist)))
+ (acol (if (null? (cdr coordlist))
+ #f
+ (string->number (car (cdr coordlist))))))
+ (if (and (equal? line aline)
+ eol?
+ (or (not acol) (> acol col)))
+ (make sequence
+ (let loop ((atcol col))
+ (if (>= atcol (if acol acol %callout-default-col%))
+ (empty-sosofo)
+ (make sequence
+ (literal "\no-break-space;")
+ (loop (+ atcol 1)))))
+ ($callout-mark$ area))
+ ($callout-mark$ area))))
+
+(define ($callout-linespecific-content$ indent line-numbers?)
+ ;; Print linespecific content in a callout with line numbers
+ (make sequence
+ ($line-start$ indent line-numbers? 1)
+ (let loop ((kl (children (current-node)))
+ (linecount 1)
+ (colcount 1)
+ (res (empty-sosofo)))
+ (if (node-list-empty? kl)
+ (sosofo-append res
+ ($look-for-callout$ linecount colcount #t)
+ (empty-sosofo))
+ (loop
+ (node-list-rest kl)
+ (if (char=? (node-property 'char (node-list-first kl)
+ default: #\U-0000) #\U-000D)
+ (+ linecount 1)
+ linecount)
+ (if (char=? (node-property 'char (node-list-first kl)
+ default: #\U-0000) #\U-000D)
+ 1
+ (if (char=? (node-property 'char (node-list-first kl)
+ default: #\U-0000) #\U-0000)
+ colcount
+ (+ colcount 1)))
+ (let ((c (node-list-first kl)))
+ (if (char=? (node-property 'char c default: #\U-0000)
+ #\U-000D)
+ (sosofo-append res
+ ($look-for-callout$ linecount colcount #t)
+ (process-node-list c)
+ ($line-start$ indent
+ line-numbers?
+ (+ linecount 1)))
+ (sosofo-append res
+ ($look-for-callout$ linecount colcount)
+ (process-node-list c)))))))))
+
+(define ($callout-verbatim-display$ indent line-numbers?)
+ (let* ((width-in-chars (if (attribute-string "width")
+ (string->number (attribute-string "width"))
+ %verbatim-default-width%))
+ (fsize (lambda () (if (or (attribute-string (normalize "width"))
+ (not %verbatim-size-factor%))
+ (/ (/ (- %text-width% (inherited-start-indent))
+ width-in-chars)
+ 0.7)
+ (* (inherited-font-size)
+ %verbatim-size-factor%))))
+ (vspace-before (if (INBLOCK?)
+ 0pt
+ (if (INLIST?)
+ %para-sep%
+ %block-sep%)))
+ (vspace-after (if (INBLOCK?)
+ 0pt
+ (if (INLIST?)
+ 0pt
+ %block-sep%))))
+ (make paragraph
+ use: verbatim-style
+ space-before: (if (and (string=? (gi (parent)) (normalize "entry"))
+ (absolute-first-sibling?))
+ 0pt
+ vspace-before)
+ space-after: (if (and (string=? (gi (parent)) (normalize "entry"))
+ (absolute-last-sibling?))
+ 0pt
+ vspace-after)
+ font-size: (fsize)
+ line-spacing: (* (fsize) %line-spacing-factor%)
+ start-indent: (if (INBLOCK?)
+ (inherited-start-indent)
+ (+ %block-start-indent% (inherited-start-indent)))
+ quadding: 'start
+ ($callout-linespecific-content$ indent line-numbers?))))
+
+;; EOF dbcallout.dsl
diff --git a/print/dbcompon.dsl b/print/dbcompon.dsl
new file mode 100644
index 0000000..17b1378
--- /dev/null
+++ b/print/dbcompon.dsl
@@ -0,0 +1,520 @@
+;; $Id: dbcompon.dsl,v 1.5 2003/04/29 06:33:10 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; ============================= COMPONENTS =============================
+;;
+;; in docbook, components are containers at the chapter/appendix level
+
+(define ($title-header-footer-element$)
+ (let* ((firstchild (node-list-first (children (current-node))))
+ (metainfo (if (node-list-empty? firstchild)
+ (empty-node-list)
+ (if (member (gi firstchild) (info-element-list))
+ firstchild
+ (empty-node-list))))
+ (metatitle (select-elements (children metainfo) (normalize "title")))
+ (metatabb (select-elements (children metainfo) (normalize "titleabbrev")))
+ (title (select-elements (children (current-node))
+ (normalize "title")))
+ (titleabb (select-elements (children (current-node))
+ (normalize "titleabbrev"))))
+ (if (node-list-empty? metatabb)
+ (if (node-list-empty? titleabb)
+ (if (node-list-empty? metatitle)
+ title
+ metatitle)
+ titleabb)
+ metatabb)))
+
+(define ($refentry-header-footer-element$)
+ (let* ((refdescriptor (node-list-first
+ (select-elements
+ (descendants (current-node)) (normalize "refdescriptor"))))
+ (refname (node-list-first
+ (select-elements
+ (descendants (current-node)) (normalize "refname"))))
+ (refentrytitle (node-list-first
+ (select-elements
+ (descendants (current-node)) (normalize "refentrytitle")))))
+ (if (node-list-empty? refentrytitle)
+ (if (node-list-empty? refdescriptor)
+ refname
+ refdescriptor)
+ refentrytitle)))
+
+(define ($title-header-footer$)
+ (let* ((title (if (equal? (gi) (normalize "refentry"))
+ ($refentry-header-footer-element$)
+ ($title-header-footer-element$))))
+ (make sequence
+ font-posture: 'italic
+ (with-mode hf-mode
+ (process-node-list title)))))
+
+(define ($page-number-header-footer$)
+ (let ((component (ancestor-member (current-node)
+ (append (division-element-list)
+ (component-element-list)))))
+ (make sequence
+ font-posture: 'italic
+ (literal
+ (gentext-page)
+ (if %page-number-restart%
+ (if (or (equal? (gi component) (normalize "chapter"))
+ (equal? (gi component) (normalize "appendix")))
+ (string-append
+ (element-label component #t)
+ (gentext-intra-label-sep "_pagenumber"))
+ "")
+ ""))
+ (page-number-sosofo))))
+
+(define (first-page-inner-header gi)
+ (empty-sosofo))
+
+(define (first-page-center-header gi)
+ (empty-sosofo))
+
+(define (first-page-outer-header gi)
+ (empty-sosofo))
+
+(define (page-inner-header gi)
+ (empty-sosofo))
+
+(define (page-center-header gi)
+ (empty-sosofo))
+
+(define (page-outer-header gi)
+ (cond
+ ((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
+ ((equal? (normalize gi) (normalize "lot")) (empty-sosofo))
+ ((equal? (normalize gi) (normalize "part")) (empty-sosofo))
+ ((equal? (normalize gi) (normalize "toc")) (empty-sosofo))
+ (else ($title-header-footer$))))
+
+(define (first-page-inner-footer gi)
+ (empty-sosofo))
+
+(define (first-page-center-footer gi)
+ (empty-sosofo))
+
+(define (first-page-outer-footer gi)
+ (cond
+ ((equal? (normalize gi) (normalize "dedication")) (empty-sosofo))
+ ((equal? (normalize gi) (normalize "part")) (empty-sosofo))
+ (else ($page-number-header-footer$))))
+
+(define (page-inner-footer gi)
+ (empty-sosofo))
+
+(define (page-center-footer gi)
+ (empty-sosofo))
+
+(define (page-outer-footer gi)
+ ($page-number-header-footer$))
+
+(define ($page-number-format$ #!optional (gi (gi)))
+ (cond
+ ((equal? (normalize gi) (normalize "toc")) "i")
+ ((equal? (normalize gi) (normalize "lot")) "i")
+ ((equal? (normalize gi) (normalize "preface")) "i")
+ (else "1")))
+
+(define ($left-header$ #!optional (gi (gi)))
+ (if-first-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (first-page-inner-header gi)
+ (first-page-outer-header gi))
+ (if %two-side%
+ (if-front-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-inner-header gi)
+ (page-outer-header gi))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-outer-header gi)
+ (page-inner-header gi)))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-inner-header gi)
+ (page-outer-header gi)))))
+
+(define ($center-header$ #!optional (gi (gi)))
+ (if-first-page
+ (first-page-center-header gi)
+ (page-center-header gi)))
+
+(define ($right-header$ #!optional (gi (gi)))
+ (if-first-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (first-page-outer-header gi)
+ (first-page-inner-header gi))
+ (if %two-side%
+ (if-front-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-outer-header gi)
+ (page-inner-header gi))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-inner-header gi)
+ (page-outer-header gi)))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-outer-header gi)
+ (page-inner-header gi)))))
+
+(define ($left-footer$ #!optional (gi (gi)))
+ (if-first-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (first-page-inner-footer gi)
+ (first-page-outer-footer gi))
+ (if %two-side%
+ (if-front-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-inner-footer gi)
+ (page-outer-footer gi))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-outer-footer gi)
+ (page-inner-footer gi)))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-inner-footer gi)
+ (page-outer-footer gi)))))
+
+(define ($center-footer$ #!optional (gi (gi)))
+ (if-first-page
+ (first-page-center-footer gi)
+ (page-center-footer gi)))
+
+(define ($right-footer$ #!optional (gi (gi)))
+ (if-first-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (first-page-outer-footer gi)
+ (first-page-inner-footer gi))
+ (if %two-side%
+ (if-front-page
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-outer-footer gi)
+ (page-inner-footer gi))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-inner-footer gi)
+ (page-outer-footer gi)))
+ (if (equal? %writing-mode% 'left-to-right)
+ (page-outer-footer gi)
+ (page-inner-footer gi)))))
+
+(define ($component$)
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-restart?: (or %page-number-restart%
+ (first-chapter?))
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ start-indent: %body-start-indent%
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+ (make sequence
+ ($component-title$)
+ (process-children))
+ (make-endnotes)))
+
+(define ($component-title$)
+ (let* ((info (cond
+ ((equal? (gi) (normalize "appendix"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ ((equal? (gi) (normalize "article"))
+ (node-list-filter-by-gi (children (current-node))
+ (list (normalize "artheader")
+ (normalize "articleinfo"))))
+ ((equal? (gi) (normalize "bibliography"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ ((equal? (gi) (normalize "chapter"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ ((equal? (gi) (normalize "dedication"))
+ (empty-node-list))
+ ((equal? (gi) (normalize "glossary"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ ((equal? (gi) (normalize "index"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ ((equal? (gi) (normalize "preface"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ ((equal? (gi) (normalize "reference"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ ((equal? (gi) (normalize "setindex"))
+ (select-elements (children (current-node)) (normalize "docinfo")))
+ (else
+ (empty-node-list))))
+ (exp-children (if (node-list-empty? info)
+ (empty-node-list)
+ (expand-children (children info)
+ (list (normalize "bookbiblio")
+ (normalize "bibliomisc")
+ (normalize "biblioset")))))
+ (parent-titles (select-elements (children (current-node)) (normalize "title")))
+ (titles (if (node-list-empty? parent-titles)
+ (select-elements exp-children (normalize "title"))
+ parent-titles))
+ (parent-subttl (select-elements (children (current-node)) (normalize "subtitle")))
+ (subtitles (if (node-list-empty? parent-subttl)
+ (select-elements exp-children (normalize "subtitle"))
+ parent-subttl)))
+ (make sequence
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 4)
+ line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+ space-before: (* (HSIZE 4) %head-before-factor%)
+ start-indent: 0pt
+ first-line-start-indent: 0pt
+ quadding: %component-title-quadding%
+ heading-level: (if %generate-heading-level% 1 0)
+ keep-with-next?: #t
+
+ (if (string=? (element-label) "")
+ (empty-sosofo)
+ (literal (gentext-element-name-space (current-node))
+ (element-label)
+ (gentext-label-title-sep (gi))))
+
+ (if (node-list-empty? titles)
+ (element-title-sosofo) ;; get a default!
+ (with-mode component-title-mode
+ (make sequence
+ (process-node-list titles)))))
+
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-posture: 'italic
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* 0.5 (* (HSIZE 3) %head-before-factor%))
+ space-after: (* (HSIZE 4) %head-after-factor%)
+ start-indent: 0pt
+ first-line-start-indent: 0pt
+ quadding: %component-subtitle-quadding%
+ keep-with-next?: #t
+
+ (with-mode component-title-mode
+ (make sequence
+ (process-node-list subtitles)))))))
+
+(mode component-title-mode
+ (element title
+ (process-children))
+
+ (element subtitle
+ (process-children))
+)
+
+;; this is how we prevent the title in the header from acquiring the
+;; display treatment that it receives in the body of the document
+;;
+(mode hf-mode
+ (element title
+ (let* ((component (ancestor-member (current-node)
+ (component-element-list)))
+ (chaporapp (or (equal? (gi component) (normalize "chapter"))
+ (equal? (gi component) (normalize "appendix")))))
+ (if %chap-app-running-heads%
+ (make sequence
+ (if (and chaporapp
+ %chapter-autolabel%
+ (or %chap-app-running-head-autolabel%
+ (attribute-string (normalize "label") component)))
+ (literal (gentext-element-name-space component)
+ (element-label component)
+ (gentext-label-title-sep (gi component)))
+ (empty-sosofo))
+ (process-children-trim))
+ (empty-sosofo))))
+
+ (element titleabbrev
+ (if %chap-app-running-heads%
+ (make sequence
+ (if (or (have-ancestor? (normalize "chapter"))
+ (have-ancestor? (normalize "appendix")))
+ (literal (gentext-element-name-space (parent))
+ (element-label (parent))
+ (gentext-label-title-sep (gi (parent))))
+ (empty-sosofo))
+ (process-children-trim))
+ (empty-sosofo)))
+
+ (element refentrytitle
+ (if %chap-app-running-heads%
+ (process-children-trim)
+ (empty-sosofo)))
+
+ (element refdescriptor
+ (if %chap-app-running-heads%
+ (process-children-trim)
+ (empty-sosofo)))
+
+ (element refname
+ (if %chap-app-running-heads%
+ (process-children-trim)
+ (empty-sosofo)))
+
+ ;; Graphics aren't allowed in headers and footers...
+ (element graphic
+ (empty-sosofo))
+
+ (element inlinegraphic
+ (empty-sosofo))
+)
+
+(element appendix ($component$))
+(element (article appendix) ($section$)) ;; this is a special case
+(element (appendix title) (empty-sosofo))
+
+(element chapter ($component$))
+(element (chapter title) (empty-sosofo))
+
+(element preface ($component$))
+(element (preface title) (empty-sosofo))
+
+(element colophon ($component$))
+
+;; Dedication is empty except in a special mode so that it can be
+;; reordered (made to come before the TOCs)
+(element dedication (empty-sosofo))
+(mode dedication-page-mode
+ (element dedication ($component$))
+ (element (dedication title) (empty-sosofo))
+)
+
+;; Articles are like components, except that if they may have much
+;; more formal title pages (created with article-titlepage).
+;;
+(element article
+ (let* ((info (node-list-filter-by-gi (children (current-node))
+ (list (normalize "artheader")
+ (normalize "articleinfo"))))
+ (nl (titlepage-info-elements (current-node) info))
+ (article-titlepage (if %generate-article-titlepage-on-separate-page%
+ (make sequence
+ (if (article-titlepage-content? nl 'recto)
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ use: default-text-style
+ quadding: %default-quadding%
+ (article-titlepage nl 'recto))
+ (empty-sosofo))
+ (if (article-titlepage-content? nl 'verso)
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ use: default-text-style
+ quadding: %default-quadding%
+ (article-titlepage nl 'verso))
+ (empty-sosofo)))
+ (make sequence
+ (article-titlepage nl 'recto)
+ (article-titlepage nl 'verso)))))
+ (make sequence
+
+ ;; make the titlepage first if its on a separate page
+ (if (and %generate-article-titlepage%
+ %generate-article-titlepage-on-separate-page%)
+ article-titlepage
+ (empty-sosofo))
+
+ ;; make the TOC on a separate page if requested and it's not
+ ;; already on the title page and it's supposed to be in front
+ (if (and %generate-article-toc%
+ (not %generate-article-toc-on-titlepage%)
+ %generate-article-titlepage-on-separate-page%
+ (generate-toc-in-front))
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ ;; FIXME: page restarting here and below is ill-considered
+ page-number-restart?: %article-page-number-restart%
+ page-number-format: ($page-number-format$ (normalize "toc"))
+ left-header: ($left-header$ (normalize "toc"))
+ center-header: ($center-header$ (normalize "toc"))
+ right-header: ($right-header$ (normalize "toc"))
+ left-footer: ($left-footer$ (normalize "toc"))
+ center-footer: ($center-footer$ (normalize "toc"))
+ right-footer: ($right-footer$ (normalize "toc"))
+ input-whitespace-treatment: 'collapse
+ use: default-text-style
+ quadding: %default-quadding%
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo))
+
+ ;; start a new page for the article itself
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-restart?: (or %article-page-number-restart%
+ (book-start?))
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ start-indent: %body-start-indent%
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+
+ ;; ... and include the titlepage if there is one and it's not
+ ;; already generated on a separate page
+ (if (and %generate-article-titlepage%
+ (not %generate-article-titlepage-on-separate-page%))
+ article-titlepage
+ (empty-sosofo))
+
+ ;; ... and include the TOC if it is in front and not already
+ ;; generated
+ (if (and %generate-article-toc%
+ (generate-toc-in-front)
+ (not %generate-article-toc-on-titlepage%)
+ (not %generate-article-titlepage-on-separate-page%))
+ (make display-group
+ space-after: (* (HSIZE 3) %head-after-factor%)
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo))
+
+ ;; .. and the contents of the article
+ (process-children)
+
+ ;; ... and the endnotes
+ (make-endnotes)
+
+ ;; ... and the TOC if it is supposed to be on the back and not
+ ;; on the titlepage nor on a separate pagee
+ (if (and %generate-article-toc%
+ (not (generate-toc-in-front))
+ (not %generate-article-toc-on-titlepage%)
+ (not %generate-article-titlepage-on-separate-page%))
+ (make display-group
+ space-after: (* (HSIZE 3) %head-after-factor%)
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo)))
+
+ ;; finally, produce the TOC if it is supposed to be at the end
+ ;; and on its own page
+ (if (and %generate-article-toc%
+ (not %generate-article-toc-on-titlepage%)
+ %generate-article-titlepage-on-separate-page%
+ (not (generate-toc-in-front)))
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ use: default-text-style
+ quadding: %default-quadding%
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo)))))
+
+(element (article title) (empty-sosofo))
+
diff --git a/print/dbdivis.dsl b/print/dbdivis.dsl
new file mode 100644
index 0000000..faf7e6c
--- /dev/null
+++ b/print/dbdivis.dsl
@@ -0,0 +1,224 @@
+;; $Id: dbdivis.dsl,v 1.5 2003/12/05 05:00:05 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================= DIVISIONS ==============================
+
+(element set
+ (let* ((setinfo (select-elements (children (current-node))
+ (normalize "setinfo")))
+ (nl (titlepage-info-elements (current-node) setinfo)))
+ (make sequence
+ (if %generate-set-titlepage%
+ (make simple-page-sequence
+ page-n-columns: %titlepage-n-columns%
+ input-whitespace-treatment: 'collapse
+ use: default-text-style
+ (set-titlepage nl 'recto)
+ (make display-group
+ break-before: 'page
+ (set-titlepage nl 'verso)))
+ (empty-sosofo))
+
+ (if (not (generate-toc-in-front))
+ (process-children)
+ (empty-sosofo))
+
+ (if %generate-set-toc%
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-format: ($page-number-format$ (normalize "toc"))
+ use: default-text-style
+ left-header: ($left-header$ (normalize "toc"))
+ center-header: ($center-header$ (normalize "toc"))
+ right-header: ($right-header$ (normalize "toc"))
+ left-footer: ($left-footer$ (normalize "toc"))
+ center-footer: ($center-footer$ (normalize "toc"))
+ right-footer: ($right-footer$ (normalize "toc"))
+ input-whitespace-treatment: 'collapse
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo))
+
+ (if (generate-toc-in-front)
+ (process-children)
+ (empty-sosofo)))))
+
+(element (set title) (empty-sosofo))
+
+(element book
+ (let* ((bookinfo (select-elements (children (current-node))
+ (normalize "bookinfo")))
+ (dedication (select-elements (children (current-node))
+ (normalize "dedication")))
+ (nl (titlepage-info-elements (current-node) bookinfo)))
+ (make sequence
+ (if %generate-book-titlepage%
+ (make simple-page-sequence
+ page-n-columns: %titlepage-n-columns%
+ input-whitespace-treatment: 'collapse
+ use: default-text-style
+ (book-titlepage nl 'recto)
+ (make display-group
+ break-before: 'page
+ (book-titlepage nl 'verso)))
+ (empty-sosofo))
+
+ (if (node-list-empty? dedication)
+ (empty-sosofo)
+ (with-mode dedication-page-mode
+ (process-node-list dedication)))
+
+ (if (not (generate-toc-in-front))
+ (process-children)
+ (empty-sosofo))
+
+ (if %generate-book-toc%
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-format: ($page-number-format$ (normalize "toc"))
+ use: default-text-style
+ left-header: ($left-header$ (normalize "toc"))
+ center-header: ($center-header$ (normalize "toc"))
+ right-header: ($right-header$ (normalize "toc"))
+ left-footer: ($left-footer$ (normalize "toc"))
+ center-footer: ($center-footer$ (normalize "toc"))
+ right-footer: ($right-footer$ (normalize "toc"))
+ input-whitespace-treatment: 'collapse
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo))
+
+ (let loop ((gilist ($generate-book-lot-list$)))
+ (if (null? gilist)
+ (empty-sosofo)
+ (if (not (node-list-empty?
+ (select-elements (descendants (current-node))
+ (car gilist))))
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-format: ($page-number-format$ (normalize "lot"))
+ use: default-text-style
+ left-header: ($left-header$ (normalize "lot"))
+ center-header: ($center-header$ (normalize "lot"))
+ right-header: ($right-header$ (normalize "lot"))
+ left-footer: ($left-footer$ (normalize "lot"))
+ center-footer: ($center-footer$ (normalize "lot"))
+ right-footer: ($right-footer$ (normalize "lot"))
+ input-whitespace-treatment: 'collapse
+ (build-lot (current-node) (car gilist)))
+ (loop (cdr gilist)))))
+
+ (if (generate-toc-in-front)
+ (process-children)
+ (empty-sosofo)))))
+
+(element (book title) (empty-sosofo))
+
+(element part
+ (let* ((partinfo (select-elements (children (current-node))
+ (normalize "docinfo")))
+ (partintro (select-elements (children (current-node))
+ (normalize "partintro")))
+
+ (nl (titlepage-info-elements
+ (current-node)
+ partinfo
+ (if %generate-partintro-on-titlepage%
+ partintro
+ (empty-node-list)))))
+ (make sequence
+ (if %generate-part-titlepage%
+ (make simple-page-sequence
+ page-n-columns: %titlepage-n-columns%
+ input-whitespace-treatment: 'collapse
+ use: default-text-style
+ (part-titlepage nl 'recto)
+ (make display-group
+ break-before: 'page
+ (part-titlepage nl 'verso)))
+ (empty-sosofo))
+
+ (if (not (generate-toc-in-front))
+ (process-children)
+ (empty-sosofo))
+
+ ;; generate a part TOC on a separate page
+ (if (and %generate-part-toc%
+ (not %generate-part-toc-on-titlepage%))
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-format: ($page-number-format$ (normalize "toc"))
+ use: default-text-style
+ left-header: ($left-header$ (normalize "toc"))
+ center-header: ($center-header$ (normalize "toc"))
+ right-header: ($right-header$ (normalize "toc"))
+ left-footer: ($left-footer$ (normalize "toc"))
+ center-footer: ($center-footer$ (normalize "toc"))
+ right-footer: ($right-footer$ (normalize "toc"))
+ input-whitespace-treatment: 'collapse
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo))
+
+ ;; this seems wrong relative to generate-toc-in-front,
+ ;; goes *after* the content ??!
+ (if (and (not (node-list-empty? partintro))
+ (not %generate-partintro-on-titlepage%))
+ ($process-partintro$ partintro #t)
+ (empty-sosofo))
+
+ (if (generate-toc-in-front)
+ (process-children)
+ (empty-sosofo)))))
+
+(element (part title) (empty-sosofo))
+
+(element partintro (empty-sosofo))
+
+(element (partintro title)
+ (let* ((hlevel 1)
+ (hs (HSIZE (- 4 hlevel))))
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: (if (< hlevel 5) 'bold 'medium)
+ font-posture: (if (< hlevel 5) 'upright 'italic)
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: (* hs %head-before-factor%)
+ space-after: (* hs %head-after-factor%)
+ start-indent: 0pt
+ first-line-start-indent: 0pt
+ quadding: %section-title-quadding%
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% (+ hlevel 1) 0)
+ (element-title-sosofo (parent (current-node))))))
+
+(define ($process-partintro$ partintro make-page-seq?)
+ (if make-page-seq?
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-restart?: (or %page-number-restart%
+ (book-start?)
+ (first-chapter?))
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ start-indent: %body-start-indent%
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+ (make sequence
+ (process-node-list (children partintro))
+ (make-endnotes partintro)))
+ (make sequence
+ start-indent: %body-start-indent%
+ (process-node-list (children partintro))
+ (make-endnotes partintro))))
+
diff --git a/print/dbefsyn.dsl b/print/dbefsyn.dsl
new file mode 100644
index 0000000..2eed205
--- /dev/null
+++ b/print/dbefsyn.dsl
@@ -0,0 +1,588 @@
+;; $Id: dbefsyn.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================ CLASS SYNOPSIS =============================
+
+(define %indent-classsynopsisinfo-lines% #f)
+(define %number-classsynopsisinfo-lines% #f)
+
+(define %default-classsynopsis-language% "java")
+
+(element classsynopsis
+ (let ((language (if (attribute-string (normalize "language"))
+ (attribute-string (normalize "language"))
+ %default-classsynopsis-language%)))
+ (case language
+ (("java") (with-mode cs-java-mode
+ (process-node-list (current-node))))
+ (("perl") (with-mode cs-perl-mode
+ (process-node-list (current-node))))
+ (("idl") (with-mode cs-idl-mode
+ (process-node-list (current-node))))
+ (("python") (with-mode cs-python-mode
+ (process-node-list (current-node))))
+ (else (with-mode cs-java-mode
+ (process-node-list (current-node)))))))
+
+(element methodsynopsis
+ (let ((language (if (attribute-string (normalize "language"))
+ (attribute-string (normalize "language"))
+ %default-classsynopsis-language%)))
+ (case language
+ (("java") (with-mode cs-java-mode
+ (process-node-list (current-node))))
+ (("perl") (with-mode cs-perl-mode
+ (process-node-list (current-node))))
+ (("idl") (with-mode cs-idl-mode
+ (process-node-list (current-node))))
+ (("python") (with-mode cs-python-mode
+ (process-node-list (current-node))))
+ (else (with-mode cs-java-mode
+ (process-node-list (current-node)))))))
+
+(element fieldsynopsis
+ (let ((language (if (attribute-string (normalize "language"))
+ (attribute-string (normalize "language"))
+ %default-classsynopsis-language%)))
+ (case language
+ (("java") (with-mode cs-java-mode
+ (process-node-list (current-node))))
+ (("perl") (with-mode cs-perl-mode
+ (process-node-list (current-node))))
+ (("idl") (with-mode cs-idl-mode
+ (process-node-list (current-node))))
+ (("python") (with-mode cs-python-mode
+ (process-node-list (current-node))))
+ (else (with-mode cs-java-mode
+ (process-node-list (current-node)))))))
+
+(element constructorynopsis
+ (let ((language (if (attribute-string (normalize "language"))
+ (attribute-string (normalize "language"))
+ %default-classsynopsis-language%)))
+ (case language
+ (("java") (with-mode cs-java-mode
+ (process-node-list (current-node))))
+ (("perl") (with-mode cs-perl-mode
+ (process-node-list (current-node))))
+ (("idl") (with-mode cs-idl-mode
+ (process-node-list (current-node))))
+ (("python") (with-mode cs-python-mode
+ (process-node-list (current-node))))
+ (else (with-mode cs-java-mode
+ (process-node-list (current-node)))))))
+
+(element destructorsynopsis
+ (let ((language (if (attribute-string (normalize "language"))
+ (attribute-string (normalize "language"))
+ %default-classsynopsis-language%)))
+ (case language
+ (("java") (with-mode cs-java-mode
+ (process-node-list (current-node))))
+ (("perl") (with-mode cs-perl-mode
+ (process-node-list (current-node))))
+ (("idl") (with-mode cs-idl-mode
+ (process-node-list (current-node))))
+ (("python") (with-mode cs-python-mode
+ (process-node-list (current-node))))
+ (else (with-mode cs-java-mode
+ (process-node-list (current-node)))))))
+
+;; ===== Java ========================================================
+
+(mode cs-java-mode
+
+(element classsynopsis
+ (let* ((classes (select-elements (children (current-node))
+ (normalize "ooclass")))
+ (classname (node-list-first classes))
+ (superclasses (node-list-rest classes)))
+ (make display-group
+ use: verbatim-style
+ (make paragraph
+ (process-node-list classname)
+ (process-node-list superclasses)
+ (literal "{"))
+ (process-node-list
+ (node-list-filter-by-gi
+ (children (current-node))
+ (list (normalize "constructorsynopsis")
+ (normalize "destructorsynopsis")
+ (normalize "fieldsynopsis")
+ (normalize "methodsynopsis")
+ (normalize "classsynopsisinfo"))))
+ (make paragraph
+ (literal "}")))))
+
+(element classsynopsisinfo
+ ($verbatim-display$ %indent-classsynopsisinfo-lines%
+ %number-classsynopsisinfo-lines%))
+
+(element ooclass
+ (make sequence
+ (if (first-sibling?)
+ (literal " ")
+ (literal ", "))
+ (process-children)))
+
+(element oointerface
+ (make sequence
+ (if (first-sibling?)
+ (literal " ")
+ (literal ", "))
+ (process-children)))
+
+(element ooexception
+ (make sequence
+ (if (first-sibling?)
+ (literal " ")
+ (literal ", "))
+ (process-children)))
+
+(element modifier
+ (make sequence
+ (process-children)
+ (literal " ")))
+
+(element classname
+ (if (first-sibling?)
+ (make sequence
+ (literal "class ")
+ (process-children)
+ (literal " ")
+ (if (last-sibling?)
+ (empty-sosofo)
+ (literal "extends ")))
+ (make sequence
+ (process-children)
+ (if (last-sibling?)
+ (literal " ")
+ (literal ", ")))))
+
+(element fieldsynopsis
+ (make paragraph
+ use: inline-verbatim-style
+ (literal " ")
+ (process-children)
+ (literal ";")))
+
+(element type
+ (make sequence
+ (process-children)
+ (literal " ")))
+
+(element varname
+ (make sequence
+ (process-children)))
+
+(element initializer
+ (make sequence
+ (literal " = ")
+ (process-children)))
+
+(element constructorsynopsis
+ (java-method-synopsis))
+
+(element destructorsynopsis
+ (java-method-synopsis))
+
+(element methodsynopsis
+ (java-method-synopsis))
+
+(element void
+ (literal "void "))
+
+(element methodname
+ (process-children))
+
+(element methodparam
+ (make sequence
+ (if (first-sibling?)
+ (empty-sosofo)
+ (literal ", "))
+ (process-children)))
+
+(element parameter
+ (process-children))
+
+(element exceptionname
+ (make sequence
+ (if (first-sibling?)
+ (literal " throws ")
+ (literal ", "))
+ (process-children)))
+)
+
+(define (java-method-synopsis #!optional (nd (current-node)))
+ (let* ((modifiers (select-elements (children nd)
+ (normalize "modifier")))
+ (notmod (node-list-filter-by-not-gi
+ (children nd)
+ (list (normalize "modifier"))))
+ (type (if (equal? (gi (node-list-first notmod))
+ (normalize "methodname"))
+ (empty-node-list)
+ (node-list-first notmod)))
+ (methodname (select-elements (children nd)
+ (normalize "methodname")))
+ (param (node-list-filter-by-gi (node-list-rest notmod)
+ (list (normalize "methodparam"))))
+ (excep (select-elements (children nd)
+ (normalize "exceptionname"))))
+ (make paragraph
+ use: inline-verbatim-style
+ (literal " ")
+ (process-node-list modifiers)
+ (process-node-list type)
+ (process-node-list methodname)
+ (literal "(")
+ (process-node-list param)
+ (literal ")")
+ (process-node-list excep)
+ (literal ";"))))
+
+;; ===== Perl ========================================================
+
+(mode cs-perl-mode
+
+(element classsynopsis
+ (let* ((modifiers (select-elements (children (current-node))
+ (normalize "modifier")))
+ (classes (select-elements (children (current-node))
+ (normalize "classname")))
+ (classname (node-list-first classes))
+ (superclasses (node-list-rest classes)))
+ (make display-group
+ use: verbatim-style;
+ (make paragraph
+ (literal "package ")
+ (process-node-list classname)
+ (literal ";"))
+ (if (node-list-empty? superclasses)
+ (empty-sosofo)
+ (make sequence
+ (literal "@ISA = (");
+ (process-node-list superclasses)
+ (literal ";")))
+ (process-node-list
+ (node-list-filter-by-gi
+ (children (current-node))
+ (list (normalize "constructorsynopsis")
+ (normalize "destructorsynopsis")
+ (normalize "fieldsynopsis")
+ (normalize "methodsynopsis")
+ (normalize "classsynopsisinfo")))))))
+
+(element classsynopsisinfo
+ ($verbatim-display$ %indent-classsynopsisinfo-lines%
+ %number-classsynopsisinfo-lines%))
+
+(element modifier
+ (literal "Perl ClassSynopses don't use Modifiers"))
+
+(element classname
+ (if (first-sibling?)
+ (process-children)
+ (make sequence
+ (process-children)
+ (if (last-sibling?)
+ (empty-sosofo)
+ (literal ", ")))))
+
+(element fieldsynopsis
+ (make paragraph
+ use: inline-verbatim-style
+ (literal " ");
+ (process-children)
+ (literal ";")))
+
+(element type
+ (make sequence
+ (process-children)
+ (literal " ")))
+
+(element varname
+ (make sequence
+ (process-children)))
+
+(element initializer
+ (make sequence
+ (literal " = ")
+ (process-children)))
+
+(element constructorsynopsis
+ (perl-method-synopsis))
+
+(element destructorsynopsis
+ (perl-method-synopsis))
+
+(element methodsynopsis
+ (perl-method-synopsis))
+
+(element void
+ (empty-sosofo))
+
+(element methodname
+ (process-children))
+
+(element methodparam
+ (make sequence
+ (if (first-sibling?)
+ (empty-sosofo)
+ (literal ", "))
+ (process-children)))
+
+(element parameter
+ (process-children))
+
+(element exceptionname
+ (literal "Perl ClassSynopses don't use Exceptions"))
+
+)
+
+(define (perl-method-synopsis #!optional (nd (current-node)))
+ (let* ((modifiers (select-elements (children nd)
+ (normalize "modifier")))
+ (notmod (node-list-filter-by-not-gi
+ (children nd)
+ (list (normalize "modifier"))))
+ (type (if (equal? (gi (node-list-first notmod))
+ (normalize "methodname"))
+ (empty-node-list)
+ (node-list-first notmod)))
+ (methodname (select-elements (children nd)
+ (normalize "methodname")))
+ (param (node-list-filter-by-gi (node-list-rest notmod)
+ (list (normalize "type")
+ (normalize "void"))))
+ (excep (select-elements (children nd)
+ (normalize "exceptionname"))))
+ (make paragraph
+ use: inline-verbatim-style
+ (literal "sub ")
+ (process-node-list modifiers)
+ (process-node-list type)
+ (process-node-list methodname)
+ (literal " { ... }"))))
+
+;; ===== IDL =========================================================
+
+(mode cs-idl-mode
+
+(element classsynopsis
+ (let* ((modifiers (select-elements (children (current-node))
+ (normalize "modifier")))
+ (classes (select-elements (children (current-node))
+ (normalize "classname")))
+ (classname (node-list-first classes))
+ (superclasses (node-list-rest classes)))
+ (make display-group
+ use: verbatim-style;
+ (make paragraph
+ (literal "interface ")
+ (process-node-list modifiers)
+ (process-node-list classname)
+ (if (node-list-empty? superclasses)
+ (literal " ")
+ (make sequence
+ (literal " : ")
+ (process-node-list superclasses)))
+ (literal "{"))
+ (process-node-list
+ (node-list-filter-by-gi
+ (children (current-node))
+ (list (normalize "constructorsynopsis")
+ (normalize "destructorsynopsis")
+ (normalize "fieldsynopsis")
+ (normalize "methodsynopsis")
+ (normalize "classsynopsisinfo"))))
+ (make paragraph
+ (literal "}")))))
+
+(element classsynopsisinfo
+ ($verbatim-display$ %indent-classsynopsisinfo-lines%
+ %number-classsynopsisinfo-lines%))
+
+(element modifier
+ (make sequence
+ (process-children)
+ (literal " ")))
+
+(element classname
+ (if (first-sibling?)
+ (process-children)
+ (make sequence
+ (process-children)
+ (if (last-sibling?)
+ (empty-sosofo)
+ (literal ", ")))))
+
+(element fieldsynopsis
+ (make paragraph
+ use: inline-verbatim-style
+ (literal " ");
+ (process-children)
+ (literal ";")))
+
+(element type
+ (make sequence
+ (process-children)
+ (literal " ")))
+
+(element varname
+ (make sequence
+ (process-children)))
+
+(element initializer
+ (make sequence
+ (literal " = ")
+ (process-children)))
+
+(element constructorsynopsis
+ (idl-method-synopsis))
+
+(element destructorsynopsis
+ (idl-method-synopsis))
+
+(element methodsynopsis
+ (idl-method-synopsis))
+
+(element void
+ (literal "void "))
+
+(element methodname
+ (process-children))
+
+(element methodparam
+ (make sequence
+ (if (first-sibling?)
+ (empty-sosofo)
+ (literal ", "))
+ (process-children)))
+
+(element parameter
+ (process-children))
+
+(element exceptionname
+ (make sequence
+ (if (first-sibling?)
+ (literal " raises(")
+ (literal ", "))
+ (process-children)
+ (if (last-sibling?)
+ (literal ")")
+ (empty-sosofo))))
+)
+
+(define (idl-method-synopsis #!optional (nd (current-node)))
+ (let* ((modifiers (select-elements (children nd)
+ (normalize "modifier")))
+ (notmod (node-list-filter-by-not-gi
+ (children nd)
+ (list (normalize "modifier"))))
+ (type (if (equal? (gi (node-list-first notmod))
+ (normalize "methodname"))
+ (empty-node-list)
+ (node-list-first notmod)))
+ (methodname (select-elements (children nd)
+ (normalize "methodname")))
+ (param (node-list-filter-by-gi (node-list-rest notmod)
+ (list (normalize "methodparam"))))
+ (excep (select-elements (children nd)
+ (normalize "exceptionname"))))
+ (make paragraph
+ use: inline-verbatim-style
+ (process-node-list modifiers)
+ (process-node-list type)
+ (process-node-list methodname)
+ (literal "(")
+ (process-node-list param)
+ (literal ")")
+ (process-node-list excep)
+ (literal ";"))))
+
+;; ===== Python ======================================================
+;; Contributed by Lane Stevens, lane@cycletime.com
+
+(mode cs-python-mode
+ (element classsynopsis
+ (let* ((classes (select-elements (children (current-node))
+ (normalize "ooclass")))
+ (classname (node-list-first classes))
+ (superclasses (node-list-rest classes)))
+ (make display-group
+ use: verbatim-style
+ (make paragraph
+ (literal "class ")
+ (process-node-list classname)
+ (literal "(")
+ (process-node-list superclasses)
+ (literal ") :"))
+ (process-node-list
+ (node-list-filter-by-gi
+ (children (current-node))
+ (list (normalize "constructorsynopsis")
+ (normalize "destructorsynopsis")
+ (normalize "fieldsynopsis")
+ (normalize "methodsynopsis")
+ (normalize "classsynopsisinfo"))))
+ )
+ )
+ )
+
+ (element ooclass
+ (make sequence
+ (process-children)
+ (cond
+ ((first-sibling?) (literal " "))
+ ((last-sibling?) (empty-sosofo))
+ (#t (literal ", "))
+ )
+ )
+ )
+
+ (element methodsynopsis
+ (python-method-synopsis))
+
+ (element classname
+ (process-children))
+
+ (element initializer
+ (make sequence
+ (literal " = ")
+ (process-children)))
+
+ (element methodname
+ (process-children))
+
+ (element methodparam
+ (make sequence
+ (process-children)
+ (if (last-sibling?)
+ (empty-sosofo)
+ (literal ", "))
+ )
+ )
+
+ (element parameter
+ (process-children))
+ )
+
+(define (python-method-synopsis #!optional (nd (current-node)))
+ (let* ((the-method-name (select-elements (children nd) (normalize "methodname")))
+ (the-method-params (select-elements (children nd) (normalize "methodparam")))
+ )
+ (make paragraph
+ use: inline-verbatim-style
+ (literal " def ")
+ (process-node-list the-method-name)
+ (literal "(")
+ (process-node-list the-method-params)
+ (literal ") :"))
+ )
+ )
+
+;; EOF
diff --git a/print/dbgloss.dsl b/print/dbgloss.dsl
new file mode 100644
index 0000000..2fcc5d9
--- /dev/null
+++ b/print/dbgloss.dsl
@@ -0,0 +1,117 @@
+;; $Id: dbgloss.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= GLOSSARY ELEMENTS ==========================
+
+(element glossary ($component$))
+(element (article glossary) ($section$)) ;; this is a special case
+(element (glossary title) (empty-sosofo))
+
+(element glossdiv ($section$))
+(element (glossdiv title) (empty-sosofo))
+
+(element glosslist ($block-container$))
+(element glossentry (process-children))
+
+;; a glossentry glossterm
+(element (glossentry glossterm) ($lowtitle$ 3 2))
+(element (glossdiv glossentry glossterm) ($lowtitle$ 3 3))
+(element (glossentry acronym) (empty-sosofo))
+(element (glossentry abbrev) (empty-sosofo))
+(element glossdef ($indent-para-container$))
+
+(element glosssee ($italic-seq$))
+
+(element (glossentry glosssee)
+ (let ((otherterm (attribute-string (normalize "otherterm"))))
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: (+ (inherited-start-indent) (* (ILSTEP) 2))
+ quadding: %default-quadding%
+ ($italic-seq$ (literal (gentext-element-name (current-node))
+ (gentext-label-title-sep (gi))))
+ (if otherterm
+ (make link
+ destination: (node-list-address (element-with-id otherterm))
+ (with-mode otherterm
+ (process-element-with-id otherterm)))
+ (process-children)))))
+
+;; When we hit the first GLOSSSEEALSO, process all of them as a node-list
+(element glossseealso
+ (if (first-sibling?)
+ (make paragraph
+ ($italic-seq$ (literal (gentext-element-name (current-node))
+ (gentext-label-title-sep (gi))))
+ (with-mode glossseealso
+ (process-node-list
+ (select-elements (children (parent)) '(glossseealso))))
+ (literal "."))
+ (empty-sosofo)))
+
+(mode glossseealso
+
+ (element glossseealso
+ (let ((otherterm (attribute-string (normalize "otherterm"))))
+ (make sequence
+ (if (first-sibling?)
+ (empty-sosofo)
+ ($italic-seq$ (literal ", ")))
+
+ (if otherterm ;; but this should be required...
+ (make link
+ destination: (node-list-address (element-with-id otherterm))
+ (with-mode otherterm
+ (process-element-with-id otherterm)))
+ (process-children)))))
+
+)
+
+;; This is referenced within the GLOSSSEE and GLOSSSEEALSO element
+;; construction expressions. The OTHERTERM attributes on GLOSSSEE and
+;; GLOSSSEEALSO (should) refer to GLOSSENTRY elements but we're only
+;; interested in the text within the GLOSSTERM. Discard the revision
+;; history and the definition from the referenced term.
+(mode otherterm
+ (element glossentry
+ (process-children))
+ (element glossterm
+ (process-children))
+ (element glossdef
+ (empty-sosofo))
+ (element revhistory
+ (empty-sosofo))
+ (element glosssee
+ (empty-sosofo))
+ (element (glossentry acronym)
+ (empty-sosofo))
+ (element (glossentry abbrev)
+ (empty-sosofo)))
+
+;; an inline gloss term
+(element glossterm
+ (let* ((linkend (attribute-string (normalize "linkend"))))
+ (if linkend
+ (make link
+ destination: (node-list-address (element-with-id linkend))
+ ($italic-seq$))
+ ($italic-seq$))))
+
+;; a first glossterm
+(element firstterm
+ (let* ((linkend (attribute-string (normalize "linkend")))
+ (sosofo (if linkend
+ (make link
+ destination: (node-list-address
+ (element-with-id linkend))
+ ($italic-seq$))
+ ($italic-seq$))))
+ (if firstterm-bold
+ (make sequence
+ font-weight: 'bold
+ sosofo)
+ sosofo)))
diff --git a/print/dbgraph.dsl b/print/dbgraph.dsl
new file mode 100644
index 0000000..218698a
--- /dev/null
+++ b/print/dbgraph.dsl
@@ -0,0 +1,134 @@
+;; $Id: dbgraph.dsl,v 1.3 2003/03/25 19:53:55 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ==================== GRAPHICS ====================
+
+;; NOTE: display #f doesn't seem to work right in the RTF back end...
+
+(define (graphic-file filename)
+ (let ((ext (file-extension filename)))
+ (if (or (not filename)
+ (not %graphic-default-extension%)
+ (member ext %graphic-extensions%))
+ filename
+ (string-append filename "." %graphic-default-extension%))))
+
+(define ($graphic$ fileref
+ #!optional (display #f) (format #f) (scale #f) (align #f))
+ (let ((graphic-format (if format format ""))
+ (graphic-scale (if scale (/ (string->number scale) 100) 1))
+ (graphic-align (cond ((equal? align (normalize "center"))
+ 'center)
+ ((equal? align (normalize "right"))
+ 'end)
+ (else
+ 'start))))
+ (make external-graphic
+ entity-system-id: (graphic-file fileref)
+ notation-system-id: graphic-format
+ scale: graphic-scale
+ display?: display
+ display-alignment: graphic-align)))
+
+(define ($img$ #!optional (nd (current-node)) (display #f))
+ ;; This function now supports an extension to DocBook. It's
+ ;; either a clever trick or an ugly hack, depending on your
+ ;; point of view, but it'll hold us until XLink is finalized
+ ;; and we can extend DocBook the "right" way.
+ ;;
+ ;; If the entity passed to GRAPHIC has the FORMAT
+ ;; "LINESPECIFIC", either because that's what's specified or
+ ;; because it's the notation of the supplied ENTITYREF, then
+ ;; the text of the entity is inserted literally (via Jade's
+ ;; read-entity external procedure).
+ ;;
+ (let* ((fileref (attribute-string (normalize "fileref") nd))
+ (entityref (attribute-string (normalize "entityref") nd))
+ (format (if (attribute-string (normalize "format") nd)
+ (attribute-string (normalize "format") nd)
+ (if entityref
+ (entity-notation entityref)
+ #f)))
+ (align (attribute-string (normalize "align") nd))
+ (scale (attribute-string (normalize "scale") nd)))
+ (if (or fileref entityref)
+ (if (equal? format (normalize "linespecific"))
+ (if fileref
+ (include-file fileref)
+ (include-file (entity-generated-system-id entityref)))
+ (if fileref
+ ($graphic$ fileref display format scale align)
+ ($graphic$ (entity-generated-system-id entityref)
+ display format scale align)))
+ (empty-sosofo))))
+
+(element graphic
+ (make paragraph
+ space-before: %block-sep%
+ space-after: %block-sep%
+ ($img$ (current-node) #t)))
+
+(element inlinegraphic ($img$))
+
+
+;; ======================================================================
+;; MediaObject and friends...
+
+(define preferred-mediaobject-notations
+ (list "EPS" "PS" "JPG" "JPEG" "PNG" "linespecific"))
+
+(define preferred-mediaobject-extensions
+ (list "eps" "ps" "jpg" "jpeg" "png"))
+
+(define acceptable-mediaobject-notations
+ (list "GIF" "GIF87a" "GIF89a" "BMP" "WMF"))
+
+(define acceptable-mediaobject-extensions
+ (list "gif" "bmp" "wmf"))
+
+(element mediaobject
+ (make paragraph
+ ($mediaobject$)))
+
+(element inlinemediaobject
+ (make sequence
+ ($mediaobject$)))
+
+(element mediaobjectco
+ (error "MediaObjectCO is not supported yet."))
+
+(element imageobjectco
+ (error "ImageObjectCO is not supported yet."))
+
+(element objectinfo
+ (empty-sosofo))
+
+(element videoobject
+ (process-children))
+
+(element videodata
+ (empty-sosofo))
+
+(element audioobject
+ (process-children))
+
+(element audiodata
+ (empty-sosofo))
+
+(element imageobject
+ (process-children))
+
+(element imagedata
+ (if (have-ancestor? (normalize "mediaobject"))
+ ($img$ (current-node) #t)
+ ($img$ (current-node) #f)))
+
+(element textobject
+ (make display-group
+ (process-children)))
+
+(element caption
+ (process-children))
diff --git a/print/dbindex.dsl b/print/dbindex.dsl
new file mode 100644
index 0000000..c97d49b
--- /dev/null
+++ b/print/dbindex.dsl
@@ -0,0 +1,156 @@
+;; $Id: dbindex.dsl,v 1.4 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ................... INDEX TERMS (EMBEDDED MARKERS) ...................
+
+(element indexterm
+ ;; This is different than (empty-sosofo) alone because the backend
+ ;; will hang an anchor off the empty sequence. This allows the index
+ ;; to point to the indexterm (but only if the indexterm has an ID).
+ (make sequence (empty-sosofo)))
+
+(element primary (empty-sosofo))
+(element secondary (empty-sosofo))
+(element tertiary (empty-sosofo))
+(element see (empty-sosofo))
+(element seealso (empty-sosofo))
+
+;; =========================== INDEX ELEMENTS ===========================
+
+(element setindex ($component$))
+(element (setindex title) (empty-sosofo))
+
+(element index
+ (make simple-page-sequence
+ page-number-restart?: (or %page-number-restart%
+ (book-start?)
+ (first-chapter?))
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ start-indent: %body-start-indent%
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+ page-n-columns: 2
+ (make sequence
+ ($component-title$)
+ (process-children))
+ (make-endnotes)))
+
+;; this is a special case. this prevents the index from causing an error but
+;; will make the index a single column. c'est la vie.
+(element (article index) ($section$))
+
+(element (index title) (empty-sosofo))
+
+(element indexdiv ($section$))
+(element (indexdiv title) (empty-sosofo))
+
+(element indexentry (process-children))
+
+(element primaryie
+ (make paragraph
+ font-size: (* (inherited-font-size) %smaller-size-factor%)
+ (process-children)))
+
+(element secondaryie
+ (make paragraph
+ font-size: (* (inherited-font-size) %smaller-size-factor%)
+ start-indent: (+ (inherited-start-indent) 1em)
+ (process-children)))
+
+(element tertiaryie
+ (make paragraph
+ font-size: (* (inherited-font-size) %smaller-size-factor%)
+ start-indent: (+ (inherited-start-indent) 2em)
+ (process-children)))
+
+(define (find-indexterm id)
+ ;; If you have a lot of indexterms that don't have IDs, this could
+ ;; be incredibly slow. So don't do that.
+ (let* ((idtarget (element-with-id id)))
+ (if (node-list-empty? idtarget)
+ (let loop ((idnodes (select-elements (descendants (sgml-root-element))
+ (normalize "indexterm"))))
+ (if (node-list-empty? idnodes)
+ (empty-node-list)
+ (if (equal? id (string-append "AEN"
+ (number->string
+ (all-element-number
+ (node-list-first idnodes)))))
+ (node-list-first idnodes)
+ (loop (node-list-rest idnodes)))))
+ idtarget)))
+
+(define (indexentry-link nd)
+ (let* ((id (attribute-string (normalize "role") nd))
+ (target (find-indexterm id))
+ (preferred (not (node-list-empty?
+ (select-elements (children (current-node))
+ (normalize "emphasis")))))
+ (sosofo (if (node-list-empty? target)
+ (literal "?")
+ (make link
+ destination: (node-list-address target)
+ (with-mode toc-page-number-mode
+ (process-node-list target))))))
+ (if preferred
+ (make sequence
+ font-weight: 'bold
+ sosofo)
+ sosofo)))
+
+(element (primaryie ulink)
+ (indexentry-link (current-node)))
+
+(element (secondaryie ulink)
+ (indexentry-link (current-node)))
+
+(element (tertiaryie ulink)
+ (indexentry-link (current-node)))
+
+(element seeie
+ (let ((indent (cond ((node-list-empty?
+ (select-elements
+ (children (parent (current-node)))
+ (normalize "secondaryie")))
+ 1em)
+ ((node-list-empty?
+ (select-elements
+ (children (parent (current-node)))
+ (normalize "tertiaryie")))
+ 2em)
+ (else 3em))))
+ (make paragraph
+ font-size: (* (inherited-font-size) %smaller-size-factor%)
+ start-indent: (+ (inherited-start-indent) indent)
+ (literal "(" (gentext-index-see) " ")
+ (process-children)
+ (literal ")"))))
+
+(element seealsoie
+ (let ((indent (cond ((node-list-empty?
+ (select-elements
+ (children (parent (current-node)))
+ (normalize "secondaryie")))
+ 1em)
+ ((node-list-empty?
+ (select-elements
+ (children (parent (current-node)))
+ (normalize "tertiaryie")))
+ 2em)
+ (else 3em))))
+ (make paragraph
+ font-size: (* (inherited-font-size) %smaller-size-factor%)
+ start-indent: (+ (inherited-start-indent) indent)
+ (literal "(" (gentext-index-seealso) " ")
+ (process-children)
+ (literal ")"))))
diff --git a/print/dbinfo.dsl b/print/dbinfo.dsl
new file mode 100644
index 0000000..e89af5c
--- /dev/null
+++ b/print/dbinfo.dsl
@@ -0,0 +1,1012 @@
+;; $Id: dbinfo.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ................................ INFO ................................
+
+;; Rather than make the *INFO containers empty-sosofos, we make them
+;; process-children and then make all of the elements they may contain
+;; empty in this context. The advantage here is that we can then
+;; more easily override some of them in stylesheets that use this one.
+
+(element setinfo (empty-sosofo))
+
+(element (setinfo abbrev) (empty-sosofo))
+(element (setinfo abstract) (empty-sosofo))
+(element (setinfo address) (empty-sosofo))
+(element (setinfo affiliation) (empty-sosofo))
+(element (setinfo artpagenums) (empty-sosofo))
+(element (setinfo author) (empty-sosofo))
+(element (setinfo authorblurb) (empty-sosofo))
+(element (setinfo authorgroup) (empty-sosofo))
+(element (setinfo authorinitials) (empty-sosofo))
+(element (setinfo bibliomisc) (empty-sosofo))
+(element (setinfo biblioset) (empty-sosofo))
+(element (setinfo collab) (empty-sosofo))
+(element (setinfo confgroup) (empty-sosofo))
+(element (setinfo contractnum) (empty-sosofo))
+(element (setinfo contractsponsor) (empty-sosofo))
+(element (setinfo contrib) (empty-sosofo))
+(element (setinfo copyright) (empty-sosofo))
+(element (setinfo corpauthor) (empty-sosofo))
+(element (setinfo corpname) (empty-sosofo))
+(element (setinfo date) (empty-sosofo))
+(element (setinfo edition) (empty-sosofo))
+(element (setinfo editor) (empty-sosofo))
+(element (setinfo firstname) (empty-sosofo))
+(element (setinfo graphic) (empty-sosofo))
+(element (setinfo honorific) (empty-sosofo))
+(element (setinfo invpartnumber) (empty-sosofo))
+(element (setinfo isbn) (empty-sosofo))
+(element (setinfo issn) (empty-sosofo))
+(element (setinfo issuenum) (empty-sosofo))
+(element (setinfo itermset) (empty-sosofo))
+(element (setinfo keywordset) (empty-sosofo))
+(element (setinfo legalnotice) (empty-sosofo))
+(element (setinfo lineage) (empty-sosofo))
+(element (setinfo modespec) (empty-sosofo))
+(element (setinfo orgname) (empty-sosofo))
+(element (setinfo othercredit) (empty-sosofo))
+(element (setinfo othername) (empty-sosofo))
+(element (setinfo pagenums) (empty-sosofo))
+(element (setinfo printhistory) (empty-sosofo))
+(element (setinfo productname) (empty-sosofo))
+(element (setinfo productnumber) (empty-sosofo))
+(element (setinfo pubdate) (empty-sosofo))
+(element (setinfo publisher) (empty-sosofo))
+(element (setinfo publishername) (empty-sosofo))
+(element (setinfo pubsnumber) (empty-sosofo))
+(element (setinfo releaseinfo) (empty-sosofo))
+(element (setinfo revhistory) (empty-sosofo))
+(element (setinfo seriesvolnums) (empty-sosofo))
+(element (setinfo subjectset) (empty-sosofo))
+(element (setinfo subtitle) (empty-sosofo))
+(element (setinfo surname) (empty-sosofo))
+(element (setinfo title) (empty-sosofo))
+(element (setinfo titleabbrev) (empty-sosofo))
+(element (setinfo volumenum) (empty-sosofo))
+
+;; BookInfo is handled differently in dbdivis.dsl by using a
+;; special mode...
+
+(element bookinfo (empty-sosofo))
+
+(element (bookinfo abbrev) (process-children))
+(element (bookinfo abstract) (process-children))
+(element (bookinfo address) (process-children))
+(element (bookinfo affiliation) (process-children))
+(element (bookinfo artpagenums) (process-children))
+(element (bookinfo author) (process-children))
+(element (bookinfo authorblurb) (process-children))
+(element (bookinfo authorgroup) (process-children))
+(element (bookinfo authorinitials) (process-children))
+(element (bookinfo bibliomisc) (process-children))
+(element (bookinfo biblioset) (process-children))
+(element (bookinfo bookbiblio) (process-children))
+(element (bookinfo collab) (process-children))
+(element (bookinfo confgroup) (process-children))
+(element (bookinfo contractnum) (process-children))
+(element (bookinfo contractsponsor) (process-children))
+(element (bookinfo contrib) (process-children))
+;; (element (bookinfo copyright) (process-children)) ;; the default is good
+(element (bookinfo corpauthor) (process-children))
+(element (bookinfo corpname) (process-children))
+(element (bookinfo date) (process-children))
+(element (bookinfo edition) (process-children))
+(element (bookinfo editor) (process-children))
+(element (bookinfo firstname) (process-children))
+(element (bookinfo graphic) (process-children))
+(element (bookinfo honorific) (process-children))
+(element (bookinfo invpartnumber) (process-children))
+(element (bookinfo isbn) (process-children))
+(element (bookinfo issn) (process-children))
+(element (bookinfo issuenum) (process-children))
+(element (bookinfo itermset) (process-children))
+(element (bookinfo keywordset) (process-children))
+(element (bookinfo legalnotice) ($semiformal-object$))
+(element (bookinfo lineage) (process-children))
+(element (bookinfo modespec) (process-children))
+(element (bookinfo orgname) (process-children))
+(element (bookinfo othercredit) (process-children))
+(element (bookinfo othername) (process-children))
+(element (bookinfo pagenums) (process-children))
+(element (bookinfo printhistory) (process-children))
+(element (bookinfo productname) (process-children))
+(element (bookinfo productnumber) (process-children))
+(element (bookinfo pubdate) (process-children))
+(element (bookinfo publisher) (process-children))
+(element (bookinfo publishername) (process-children))
+(element (bookinfo pubsnumber) (process-children))
+(element (bookinfo releaseinfo) (process-children))
+(element (bookinfo revhistory) ($book-revhistory$))
+(element (bookinfo seriesvolnums) (process-children))
+(element (bookinfo subjectset) (process-children))
+(element (bookinfo subtitle) (process-children))
+(element (bookinfo surname) (process-children))
+(element (bookinfo title) (process-children))
+(element (bookinfo titleabbrev) (process-children))
+(element (bookinfo volumenum) (process-children))
+
+(element docinfo (empty-sosofo))
+
+(element (docinfo abbrev) (empty-sosofo))
+(element (docinfo abstract) (empty-sosofo))
+(element (docinfo address) (empty-sosofo))
+(element (docinfo affiliation) (empty-sosofo))
+(element (docinfo artpagenums) (empty-sosofo))
+(element (docinfo author) (empty-sosofo))
+(element (docinfo authorblurb) (empty-sosofo))
+(element (docinfo authorgroup) (empty-sosofo))
+(element (docinfo authorinitials) (empty-sosofo))
+(element (docinfo bibliomisc) (empty-sosofo))
+(element (docinfo biblioset) (empty-sosofo))
+(element (docinfo collab) (empty-sosofo))
+(element (docinfo confgroup) (empty-sosofo))
+(element (docinfo contractnum) (empty-sosofo))
+(element (docinfo contractsponsor) (empty-sosofo))
+(element (docinfo contrib) (empty-sosofo))
+(element (docinfo copyright) (empty-sosofo))
+(element (docinfo corpauthor) (empty-sosofo))
+(element (docinfo corpname) (empty-sosofo))
+(element (docinfo date) (empty-sosofo))
+(element (docinfo edition) (empty-sosofo))
+(element (docinfo editor) (empty-sosofo))
+(element (docinfo firstname) (empty-sosofo))
+(element (docinfo graphic) (empty-sosofo))
+(element (docinfo honorific) (empty-sosofo))
+(element (docinfo invpartnumber) (empty-sosofo))
+(element (docinfo isbn) (empty-sosofo))
+(element (docinfo issn) (empty-sosofo))
+(element (docinfo issuenum) (empty-sosofo))
+(element (docinfo itermset) (empty-sosofo))
+(element (docinfo keywordset) (empty-sosofo))
+(element (docinfo legalnotice) (empty-sosofo))
+(element (docinfo lineage) (empty-sosofo))
+(element (docinfo modespec) (empty-sosofo))
+(element (docinfo orgname) (empty-sosofo))
+(element (docinfo othercredit) (empty-sosofo))
+(element (docinfo othername) (empty-sosofo))
+(element (docinfo pagenums) (empty-sosofo))
+(element (docinfo printhistory) (empty-sosofo))
+(element (docinfo productname) (empty-sosofo))
+(element (docinfo productnumber) (empty-sosofo))
+(element (docinfo pubdate) (empty-sosofo))
+(element (docinfo publisher) (empty-sosofo))
+(element (docinfo publishername) (empty-sosofo))
+(element (docinfo pubsnumber) (empty-sosofo))
+(element (docinfo releaseinfo) (empty-sosofo))
+(element (docinfo revhistory) (empty-sosofo))
+(element (docinfo seriesvolnums) (empty-sosofo))
+(element (docinfo subjectset) (empty-sosofo))
+(element (docinfo subtitle) (empty-sosofo))
+(element (docinfo surname) (empty-sosofo))
+(element (docinfo title) (empty-sosofo))
+(element (docinfo titleabbrev) (empty-sosofo))
+(element (docinfo volumenum) (empty-sosofo))
+
+(element sect1info (process-children))
+
+(element (sect1info abbrev) (empty-sosofo))
+(element (sect1info abstract) (empty-sosofo))
+(element (sect1info address) (empty-sosofo))
+(element (sect1info affiliation) (empty-sosofo))
+(element (sect1info artpagenums) (empty-sosofo))
+(element (sect1info author) (empty-sosofo))
+(element (sect1info authorblurb) (empty-sosofo))
+(element (sect1info authorgroup) (empty-sosofo))
+(element (sect1info authorinitials) (empty-sosofo))
+(element (sect1info bibliomisc) (empty-sosofo))
+(element (sect1info biblioset) (empty-sosofo))
+(element (sect1info collab) (empty-sosofo))
+(element (sect1info confgroup) (empty-sosofo))
+(element (sect1info contractnum) (empty-sosofo))
+(element (sect1info contractsponsor) (empty-sosofo))
+(element (sect1info contrib) (empty-sosofo))
+(element (sect1info copyright) (empty-sosofo))
+(element (sect1info corpauthor) (empty-sosofo))
+(element (sect1info corpname) (empty-sosofo))
+(element (sect1info date) (empty-sosofo))
+(element (sect1info edition) (empty-sosofo))
+(element (sect1info editor) (empty-sosofo))
+(element (sect1info firstname) (empty-sosofo))
+(element (sect1info graphic) (empty-sosofo))
+(element (sect1info honorific) (empty-sosofo))
+(element (sect1info invpartnumber) (empty-sosofo))
+(element (sect1info isbn) (empty-sosofo))
+(element (sect1info issn) (empty-sosofo))
+(element (sect1info issuenum) (empty-sosofo))
+(element (sect1info itermset) (empty-sosofo))
+(element (sect1info keywordset) (empty-sosofo))
+(element (sect1info legalnotice) (empty-sosofo))
+(element (sect1info lineage) (empty-sosofo))
+(element (sect1info modespec) (empty-sosofo))
+(element (sect1info orgname) (empty-sosofo))
+(element (sect1info othercredit) (empty-sosofo))
+(element (sect1info othername) (empty-sosofo))
+(element (sect1info pagenums) (empty-sosofo))
+(element (sect1info printhistory) (empty-sosofo))
+(element (sect1info productname) (empty-sosofo))
+(element (sect1info productnumber) (empty-sosofo))
+(element (sect1info pubdate) (empty-sosofo))
+(element (sect1info publisher) (empty-sosofo))
+(element (sect1info publishername) (empty-sosofo))
+(element (sect1info pubsnumber) (empty-sosofo))
+(element (sect1info releaseinfo) (empty-sosofo))
+(element (sect1info revhistory) (empty-sosofo))
+(element (sect1info seriesvolnums) (empty-sosofo))
+(element (sect1info subjectset) (empty-sosofo))
+(element (sect1info subtitle) (empty-sosofo))
+(element (sect1info surname) (empty-sosofo))
+(element (sect1info title) (empty-sosofo))
+(element (sect1info titleabbrev) (empty-sosofo))
+(element (sect1info volumenum) (empty-sosofo))
+
+(element sect2info (process-children))
+
+(element (sect2info abbrev) (empty-sosofo))
+(element (sect2info abstract) (empty-sosofo))
+(element (sect2info address) (empty-sosofo))
+(element (sect2info affiliation) (empty-sosofo))
+(element (sect2info artpagenums) (empty-sosofo))
+(element (sect2info author) (empty-sosofo))
+(element (sect2info authorblurb) (empty-sosofo))
+(element (sect2info authorgroup) (empty-sosofo))
+(element (sect2info authorinitials) (empty-sosofo))
+(element (sect2info bibliomisc) (empty-sosofo))
+(element (sect2info biblioset) (empty-sosofo))
+(element (sect2info collab) (empty-sosofo))
+(element (sect2info confgroup) (empty-sosofo))
+(element (sect2info contractnum) (empty-sosofo))
+(element (sect2info contractsponsor) (empty-sosofo))
+(element (sect2info contrib) (empty-sosofo))
+(element (sect2info copyright) (empty-sosofo))
+(element (sect2info corpauthor) (empty-sosofo))
+(element (sect2info corpname) (empty-sosofo))
+(element (sect2info date) (empty-sosofo))
+(element (sect2info edition) (empty-sosofo))
+(element (sect2info editor) (empty-sosofo))
+(element (sect2info firstname) (empty-sosofo))
+(element (sect2info graphic) (empty-sosofo))
+(element (sect2info honorific) (empty-sosofo))
+(element (sect2info invpartnumber) (empty-sosofo))
+(element (sect2info isbn) (empty-sosofo))
+(element (sect2info issn) (empty-sosofo))
+(element (sect2info issuenum) (empty-sosofo))
+(element (sect2info itermset) (empty-sosofo))
+(element (sect2info keywordset) (empty-sosofo))
+(element (sect2info legalnotice) (empty-sosofo))
+(element (sect2info lineage) (empty-sosofo))
+(element (sect2info modespec) (empty-sosofo))
+(element (sect2info orgname) (empty-sosofo))
+(element (sect2info othercredit) (empty-sosofo))
+(element (sect2info othername) (empty-sosofo))
+(element (sect2info pagenums) (empty-sosofo))
+(element (sect2info printhistory) (empty-sosofo))
+(element (sect2info productname) (empty-sosofo))
+(element (sect2info productnumber) (empty-sosofo))
+(element (sect2info pubdate) (empty-sosofo))
+(element (sect2info publisher) (empty-sosofo))
+(element (sect2info publishername) (empty-sosofo))
+(element (sect2info pubsnumber) (empty-sosofo))
+(element (sect2info releaseinfo) (empty-sosofo))
+(element (sect2info revhistory) (empty-sosofo))
+(element (sect2info seriesvolnums) (empty-sosofo))
+(element (sect2info subjectset) (empty-sosofo))
+(element (sect2info subtitle) (empty-sosofo))
+(element (sect2info surname) (empty-sosofo))
+(element (sect2info title) (empty-sosofo))
+(element (sect2info titleabbrev) (empty-sosofo))
+(element (sect2info volumenum) (empty-sosofo))
+
+(element sect3info (process-children))
+
+(element (sect3info abbrev) (empty-sosofo))
+(element (sect3info abstract) (empty-sosofo))
+(element (sect3info address) (empty-sosofo))
+(element (sect3info affiliation) (empty-sosofo))
+(element (sect3info artpagenums) (empty-sosofo))
+(element (sect3info author) (empty-sosofo))
+(element (sect3info authorblurb) (empty-sosofo))
+(element (sect3info authorgroup) (empty-sosofo))
+(element (sect3info authorinitials) (empty-sosofo))
+(element (sect3info bibliomisc) (empty-sosofo))
+(element (sect3info biblioset) (empty-sosofo))
+(element (sect3info collab) (empty-sosofo))
+(element (sect3info confgroup) (empty-sosofo))
+(element (sect3info contractnum) (empty-sosofo))
+(element (sect3info contractsponsor) (empty-sosofo))
+(element (sect3info contrib) (empty-sosofo))
+(element (sect3info copyright) (empty-sosofo))
+(element (sect3info corpauthor) (empty-sosofo))
+(element (sect3info corpname) (empty-sosofo))
+(element (sect3info date) (empty-sosofo))
+(element (sect3info edition) (empty-sosofo))
+(element (sect3info editor) (empty-sosofo))
+(element (sect3info firstname) (empty-sosofo))
+(element (sect3info graphic) (empty-sosofo))
+(element (sect3info honorific) (empty-sosofo))
+(element (sect3info invpartnumber) (empty-sosofo))
+(element (sect3info isbn) (empty-sosofo))
+(element (sect3info issn) (empty-sosofo))
+(element (sect3info issuenum) (empty-sosofo))
+(element (sect3info itermset) (empty-sosofo))
+(element (sect3info keywordset) (empty-sosofo))
+(element (sect3info legalnotice) (empty-sosofo))
+(element (sect3info lineage) (empty-sosofo))
+(element (sect3info modespec) (empty-sosofo))
+(element (sect3info orgname) (empty-sosofo))
+(element (sect3info othercredit) (empty-sosofo))
+(element (sect3info othername) (empty-sosofo))
+(element (sect3info pagenums) (empty-sosofo))
+(element (sect3info printhistory) (empty-sosofo))
+(element (sect3info productname) (empty-sosofo))
+(element (sect3info productnumber) (empty-sosofo))
+(element (sect3info pubdate) (empty-sosofo))
+(element (sect3info publisher) (empty-sosofo))
+(element (sect3info publishername) (empty-sosofo))
+(element (sect3info pubsnumber) (empty-sosofo))
+(element (sect3info releaseinfo) (empty-sosofo))
+(element (sect3info revhistory) (empty-sosofo))
+(element (sect3info seriesvolnums) (empty-sosofo))
+(element (sect3info subjectset) (empty-sosofo))
+(element (sect3info subtitle) (empty-sosofo))
+(element (sect3info surname) (empty-sosofo))
+(element (sect3info title) (empty-sosofo))
+(element (sect3info titleabbrev) (empty-sosofo))
+(element (sect3info volumenum) (empty-sosofo))
+
+(element sect4info (process-children))
+
+(element (sect4info abbrev) (empty-sosofo))
+(element (sect4info abstract) (empty-sosofo))
+(element (sect4info address) (empty-sosofo))
+(element (sect4info affiliation) (empty-sosofo))
+(element (sect4info artpagenums) (empty-sosofo))
+(element (sect4info author) (empty-sosofo))
+(element (sect4info authorblurb) (empty-sosofo))
+(element (sect4info authorgroup) (empty-sosofo))
+(element (sect4info authorinitials) (empty-sosofo))
+(element (sect4info bibliomisc) (empty-sosofo))
+(element (sect4info biblioset) (empty-sosofo))
+(element (sect4info collab) (empty-sosofo))
+(element (sect4info confgroup) (empty-sosofo))
+(element (sect4info contractnum) (empty-sosofo))
+(element (sect4info contractsponsor) (empty-sosofo))
+(element (sect4info contrib) (empty-sosofo))
+(element (sect4info copyright) (empty-sosofo))
+(element (sect4info corpauthor) (empty-sosofo))
+(element (sect4info corpname) (empty-sosofo))
+(element (sect4info date) (empty-sosofo))
+(element (sect4info edition) (empty-sosofo))
+(element (sect4info editor) (empty-sosofo))
+(element (sect4info firstname) (empty-sosofo))
+(element (sect4info graphic) (empty-sosofo))
+(element (sect4info honorific) (empty-sosofo))
+(element (sect4info invpartnumber) (empty-sosofo))
+(element (sect4info isbn) (empty-sosofo))
+(element (sect4info issn) (empty-sosofo))
+(element (sect4info issuenum) (empty-sosofo))
+(element (sect4info itermset) (empty-sosofo))
+(element (sect4info keywordset) (empty-sosofo))
+(element (sect4info legalnotice) (empty-sosofo))
+(element (sect4info lineage) (empty-sosofo))
+(element (sect4info modespec) (empty-sosofo))
+(element (sect4info orgname) (empty-sosofo))
+(element (sect4info othercredit) (empty-sosofo))
+(element (sect4info othername) (empty-sosofo))
+(element (sect4info pagenums) (empty-sosofo))
+(element (sect4info printhistory) (empty-sosofo))
+(element (sect4info productname) (empty-sosofo))
+(element (sect4info productnumber) (empty-sosofo))
+(element (sect4info pubdate) (empty-sosofo))
+(element (sect4info publisher) (empty-sosofo))
+(element (sect4info publishername) (empty-sosofo))
+(element (sect4info pubsnumber) (empty-sosofo))
+(element (sect4info releaseinfo) (empty-sosofo))
+(element (sect4info revhistory) (empty-sosofo))
+(element (sect4info seriesvolnums) (empty-sosofo))
+(element (sect4info subjectset) (empty-sosofo))
+(element (sect4info subtitle) (empty-sosofo))
+(element (sect4info surname) (empty-sosofo))
+(element (sect4info title) (empty-sosofo))
+(element (sect4info titleabbrev) (empty-sosofo))
+(element (sect4info volumenum) (empty-sosofo))
+
+(element sect5info (process-children))
+
+(element (sect5info abbrev) (empty-sosofo))
+(element (sect5info abstract) (empty-sosofo))
+(element (sect5info address) (empty-sosofo))
+(element (sect5info affiliation) (empty-sosofo))
+(element (sect5info artpagenums) (empty-sosofo))
+(element (sect5info author) (empty-sosofo))
+(element (sect5info authorblurb) (empty-sosofo))
+(element (sect5info authorgroup) (empty-sosofo))
+(element (sect5info authorinitials) (empty-sosofo))
+(element (sect5info bibliomisc) (empty-sosofo))
+(element (sect5info biblioset) (empty-sosofo))
+(element (sect5info collab) (empty-sosofo))
+(element (sect5info confgroup) (empty-sosofo))
+(element (sect5info contractnum) (empty-sosofo))
+(element (sect5info contractsponsor) (empty-sosofo))
+(element (sect5info contrib) (empty-sosofo))
+(element (sect5info copyright) (empty-sosofo))
+(element (sect5info corpauthor) (empty-sosofo))
+(element (sect5info corpname) (empty-sosofo))
+(element (sect5info date) (empty-sosofo))
+(element (sect5info edition) (empty-sosofo))
+(element (sect5info editor) (empty-sosofo))
+(element (sect5info firstname) (empty-sosofo))
+(element (sect5info graphic) (empty-sosofo))
+(element (sect5info honorific) (empty-sosofo))
+(element (sect5info invpartnumber) (empty-sosofo))
+(element (sect5info isbn) (empty-sosofo))
+(element (sect5info issn) (empty-sosofo))
+(element (sect5info issuenum) (empty-sosofo))
+(element (sect5info itermset) (empty-sosofo))
+(element (sect5info keywordset) (empty-sosofo))
+(element (sect5info legalnotice) (empty-sosofo))
+(element (sect5info lineage) (empty-sosofo))
+(element (sect5info modespec) (empty-sosofo))
+(element (sect5info orgname) (empty-sosofo))
+(element (sect5info othercredit) (empty-sosofo))
+(element (sect5info othername) (empty-sosofo))
+(element (sect5info pagenums) (empty-sosofo))
+(element (sect5info printhistory) (empty-sosofo))
+(element (sect5info productname) (empty-sosofo))
+(element (sect5info productnumber) (empty-sosofo))
+(element (sect5info pubdate) (empty-sosofo))
+(element (sect5info publisher) (empty-sosofo))
+(element (sect5info publishername) (empty-sosofo))
+(element (sect5info pubsnumber) (empty-sosofo))
+(element (sect5info releaseinfo) (empty-sosofo))
+(element (sect5info revhistory) (empty-sosofo))
+(element (sect5info seriesvolnums) (empty-sosofo))
+(element (sect5info subjectset) (empty-sosofo))
+(element (sect5info subtitle) (empty-sosofo))
+(element (sect5info surname) (empty-sosofo))
+(element (sect5info title) (empty-sosofo))
+(element (sect5info titleabbrev) (empty-sosofo))
+(element (sect5info volumenum) (empty-sosofo))
+
+(element refsect1info (process-children))
+
+(element (refsect1info abbrev) (empty-sosofo))
+(element (refsect1info abstract) (empty-sosofo))
+(element (refsect1info address) (empty-sosofo))
+(element (refsect1info affiliation) (empty-sosofo))
+(element (refsect1info artpagenums) (empty-sosofo))
+(element (refsect1info author) (empty-sosofo))
+(element (refsect1info authorblurb) (empty-sosofo))
+(element (refsect1info authorgroup) (empty-sosofo))
+(element (refsect1info authorinitials) (empty-sosofo))
+(element (refsect1info bibliomisc) (empty-sosofo))
+(element (refsect1info biblioset) (empty-sosofo))
+(element (refsect1info collab) (empty-sosofo))
+(element (refsect1info confgroup) (empty-sosofo))
+(element (refsect1info contractnum) (empty-sosofo))
+(element (refsect1info contractsponsor) (empty-sosofo))
+(element (refsect1info contrib) (empty-sosofo))
+(element (refsect1info copyright) (empty-sosofo))
+(element (refsect1info corpauthor) (empty-sosofo))
+(element (refsect1info corpname) (empty-sosofo))
+(element (refsect1info date) (empty-sosofo))
+(element (refsect1info edition) (empty-sosofo))
+(element (refsect1info editor) (empty-sosofo))
+(element (refsect1info firstname) (empty-sosofo))
+(element (refsect1info graphic) (empty-sosofo))
+(element (refsect1info honorific) (empty-sosofo))
+(element (refsect1info invpartnumber) (empty-sosofo))
+(element (refsect1info isbn) (empty-sosofo))
+(element (refsect1info issn) (empty-sosofo))
+(element (refsect1info issuenum) (empty-sosofo))
+(element (refsect1info itermset) (empty-sosofo))
+(element (refsect1info keywordset) (empty-sosofo))
+(element (refsect1info legalnotice) (empty-sosofo))
+(element (refsect1info lineage) (empty-sosofo))
+(element (refsect1info modespec) (empty-sosofo))
+(element (refsect1info orgname) (empty-sosofo))
+(element (refsect1info othercredit) (empty-sosofo))
+(element (refsect1info othername) (empty-sosofo))
+(element (refsect1info pagenums) (empty-sosofo))
+(element (refsect1info printhistory) (empty-sosofo))
+(element (refsect1info productname) (empty-sosofo))
+(element (refsect1info productnumber) (empty-sosofo))
+(element (refsect1info pubdate) (empty-sosofo))
+(element (refsect1info publisher) (empty-sosofo))
+(element (refsect1info publishername) (empty-sosofo))
+(element (refsect1info pubsnumber) (empty-sosofo))
+(element (refsect1info releaseinfo) (empty-sosofo))
+(element (refsect1info revhistory) (empty-sosofo))
+(element (refsect1info seriesvolnums) (empty-sosofo))
+(element (refsect1info subjectset) (empty-sosofo))
+(element (refsect1info subtitle) (empty-sosofo))
+(element (refsect1info surname) (empty-sosofo))
+(element (refsect1info title) (empty-sosofo))
+(element (refsect1info titleabbrev) (empty-sosofo))
+(element (refsect1info volumenum) (empty-sosofo))
+
+(element refsect2info (process-children))
+
+(element (refsect2info abbrev) (empty-sosofo))
+(element (refsect2info abstract) (empty-sosofo))
+(element (refsect2info address) (empty-sosofo))
+(element (refsect2info affiliation) (empty-sosofo))
+(element (refsect2info artpagenums) (empty-sosofo))
+(element (refsect2info author) (empty-sosofo))
+(element (refsect2info authorblurb) (empty-sosofo))
+(element (refsect2info authorgroup) (empty-sosofo))
+(element (refsect2info authorinitials) (empty-sosofo))
+(element (refsect2info bibliomisc) (empty-sosofo))
+(element (refsect2info biblioset) (empty-sosofo))
+(element (refsect2info collab) (empty-sosofo))
+(element (refsect2info confgroup) (empty-sosofo))
+(element (refsect2info contractnum) (empty-sosofo))
+(element (refsect2info contractsponsor) (empty-sosofo))
+(element (refsect2info contrib) (empty-sosofo))
+(element (refsect2info copyright) (empty-sosofo))
+(element (refsect2info corpauthor) (empty-sosofo))
+(element (refsect2info corpname) (empty-sosofo))
+(element (refsect2info date) (empty-sosofo))
+(element (refsect2info edition) (empty-sosofo))
+(element (refsect2info editor) (empty-sosofo))
+(element (refsect2info firstname) (empty-sosofo))
+(element (refsect2info graphic) (empty-sosofo))
+(element (refsect2info honorific) (empty-sosofo))
+(element (refsect2info invpartnumber) (empty-sosofo))
+(element (refsect2info isbn) (empty-sosofo))
+(element (refsect2info issn) (empty-sosofo))
+(element (refsect2info issuenum) (empty-sosofo))
+(element (refsect2info itermset) (empty-sosofo))
+(element (refsect2info keywordset) (empty-sosofo))
+(element (refsect2info legalnotice) (empty-sosofo))
+(element (refsect2info lineage) (empty-sosofo))
+(element (refsect2info modespec) (empty-sosofo))
+(element (refsect2info orgname) (empty-sosofo))
+(element (refsect2info othercredit) (empty-sosofo))
+(element (refsect2info othername) (empty-sosofo))
+(element (refsect2info pagenums) (empty-sosofo))
+(element (refsect2info printhistory) (empty-sosofo))
+(element (refsect2info productname) (empty-sosofo))
+(element (refsect2info productnumber) (empty-sosofo))
+(element (refsect2info pubdate) (empty-sosofo))
+(element (refsect2info publisher) (empty-sosofo))
+(element (refsect2info publishername) (empty-sosofo))
+(element (refsect2info pubsnumber) (empty-sosofo))
+(element (refsect2info releaseinfo) (empty-sosofo))
+(element (refsect2info revhistory) (empty-sosofo))
+(element (refsect2info seriesvolnums) (empty-sosofo))
+(element (refsect2info subjectset) (empty-sosofo))
+(element (refsect2info subtitle) (empty-sosofo))
+(element (refsect2info surname) (empty-sosofo))
+(element (refsect2info title) (empty-sosofo))
+(element (refsect2info titleabbrev) (empty-sosofo))
+(element (refsect2info volumenum) (empty-sosofo))
+
+(element refsect3info (process-children))
+
+(element (refsect3info abbrev) (empty-sosofo))
+(element (refsect3info abstract) (empty-sosofo))
+(element (refsect3info address) (empty-sosofo))
+(element (refsect3info affiliation) (empty-sosofo))
+(element (refsect3info artpagenums) (empty-sosofo))
+(element (refsect3info author) (empty-sosofo))
+(element (refsect3info authorblurb) (empty-sosofo))
+(element (refsect3info authorgroup) (empty-sosofo))
+(element (refsect3info authorinitials) (empty-sosofo))
+(element (refsect3info bibliomisc) (empty-sosofo))
+(element (refsect3info biblioset) (empty-sosofo))
+(element (refsect3info collab) (empty-sosofo))
+(element (refsect3info confgroup) (empty-sosofo))
+(element (refsect3info contractnum) (empty-sosofo))
+(element (refsect3info contractsponsor) (empty-sosofo))
+(element (refsect3info contrib) (empty-sosofo))
+(element (refsect3info copyright) (empty-sosofo))
+(element (refsect3info corpauthor) (empty-sosofo))
+(element (refsect3info corpname) (empty-sosofo))
+(element (refsect3info date) (empty-sosofo))
+(element (refsect3info edition) (empty-sosofo))
+(element (refsect3info editor) (empty-sosofo))
+(element (refsect3info firstname) (empty-sosofo))
+(element (refsect3info graphic) (empty-sosofo))
+(element (refsect3info honorific) (empty-sosofo))
+(element (refsect3info invpartnumber) (empty-sosofo))
+(element (refsect3info isbn) (empty-sosofo))
+(element (refsect3info issn) (empty-sosofo))
+(element (refsect3info issuenum) (empty-sosofo))
+(element (refsect3info itermset) (empty-sosofo))
+(element (refsect3info keywordset) (empty-sosofo))
+(element (refsect3info legalnotice) (empty-sosofo))
+(element (refsect3info lineage) (empty-sosofo))
+(element (refsect3info modespec) (empty-sosofo))
+(element (refsect3info orgname) (empty-sosofo))
+(element (refsect3info othercredit) (empty-sosofo))
+(element (refsect3info othername) (empty-sosofo))
+(element (refsect3info pagenums) (empty-sosofo))
+(element (refsect3info printhistory) (empty-sosofo))
+(element (refsect3info productname) (empty-sosofo))
+(element (refsect3info productnumber) (empty-sosofo))
+(element (refsect3info pubdate) (empty-sosofo))
+(element (refsect3info publisher) (empty-sosofo))
+(element (refsect3info publishername) (empty-sosofo))
+(element (refsect3info pubsnumber) (empty-sosofo))
+(element (refsect3info releaseinfo) (empty-sosofo))
+(element (refsect3info revhistory) (empty-sosofo))
+(element (refsect3info seriesvolnums) (empty-sosofo))
+(element (refsect3info subjectset) (empty-sosofo))
+(element (refsect3info subtitle) (empty-sosofo))
+(element (refsect3info surname) (empty-sosofo))
+(element (refsect3info title) (empty-sosofo))
+(element (refsect3info titleabbrev) (empty-sosofo))
+(element (refsect3info volumenum) (empty-sosofo))
+
+(element seriesinfo (process-children))
+
+(element (seriesinfo abbrev) (empty-sosofo))
+(element (seriesinfo abstract) (empty-sosofo))
+(element (seriesinfo address) (empty-sosofo))
+(element (seriesinfo affiliation) (empty-sosofo))
+(element (seriesinfo artpagenums) (empty-sosofo))
+(element (seriesinfo author) (empty-sosofo))
+(element (seriesinfo authorblurb) (empty-sosofo))
+(element (seriesinfo authorgroup) (empty-sosofo))
+(element (seriesinfo authorinitials) (empty-sosofo))
+(element (seriesinfo bibliomisc) (empty-sosofo))
+(element (seriesinfo biblioset) (empty-sosofo))
+(element (seriesinfo collab) (empty-sosofo))
+(element (seriesinfo confgroup) (empty-sosofo))
+(element (seriesinfo contractnum) (empty-sosofo))
+(element (seriesinfo contractsponsor) (empty-sosofo))
+(element (seriesinfo contrib) (empty-sosofo))
+(element (seriesinfo copyright) (empty-sosofo))
+(element (seriesinfo corpauthor) (empty-sosofo))
+(element (seriesinfo corpname) (empty-sosofo))
+(element (seriesinfo date) (empty-sosofo))
+(element (seriesinfo edition) (empty-sosofo))
+(element (seriesinfo editor) (empty-sosofo))
+(element (seriesinfo firstname) (empty-sosofo))
+(element (seriesinfo honorific) (empty-sosofo))
+(element (seriesinfo invpartnumber) (empty-sosofo))
+(element (seriesinfo isbn) (empty-sosofo))
+(element (seriesinfo issn) (empty-sosofo))
+(element (seriesinfo issuenum) (empty-sosofo))
+(element (seriesinfo lineage) (empty-sosofo))
+(element (seriesinfo orgname) (empty-sosofo))
+(element (seriesinfo othercredit) (empty-sosofo))
+(element (seriesinfo othername) (empty-sosofo))
+(element (seriesinfo pagenums) (empty-sosofo))
+(element (seriesinfo printhistory) (empty-sosofo))
+(element (seriesinfo productname) (empty-sosofo))
+(element (seriesinfo productnumber) (empty-sosofo))
+(element (seriesinfo pubdate) (empty-sosofo))
+(element (seriesinfo publisher) (empty-sosofo))
+(element (seriesinfo publishername) (empty-sosofo))
+(element (seriesinfo pubsnumber) (empty-sosofo))
+(element (seriesinfo releaseinfo) (empty-sosofo))
+(element (seriesinfo revhistory) (empty-sosofo))
+(element (seriesinfo seriesvolnums) (empty-sosofo))
+(element (seriesinfo subtitle) (empty-sosofo))
+(element (seriesinfo surname) (empty-sosofo))
+(element (seriesinfo title) (empty-sosofo))
+(element (seriesinfo titleabbrev) (empty-sosofo))
+(element (seriesinfo volumenum) (empty-sosofo))
+
+(element artheader (empty-sosofo))
+
+(element (artheader abbrev) (empty-sosofo))
+(element (artheader abstract) (empty-sosofo))
+(element (artheader address) (empty-sosofo))
+(element (artheader affiliation) (empty-sosofo))
+(element (artheader artpagenums) (empty-sosofo))
+(element (artheader author) (empty-sosofo))
+(element (artheader authorblurb) (empty-sosofo))
+(element (artheader authorgroup) (empty-sosofo))
+(element (artheader authorinitials) (empty-sosofo))
+(element (artheader bibliomisc) (empty-sosofo))
+(element (artheader biblioset) (empty-sosofo))
+(element (artheader bookbiblio) (empty-sosofo))
+(element (artheader collab) (empty-sosofo))
+(element (artheader confgroup) (empty-sosofo))
+(element (artheader contractnum) (empty-sosofo))
+(element (artheader contractsponsor) (empty-sosofo))
+(element (artheader contrib) (empty-sosofo))
+(element (artheader copyright) (empty-sosofo))
+(element (artheader corpauthor) (empty-sosofo))
+(element (artheader corpname) (empty-sosofo))
+(element (artheader date) (empty-sosofo))
+(element (artheader edition) (empty-sosofo))
+(element (artheader editor) (empty-sosofo))
+(element (artheader firstname) (empty-sosofo))
+(element (artheader honorific) (empty-sosofo))
+(element (artheader invpartnumber) (empty-sosofo))
+(element (artheader isbn) (empty-sosofo))
+(element (artheader issn) (empty-sosofo))
+(element (artheader issuenum) (empty-sosofo))
+(element (artheader keywordset) (empty-sosofo))
+(element (artheader lineage) (empty-sosofo))
+(element (artheader orgname) (empty-sosofo))
+(element (artheader othercredit) (empty-sosofo))
+(element (artheader othername) (empty-sosofo))
+(element (artheader pagenums) (empty-sosofo))
+(element (artheader printhistory) (empty-sosofo))
+(element (artheader productname) (empty-sosofo))
+(element (artheader productnumber) (empty-sosofo))
+(element (artheader pubdate) (empty-sosofo))
+(element (artheader publisher) (empty-sosofo))
+(element (artheader publishername) (empty-sosofo))
+(element (artheader pubsnumber) (empty-sosofo))
+(element (artheader releaseinfo) (empty-sosofo))
+(element (artheader revhistory) (empty-sosofo))
+(element (artheader seriesvolnums) (empty-sosofo))
+(element (artheader subtitle) (empty-sosofo))
+(element (artheader surname) (empty-sosofo))
+(element (artheader title) (empty-sosofo))
+(element (artheader titleabbrev) (empty-sosofo))
+(element (artheader volumenum) (empty-sosofo))
+
+(element articleinfo (empty-sosofo))
+
+(element (articleinfo abbrev) (empty-sosofo))
+(element (articleinfo abstract) (empty-sosofo))
+(element (articleinfo address) (empty-sosofo))
+(element (articleinfo affiliation) (empty-sosofo))
+(element (articleinfo artpagenums) (empty-sosofo))
+(element (articleinfo author) (empty-sosofo))
+(element (articleinfo authorblurb) (empty-sosofo))
+(element (articleinfo authorgroup) (empty-sosofo))
+(element (articleinfo authorinitials) (empty-sosofo))
+(element (articleinfo bibliomisc) (empty-sosofo))
+(element (articleinfo biblioset) (empty-sosofo))
+(element (articleinfo bookbiblio) (empty-sosofo))
+(element (articleinfo collab) (empty-sosofo))
+(element (articleinfo confgroup) (empty-sosofo))
+(element (articleinfo contractnum) (empty-sosofo))
+(element (articleinfo contractsponsor) (empty-sosofo))
+(element (articleinfo contrib) (empty-sosofo))
+(element (articleinfo copyright) (empty-sosofo))
+(element (articleinfo corpauthor) (empty-sosofo))
+(element (articleinfo corpname) (empty-sosofo))
+(element (articleinfo date) (empty-sosofo))
+(element (articleinfo edition) (empty-sosofo))
+(element (articleinfo editor) (empty-sosofo))
+(element (articleinfo firstname) (empty-sosofo))
+(element (articleinfo honorific) (empty-sosofo))
+(element (articleinfo invpartnumber) (empty-sosofo))
+(element (articleinfo isbn) (empty-sosofo))
+(element (articleinfo issn) (empty-sosofo))
+(element (articleinfo issuenum) (empty-sosofo))
+(element (articleinfo lineage) (empty-sosofo))
+(element (articleinfo orgname) (empty-sosofo))
+(element (articleinfo othercredit) (empty-sosofo))
+(element (articleinfo othername) (empty-sosofo))
+(element (articleinfo pagenums) (empty-sosofo))
+(element (articleinfo printhistory) (empty-sosofo))
+(element (articleinfo productname) (empty-sosofo))
+(element (articleinfo productnumber) (empty-sosofo))
+(element (articleinfo pubdate) (empty-sosofo))
+(element (articleinfo publisher) (empty-sosofo))
+(element (articleinfo publishername) (empty-sosofo))
+(element (articleinfo pubsnumber) (empty-sosofo))
+(element (articleinfo releaseinfo) (empty-sosofo))
+(element (articleinfo revhistory) (empty-sosofo))
+(element (articleinfo seriesvolnums) (empty-sosofo))
+(element (articleinfo subtitle) (empty-sosofo))
+(element (articleinfo surname) (empty-sosofo))
+(element (articleinfo title) (empty-sosofo))
+(element (articleinfo titleabbrev) (empty-sosofo))
+(element (articleinfo volumenum) (empty-sosofo))
+
+(element refsynopsisdivinfo (process-children))
+
+(element (refsynopsisdivinfo graphic) (empty-sosofo))
+(element (refsynopsisdivinfo legalnotice) (empty-sosofo))
+(element (refsynopsisdivinfo modespec) (empty-sosofo))
+(element (refsynopsisdivinfo subjectset) (empty-sosofo))
+(element (refsynopsisdivinfo keywordset) (empty-sosofo))
+(element (refsynopsisdivinfo itermset) (empty-sosofo))
+(element (refsynopsisdivinfo abbrev) (empty-sosofo))
+(element (refsynopsisdivinfo abstract) (empty-sosofo))
+(element (refsynopsisdivinfo address) (empty-sosofo))
+(element (refsynopsisdivinfo artpagenums) (empty-sosofo))
+(element (refsynopsisdivinfo author) (empty-sosofo))
+(element (refsynopsisdivinfo authorgroup) (empty-sosofo))
+(element (refsynopsisdivinfo authorinitials) (empty-sosofo))
+(element (refsynopsisdivinfo bibliomisc) (empty-sosofo))
+(element (refsynopsisdivinfo biblioset) (empty-sosofo))
+(element (refsynopsisdivinfo collab) (empty-sosofo))
+(element (refsynopsisdivinfo confgroup) (empty-sosofo))
+(element (refsynopsisdivinfo contractnum) (empty-sosofo))
+(element (refsynopsisdivinfo contractsponsor) (empty-sosofo))
+(element (refsynopsisdivinfo copyright) (empty-sosofo))
+(element (refsynopsisdivinfo corpauthor) (empty-sosofo))
+(element (refsynopsisdivinfo corpname) (empty-sosofo))
+(element (refsynopsisdivinfo date) (empty-sosofo))
+(element (refsynopsisdivinfo edition) (empty-sosofo))
+(element (refsynopsisdivinfo editor) (empty-sosofo))
+(element (refsynopsisdivinfo invpartnumber) (empty-sosofo))
+(element (refsynopsisdivinfo isbn) (empty-sosofo))
+(element (refsynopsisdivinfo issn) (empty-sosofo))
+(element (refsynopsisdivinfo issuenum) (empty-sosofo))
+(element (refsynopsisdivinfo orgname) (empty-sosofo))
+(element (refsynopsisdivinfo othercredit) (empty-sosofo))
+(element (refsynopsisdivinfo pagenums) (empty-sosofo))
+(element (refsynopsisdivinfo printhistory) (empty-sosofo))
+(element (refsynopsisdivinfo productname) (empty-sosofo))
+(element (refsynopsisdivinfo productnumber) (empty-sosofo))
+(element (refsynopsisdivinfo pubdate) (empty-sosofo))
+(element (refsynopsisdivinfo publisher) (empty-sosofo))
+(element (refsynopsisdivinfo publishername) (empty-sosofo))
+(element (refsynopsisdivinfo pubsnumber) (empty-sosofo))
+(element (refsynopsisdivinfo releaseinfo) (empty-sosofo))
+(element (refsynopsisdivinfo revhistory) (empty-sosofo))
+(element (refsynopsisdivinfo seriesvolnums) (empty-sosofo))
+(element (refsynopsisdivinfo subtitle) (empty-sosofo))
+(element (refsynopsisdivinfo title) (empty-sosofo))
+(element (refsynopsisdivinfo titleabbrev) (empty-sosofo))
+(element (refsynopsisdivinfo volumenum) (empty-sosofo))
+(element (refsynopsisdivinfo honorific) (empty-sosofo))
+(element (refsynopsisdivinfo firstname) (empty-sosofo))
+(element (refsynopsisdivinfo surname) (empty-sosofo))
+(element (refsynopsisdivinfo lineage) (empty-sosofo))
+(element (refsynopsisdivinfo othername) (empty-sosofo))
+(element (refsynopsisdivinfo affiliation) (empty-sosofo))
+(element (refsynopsisdivinfo authorblurb) (empty-sosofo))
+(element (refsynopsisdivinfo contrib) (empty-sosofo))
+
+(element prefaceinfo (empty-sosofo))
+
+(element (prefaceinfo abbrev) (empty-sosofo))
+(element (prefaceinfo abstract) (empty-sosofo))
+(element (prefaceinfo address) (empty-sosofo))
+(element (prefaceinfo affiliation) (empty-sosofo))
+(element (prefaceinfo artpagenums) (empty-sosofo))
+(element (prefaceinfo author) (empty-sosofo))
+(element (prefaceinfo authorblurb) (empty-sosofo))
+(element (prefaceinfo authorgroup) (empty-sosofo))
+(element (prefaceinfo authorinitials) (empty-sosofo))
+(element (prefaceinfo bibliomisc) (empty-sosofo))
+(element (prefaceinfo biblioset) (empty-sosofo))
+(element (prefaceinfo bookbiblio) (empty-sosofo))
+(element (prefaceinfo collab) (empty-sosofo))
+(element (prefaceinfo confgroup) (empty-sosofo))
+(element (prefaceinfo contractnum) (empty-sosofo))
+(element (prefaceinfo contractsponsor) (empty-sosofo))
+(element (prefaceinfo contrib) (empty-sosofo))
+(element (prefaceinfo copyright) (empty-sosofo))
+(element (prefaceinfo corpauthor) (empty-sosofo))
+(element (prefaceinfo corpname) (empty-sosofo))
+(element (prefaceinfo date) (empty-sosofo))
+(element (prefaceinfo edition) (empty-sosofo))
+(element (prefaceinfo editor) (empty-sosofo))
+(element (prefaceinfo firstname) (empty-sosofo))
+(element (prefaceinfo honorific) (empty-sosofo))
+(element (prefaceinfo invpartnumber) (empty-sosofo))
+(element (prefaceinfo isbn) (empty-sosofo))
+(element (prefaceinfo issn) (empty-sosofo))
+(element (prefaceinfo issuenum) (empty-sosofo))
+(element (prefaceinfo lineage) (empty-sosofo))
+(element (prefaceinfo orgname) (empty-sosofo))
+(element (prefaceinfo othercredit) (empty-sosofo))
+(element (prefaceinfo othername) (empty-sosofo))
+(element (prefaceinfo pagenums) (empty-sosofo))
+(element (prefaceinfo printhistory) (empty-sosofo))
+(element (prefaceinfo productname) (empty-sosofo))
+(element (prefaceinfo productnumber) (empty-sosofo))
+(element (prefaceinfo pubdate) (empty-sosofo))
+(element (prefaceinfo publisher) (empty-sosofo))
+(element (prefaceinfo publishername) (empty-sosofo))
+(element (prefaceinfo pubsnumber) (empty-sosofo))
+(element (prefaceinfo releaseinfo) (empty-sosofo))
+(element (prefaceinfo revhistory) (empty-sosofo))
+(element (prefaceinfo seriesvolnums) (empty-sosofo))
+(element (prefaceinfo subtitle) (empty-sosofo))
+(element (prefaceinfo surname) (empty-sosofo))
+(element (prefaceinfo title) (empty-sosofo))
+(element (prefaceinfo titleabbrev) (empty-sosofo))
+(element (prefaceinfo volumenum) (empty-sosofo))
+
+(element chapterinfo (empty-sosofo))
+
+(element (chapterinfo abbrev) (empty-sosofo))
+(element (chapterinfo abstract) (empty-sosofo))
+(element (chapterinfo address) (empty-sosofo))
+(element (chapterinfo affiliation) (empty-sosofo))
+(element (chapterinfo artpagenums) (empty-sosofo))
+(element (chapterinfo author) (empty-sosofo))
+(element (chapterinfo authorblurb) (empty-sosofo))
+(element (chapterinfo authorgroup) (empty-sosofo))
+(element (chapterinfo authorinitials) (empty-sosofo))
+(element (chapterinfo bibliomisc) (empty-sosofo))
+(element (chapterinfo biblioset) (empty-sosofo))
+(element (chapterinfo bookbiblio) (empty-sosofo))
+(element (chapterinfo collab) (empty-sosofo))
+(element (chapterinfo confgroup) (empty-sosofo))
+(element (chapterinfo contractnum) (empty-sosofo))
+(element (chapterinfo contractsponsor) (empty-sosofo))
+(element (chapterinfo contrib) (empty-sosofo))
+(element (chapterinfo copyright) (empty-sosofo))
+(element (chapterinfo corpauthor) (empty-sosofo))
+(element (chapterinfo corpname) (empty-sosofo))
+(element (chapterinfo date) (empty-sosofo))
+(element (chapterinfo edition) (empty-sosofo))
+(element (chapterinfo editor) (empty-sosofo))
+(element (chapterinfo firstname) (empty-sosofo))
+(element (chapterinfo honorific) (empty-sosofo))
+(element (chapterinfo invpartnumber) (empty-sosofo))
+(element (chapterinfo isbn) (empty-sosofo))
+(element (chapterinfo issn) (empty-sosofo))
+(element (chapterinfo issuenum) (empty-sosofo))
+(element (chapterinfo lineage) (empty-sosofo))
+(element (chapterinfo orgname) (empty-sosofo))
+(element (chapterinfo othercredit) (empty-sosofo))
+(element (chapterinfo othername) (empty-sosofo))
+(element (chapterinfo pagenums) (empty-sosofo))
+(element (chapterinfo printhistory) (empty-sosofo))
+(element (chapterinfo productname) (empty-sosofo))
+(element (chapterinfo productnumber) (empty-sosofo))
+(element (chapterinfo pubdate) (empty-sosofo))
+(element (chapterinfo publisher) (empty-sosofo))
+(element (chapterinfo publishername) (empty-sosofo))
+(element (chapterinfo pubsnumber) (empty-sosofo))
+(element (chapterinfo releaseinfo) (empty-sosofo))
+(element (chapterinfo revhistory) (empty-sosofo))
+(element (chapterinfo seriesvolnums) (empty-sosofo))
+(element (chapterinfo subtitle) (empty-sosofo))
+(element (chapterinfo surname) (empty-sosofo))
+(element (chapterinfo title) (empty-sosofo))
+(element (chapterinfo titleabbrev) (empty-sosofo))
+(element (chapterinfo volumenum) (empty-sosofo))
+
+(element appendixinfo (empty-sosofo))
+
+(element (appendixinfo abbrev) (empty-sosofo))
+(element (appendixinfo abstract) (empty-sosofo))
+(element (appendixinfo address) (empty-sosofo))
+(element (appendixinfo affiliation) (empty-sosofo))
+(element (appendixinfo artpagenums) (empty-sosofo))
+(element (appendixinfo author) (empty-sosofo))
+(element (appendixinfo authorblurb) (empty-sosofo))
+(element (appendixinfo authorgroup) (empty-sosofo))
+(element (appendixinfo authorinitials) (empty-sosofo))
+(element (appendixinfo bibliomisc) (empty-sosofo))
+(element (appendixinfo biblioset) (empty-sosofo))
+(element (appendixinfo bookbiblio) (empty-sosofo))
+(element (appendixinfo collab) (empty-sosofo))
+(element (appendixinfo confgroup) (empty-sosofo))
+(element (appendixinfo contractnum) (empty-sosofo))
+(element (appendixinfo contractsponsor) (empty-sosofo))
+(element (appendixinfo contrib) (empty-sosofo))
+(element (appendixinfo copyright) (empty-sosofo))
+(element (appendixinfo corpauthor) (empty-sosofo))
+(element (appendixinfo corpname) (empty-sosofo))
+(element (appendixinfo date) (empty-sosofo))
+(element (appendixinfo edition) (empty-sosofo))
+(element (appendixinfo editor) (empty-sosofo))
+(element (appendixinfo firstname) (empty-sosofo))
+(element (appendixinfo honorific) (empty-sosofo))
+(element (appendixinfo invpartnumber) (empty-sosofo))
+(element (appendixinfo isbn) (empty-sosofo))
+(element (appendixinfo issn) (empty-sosofo))
+(element (appendixinfo issuenum) (empty-sosofo))
+(element (appendixinfo lineage) (empty-sosofo))
+(element (appendixinfo orgname) (empty-sosofo))
+(element (appendixinfo othercredit) (empty-sosofo))
+(element (appendixinfo othername) (empty-sosofo))
+(element (appendixinfo pagenums) (empty-sosofo))
+(element (appendixinfo printhistory) (empty-sosofo))
+(element (appendixinfo productname) (empty-sosofo))
+(element (appendixinfo productnumber) (empty-sosofo))
+(element (appendixinfo pubdate) (empty-sosofo))
+(element (appendixinfo publisher) (empty-sosofo))
+(element (appendixinfo publishername) (empty-sosofo))
+(element (appendixinfo pubsnumber) (empty-sosofo))
+(element (appendixinfo releaseinfo) (empty-sosofo))
+(element (appendixinfo revhistory) (empty-sosofo))
+(element (appendixinfo seriesvolnums) (empty-sosofo))
+(element (appendixinfo subtitle) (empty-sosofo))
+(element (appendixinfo surname) (empty-sosofo))
+(element (appendixinfo title) (empty-sosofo))
+(element (appendixinfo titleabbrev) (empty-sosofo))
+(element (appendixinfo volumenum) (empty-sosofo))
diff --git a/print/dbinline.dsl b/print/dbinline.dsl
new file mode 100644
index 0000000..43fb26a
--- /dev/null
+++ b/print/dbinline.dsl
@@ -0,0 +1,263 @@
+;; $Id: dbinline.dsl,v 1.7 2003/03/25 19:53:56 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== INLINES ===============================
+
+(element abbrev ($charseq$))
+(element accel ($score-seq$ 'after))
+(element acronym ($charseq$))
+(element action ($charseq$))
+(element application ($charseq$))
+(element classname ($mono-seq$))
+(element constant ($mono-seq$))
+(element command ($bold-seq$))
+(element computeroutput ($mono-seq$))
+(element database ($charseq$))
+(element email
+ (make sequence (literal "&#60;") ($mono-seq$) (literal "&#62;")))
+(element envar ($charseq$))
+(element errorcode ($charseq$))
+(element errorname ($charseq$))
+(element errortype ($charseq$))
+(element filename ($mono-seq$))
+(element function ($mono-seq$))
+(element guibutton ($guilabel-seq$))
+(element guiicon ($guilabel-seq$))
+(element guilabel ($guilabel-seq$))
+(element guimenu ($guilabel-seq$))
+(element guimenuitem ($guilabel-seq$))
+(element guisubmenu ($guilabel-seq$))
+(element hardware ($charseq$))
+(element interface ($charseq$))
+(element interfacedefinition ($charseq$))
+(element keycap ($bold-seq$))
+(element keycode ($charseq$))
+
+(element keycombo
+ (let* ((action (attribute-string (normalize "action")))
+ (joinchar
+ (cond
+ ((equal? action (normalize "seq")) " ") ;; space
+ ((equal? action (normalize "simul")) "+") ;; +
+ ((equal? action (normalize "press")) "-") ;; ? I don't know
+ ((equal? action (normalize "click")) "-") ;; ? what to do
+ ((equal? action (normalize "double-click")) "-") ;; ? about the rest
+ ((equal? action (normalize "other")) "-") ;; ? of these
+ (else "-"))))
+ (let loop ((nl (children (current-node))) (count 1))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (if (equal? count 1)
+ (make sequence
+ (process-node-list (node-list-first nl))
+ (loop (node-list-rest nl) (+ count 1)))
+ (make sequence
+ (literal joinchar)
+ (process-node-list (node-list-first nl))
+ (loop (node-list-rest nl) (+ count 1))))))))
+
+(element keysym ($charseq$))
+(element literal ($mono-seq$))
+(element medialabel ($italic-seq$))
+
+(element menuchoice
+ (let* ((shortcut (select-elements (children (current-node))
+ (normalize "shortcut")))
+ (items (node-list-filter-by-not-gi
+ (children (current-node))
+ (list (normalize "shortcut")))))
+ (make sequence
+ (let loop ((nl items) (first? #t))
+ (if (node-list-empty? nl)
+ (empty-sosofo)
+ (make sequence
+ (if first?
+ (process-node-list (node-list-first nl))
+ (make sequence
+ (if (or (equal? (gi (node-list-first nl))
+ (normalize "guimenuitem"))
+ (equal? (gi (node-list-first nl))
+ (normalize "guisubmenu")))
+ (literal "\rightwards-arrow;")
+ (literal "+"))
+ (process-node-list (node-list-first nl))))
+ (loop (node-list-rest nl) #f))))
+ (if (node-list-empty? shortcut)
+ (empty-sosofo)
+ (make sequence
+ (literal " (")
+ (process-node-list shortcut)
+ (literal ")"))))))
+
+(element methodname ($mono-seq$))
+(element shortcut ($bold-seq$))
+(element mousebutton ($charseq$))
+(element option ($mono-seq$))
+
+(element optional
+ (make sequence
+ (literal %arg-choice-opt-open-str%)
+ ($charseq$)
+ (literal %arg-choice-opt-close-str%)))
+
+(element parameter ($italic-mono-seq$))
+(element property ($charseq$))
+(element prompt ($mono-seq$))
+(element replaceable ($italic-mono-seq$))
+(element returnvalue ($charseq$))
+(element structfield ($italic-mono-seq$))
+(element structname ($charseq$))
+(element symbol ($charseq$))
+(element systemitem ($charseq$))
+(element token ($charseq$))
+(element type ($charseq$))
+(element userinput ($bold-mono-seq$))
+(element varname ($mono-seq$))
+
+(element citation
+ (if biblio-citation-check
+ (let* ((bgraphies (select-elements (descendants (sgml-root-element))
+ (normalize "bibliography")))
+ (bchildren1 (expand-children bgraphies
+ (list (normalize "bibliography"))))
+ (bchildren2 (expand-children bchildren1
+ (list (normalize "bibliodiv"))))
+ (bibentries (node-list-filter-by-gi
+ bchildren2
+ (list (normalize "biblioentry")
+ (normalize "bibliomixed")))))
+ (let loop ((bibs bibentries))
+ (if (node-list-empty? bibs)
+ (make sequence
+ (error (string-append "Cannot find citation: "
+ (data (current-node))))
+ (literal "[") ($charseq$) (literal "]"))
+ (if (citation-matches-target? (current-node)
+ (node-list-first bibs))
+ (make link
+ destination: (node-list-address (node-list-first bibs))
+ (literal "[") ($charseq$) (literal "]"))
+ (loop (node-list-rest bibs))))))
+ (make sequence
+ (literal "[") ($charseq$) (literal "]"))))
+
+(element citerefentry
+ (if %refentry-xref-italic%
+ ($italic-seq$)
+ ($charseq$)))
+
+(element citetitle
+ (if (equal? (attribute-string (normalize "pubwork")) "article")
+ (make sequence
+ (literal (gentext-start-quote))
+ (process-children)
+ (literal (gentext-end-quote)))
+ ($italic-seq$)))
+
+(element emphasis
+ (if (and (attribute-string (normalize "role"))
+ (or (equal? (attribute-string (normalize "role")) "strong")
+ (equal? (attribute-string (normalize "role")) "bold")))
+ ($bold-seq$)
+ ($italic-seq$)))
+
+(element foreignphrase ($italic-seq$))
+(element markup ($charseq$))
+(element phrase ($charseq$))
+
+(element quote
+ (let* ((hnr (hierarchical-number-recursive (normalize "quote")
+ (current-node)))
+ (depth (length hnr)))
+ (if (equal? (modulo depth 2) 1)
+ (make sequence
+ (literal (gentext-start-nested-quote))
+ (process-children)
+ (literal (gentext-end-nested-quote)))
+ (make sequence
+ (literal (gentext-start-quote))
+ (process-children)
+ (literal (gentext-end-quote))))))
+
+(element sgmltag
+ (let ((class (if (attribute-string (normalize "class"))
+ (attribute-string (normalize "class"))
+ (normalize "element"))))
+ (cond
+<![CDATA[
+ ((equal? class (normalize "attribute")) ($mono-seq$))
+ ((equal? class (normalize "attvalue")) ($mono-seq$))
+ ((equal? class (normalize "element")) ($mono-seq$))
+ ((equal? class (normalize "emptytag")) ($mono-seq$ (make sequence
+ (literal "<")
+ (process-children)
+ (literal "/>"))))
+ ((equal? class (normalize "endtag")) ($mono-seq$ (make sequence
+ (literal "</")
+ (process-children)
+ (literal ">"))))
+ ((equal? class (normalize "genentity")) ($mono-seq$ (make sequence
+ (literal "&")
+ (process-children)
+ (literal ";"))))
+ ((equal? class (normalize "numcharref")) ($mono-seq$ (make sequence
+ (literal "&#")
+ (process-children)
+ (literal ";"))))
+ ((equal? class (normalize "paramentity")) ($mono-seq$ (make sequence
+ (literal "%")
+ (process-children)
+ (literal ";"))))
+ ((equal? class (normalize "pi")) ($mono-seq$ (make sequence
+ (literal "<?")
+ (process-children)
+ (literal ">"))))
+ ((equal? class (normalize "starttag")) ($mono-seq$ (make sequence
+ (literal "<")
+ (process-children)
+ (literal ">"))))
+ ((equal? class (normalize "sgmlcomment")) ($mono-seq$ (make sequence
+ (literal "<!--")
+ (process-children)
+ (literal "-->"))))
+ ((equal? class (normalize "xmlpi")) ($mono-seq$ (make sequence
+ (literal "<?")
+ (process-children)
+ (literal "?>"))))
+]]>
+ (else ($charseq$)))))
+
+(element trademark
+ (make sequence
+ ($charseq$)
+ (cond
+ ((equal? (attribute-string "class") (normalize "copyright"))
+ (literal "\copyright-sign;"))
+ ((equal? (attribute-string "class") (normalize "registered"))
+ (literal "\registered-sign;"))
+ ((equal? (attribute-string "class") (normalize "service"))
+ ($ss-seq$ + (literal "SM")))
+ (else
+ (literal "\trade-mark-sign;")))))
+
+(element wordasword ($italic-seq$))
+
+(element lineannotation
+ (make sequence
+ font-family-name: %body-font-family%
+ font-posture: 'italic
+ (process-children)))
+
+(define ($ss-seq$ plus-or-minus #!optional (sosofo (process-children)))
+ (make sequence
+ font-size:
+ (* (inherited-font-size) %ss-size-factor%)
+ position-point-shift:
+ (plus-or-minus (* (inherited-font-size) %ss-shift-factor%))
+ sosofo))
+
+(element superscript ($ss-seq$ +))
+(element subscript ($ss-seq$ -))
diff --git a/print/dblink.dsl b/print/dblink.dsl
new file mode 100644
index 0000000..6517a26
--- /dev/null
+++ b/print/dblink.dsl
@@ -0,0 +1,457 @@
+;; $Id: dblink.dsl,v 1.6 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= LINKS AND ANCHORS ==========================
+
+(element link
+ ;; No warnings about missing targets. Jade will do that for us, and
+ ;; this way we can use -wno-idref if we really don't care.
+ (let* ((endterm (attribute-string (normalize "endterm")))
+ (linkend (attribute-string (normalize "linkend")))
+ (target (element-with-id linkend))
+ (etarget (if endterm
+ (element-with-id endterm)
+ (empty-node-list)))
+ (link-cont (if endterm
+ (if (node-list-empty? etarget)
+ (literal
+ (string-append "LINK CONTENT ENDTERM '"
+ endterm
+ "' MISSING"))
+ (with-mode xref-endterm-mode
+ (process-node-list etarget)))
+ (process-children))))
+ (if (node-list-empty? target)
+ link-cont
+ (make link
+ destination: (node-list-address target)
+ link-cont))))
+
+(element ulink
+ (make sequence
+ (if (node-list-empty? (children (current-node)))
+ (literal (attribute-string (normalize "url")))
+ (make sequence
+ ($charseq$)
+ (if (not (equal? (attribute-string (normalize "url"))
+ (data-of (current-node))))
+ (if %footnote-ulinks%
+ (if (and (equal? (print-backend) 'tex) bop-footnotes)
+ (make sequence
+ ($ss-seq$ + (literal (footnote-number (current-node))))
+ (make page-footnote
+ (make paragraph
+ font-family-name: %body-font-family%
+ font-size: (* %footnote-size-factor% %bf-size%)
+ font-posture: 'upright
+ quadding: %default-quadding%
+ line-spacing: (* (* %footnote-size-factor% %bf-size%)
+ %line-spacing-factor%)
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: %footnote-field-width%
+ first-line-start-indent: (- %footnote-field-width%)
+ (make line-field
+ field-width: %footnote-field-width%
+ (literal (footnote-number (current-node))
+ (gentext-label-title-sep (normalize "footnote"))))
+ (literal (attribute-string (normalize "url"))))))
+ ($ss-seq$ + (literal (footnote-number (current-node)))))
+ (if %show-ulinks%
+ (make sequence
+ (literal " (")
+ (literal (attribute-string (normalize "url")))
+ (literal ")"))
+ (empty-sosofo)))
+ (empty-sosofo))))))
+
+(element footnoteref
+ (process-element-with-id (attribute-string (normalize "linkend"))))
+
+(element anchor
+ ;; This is different than (empty-sosofo) alone because the backend
+ ;; will hang an anchor off the empty sequence.
+ (make sequence (empty-sosofo)))
+
+(element beginpage (empty-sosofo))
+
+;; ======================================================================
+
+(define (olink-link)
+ ;; This is an olink without a TARGETDOCENT, treat it as a link within
+ ;; the same document.
+ (let* ((localinfo (attribute-string (normalize "localinfo")))
+ (target (element-with-id localinfo))
+ (linkmode (attribute-string (normalize "linkmode")))
+ (modespec (if linkmode (element-with-id linkmode) (empty-node-list)))
+ (xreflabel (if (node-list-empty? modespec)
+ #f
+ (attribute-string (normalize "xreflabel") modespec)))
+ (linktext (strip (data-of (current-node)))))
+ (if (node-list-empty? target)
+ (make sequence
+ (error (string-append "OLink to missing ID '" localinfo "'"))
+ (if (and (equal? linktext "") xreflabel)
+ (literal xreflabel)
+ (process-children)))
+ (if (equal? linktext "")
+ (if xreflabel
+ (xref-general target xreflabel)
+ (xref-general target))
+ (process-children)))))
+
+(define (olink-simple)
+ ;; Assumptions:
+ ;; - The TARGETDOCENT is identified by a public ID
+ ;; - If the element has no content, the title extracted by
+ ;; (olink-resource-title) should be used
+ ;; - The (olink-resource-title) function can deduce the title from
+ ;; the pubid and the sysid
+ (let* ((target (attribute-string (normalize "targetdocent")))
+ (pubid (entity-public-id target))
+ (sysid (system-id-filename target))
+ (title (olink-resource-title pubid sysid))
+ (linktext (strip (data-of (current-node)))))
+ (if (equal? linktext "")
+ (make sequence
+ font-posture: 'italic
+ (literal title))
+ (process-children))))
+
+(define (olink-outline-xref olroot target linktext)
+ (let* ((name (attribute-string (normalize "name") target))
+ (label (attribute-string (normalize "label") target))
+ (title (select-elements (children target) (normalize "ttl")))
+ (substitute (list
+ (list "%g" (if name (literal name) (literal "")))
+ (list "%n" (if label (literal label) (literal "")))
+ (list "%t" (with-mode olink-title-mode
+ (process-node-list title)))))
+ (tlist (match-split-list linktext (assoc-objs substitute))))
+ (string-list-sosofo tlist substitute)))
+
+(define (olink-outline)
+ (let* ((target (attribute-string (normalize "targetdocent")))
+ (linkmode (attribute-string (normalize "linkmode")))
+ (localinfo (attribute-string (normalize "localinfo")))
+ (modespec (if linkmode (element-with-id linkmode) (empty-node-list)))
+ (xreflabel (if (node-list-empty? modespec)
+ ""
+ (attribute-string (normalize "xreflabel") modespec)))
+ (pubid (entity-public-id target))
+ (sysid (system-id-filename target))
+ (basename (trim-string sysid '(".sgm" ".xml" ".sgml")))
+ (olinkfile (string-append basename %olink-outline-ext%))
+ (olinkdoc (sgml-parse olinkfile))
+ (olinkroot (node-property 'document-element olinkdoc))
+ (olnode (if localinfo
+ (element-with-id localinfo olinkroot)
+ olinkroot))
+ (linktext (strip (data-of (current-node)))))
+ (if (equal? linktext "")
+ (olink-outline-xref olinkroot olnode xreflabel)
+ (process-children))))
+
+(element olink
+ (if (not (attribute-string (normalize "targetdocent")))
+ (olink-link)
+ (if (attribute-string (normalize "linkmode"))
+ (olink-outline)
+ (olink-simple))))
+
+(mode olink-title-mode
+ (default (process-children))
+
+ (element ttl
+ (make sequence
+ font-posture: 'italic
+ (process-children)))
+
+ (element it
+ (make sequence
+ font-posture: 'upright
+ (process-children)))
+
+ (element tt
+ (make sequence
+ font-family-name: %mono-font-family%
+ (process-children)))
+
+ (element sub
+ ($ss-seq$ -))
+
+ (element sup
+ ($ss-seq$ +))
+)
+
+;; ======================================================================
+
+(element xref
+ (let* ((endterm (attribute-string (normalize "endterm")))
+ (linkend (attribute-string (normalize "linkend")))
+ (target (element-with-id linkend))
+ (xreflabel (if (node-list-empty? target)
+ #f
+ (attribute-string (normalize "xreflabel") target))))
+ (if (node-list-empty? target)
+ (error (string-append "XRef LinkEnd to missing ID '" linkend "'"))
+ (if xreflabel
+ (make link
+ destination: (node-list-address target)
+ (literal xreflabel))
+ (if endterm
+ (if (node-list-empty? (element-with-id endterm))
+ (error (string-append "XRef EndTerm to missing ID '"
+ endterm "'"))
+ (make link
+ destination: (node-list-address (element-with-id endterm))
+ (with-mode xref-endterm-mode
+ (process-element-with-id endterm))))
+ (cond
+ ((or (equal? (gi target) (normalize "biblioentry"))
+ (equal? (gi target) (normalize "bibliomixed")))
+ ;; xref to the bibliography is a special case
+ (xref-biblioentry target))
+ ((equal? (gi target) (normalize "co"))
+ ;; callouts are a special case
+ (xref-callout target))
+ ((equal? (gi target) (normalize "listitem"))
+ (xref-listitem target))
+ ((equal? (gi target) (normalize "varlistentry"))
+ (xref-varlistentry target))
+ ((equal? (gi target) (normalize "question"))
+ (xref-question target))
+ ((equal? (gi target) (normalize "answer"))
+ (xref-answer target))
+ ((equal? (gi target) (normalize "refentry"))
+ (xref-refentry target))
+ ((equal? (gi target) (normalize "refnamediv"))
+ ;; and refnamedivs
+ (xref-refnamediv target))
+ ((equal? (gi target) (normalize "glossentry"))
+ ;; as are glossentrys
+ (xref-glossentry target))
+ ((equal? (gi target) (normalize "author"))
+ ;; and authors
+ (xref-author target))
+ ((equal? (gi target) (normalize "authorgroup"))
+ ;; and authorgroups
+ (xref-authorgroup target))
+ (else
+ (xref-general target))))))))
+
+(define (xref-general target #!optional (xref-string #f))
+ ;; This function is used by both XREF and OLINK (when no TARGETDOCENT
+ ;; is specified). The only case where xref-string is supplied is
+ ;; on OLINK.
+ (let ((label (attribute-string (normalize "xreflabel") target)))
+ (make link
+ destination: (node-list-address target)
+ (if xref-string
+ (auto-xref target xref-string)
+ (if label
+ (xreflabel-sosofo label)
+ (auto-xref target))))))
+
+(define (xref-refentry target)
+;; refmeta/refentrytitle, refmeta/manvolnum, refnamediv/refdescriptor,
+;; refnamediv/refname
+ (let* ((refmeta (select-elements (children target)
+ (normalize "refmeta")))
+ (refnamediv (select-elements (children target)
+ (normalize "refnamediv")))
+ (rfetitle (select-elements (children refmeta)
+ (normalize "refentrytitle")))
+ (manvolnum (select-elements (children refmeta)
+ (normalize "manvolnum")))
+ (refdescrip (select-elements (children refnamediv)
+ (normalize "refdescriptor")))
+ (refname (select-elements (children refnamediv)
+ (normalize "refname")))
+
+ (title (if (node-list-empty? rfetitle)
+ (if (node-list-empty? refdescrip)
+ (node-list-first refname)
+ (node-list-first refdescrip))
+ (node-list-first rfetitle))))
+ (make link
+ destination: (node-list-address target)
+
+ (make sequence
+ font-posture: (if %refentry-xref-italic%
+ 'italic
+ (inherited-font-posture))
+
+ (process-node-list (children title))
+ (if (and %refentry-xref-manvolnum%
+ (not (node-list-empty? manvolnum)))
+ (process-node-list manvolnum)
+ (empty-sosofo))))))
+
+(define (xref-refnamediv target)
+ (let* ((refname (select-elements (children target)
+ (normalize "refname")))
+
+ (title (node-list-first refname)))
+ (make link
+ destination: (node-list-address target)
+
+ (make sequence
+ font-posture: (if %refentry-xref-italic%
+ 'italic
+ (inherited-font-posture))
+
+ (process-node-list (children title))))))
+
+(define (xref-varlistentry target)
+ (let ((terms (select-elements (children target)
+ (normalize "term"))))
+ (make link
+ destination: (node-list-address target)
+ (with-mode xref-varlistentry-mode
+ (process-node-list (node-list-first terms))))))
+
+(define (xref-glossentry target)
+ (let ((glossterms (select-elements (children target)
+ (normalize "glossterm"))))
+ (make link
+ destination: (node-list-address target)
+ (with-mode xref-glossentry-mode
+ (process-node-list (node-list-first glossterms))))))
+
+(define (xref-author target)
+ (make link
+ destination: (node-list-address target)
+ (literal (author-string target))))
+
+(define (xref-authorgroup target)
+ ;; it's a quirk of author-list-string that it needs to point to
+ ;; one of the authors in the authorgroup, not the authorgroup.
+ ;; go figure.
+ (make link
+ destination: (node-list-address target)
+ (let loop ((author (select-elements (children target)
+ (normalize "author"))))
+ (if (node-list-empty? author)
+ (empty-sosofo)
+ (make sequence
+ (literal (author-list-string (node-list-first author)))
+ (loop (node-list-rest author)))))))
+
+(define (xref-biblioentry target)
+ (let* ((abbrev (node-list-first
+ (node-list-filter-out-pis (children target))))
+ (label (attribute-string (normalize "xreflabel") target)))
+ (make link
+ destination: (node-list-address target)
+
+ (if biblio-xref-title
+ (let* ((citetitles (select-elements (descendants target)
+ (normalize "citetitle")))
+ (titles (select-elements (descendants target)
+ (normalize "title")))
+ (title (if (node-list-empty? citetitles)
+ (node-list-first titles)
+ (node-list-first citetitles))))
+ (with-mode xref-title-mode
+ (process-node-list title)))
+ (if biblio-number
+ (make sequence
+ (literal "[" (number->string (bibentry-number target)) "]"))
+ (if label
+ (make sequence
+ (literal "[" label "]"))
+ (if (equal? (gi abbrev) (normalize "abbrev"))
+ (make sequence
+ (process-node-list abbrev))
+ (make sequence
+ (literal "["
+ (attribute-string (normalize "id") target)
+ "]")))))))))
+
+(define (xref-callout target)
+ (make link
+ destination: (node-list-address target)
+ ($callout-mark$ target)))
+
+(define (xref-listitem target)
+ (if (equal? (gi (parent target)) (normalize "orderedlist"))
+ (make link
+ destination: (node-list-address target)
+ (literal (orderedlist-listitem-label-recursive target)))
+ (error
+ (string-append "XRef to LISTITEM only supported in ORDEREDLISTs"))))
+
+
+(define (xref-question target)
+ (make link
+ destination: (node-list-address target)
+ (make sequence
+ (literal (gentext-element-name target))
+ (literal (gentext-label-title-sep target))
+ (literal (question-answer-label target)))))
+
+(define (xref-answer target)
+ (xref-question target))
+
+(mode xref-endterm-mode
+ (default
+ (make sequence
+ font-posture: 'italic
+ (process-children-trim))))
+
+(define (xreflabel-sosofo xreflabel)
+ (make sequence
+ font-posture: 'italic
+ (literal xreflabel)))
+
+;; ======================================================================
+
+;; Returns the title of the element as a sosofo, italicized for xref.
+;;
+(define (element-title-xref-sosofo nd)
+ (make sequence
+ font-posture: 'italic
+ (element-title-sosofo nd)))
+
+(mode xref-title-mode
+ (element title
+ (make sequence
+ font-posture: 'italic
+ (process-children-trim)))
+
+ (element citetitle
+ (make sequence
+ font-posture: 'italic
+ (process-children-trim)))
+
+ (element refname
+ (process-children-trim))
+
+ (element refentrytitle
+ (process-children-trim))
+)
+
+(mode xref-varlistentry-mode
+ (element term
+ ($italic-seq$)))
+
+(mode xref-glossentry-mode
+ (element glossterm
+ ($italic-seq$)))
+
+;; ======================================================================
+
+(define (element-page-number-sosofo target)
+ (with-mode pageno-mode
+ (process-node-list target)))
+
+(mode pageno-mode
+ (default
+ (current-node-page-number-sosofo)))
+
+;; ======================================================================
+
diff --git a/print/dblists.dsl b/print/dblists.dsl
new file mode 100644
index 0000000..d109e77
--- /dev/null
+++ b/print/dblists.dsl
@@ -0,0 +1,515 @@
+;; $Id: dblists.dsl,v 1.7 2003/02/17 02:42:44 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; =============================== LISTS ================================
+
+(define (BULLTREAT bullfcn ilevel override mark)
+ (cond
+ (override (bullfcn override ilevel))
+ (mark (bullfcn mark ilevel))
+ (else (bullfcn "bullet" ilevel))))
+
+(define (BULLSTR m lvl)
+ (dingbat m))
+
+(define (BULLSHIFT m lvl)
+ (let ((md (case-fold-down m)))
+ (case md
+ (("bullet") 0.0em)
+ (("box") (if (= lvl 1) 0.0em 0.1em))
+ (("checkbox") (if (= lvl 1) 0.0em 0.1em))
+ (("check") 0.0em)
+ (("checkedbox") 0.0em)
+ (("dash") 0.0em)
+ (("none") 0.0em)
+ (else 0.0em))))
+
+(define (MSIZE m lvl f1 f2)
+ (if (= lvl 1)
+ (* %bf-size% f1)
+ (* %bf-size% f2)))
+
+(define (BULLSIZE m lvl)
+ (let ((md (case-fold-down m)))
+ (case md
+ (("bullet") (MSIZE m lvl 0.8 0.72))
+ (("box") (MSIZE m lvl 0.9 0.72))
+ (("checkbox") (MSIZE m lvl 0.9 0.72))
+ (("check") (MSIZE m lvl 1.0 1.0))
+ (("checkedbox") (MSIZE m lvl 1.0 1.0))
+ (("dash") (MSIZE m lvl 1.0 1.0))
+ (("none") (MSIZE m lvl 1.0 1.0))
+ (else (MSIZE m lvl 1.0 1.0)))))
+
+(define (OLSTEP) 0.9em)
+;; (case
+;; (modulo (length (hierarchical-number-recursive (normalize "orderedlist"))) 4)
+;; ((1) 1.4em)
+;; ((2) 1.4em)
+;; ((3) 1.4em)
+;; ((0) 1.4em)))
+
+(define (ILSTEP) 1.0em)
+
+(define (COSTEP) 1.5pi)
+
+;; Improve spacing on lists, remove extra space before..
+;; Suggested by Adam Di Carlo, adam@onshore.com
+(define ($list$)
+ (make display-group
+ start-indent: (if (INBLOCK?)
+ (inherited-start-indent)
+ (+ %block-start-indent% (inherited-start-indent)))
+ space-after: (if (INLIST?) %para-sep% %block-sep%)))
+
+(element itemizedlist ($list$))
+
+(element (itemizedlist title)
+ (make paragraph
+ use: title-style
+ (process-children)))
+
+(define (generic-list-item indent-step line-field)
+ (let* ((itemcontent (children (current-node)))
+ (first-child (node-list-first itemcontent))
+ (spacing (inherited-attribute-string (normalize "spacing"))))
+ (make display-group
+ start-indent: (+ (inherited-start-indent) indent-step)
+ (make paragraph
+ use: (cond
+ ((equal? (gi first-child) (normalize "programlisting"))
+ verbatim-style)
+ ((equal? (gi first-child) (normalize "screen"))
+ verbatim-style)
+ ((equal? (gi first-child) (normalize "synopsis"))
+ verbatim-style)
+ ((equal? (gi first-child) (normalize "literallayout"))
+ linespecific-style)
+ ((equal? (gi first-child) (normalize "address"))
+ linespecific-style)
+ (else
+ nop-style))
+ space-before: (if (equal? (normalize "compact") spacing)
+ 0pt
+ %para-sep%)
+ first-line-start-indent: (- indent-step)
+ (make sequence
+ line-field)
+ (with-mode listitem-content-mode
+ (process-node-list first-child)))
+ (process-node-list (node-list-rest itemcontent)))))
+
+(define (process-listitem-content)
+ (if (absolute-first-sibling?)
+ (make sequence
+ (process-children-trim))
+ (next-match)))
+
+(mode listitem-content-mode
+ (element (listitem programlisting) (process-listitem-content))
+ (element (listitem screen) (process-listitem-content))
+ (element (listitem synopsis) (process-listitem-content))
+ (element (listitem funcsynopsis) (process-listitem-content))
+ (element (listitem literallayout) (process-listitem-content))
+ (element (listitem address) (process-listitem-content))
+ (element (listitem para) (process-listitem-content))
+ (element (listitem formalpara) (process-listitem-content))
+ (element (listitem simpara) (process-listitem-content))
+)
+
+(element (itemizedlist listitem)
+ (let ((ilevel (length (hierarchical-number-recursive (normalize "itemizedlist"))))
+ (override (inherited-attribute-string (normalize "override")))
+ (mark (inherited-attribute-string (normalize "mark"))))
+ (generic-list-item
+ (ILSTEP)
+ (if (or (and override
+ (equal? (normalize override) (normalize "none")))
+ (and (not override)
+ (equal? (normalize mark) (normalize "none"))))
+ (make line-field
+ font-size: (BULLTREAT BULLSIZE ilevel override mark)
+ position-point-shift: (BULLTREAT BULLSHIFT ilevel override mark)
+ field-width: (ILSTEP)
+ (literal "\no-break-space;"))
+ (make line-field
+ font-size: (BULLTREAT BULLSIZE ilevel override mark)
+ position-point-shift: (BULLTREAT BULLSHIFT ilevel override mark)
+ field-width: (ILSTEP)
+ (literal (BULLTREAT BULLSTR ilevel override mark)))))))
+
+(element orderedlist ($list$))
+
+(element (orderedlist title)
+ (make paragraph
+ use: title-style
+ (process-children)))
+
+(element (orderedlist listitem)
+ (let* ((listitems (select-elements (children (parent (current-node)))
+ (normalize "listitem")))
+ (itemnumber (orderedlist-listitem-number (current-node)))
+ (displaynum (if (string=? (inherited-attribute-string
+ (normalize "inheritnum"))
+ (normalize "inherit"))
+ (let loop ((nd (current-node)) (inum ""))
+ (if (node-list-empty? nd)
+ inum
+ (if (and (equal? (gi nd)
+ (normalize "listitem"))
+ (equal? (gi (parent nd))
+ (normalize "orderedlist")))
+ (loop (parent nd)
+ (string-append
+ (number-with-numeration
+ nd
+ (inherited-attribute-string
+ (normalize "numeration") nd)
+ (orderedlist-listitem-number nd))
+ (if (string=? inum "")
+ ""
+ ".")
+ inum))
+ (loop (parent nd) inum))))
+ (number-with-numeration
+ (current-node)
+ (inherited-attribute-string (normalize "numeration"))
+ (orderedlist-listitem-number (current-node)))))
+ (listcount (+ (node-list-length listitems) itemnumber))
+ (factor (cond
+ ((> listcount 999) 4)
+ ((> listcount 99) 3)
+ ((> listcount 9) 2)
+ (else 2))))
+ (generic-list-item
+ (* (OLSTEP) factor)
+ (make line-field
+ field-width: (* (OLSTEP) factor)
+ field-align: 'end
+ (literal displaynum
+ (gentext-label-title-sep (normalize "orderedlist")))))))
+
+(define (number-with-numeration node numeration number)
+ (let* ((depth (length (hierarchical-number-recursive (normalize "orderedlist") node)))
+ (rawnum (cond
+ ((equal? numeration (normalize "arabic")) 1)
+ ((equal? numeration (normalize "loweralpha")) 2)
+ ((equal? numeration (normalize "lowerroman")) 3)
+ ((equal? numeration (normalize "upperalpha")) 4)
+ ((equal? numeration (normalize "upperroman")) 0)
+ (else (modulo depth 5))))
+ (num (case rawnum
+ ((1) (format-number number "1"))
+ ((2) (format-number number "a"))
+ ((3) (format-number number "i"))
+ ((4) (format-number number "A"))
+ ((0) (format-number number "I")))))
+ (if (> depth 5)
+ (string-append "(" num ")")
+ num)))
+
+(element variablelist
+ (let* ((termlength (if (attribute-string (normalize "termlength"))
+ (string->number
+ (attribute-string (normalize "termlength")))
+ %default-variablelist-termlength%))
+ (maxlen (if (> termlength %default-variablelist-termlength%)
+ termlength
+ %default-variablelist-termlength%))
+ (too-long? (variablelist-term-too-long? termlength)))
+ (make display-group
+ start-indent: (if (INBLOCK?)
+ (inherited-start-indent)
+ (+ %block-start-indent% (inherited-start-indent)))
+ space-before: (if (INLIST?) %para-sep% %block-sep%)
+ space-after: (if (INLIST?) %para-sep% %block-sep%)
+
+ (if (and (or (and termlength (not too-long?))
+ %always-format-variablelist-as-table%)
+ (or %may-format-variablelist-as-table%
+ %always-format-variablelist-as-table%))
+ (make table
+ space-before: (if (INLIST?) %para-sep% %block-sep%)
+ space-after: (if (INLIST?) %para-sep% %block-sep%)
+ start-indent: (if (INBLOCK?)
+ (inherited-start-indent)
+ (+ %block-start-indent%
+ (inherited-start-indent)))
+
+;; Calculate the width of the column containing the terms...
+;;
+;; maxlen in (inherited-font-size) 72pt
+;; x ---------- x ----------------------- x ------ = width
+;; 12 chars 10pt in
+;;
+ (make table-column
+ column-number: 1
+ width: (* (* (/ maxlen 12) (/ (inherited-font-size) 10pt)) 72pt))
+ (with-mode variablelist-table
+ (process-children)))
+ (process-children)))))
+
+(element varlistentry (process-children))
+
+(element (varlistentry term)
+ (make paragraph
+ space-before: (if (first-sibling?)
+ %block-sep%
+ 0pt)
+ keep-with-next?: #t
+ first-line-start-indent: 0pt
+ start-indent: (inherited-start-indent)
+ (process-children)))
+
+(element (varlistentry listitem)
+ (let ((vle-indent 2em)) ; this ought to be in dbparam!
+ (generic-list-item
+ vle-indent
+ (make line-field
+ field-width: vle-indent
+ (literal "\no-break-space;")))))
+
+(mode variablelist-table
+ (element varlistentry
+ (let* ((terms (select-elements (children (current-node))
+ (normalize "term")))
+ (listitem (select-elements (children (current-node))
+ (normalize "listitem")))
+ (termlen (if (attribute-string (normalize "termlength")
+ (parent (current-node)))
+ (string->number (attribute-string
+ (normalize "termlength")
+ (parent (current-node))))
+ %default-variablelist-termlength%))
+ (too-long? (varlistentry-term-too-long? (current-node) termlen)))
+ (if too-long?
+ (make sequence
+ (make table-row
+ cell-before-row-margin: %para-sep%
+
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 2
+ n-rows-spanned: 1
+ (process-node-list terms)))
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ ;; where terms would have gone
+ (empty-sosofo))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (process-node-list listitem))))
+ (make table-row
+ cell-before-row-margin: %para-sep%
+
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (process-node-list terms))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ (process-node-list listitem))))))
+
+ (element (varlistentry term)
+ (make sequence
+ (process-children-trim)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (empty-sosofo))))
+
+ (element (varlistentry listitem)
+ (make display-group
+ start-indent: 0pt
+ (process-children)))
+
+ ;; Suggested by Nick NICHOLAS, nicholas@uci.edu
+ (element (variablelist title)
+ (make table-row
+ cell-before-row-margin: %para-sep%
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 2
+ n-rows-spanned: 1
+ (make paragraph
+ use: title-style
+ start-indent: 0pt
+ (process-children)))))
+
+)
+
+(define (simplelist-table majororder cols members)
+ (let* ((termcount (node-list-length members))
+ (rows (quotient (+ termcount (- cols 1)) cols)))
+ (make table
+ space-before: (if (INLIST?) %para-sep% %block-sep%)
+ space-after: (if (INLIST?) %para-sep% %block-sep%)
+ start-indent: (if (INBLOCK?)
+ (inherited-start-indent)
+ (+ %block-start-indent% (inherited-start-indent)))
+ (if %simplelist-column-width%
+ (let colloop ((colnum 1))
+ (if (> colnum cols)
+ (empty-sosofo)
+ (make sequence
+ (make table-column
+ width: %simplelist-column-width%)
+ (colloop (+ colnum 1)))))
+ (empty-sosofo))
+ (let rowloop ((rownum 1))
+ (if (> rownum rows)
+ (empty-sosofo)
+ (make sequence
+ (simplelist-row rownum majororder rows cols members)
+ (rowloop (+ rownum 1))))))))
+
+(define (simplelist-row rownum majororder rows cols members)
+ (make table-row
+ (let colloop ((colnum 1))
+ (if (> colnum cols)
+ (empty-sosofo)
+ (make sequence
+ (simplelist-entry rownum colnum majororder rows cols members)
+ (colloop (+ colnum 1)))))))
+
+(define (simplelist-entry rownum colnum majororder rows cols members)
+ (let ((membernum (if (equal? majororder 'row)
+ (+ (* (- rownum 1) cols) colnum)
+ (+ (* (- colnum 1) rows) rownum))))
+ (let loop ((nl members) (count membernum))
+ (if (<= count 1)
+ (make table-cell
+ column-number: colnum
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+;; removed to avoid dependency between dblists and dbtable
+;; cell-before-row-margin: %cals-cell-before-row-margin%
+;; cell-after-row-margin: %cals-cell-after-row-margin%
+;; cell-before-column-margin: %cals-cell-before-column-margin%
+;; cell-after-column-margin: %cals-cell-after-column-margin%
+;; start-indent: %cals-cell-content-start-indent%
+;; end-indent: %cals-cell-content-end-indent%
+;; is another variable needed to parameterize these settings, or are
+;; constants good enough?
+ cell-before-row-margin: 0pt
+ cell-after-row-margin: 0pt
+ cell-before-column-margin: 3pt
+ cell-after-column-margin: 3pt
+ start-indent: 0pt
+ end-indent: 0pt
+ quadding: 'start
+ (if (node-list-empty? nl)
+ (literal "\no-break-space;")
+ (process-node-list (node-list-first nl))))
+ (loop (node-list-rest nl) (- count 1))))))
+
+(element (entry simplelist)
+ ;; This is to avoid possibly putting tables inside tables, which don't
+ ;; work in some backends (e.g. RTF)
+ (make paragraph
+ (process-children)))
+
+(element (entry simplelist member)
+ ;; This is to avoid possibly putting tables inside tables, which don't
+ ;; work in some backends (e.g. RTF)
+ (let ((type (inherited-attribute-string (normalize "type"))))
+ (if (equal? type (normalize "inline"))
+ (next-match)
+ (make sequence
+ (if (equal? (child-number) 1)
+ (empty-sosofo)
+ (make paragraph-break))
+ (process-children)))))
+
+(element simplelist
+ (let ((type (attribute-string (normalize "type")))
+ (cols (if (attribute-string (normalize "columns"))
+ (if (> (string->number (attribute-string (normalize "columns"))) 0)
+ (string->number (attribute-string (normalize "columns")))
+ 1)
+ 1))
+ (members (select-elements (children (current-node)) (normalize "member"))))
+ (cond
+ ((equal? type (normalize "inline"))
+ (process-children))
+ ((equal? type (normalize "vert"))
+ (simplelist-table 'column cols members))
+ ((equal? type (normalize "horiz"))
+ (simplelist-table 'row cols members)))))
+
+(element member
+ (let ((type (inherited-attribute-string (normalize "type"))))
+ (if (equal? type (normalize "inline"))
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal "")))
+ (make paragraph
+ quadding: 'start
+ (process-children)))))
+
+(element segmentedlist (process-children))
+(element (segmentedlist title) ($lowtitle$ 2 4))
+
+(element segtitle (empty-sosofo))
+(mode seglist-in-seg
+ (element segtitle
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (process-children))))
+
+(element seglistitem ($paragraph$))
+(element seg
+ (let* ((seg-num (child-number (current-node)))
+ (seglist (parent (parent (current-node))))
+ (segtitle (nth-node (select-elements
+ (descendants seglist) (normalize "segtitle")) seg-num)))
+
+ ;; Note: segtitle is only going to be the right thing in a well formed
+ ;; SegmentedList. If there are too many Segs or too few SegTitles,
+ ;; you'll get something odd...maybe an error
+
+ (with-mode seglist-in-seg
+ (make paragraph
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (sosofo-append (process-node-list segtitle))
+ (literal ": "))
+ (process-children)))))
+
+(element calloutlist ($list$))
+(element (calloutlist title) ($lowtitle$ 2 4))
+
+(element callout
+ (let* ((calloutcontent (children (current-node)))
+ (arearefs (inherited-attribute-string (normalize "arearefs")))
+ (idlist (split arearefs)))
+ (make sequence
+ start-indent: (+ (inherited-start-indent) (COSTEP))
+ (make paragraph
+ space-before: %para-sep%
+ first-line-start-indent: (- (COSTEP))
+ (make line-field
+ field-width: (COSTEP)
+ (let loop ((ids idlist))
+ (if (null? ids)
+ (empty-sosofo)
+ (make sequence
+ ($callout-mark$ (element-with-id (car ids)))
+ (loop (cdr ids))))))
+ (process-node-list (children (node-list-first calloutcontent))))
+
+ (process-node-list (node-list-rest calloutcontent)))))
diff --git a/print/dblot.dsl b/print/dblot.dsl
new file mode 100644
index 0000000..6964ad4
--- /dev/null
+++ b/print/dblot.dsl
@@ -0,0 +1,24 @@
+;; $Id: dblot.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; need test cases to do toc/lot; do these later
+
+(element toc (empty-sosofo))
+(element (toc title) (empty-sosofo))
+(element tocfront ($paragraph$))
+(element tocentry ($paragraph$))
+(element tocpart (process-children))
+(element tocchap (process-children))
+(element toclevel1 (process-children))
+(element toclevel2 (process-children))
+(element toclevel3 (process-children))
+(element toclevel4 (process-children))
+(element toclevel5 (process-children))
+(element tocback ($paragraph$))
+(element lot (empty-sosofo))
+(element (lot title) (empty-sosofo))
+(element lotentry ($paragraph$))
+
diff --git a/print/dbmath.dsl b/print/dbmath.dsl
new file mode 100644
index 0000000..7284176
--- /dev/null
+++ b/print/dbmath.dsl
@@ -0,0 +1,92 @@
+;; $Id: dbmath.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define %equation-autolabel% #f)
+
+(element equation
+ ;; derived from $semiformal-object$
+ (if (node-list-empty? (select-elements (children (current-node))
+ (normalize "title")))
+ ($informal-object$ %informalequation-rules% %informalequation-rules%)
+ ($formal-object$ %informalequation-rules% %informalequation-rules%)))
+
+(element (equation title) (empty-sosofo))
+(element (equation alt) (empty-sosofo))
+(element (equation graphic)
+ (make paragraph
+ space-before: 0pt
+ space-after: 0pt
+ ($img$ (current-node) #t)))
+
+(element informalequation
+ ;; Derived from informal-object
+ (let ((rule-before? %informalequation-rules%)
+ (rule-after? %informalequation-rules%))
+ (if %equation-autolabel%
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ start-indent: (+ %block-start-indent%
+ (inherited-start-indent))
+ keep-with-next?: (object-title-after)
+
+ (if rule-before?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-after: (/ %block-sep% 2)
+ keep-with-next?: #t)
+ (empty-sosofo))
+
+ (make table
+ (make table-column
+ column-number: 1
+ width: (- %text-width%
+ (+ (inherited-start-indent)
+ (inherited-end-indent)
+ 1in)))
+ (make table-column
+ column-number: 2
+ width: 1in)
+ (make table-row
+ (make table-cell
+ cell-row-alignment: 'center
+ start-indent: 0pt
+ end-indent: 0pt
+ (process-children))
+ (make table-cell
+ cell-row-alignment: 'center
+ quadding: 'end
+ start-indent: 0pt
+ end-indent: 0pt
+ (make paragraph
+ (literal "(" (element-label (current-node)) ")")))))
+
+ (if rule-after?
+ (make rule
+ orientation: 'horizontal
+ line-thickness: %object-rule-thickness%
+ display-alignment: 'center
+ space-before: (/ %block-sep% 2)
+ keep-with-previous?: #t)
+ (empty-sosofo)))
+ ($informal-object$ rule-before? rule-after?))))
+
+(element (informalequation alt) (empty-sosofo))
+(element (informalequation graphic)
+ (make paragraph
+ space-before: 0pt
+ space-after: 0pt
+ quadding: 'end
+ ($img$ (current-node) #t)))
+
+(element inlineequation ($inline-object$))
+(element (inlineequation alt) (empty-sosofo))
+(element (inlineequation graphic)
+ (make sequence
+ ($img$ (current-node) #f)))
+
diff --git a/print/dbmsgset.dsl b/print/dbmsgset.dsl
new file mode 100644
index 0000000..ba0648e
--- /dev/null
+++ b/print/dbmsgset.dsl
@@ -0,0 +1,51 @@
+;; $Id: dbmsgset.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ======================== ERROR MESSAGES (ETC.) =======================
+
+(element msgset (process-children))
+
+(element msgentry ($informal-object$))
+
+(element simplemsgentry ($informal-object$))
+
+(element msg
+ (make display-group
+ font-weight: 'bold
+ font-family-name: %mono-font-family%
+ (process-children)))
+
+(element msgmain (process-children))
+
+(element msgsub
+ (make display-group
+ start-indent: (+ (inherited-start-indent) (ILSTEP))
+ (process-children)))
+
+(element msgrel (empty-sosofo))
+
+(element msgtext (process-children))
+
+(element msginfo ($indent-para-container$))
+
+(define ($genhead-para$ headtext)
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ (make sequence
+ font-weight: 'bold
+ (literal
+ (string-append headtext ": ")))
+ (process-children)))
+
+(element msglevel ($genhead-para$ (gentext-element-name (current-node))))
+(element msgorig ($genhead-para$ (gentext-element-name (current-node))))
+(element msgaud ($genhead-para$ (gentext-element-name (current-node))))
+
+(element msgexplan ($indent-para-container$))
+(element (msgexplan title) ($runinhead$))
+(element (msgexplan para) (make sequence (process-children)))
+
diff --git a/print/dbparam.dsl b/print/dbparam.dsl
new file mode 100644
index 0000000..2170512
--- /dev/null
+++ b/print/dbparam.dsl
@@ -0,0 +1,2085 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
+
+<style-sheet>
+<style-specification>
+<style-specification-body>
+
+;; $Id: dbparam.dsl,v 1.9 2003/04/29 05:33:30 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+;; === Book intro, for dsl2man ==========================================
+
+<![CDATA[
+;; DOCINFO
+;; <title>DocBook Print Parameters</title>
+;; <subtitle>Part of the Modular DocBook Stylesheet distribution</subtitle>
+;; <author><firstname>Norman</firstname><surname>Walsh</surname>
+;; </author>
+;; <edition>$Revision: 1.9 $</edition>
+;; <copyright><year>1997</year><year>1998</year><year>1999</year>
+;; <holder>Norman Walsh</holder></copyright>
+;; <legalnotice>
+;; <para>
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+;; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
+;; CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+;; OTHER DEALINGS IN THE SOFTWARE.
+;; </para>
+;; </legalnotice>
+;; <legalnotice>
+;; <para>
+;; Please direct all questions, bug reports, or suggestions for changes
+;; to Norman Walsh, &lt;<literal>ndw@nwalsh.com</literal>&gt;.
+;; </para>
+;; <para>
+;; See <ulink url="http://nwalsh.com/docbook/dsssl/">http://nwalsh.com/docbook/dsssl/</ulink> for more information.</para>
+;; </legalnotice>
+;; /DOCINFO
+]]>
+
+;; REFERENCE TOC/LOT Apparatus
+
+(define %generate-set-toc%
+ ;; REFENTRY generate-set-toc
+ ;; PURP Should a Table of Contents be produced for Sets?
+ ;; DESC
+ ;; If true, a Table of Contents will be generated for each 'Set'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %generate-book-toc%
+ ;; REFENTRY generate-book-toc
+ ;; PURP Should a Table of Contents be produced for Books?
+ ;; DESC
+ ;; If true, a Table of Contents will be generated for each 'Book'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define ($generate-book-lot-list$)
+ ;; REFENTRY generate-book-lot-list
+ ;; PURP Which Lists of Titles should be produced for Books?
+ ;; DESC
+ ;; This parameter should be a list (possibly empty) of the elements
+ ;; for which Lists of Titles should be produced for each 'Book'.
+ ;;
+ ;; It is meaningless to put elements that do not have titles in this
+ ;; list. If elements with optional titles are placed in this list, only
+ ;; the instances of those elements that do have titles will appear in
+ ;; the LOT.
+ ;;
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (list (normalize "table")
+(normalize "figure")
+(normalize "example")
+(normalize "equation")))
+
+(define %generate-part-toc%
+ ;; REFENTRY generate-part-toc
+ ;; PURP Should a Table of Contents be produced for Parts?
+ ;; DESC
+ ;; If true, a Table of Contents will be generated for each 'Part'.
+ ;; Note: '%generate-part-toc-on-titlepage%' controls whether the Part TOC
+ ;; is placed on the bottom of the part titlepage or on page(s) of its own.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %generate-part-toc-on-titlepage%
+ ;; REFENTRY generate-part-toc-on-titlepage
+ ;; PURP Should the Part TOC appear on the Part title page?
+ ;; DESC
+ ;; If true, the Part TOC will be placed on the Part title page. If false,
+ ;; the TOC will be placed on separate page(s) after the Part title page.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-reference-toc%
+ ;; REFENTRY generate-reference-toc
+ ;; PURP Should a Table of Contents be produced for References?
+ ;; DESC
+ ;; If true, a Table of Contents will be generated for each 'Reference'.
+ ;; Note: '%generate-reference-toc-on-titlepage%' controls whether the
+ ;; Reference TOC
+ ;; is placed on the bottom of the title page or on page(s) of its own.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %generate-reference-toc-on-titlepage%
+ ;; REFENTRY generate-reference-toc-on-titlepage
+ ;; PURP Should the Reference TOC appear on the Reference title page?
+ ;; DESC
+ ;; If true, the Reference TOC will be placed on the Reference title page.
+ ;; If false,
+ ;; the TOC will be placed on separate page(s) after the title page.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-article-toc%
+ ;; REFENTRY generate-article-toc
+ ;; PURP Should a Table of Contents be produced for Articles?
+ ;; DESC
+ ;; If true, a Table of Contents will be generated for each 'Article'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %generate-article-toc-on-titlepage%
+ ;; REFENTRY generate-article-toc-on-titlepage
+ ;; PURP Should the Article TOC appear on the Article title page?
+ ;; DESC
+ ;; If true, the Article TOC will be placed on the Article title page.
+ ;; If false,
+ ;; the TOC will be placed on separate page(s) after the title page.
+ ;; If false, %generate-article-titlepage-on-separate-page% should be
+ ;; true.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+;; REFERENCE Titlepages
+
+(define %generate-set-titlepage%
+ ;; REFENTRY generate-set-titlepage
+ ;; PURP Should a set title page be produced?
+ ;; DESC
+ ;; If true, a title page will be generated for each 'Set'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-book-titlepage%
+ ;; REFENTRY generate-book-titlepage
+ ;; PURP Should a book title page be produced?
+ ;; DESC
+ ;; If true, a title page will be generated for each 'Book'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-part-titlepage%
+ ;; REFENTRY generate-part-titlepage
+ ;; PURP Should a part title page be produced?
+ ;; DESC
+ ;; If true, a title page will be generated for each 'Part'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-partintro-on-titlepage%
+ ;; REFENTRY generate-partintro-on-titlepage
+ ;; PURP Should the PartIntro appear on the Part/Reference title page?
+ ;; DESC
+ ;; If true, the PartIntro content will appear on the title page of
+ ;; Parts and References. If false,
+ ;; it will be placed on separate page(s) after the title page.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-reference-titlepage%
+ ;; REFENTRY generate-reference-titlepage
+ ;; PURP Should a reference title page be produced?
+ ;; DESC
+ ;; If true, a title page will be generated for each 'Reference'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-article-titlepage%
+ ;; REFENTRY generate-article-titlepage
+ ;; PURP Should an article title page be produced?
+ ;; DESC
+ ;; If true, a title page will be generated for each 'Article'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %generate-article-titlepage-on-separate-page%
+ ;; REFENTRY generate-article-ttlpg-on-sep-page
+ ;; PURP Should the article title page be on a separate page?
+ ;; DESC
+ ;; If true, the title page for each 'Article' will occur on its own page.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %titlepage-in-info-order%
+ ;; REFENTRY titlepage-in-info-order
+ ;; PURP Place elements on title page in document order?
+ ;; DESC
+ ;; If true, the elements on the title page will be set in the order that
+ ;; they appear in the *info element. Otherwise, they will be set in
+ ;; the order specified in the *-titlepage-*-elements list.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %author-othername-in-middle%
+ ;; REFENTRY othername-in-middle
+ ;; PURP Author OTHERNAME appears between FIRSTNAME and SURNAME?
+ ;; DESC
+ ;; If true, the OTHERNAME of an AUTHOR appears between the
+ ;; FIRSTNAME and SURNAME. Otherwise, OTHERNAME is suppressed.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+;; REFERENCE RefEntries and FuncSynopses
+
+(define %refentry-new-page%
+ ;; REFENTRY refentry-new-page
+ ;; PURP 'RefEntry' starts on new page?
+ ;; DESC
+ ;; If true, each 'RefEntry' begins on a new page.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %refentry-keep%
+ ;; REFENTRY refentry-keep
+ ;; PURP Keep RefEntrys together?
+ ;; DESC
+ ;; Refentry keep indicates how the stylesheet should
+ ;; attempt to keep each RefEntry. Common values are '#t', for the
+ ;; smallest possible area, 'page' for the same page, and '#f' to ignore
+ ;; this characteristic.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %refentry-generate-name%
+ ;; REFENTRY refentry-generate-name
+ ;; PURP Output NAME header before 'RefName'(s)?
+ ;; DESC
+ ;; If true, a "NAME" section title is output before the list
+ ;; of 'RefName's.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %refentry-xref-italic%
+ ;; REFENTRY refentry-xref-italic
+ ;; PURP Use italic text when cross-referencing RefEntrys?
+ ;; DESC
+ ;; If true, italics are used when cross-referencing RefEntrys, either
+ ;; with XRef or CiteRefEntry.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %refentry-xref-manvolnum%
+ ;; REFENTRY refentry-xref-manvolnum
+ ;; PURP Output manvolnum as part of RefEntry cross-reference?
+ ;; DESC
+ ;; If true, the manvolnum is used when cross-referencing RefEntrys, either
+ ;; with XRef or CiteRefEntry.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %funcsynopsis-style%
+ ;; REFENTRY funcsynopsis-style
+ ;; PURP What style of 'FuncSynopsis' should be generated?
+ ;; DESC
+ ;; If '%funcsynopsis-style%' is 'ansi',
+ ;; ANSI-style function synopses are generated for a 'FuncSynopsis',
+ ;; otherwise K<![CDATA[&]]>R-style function synopses are generated.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'ansi)
+
+(define %kr-funcsynopsis-indent%
+ ;; REFENTRY kr-funcsynopsis-indent
+ ;; PURP Indent-depth in K<![CDATA[&]]>R-style function synopses
+ ;; DESC
+ ;; If the '%funcsynopsis-style%' is 'kr',
+ ;; '%kr-funcsynopsis-indent%' specifies the amount by which parameter
+ ;; definitions should be indented under the function prototype.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 1pi)
+
+(define %funcsynopsis-decoration%
+ ;; REFENTRY funcsynopsis-decoration
+ ;; PURP Decorate elements of a FuncSynopsis?
+ ;; DESC
+ ;; If true, elements of the FuncSynopsis will be decorated (e.g. bold or
+ ;; italic). The decoration is controlled by functions that can be redefined
+ ;; in a customization layer. See 'edbsynop.dsl'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+;; REFERENCE Fonts
+
+(define %refentry-name-font-family%
+ ;; REFENTRY refentry-name-font-family
+ ;; PURP The font family used in RefName
+ ;; DESC
+ ;; The name of the font family used in 'RefEntry'
+ ;; 'RefName's.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ %mono-font-family%)
+
+(define %title-font-family%
+ ;; REFENTRY title-font-family
+ ;; PURP The font family used in titles
+ ;; DESC
+ ;; The name of the font family used in titles (Arial by default).
+ ;;
+ ;; 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.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "Arial")
+
+(define %body-font-family%
+ ;; REFENTRY body-font-family
+ ;; PURP The font family used in body text
+ ;; DESC
+ ;; The name of the font family used in body text
+ ;; (Times New Roman by default).
+ ;;
+ ;; 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.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "Times New Roman")
+
+(define %mono-font-family%
+ ;; REFENTRY mono-font-family
+ ;; PURP The font family used in verbatim environments
+ ;; DESC
+ ;; The name of the font family used in verbatim environments (Courier New
+ ;; by default).
+ ;;
+ ;; 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.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "Courier New")
+
+(define %admon-font-family%
+ ;; REFENTRY admon-font-family
+ ;; PURP The font family used in admonitions
+ ;; DESC
+ ;; The name of the font family used for body text in admonitions (Arial
+ ;; by default).
+ ;;
+ ;; 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.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "Arial")
+
+(define %guilabel-font-family%
+ ;; REFENTRY guilabel-font-family
+ ;; PURP The font family used in GUI labels
+ ;; DESC
+ ;; The name of the font family used for text that represents text on a
+ ;; GUI (e.g., text in 'GUILabel', 'GUIMenu',
+ ;; etc.). (Arial by default).
+ ;;
+ ;; 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.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "Arial")
+
+(define %visual-acuity%
+ ;; REFENTRY visual-acuity
+ ;; PURP General measure of document text size
+ ;; DESC
+ ;; This parameter controls the general size of the text in the document.
+ ;; Several other values (body font size and margins) have default values that
+ ;; vary depending on the setting of '%visual-acuity%'. There
+ ;; are three legal values: 'normal',
+ ;; the normal, standard document size (10pt body text);
+ ;; 'tiny',
+ ;; a small text size (8pt body text);
+ ;; 'presbyopic',
+ ;; a slightly more generous size (12pt body text); and
+ ;; 'large-type',
+ ;; quite large (24pt body text).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ ;; "tiny"
+ ;; "presbyopic"
+ ;; "large-type"
+ "normal")
+
+(define %hsize-bump-factor%
+ ;; REFENTRY hsize-bump-factor
+ ;; PURP Font scaling factor
+ ;; DESC
+ ;; Internally, the stylesheet refers to font sizes in purely relative
+ ;; terms. This is done by defining a scaled set of fonts
+ ;; (sizes 1, 2, 3, etc.)
+ ;; based at the default text font size (e.g. 10pt). The '%hsize-bump-factor%'
+ ;; describes the ratio between scaled sizes. The default is 1.2.
+ ;;
+ ;; Each hsize is '%hsize-bump-factor%' times larger than
+ ;; the previous hsize. For example, if the base size is 10pt, and
+ ;; '%hsize-bump-factor%'
+ ;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 1.2)
+
+(define %smaller-size-factor%
+ ;; REFENTRY smaller-size-factor
+ ;; PURP Smaller font scaling factor
+ ;; DESC
+ ;; In environments that are usually set with a slightly smaller font size,
+ ;; for example block quotations, the stylesheet calculates the smaller font
+ ;; size by muliplying the current font size by '%smaller-size-factor%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.9)
+
+(define %ss-size-factor%
+ ;; REFENTRY ss-size-factor
+ ;; PURP Super/subscript scaling factor
+ ;; DESC
+ ;; When text is set as a subscript or superscript, the font size of the
+ ;; text is multiplied by '%ss-size-factor%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.6)
+
+(define %ss-shift-factor%
+ ;; REFENTRY ss-shift-factor
+ ;; PURP Super/subscript shift factor
+ ;; DESC
+ ;; When text is set as a subscript or superscript, it is set above or below
+ ;; the baseline by a factor of the current font size and '%ss-shift-factor%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.4)
+
+(define %verbatim-size-factor%
+ ;; REFENTRY verbatim-size-factor
+ ;; PURP Verbatim font scaling factor
+ ;; DESC
+ ;; When a monospace font is selected, the current font size is multiplied
+ ;; by the '%verbatim-size-factor%'. If '%verbatim-size-factor%'
+ ;; is '#f', no scaling is performed (Well, that's not precisely true.
+ ;; In '$verbatim-display$'
+ ;; environments, the font size is calculated with respect to the longest line
+ ;; in the display, if '%verbatim-size-factor%' is '#f').
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.9)
+
+(define %bf-size%
+ ;; REFENTRY bf-size
+ ;; PURP Defines the body font size
+ ;; DESC
+ ;; Sets the body font size. This parameter is usually controlled by the
+ ;; '%visual-acuity%' parameter.
+ ;; /DESC
+ ;; /REFENTRY
+ (case %visual-acuity%
+ (("tiny") 8pt)
+ (("normal") 10pt)
+ (("presbyopic") 12pt)
+ (("large-type") 24pt)))
+
+(define-unit em %bf-size%)
+
+(define %footnote-size-factor%
+ ;; REFENTRY footnote-size-factor
+ ;; PURP Footnote font scaling factor
+ ;; DESC
+ ;; When printing footnotes, the current font size is multiplied by the
+ ;; '%footnote-size-factor%'.
+ ;; /DESC
+ ;; /REFENTRY
+ 0.9)
+
+(define %formal-object-title-font-weight%
+ ;; REFENTRY formal-object-title-font-weight
+ ;; PURP Formal object title font weight
+ ;; DESC
+ ;; Specifies the title font weight (i.e., 'bold or 'medium) of
+ ;; formal objects (e.g., figures).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'bold)
+
+(define %table-title-font-weight%
+ ;; REFENTRY table-title-font-weight
+ ;; PURP Table title font weight
+ ;; DESC
+ ;; Specifies the title font weight (i.e., 'bold or 'medium) of the
+ ;; formal tables.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'bold)
+
+;; REFERENCE Backends
+
+(define tex-backend
+ ;; REFENTRY tex-backend
+ ;; PURP Are we using the TeX backend?
+ ;; DESC
+ ;; This parameter exists so that '-V tex-backend' can be used on the
+ ;; command line to explicitly select the TeX backend.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define mif-backend
+ ;; REFENTRY mif-backend
+ ;; PURP Are we using the MIF backend?
+ ;; DESC
+ ;; This parameter exists so that '-V mif-backend' can be used on the
+ ;; command line to explicitly select the MIF backend.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define rtf-backend
+ ;; REFENTRY rtf-backend
+ ;; PURP Are we using the RTF backend?
+ ;; DESC
+ ;; This parameter exists so that '-V rtf-backend' can be used on the
+ ;; command line to explicitly select the RTF backend.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define default-backend
+ ;; REFENTRY default-backend
+ ;; PURP What is the default backend?
+ ;; DESC
+ ;; This parameter sets the default backend. Selecting an explicit
+ ;; backend enables features specific to that backend (if there are any).
+ ;; The legal values are 'rtf', 'tex', 'mif', and '#f'. Using
+ ;; '#f' implies that no special features are used.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define (print-backend)
+ ;; REFENTRY print-backend
+ ;; PURP Returns the backend that is being used to format the document
+ ;; DESC
+ ;; This parameter controls features in the stylesheet that are backend
+ ;; specific. The legal values are 'rtf', 'tex', 'mif', and '#f'. Using
+ ;; '#f' implies that no special features are used.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (cond
+ (tex-backend 'tex)
+ (mif-backend 'mif)
+ (rtf-backend 'rtf)
+ (else default-backend)))
+
+;; REFERENCE Verbatim Environments
+
+(define %verbatim-default-width%
+ ;; REFENTRY verbatim-default-width
+ ;; PURP Default width of verbatim environments
+ ;; DESC
+ ;; If no WIDTH attribute is specified on verbatim environments,
+ ;; '%verbatim-default-width%' is the default. Note: this width only
+ ;; comes into play if '%verbatim-size-factor%' is '#f'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 80)
+
+(define %number-synopsis-lines%
+ ;; REFENTRY number-synopsis-lines
+ ;; PURP Enumerate lines in a 'Synopsis'?
+ ;; DESC
+ ;; If true, lines in each 'Synopsis' will be enumerated.
+ ;; See also '%linenumber-mod%', '%linenumber-length%',
+ ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %number-funcsynopsisinfo-lines%
+ ;; REFENTRY number-funcsynopsisinfo-lines
+ ;; PURP Enumerate lines in a 'FuncSynopsisInfo'?
+ ;; DESC
+ ;; If true, lines in each 'FuncSynopsisInfo' will be enumerated.
+ ;; See also '%linenumber-mod%', '%linenumber-length%',
+ ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %number-literallayout-lines%
+ ;; REFENTRY number-literallayout-lines
+ ;; PURP Enumerate lines in a 'LiteralLayout'?
+ ;; DESC
+ ;; If true, lines in each 'LiteralLayout' will be enumerated.
+ ;; See also '%linenumber-mod%', '%linenumber-length%',
+ ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %number-address-lines%
+ ;; REFENTRY number-address-lines
+ ;; PURP Enumerate lines in a 'Address'?
+ ;; DESC
+ ;; If true, lines in each 'Address' will be enumerated.
+ ;; See also '%linenumber-mod%', '%linenumber-length%',
+ ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %number-programlisting-lines%
+ ;; REFENTRY number-programlisting-lines
+ ;; PURP Enumerate lines in a 'ProgramListing'?
+ ;; DESC
+ ;; If true, lines in each 'ProgramListing' will be enumerated.
+ ;; See also '%linenumber-mod%', '%linenumber-length%',
+ ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %number-screen-lines%
+ ;; REFENTRY number-screen-lines
+ ;; PURP Enumerate lines in a 'Screen'?
+ ;; DESC
+ ;; If true, lines in each 'Screen' will be enumerated.
+ ;; See also '%linenumber-mod%', '%linenumber-length%',
+ ;; '%linenumber-padchar%', and '($linenumber-space$)'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %linenumber-mod%
+ ;; REFENTRY linenumber-mod
+ ;; PURP Controls line-number frequency in enumerated environments.
+ ;; DESC
+ ;; Every '%linenumber-mod%' line will be enumerated.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 5)
+
+(define %linenumber-length%
+ ;; REFENTRY linenumber-length
+ ;; PURP Width of line numbers in enumerated environments
+ ;; DESC
+ ;; Line numbers will be padded to '%linenumber-length%'
+ ;; characters.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 3)
+
+(define %linenumber-padchar%
+ ;; REFENTRY linenumber-padchar
+ ;; PURP Pad character in line numbers
+ ;; DESC
+ ;; Line numbers will be padded (on the left) with '%linenumber-padchar%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "\no-break-space;")
+
+(define ($linenumber-space$)
+ ;; REFENTRY linenumber-space
+ ;; PURP Returns the sosofo which separates line numbers from the text
+ ;; DESC
+ ;; The sosofo returned by '($linenumber-space$)' is placed
+ ;; between the line number and the corresponding line in
+ ;; enumerated environments.
+ ;;
+ ;; Note: '%linenumber-padchar%'s are separated from lines
+ ;; that are not enumerated (because they don't match '%linenumber-mod%').
+ ;; In other words, '($linenumber-space$)' occurs
+ ;; on every line.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (literal "\no-break-space;"))
+
+(define %indent-synopsis-lines%
+ ;; REFENTRY indent-synopsis-lines
+ ;; PURP Indent lines in a 'Synopsis'?
+ ;; DESC
+ ;; If not '#f', each line in the display will be indented
+ ;; with the content of this variable. Usually it is set to some number
+ ;; of spaces, but you can indent with any string you wish.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %indent-funcsynopsisinfo-lines%
+ ;; REFENTRY indent-funcsynopsisinfo-lines
+ ;; PURP Indent lines in a 'FuncSynopsisInfo'?
+ ;; DESC
+ ;; If not '#f', each line in the display will be indented
+ ;; with the content of this variable. Usually it is set to some number
+ ;; of spaces, but you can indent with any string you wish.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %indent-literallayout-lines%
+ ;; REFENTRY indent-literallayout-lines
+ ;; PURP Indent lines in a 'LiteralLayout'?
+ ;; DESC
+ ;; If not '#f', each line in the display will be indented
+ ;; with the content of this variable. Usually it is set to some number
+ ;; of spaces, but you can indent with any string you wish.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %indent-address-lines%
+ ;; REFENTRY indent-address-lines
+ ;; PURP Indent lines in a 'Address'?
+ ;; DESC
+ ;; If not '#f', each line in the display will be indented
+ ;; with the content of this variable. Usually it is set to some number
+ ;; of spaces, but you can indent with any string you wish.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %indent-programlisting-lines%
+ ;; REFENTRY indent-programlisting-lines
+ ;; PURP Indent lines in a 'ProgramListing'?
+ ;; DESC
+ ;; If not '#f', each line in the display will be indented
+ ;; with the content of this variable. Usually it is set to some number
+ ;; of spaces, but you can indent with any string you wish.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %indent-screen-lines%
+ ;; REFENTRY indent-screen-lines
+ ;; PURP Indent lines in a 'Screen'?
+ ;; DESC
+ ;; If not '#f', each line in the display will be indented
+ ;; with the content of this variable. Usually it is set to some number
+ ;; of spaces, but you can indent with any string you wish.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %callout-fancy-bug%
+ ;; REFENTRY callout-fancy-bug
+ ;; PURP Use fancy callout bugs?
+ ;; DESC
+ ;; If true, fancy callout bugs will be used. Otherwise, simple ones are
+ ;; used. Fancy callout bugs may require the RTF backend.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %callout-default-col%
+ ;; REFENTRY callout-default-col
+ ;; PURP Default column for callouts
+ ;; DESC
+ ;; If the coordinates of a callout include only a line number, the callout
+ ;; bug will appear in column '%callout-default-col%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 60)
+
+;; REFERENCE Labelling
+
+(define %section-autolabel%
+ ;; REFENTRY section-autolabel
+ ;; PURP Are sections enumerated?
+ ;; DESC
+ ;; If true, unlabeled sections will be enumerated.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %chapter-autolabel%
+ ;; REFENTRY chapter-autolabel
+ ;; PURP Are chapters enumerated?
+ ;; DESC
+ ;; If true, chapters will be enumerated.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %label-preface-sections%
+ ;; REFENTRY label-preface-sections
+ ;; PURP Are sections in the Preface enumerated?
+ ;; DESC
+ ;; If true, unlabeled sections in the Preface will be enumerated
+ ;; if '%section-autolabel%' is true.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %qanda-inherit-numeration%
+ ;; REFENTRY qanda-inherit-numeration
+ ;; PURP Should numbered questions inherit the surrounding numeration?
+ ;; DESC
+ ;; If true, question numbers are prefixed with the surrounding
+ ;; component or section number. Has no effect unless
+ ;; '%section-autolabel%' is also true.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+;; REFERENCE Running Heads
+
+(define %chap-app-running-heads%
+ ;; REFENTRY chap-app-running-heads
+ ;; PURP Generate running headers and footers on chapter-level elements?
+ ;; DESC
+ ;; If true, running headers and footers are produced on chapter-level
+ ;; elements.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %chap-app-running-head-autolabel%
+ ;; REFENTRY chap-app-running-head-autolabel
+ ;; PURP Put chapter labels in running heads?
+ ;; DESC
+ ;; If true, running heads on 'Chapter's and
+ ;; 'Appendix'es will include an automatic label.
+ ;;
+ ;; In other words, if a 'Chapter' has no 'Label' attribute,
+ ;; and '%chap-app-running-head-autolabel%'
+ ;; is true, running heads will include the automatic label for the
+ ;; 'Chapter'. If '%chap-app-running-head-autolabel%'
+ ;; is false, only the 'Title' (or 'TitleAbbrev')
+ ;; will appear in the running head.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+;; REFERENCE Paper/Page Characteristics
+
+(define %paper-type%
+ ;; REFENTRY paper-type
+ ;; PURP Name of paper type
+ ;; DESC
+ ;; The paper type value identifies the sort of paper in use, for example,
+ ;; 'A4' or 'USletter'. Setting the paper type is an
+ ;; easy shortcut for setting the correct paper height and width.
+ ;;
+ ;; See %page-width% and %page-height concerning what other page size
+ ;; are available. Some common examples are 'A4', 'USletter',
+ ;; 'A4landscape', 'USlandscape'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ ;; "A4"
+ "USletter")
+
+(define %two-side%
+ ;; REFENTRY two-side
+ ;; PURP Is two-sided output being produced?
+ ;; DESC
+ ;; If '%two-side%' is true, headers and footers are alternated
+ ;; so that the "outer" and "inner" headers will be correctly
+ ;; placed in the bound document.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %writing-mode%
+ ;; REFENTRY writing-mode
+ ;; PURP The writing mode
+ ;; DESC
+ ;; The writing mode is either 'left-to-right', or
+ ;; 'right-to-left'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'left-to-right)
+
+(define %page-n-columns%
+ ;; REFENTRY page-n-columns
+ ;; PURP Sets the number of columns on each page
+ ;; DESC
+ ;; Sets the number of columns on each page
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 1)
+
+(define %titlepage-n-columns%
+ ;; REFENTRY titlepage-n-columns
+ ;; PURP Sets the number of columns on the title page
+ ;; DESC
+ ;; Sets the number of columns on the title page
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 1)
+
+(define %page-column-sep%
+ ;; REFENTRY page-column-sep
+ ;; PURP Sets the width of the gutter between columns
+ ;; DESC
+ ;; Sets the width of the gutter between columns
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.5in)
+
+(define %page-balance-columns?%
+ ;; REFENTRY page-balance-columns
+ ;; PURP Balance columns on pages?
+ ;; DESC
+ ;; If true, the columns on the final page of a multiple column layout
+ ;; will be balanced. Otherwise, the columns will be completely filled in the
+ ;; writing direction and the last column may be a different length
+ ;; than the preceding columns.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %left-margin%
+ ;; REFENTRY left-margin
+ ;; PURP Width of left margin
+ ;; DESC
+ ;; The '%left-margin%' parameter specifies the width of the left margin
+ ;; of the page. Note that this setting is relative to the physical page,
+ ;; not the writing direction.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 6pi)
+
+(define %right-margin%
+ ;; REFENTRY right-margin
+ ;; PURP Width of the right margin
+ ;; DESC
+ ;; The '%right-margin%' parameter specifies the width of the right margin
+ ;; of the page. Note that this setting is relative to the physical page,
+ ;; not the writing direction.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 6pi)
+
+(define %page-width%
+ ;; REFENTRY page-width
+ ;; PURP Specifies the page width
+ ;; DESC
+ ;; Identifies the width of the page (length in the writing direction).
+ ;; It is usually controlled by the '%paper-type%' parameter.
+ ;; /DESC
+ ;; /REFENTRY
+ (case %paper-type%
+ (("A4landscape") 297mm)
+ (("USletter") 8.5in)
+ (("USlandscape") 11in)
+ (("4A0") 1682mm)
+ (("2A0") 1189mm)
+ (("A0") 841mm)
+ (("A1") 594mm)
+ (("A2") 420mm)
+ (("A3") 297mm)
+ (("A4") 210mm)
+ (("A5") 148mm)
+ (("A6") 105mm)
+ (("A7") 74mm)
+ (("A8") 52mm)
+ (("A9") 37mm)
+ (("A10") 26mm)
+ (("B0") 1000mm)
+ (("B1") 707mm)
+ (("B2") 500mm)
+ (("B3") 353mm)
+ (("B4") 250mm)
+ (("B5") 176mm)
+ (("B6") 125mm)
+ (("B7") 88mm)
+ (("B8") 62mm)
+ (("B9") 44mm)
+ (("B10") 31mm)
+ (("C0") 917mm)
+ (("C1") 648mm)
+ (("C2") 458mm)
+ (("C3") 324mm)
+ (("C4") 229mm)
+ (("C5") 162mm)
+ (("C6") 114mm)
+ (("C7") 81mm)
+ (("C8") 57mm)
+ (("C9") 40mm)
+ (("C10") 28mm)))
+
+(define %page-height%
+ ;; REFENTRY page-height
+ ;; PURP Specifies the page height
+ ;; DESC
+ ;; Identifies the height of the page (length perpendicular to the
+ ;; writing direction).
+ ;; It is usually controlled by the '%paper-type%' parameter.
+ ;; /DESC
+ ;; /REFENTRY
+ (case %paper-type%
+ (("A4landscape") 210mm)
+ (("USletter") 11in)
+ (("USlandscape") 8.5in)
+ (("4A0") 2378mm)
+ (("2A0") 1682mm)
+ (("A0") 1189mm)
+ (("A1") 841mm)
+ (("A2") 594mm)
+ (("A3") 420mm)
+ (("A4") 297mm)
+ (("A5") 210mm)
+ (("A6") 148mm)
+ (("A7") 105mm)
+ (("A8") 74mm)
+ (("A9") 52mm)
+ (("A10") 37mm)
+ (("B0") 1414mm)
+ (("B1") 1000mm)
+ (("B2") 707mm)
+ (("B3") 500mm)
+ (("B4") 353mm)
+ (("B5") 250mm)
+ (("B6") 176mm)
+ (("B7") 125mm)
+ (("B8") 88mm)
+ (("B9") 62mm)
+ (("B10") 44mm)
+ (("C0") 1297mm)
+ (("C1") 917mm)
+ (("C2") 648mm)
+ (("C3") 458mm)
+ (("C4") 324mm)
+ (("C5") 229mm)
+ (("C6") 162mm)
+ (("C7") 114mm)
+ (("C8") 81mm)
+ (("C9") 57mm)
+ (("C10") 40mm)))
+
+(define %text-width%
+ ;; REFENTRY text-width
+ ;; PURP Specifies the width of the body column
+ ;; DESC
+ ;; Identifies the width of the page on which text may occur.
+ ;; /DESC
+ ;; /REFENTRY
+ (- %page-width% (+ %left-margin% %right-margin%)))
+
+(define %epigraph-start-indent%
+ ;; REFENTRY epigraph-start-indent
+ ;; PURP Specifies the left indent of epigraphs.
+ ;; DESC
+ ;; The indent of a epigraph. Default 55% of the text width.
+ ;; /DESC
+ ;; /REFENTRY
+ (* %text-width% 0.55))
+
+(define %epigraph-end-indent%
+ ;; REFENTRY epigraph-end-indent
+ ;; PURP Specified the right indent of epigraphs.
+ ;; DESC
+ ;; The right indent of a epigraph. Default none.
+ ;; /DESC
+ ;; /REFENTRY
+ 0pt)
+
+(define %body-width%
+ ;; REFENTRY body-width
+ ;; PURP Specifies the width of the text in the body column
+ ;; DESC
+ ;; Identifies the width of the page on which text will occur, after
+ ;; the '%body-start-indent%' is removed.
+ ;; /DESC
+ ;; /REFENTRY
+ (- %text-width% %body-start-indent%))
+
+(define %top-margin%
+ ;; REFENTRY top-margin
+ ;; PURP Height of top margin
+ ;; DESC
+ ;; The '%top-margin%' parameter specifies the height of the
+ ;; top margin
+ ;; of the page. Note that this setting is relative to the physical page,
+ ;; not the writing direction.
+ ;; /DESC
+ ;; /REFENTRY
+ (if (equal? %visual-acuity% "large-type")
+ 7.5pi
+ 6pi))
+
+(define %bottom-margin%
+ ;; REFENTRY bottom-margin
+ ;; PURP Height of bottom margin
+ ;; DESC
+ ;; The '%bottom-margin%' parameter specifies the
+ ;; height of the bottom margin
+ ;; of the page. Note that this setting is relative to the physical page,
+ ;; not the writing direction.
+ ;; /DESC
+ ;; /REFENTRY
+ (if (equal? %visual-acuity% "large-type")
+ 9.5pi
+ 8pi))
+
+(define %header-margin%
+ ;; REFENTRY header-margin
+ ;; PURP Height of header margin
+ ;; DESC
+ ;; The '%header-margin%' parameter specifies the heigth
+ ;; of the header margin
+ ;; of the page. Note that this setting is relative to the physical page,
+ ;; not the writing direction.
+ ;; /DESC
+ ;; /REFENTRY
+ (if (equal? %visual-acuity% "large-type")
+ 5.5pi
+ 4pi))
+
+(define %footer-margin%
+ ;; REFENTRY footer-margin
+ ;; PURP Height of footer margin
+ ;; DESC
+ ;; The '%footer-margin%' parameter specifies the height
+ ;; of the footer margin
+ ;; of the page. Note that this setting is relative to the physical page,
+ ;; not the writing direction.
+ ;; /DESC
+ ;; /REFENTRY
+ 4pi)
+
+(define %page-number-restart%
+ ;; REFENTRY page-number-restart
+ ;; PURP Restart page numbers in each component?
+ ;; DESC
+ ;; If true, page numbers are restarted at the beginning of each
+ ;; component-level
+ ;; element ('Chapter', 'Appendix',
+ ;; 'Bibliography', etc.).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %article-page-number-restart%
+ ;; REFENTRY article-page-number-restart
+ ;; PURP Restart page numbers in each article?
+ ;; DESC
+ ;; If true, page numbers are restarted at the beginning of each
+ ;; article.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %generate-heading-level%
+ ;; REFENTRY generate-heading-level
+ ;; PURP Output RTF heading level characteristics?
+ ;; DESC
+ ;; If true, component and section titles will have the heading-level
+ ;; characteristic in the RTF.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+;; REFERENCE Admonitions
+
+(define %admon-graphics%
+ ;; REFENTRY admon-graphics
+ ;; PURP Use graphics in admonitions?
+ ;; DESC
+ ;; If true, admonitions are presented in an alternate style that uses
+ ;; a graphic. Default graphics are provided in the distribution.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %admon-graphics-path%
+ ;; REFENTRY admon-graphics-path
+ ;; PURP Path to admonition graphics
+ ;; DESC
+ ;; Sets the path, probably relative to the directory where the HTML
+ ;; files are created, to the admonition graphics. Must include
+ ;; trailing directory separator.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "../images/")
+
+
+;; just for back compat, set it false to say its not set
+(define admon-graphic-default-extension #f)
+
+(define %admon-graphics-extension%
+ ;; REFENTRY admon-graphic-extension
+ ;; PURP Admonition graphic file extension
+ ;; DESC
+ ;; Identifies the extension for admonition graphics. This allows
+ ;; backends to select different images (e.g., EPS for print, PNG for
+ ;; PDF, etc.)
+ ;;
+ ;; The older parameter, admon-graphic-default-extension, will be
+ ;; used if it is set, for backwards compatability.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (if admon-graphic-default-extension
+ admon-graphic-default-extension
+ ".eps"))
+
+(define ($admon-graphic$ #!optional (nd (current-node)))
+ ;; REFENTRY admon-graphic
+ ;; PURP Admonition graphic file
+ ;; DESC
+ ;; Given an admonition node, returns the name of the graphic that should
+ ;; be used for that admonition.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (cond ((equal? (gi nd) (normalize "tip"))
+ (string-append %admon-graphics-path%
+ (string-append "tip"
+ %admon-graphics-extension%)))
+ ((equal? (gi nd) (normalize "note"))
+ (string-append %admon-graphics-path%
+ (string-append "note"
+ %admon-graphics-extension%)))
+
+ ((equal? (gi nd) (normalize "important"))
+ (string-append %admon-graphics-path%
+ (string-append "important"
+ %admon-graphics-extension%)))
+
+ ((equal? (gi nd) (normalize "caution"))
+ (string-append %admon-graphics-path%
+ (string-append "caution"
+ %admon-graphics-extension%)))
+ ((equal? (gi nd) (normalize "warning"))
+ (string-append %admon-graphics-path%
+ (string-append "warning"
+ %admon-graphics-extension%)))
+ (else (error (string-append (gi nd) " is not an admonition.")))))
+
+(define ($admon-graphic-width$ #!optional (nd (current-node)))
+ ;; REFENTRY admon-graphic-width
+ ;; PURP Admonition graphic file width
+ ;; DESC
+ ;; Given an admonition node, returns the width of the graphic that will
+ ;; be used for that admonition.
+ ;;
+ ;; All of the default graphics in the distribution are 0.3in wide.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.3in)
+
+;; REFERENCE Quadding
+
+(define %default-quadding%
+ ;; REFENTRY default-quadding
+ ;; PURP The default quadding
+ ;; DESC
+ ;; The default quadding ('start', 'center', 'justify',
+ ;; or 'end').
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'start)
+
+(define %division-title-quadding%
+ ;; REFENTRY division-title-quadding
+ ;; PURP Division title quadding
+ ;; DESC
+ ;; The quadding of division-level titles ('Set', 'Book', and 'Part').
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'center)
+
+(define %division-subtitle-quadding%
+ ;; REFENTRY division-subtitle-quadding
+ ;; PURP Division subtitle quadding
+ ;; DESC
+ ;; The quadding of division-level subtitles ('Set', 'Book', and 'Part').
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'center)
+
+(define %component-title-quadding%
+ ;; REFENTRY component-title-quadding
+ ;; PURP Component title quadding
+ ;; DESC
+ ;; The quadding of component-level titles ('Chapter',
+ ;; 'Appendix', 'Glossary', etc.).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'start)
+
+(define %component-subtitle-quadding%
+ ;; REFENTRY component-subtitle-quadding
+ ;; PURP Component subtitle quadding
+ ;; DESC
+ ;; The quadding of component-level subtitles ('Chapter',
+ ;; 'Appendix', 'Glossary', etc.).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'start)
+
+(define %article-title-quadding%
+ ;; REFENTRY article-title-quadding
+ ;; PURP Article title quadding
+ ;; DESC
+ ;; The quadding of article titles.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'center)
+
+(define %article-subtitle-quadding%
+ ;; REFENTRY article-subtitle-quadding
+ ;; PURP Article subtitle quadding
+ ;; DESC
+ ;; The quadding of article subtitles.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'center)
+
+(define %section-title-quadding%
+ ;; REFENTRY section-title-quadding
+ ;; PURP Section title quadding
+ ;; DESC
+ ;; The quadding of section-level titles.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'start)
+
+(define %section-subtitle-quadding%
+ ;; REFENTRY section-subtitle-quadding
+ ;; PURP Section subtitle quadding
+ ;; DESC
+ ;; The quadding of section-level subtitles.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 'start)
+
+;; REFERENCE Bibliographies
+
+(define biblio-citation-check
+ ;; REFENTRY biblio-citation-check
+ ;; PURP Check citations
+ ;; DESC
+ ;; If true, the content of CITATIONs will be checked against possible
+ ;; biblioentries. If the citation cannot be found, an error is issued
+ ;; and the citation is generated. If the citation is found, it is generated
+ ;; with a cross reference to the appropriate biblioentry.
+ ;;
+ ;; A citation matches if the content of the citation element matches the
+ ;; ID, XREFLABEL, or leading ABBREV of a biblioentry.
+ ;;
+ ;; This setting may have significant performance implications on large
+ ;; documents, hence it is false by default.
+ ;;
+ ;; (This option can conveniently be set with '-V biblio-citation-check'
+ ;; on the Jade command line).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define biblio-filter-used
+ ;; REFENTRY filter-used
+ ;; PURP Suppress unreferenced bibliography entries
+ ;; DESC
+ ;; If true, bibliography entries which are not cited are suppressed.
+ ;; A biblioentry is cited if an XREF or LINK matches its ID, or if
+ ;; a CITE element matches its
+ ;; ID, XREFLABEL, or leading ABBREV.
+ ;;
+ ;; A BIBLIOGRAPHY with no entries will still be output (making a whole
+ ;; component conditional would be _A LOT_ of work and seems unnecessary),
+ ;; but BIBLIDIVs with no entries will be suppressed.
+ ;;
+ ;; This setting may have significant performance implications,
+ ;; hence it is false by default.
+ ;;
+ ;; (This option can conveniently be set with '-V biblio-filter-used' on the
+ ;; Jade command line).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define biblio-number
+ ;; REFENTRY biblio-number
+ ;; PURP Enumerate bibliography entries
+ ;; DESC
+ ;; If true, bibliography entries will be numbered. If you cross-reference
+ ;; bibliography entries, you should probably use biblio-number or
+ ;; consistently use XREFLABEL or ABBREV.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define biblio-xref-title
+ ;; REFENTRY biblio-xref-title
+ ;; PURP Use the titles of bibliography entries in XREFs
+ ;; DESC
+ ;; If true, cross references to bibliography entries will use the
+ ;; title of the entry as the cross reference text. Otherwise, either
+ ;; the number (see 'biblio-number') or XREFLABEL/ABBREV will be used.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+;; REFERENCE OLinks
+
+(define %olink-outline-ext%
+ ;; REFENTRY olink-outline-ext
+ ;; PURP Extension for olink outline file
+ ;; DESC
+ ;; The extension used to find the outline information file. When searching
+ ;; for outline information about a document, the extension is discarded
+ ;; from the system ID of the file and '%olinke-outline-ext%' is appended.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ ".olink")
+
+;; REFERENCE Footnotes
+
+(define %footnote-ulinks%
+ ;; REFENTRY footnote-ulinks
+ ;; PURP Generate footnotes for ULinks?
+ ;; DESC
+ ;; If true, the URL of each ULink will appear as a footnote.
+ ;; Processing ULinks this way may be very, very slow. It requires
+ ;; walking over every descendant of every component in order to count
+ ;; both ulinks and footnotes.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define bop-footnotes
+ ;; REFENTRY bop-footnotes
+ ;; PURP Make "bottom-of-page" footnotes?
+ ;; DESC
+ ;; If true, footnotes will be done at the bottom of the page instead
+ ;; of collected together as notes at the end of the section.
+ ;; This variable is ignored if the print backend does not support
+ ;; bottom-of-the-page footnotes. At present, only the TeX backend
+ ;; supports them.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+;; REFERENCE Graphics
+
+(define %graphic-default-extension%
+ ;; REFENTRY graphic-default-extension
+ ;; PURP Default extension for graphic FILEREFs
+ ;; DESC
+ ;; The '%graphic-default-extension%' will be
+ ;; added to the end of all 'fileref' filenames on
+ ;; 'Graphic's if they do not end in one of the
+ ;; '%graphic-extensions%'. Set this to '#f'
+ ;; to turn off this feature.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %graphic-extensions%
+ ;; REFENTRY graphic-extensions
+ ;; PURP List of graphic filename extensions
+ ;; DESC
+ ;; The list of extensions which may appear on a 'fileref'
+ ;; on a 'Graphic' which are indicative of graphic formats.
+ ;;
+ ;; Filenames that end in one of these extensions will not have
+ ;; the '%graphic-default-extension%' added to them.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ '("eps" "epsf" "gif" "tif" "tiff" "jpg" "jpeg" "png" "pdf"))
+
+(define image-library
+ ;; REFENTRY image-library
+ ;; PURP Load image library database for additional info about images?
+ ;; DESC
+ ;; If true, an image library database is loaded and extra information
+ ;; about web graphics is retrieved from it.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define image-library-filename
+ ;; REFENTRY image-library-filename
+ ;; PURP Name of the image library database
+ ;; DESC
+ ;; If 'image-library' is true, then the database is loaded from
+ ;; 'image-library-filename'. It's a current limitation that only a
+ ;; single database can be loaded.
+ ;;
+ ;; The image library database is stored in a separate directory
+ ;; because it must be parsed with the XML declaration. The only
+ ;; practical way to accomplish this with Jade, if you are processing a
+ ;; document that uses another declaration, is by having a catalog
+ ;; file in the directory that contains the image library that
+ ;; specifies the SGMLDECL. (So if it was in the same directory
+ ;; as your document, your document would also be parsed with the
+ ;; XML declaration, which may not be correct.)
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ "imagelib/imagelib.xml")
+
+;; REFERENCE Tables
+
+(define ($table-element-list$)
+ ;; REFENTRY table-element-list
+ ;; PURP List of table element names
+ ;; DESC
+ ;; The list of table elements in the DTD.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (list (normalize "table") (normalize "informaltable")))
+
+(define %simplelist-column-width%
+ ;; REFENTRY simplelist-column-width
+ ;; PURP Width of columns in tabular simple lists
+ ;; DESC
+ ;; If set to '#f', the table will span the entire
+ ;; page width.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+;; REFERENCE VariableLists
+
+(define %default-variablelist-termlength%
+ ;; REFENTRY default-variablelist-termlength
+ ;; PURP Default term length on variablelists
+ ;; DESC
+ ;; When formatting a 'VariableList', this value is used as the
+ ;; default term length, if no 'TermLength' is specified.
+ ;;
+ ;; If all of the terms in a list shorter than the term length,
+ ;; the stylesheet may format them "side-by-side" in a table if
+ ;; 'may-format-variablelist-as-table' is '#t'.
+ ;; /DESC
+ ;; /REFENTRY
+ 20)
+
+(define %may-format-variablelist-as-table%
+ ;; REFENTRY may-format-variablelist-as-table
+ ;; PURP Format VariableLists as tables?
+ ;; DESC
+ ;; If '%may-format-variablelist-as-table%' is '#t', a
+ ;; 'VariableList' will be formatted as a table, if *all of*
+ ;; the terms are shorter than the specified 'TermLength'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %always-format-variablelist-as-table%
+ ;; REFENTRY always-format-variablelist-as-table
+ ;; PURP Always format VariableLists as tables?
+ ;; DESC
+ ;; When a 'VariableList' is formatted, if any of the
+ ;; terms in the list are too long, the whole list is formatted as a
+ ;; list.
+ ;;
+ ;; If '%always-format-variablelist-as-table%' is
+ ;; '#t', the 'VariableList' will be
+ ;; formatted as a table, even if some terms are too long. The terms that
+ ;; are too long will format span above their associated description.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+;; REFERENCE Vertical Spacing
+
+(define %line-spacing-factor%
+ ;; REFENTRY line-spacing-factor
+ ;; PURP Factor used to calculate leading
+ ;; DESC
+ ;; The leading is calculated by multiplying the current font size by the
+ ;; '%line-spacing-factor%'. For example, if the font size is 10pt and
+ ;; the '%line-spacing-factor%' is 1.1, then the text will be
+ ;; printed "10-on-11".
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 1.3)
+
+(define %head-before-factor%
+ ;; REFENTRY head-before-factor
+ ;; PURP Factor used to calculate space above a title
+ ;; DESC
+ ;; The space before a title is calculated by multiplying the font size
+ ;; used in the title by the '%head-before-factor%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.75)
+
+(define %head-after-factor%
+ ;; REFENTRY head-after-factor
+ ;; PURP Factor used to calculate space below a title
+ ;; DESC
+ ;; The space after a title is calculated by multiplying the font size used
+ ;; in the title by the '%head-after-factor%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0.5)
+
+(define %body-start-indent%
+ ;; REFENTRY body-start-indent
+ ;; PURP Default indent of body text
+ ;; DESC
+ ;; The default indent of body text. Some elements may have more or less
+ ;; indentation.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 4pi)
+
+(define %blockquote-start-indent%
+ ;; PURP Default indent of blockquoted text
+ ;; DESC
+ ;; The default start (usually left) indent of blockquoted text.
+ ;; /DESC
+ ;; AUTHOR Ola Lundqvist
+ ;; /REFENTRY
+ 1em)
+
+(define %blockquote-end-indent%
+ ;; PURP Default indent of blockquoted text
+ ;; DESC
+ ;; The default end (usually right) indent of blockquoted text.
+ ;; /DESC
+ ;; AUTHOR Ola Lundqvist
+ ;; /REFENTRY
+ 1em)
+
+(define %para-sep%
+ ;; REFENTRY para-sep
+ ;; PURP Distance between paragraphs
+ ;; DESC
+ ;; The '%para-sep%' is the distance between the last line
+ ;; of one paragraph and the first line of the next.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (/ %bf-size% 2.0))
+
+(define %block-sep%
+ ;; REFENTRY block-sep
+ ;; PURP Distance between block-elements
+ ;; DESC
+ ;; The '%block-sep%' is the vertical distance between
+ ;; block elements (figures, tables, etc.)
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ (* %para-sep% 2.0))
+
+;; REFERENCE Indents
+
+(define %para-indent%
+ ;; REFENTRY para-indent
+ ;; PURP First line start-indent for paragraphs (other than the first)
+ ;; DESC
+ ;; The '%para-indent%' is the amount of extra indentation that the
+ ;; first line of a paragraph should receive. This parameter applies
+ ;; only to the second and subsequent paragraphs in a section. See
+ ;; '%para-indent-firstpara%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0pt)
+
+(define %para-indent-firstpara%
+ ;; REFENTRY para-indent-firstpara
+ ;; PURP First line start-indent for the first paragraph
+ ;; DESC
+ ;; The '%para-indent-firstpara%' is the amount of extra indentation
+ ;; that the first line of the first paragraph of a section should receive.
+ ;; This parameter is frequently '0pt' even when '%para-indent%' is
+ ;; not.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0pt)
+
+(define %block-start-indent%
+ ;; REFENTRY block-start-indent
+ ;; PURP Extra start-indent for block-elements
+ ;; DESC
+ ;; Block elements (tables, figures, verbatim environments, etc.) will
+ ;; be indented by the specified amount.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 0pt)
+
+;; REFERENCE Object Rules
+
+(define %example-rules%
+ ;; REFENTRY example-rules
+ ;; PURP Specify rules before and after an Example
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'Example'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %figure-rules%
+ ;; REFENTRY figure-rules
+ ;; PURP Specify rules before and after an Figure
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'Figure'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %table-rules%
+ ;; REFENTRY table-rules
+ ;; PURP Specify rules before and after an Table
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'Table'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %equation-rules%
+ ;; REFENTRY equation-rules
+ ;; PURP Specify rules before and after an Equation
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'Equation'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %informalexample-rules%
+ ;; REFENTRY informalexample-rules
+ ;; PURP Specify rules before and after an InformalExample
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'InformalExample'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %informalfigure-rules%
+ ;; REFENTRY informalfigure-rules
+ ;; PURP Specify rules before and after an InformalFigure
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'InformalFigure'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %informaltable-rules%
+ ;; REFENTRY informaltable-rules
+ ;; PURP Specify rules before and after an InformalTable
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'InformalTable'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %informalequation-rules%
+ ;; REFENTRY informalequation-rules
+ ;; PURP Specify rules before and after an InformalEquation
+ ;; DESC
+ ;; If '#t', rules will be drawn before and after each
+ ;; 'InformalEquation'.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(define %object-rule-thickness%
+ ;; REFENTRY object-rule-thickness
+ ;; PURP Width of rules around formal and informal objects
+ ;; DESC
+ ;; Specifies the width of the rules drawn before and after an object.
+ ;; This only applies if the appropriate
+ ;; '%*-rules%' variable
+ ;; is '#t'.
+ ;; /DESC
+ ;; /REFENTRY
+ 2pt)
+
+;; REFERENCE Miscellaneous
+
+(define ($object-titles-after$)
+ ;; REFENTRY object-titles-after
+ ;; PURP List of objects who's titles go after the object
+ ;; DESC
+ ;; Titles of formal objects (Figures, Equations, Tables, etc.)
+ ;; in this list will be placed below the object instead of above it.
+ ;;
+ ;; This is a list of element names, for example:
+ ;; '(list (normalize "figure") (normalize "table"))'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ '())
+
+(define formal-object-float
+ ;; REFENTRY formal-object-float
+ ;; PURP Do formal objects float?
+ ;; DESC
+ ;; If '#t', formal objects will float if floating is supported by the
+ ;; backend. At present, only the TeX backend supports floats.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %default-title-end-punct%
+ ;; REFENTRY default-title-end-punct
+ ;; PURP Default punctuation at the end of a run-in head.
+ ;; DESC
+ ;; The punctuation used at the end of a run-in head (e.g. on FORMALPARA).
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ ".")
+
+(define %content-title-end-punct%
+ ;; REFENTRY content-title-end-punct
+ ;; PURP List of punctuation chars at the end of a run-in head
+ ;; DESC
+ ;; If a run-in head ends in any of these characters, the
+ ;; '%default-title-end-punct%' is not used.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ '(#\. #\! #\? #\:))
+
+(define %honorific-punctuation%
+ ;; REFENTRY honorific-punctuation
+ ;; PURP Punctuation to follow honorifics in names
+ ;; DESC
+ ;; The honorific punctuation is placed after the honorific in
+ ;; a name.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ ".")
+
+(define %default-simplesect-level%
+ ;; REFENTRY default-simplesect-level
+ ;; PURP Default section level for 'SimpleSect's.
+ ;; DESC
+ ;; If 'SimpleSect's appear inside other section-level
+ ;; elements, they are rendered at the appropriate section level, but if they
+ ;; appear in a component-level element, they are rendered at
+ ;; '%default-simplesect-level%'.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 4)
+
+(define %show-ulinks%
+ ;; REFENTRY show-ulinks
+ ;; PURP Display URLs after ULinks?
+ ;; DESC
+ ;; If true, the URL of each ULink will appear in parenthesis after
+ ;; the text of the link. If the text of the link and the URL are
+ ;; identical, the parenthetical URL is suppressed.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define %show-comments%
+ ;; REFENTRY show-comments
+ ;; PURP Display Comment elements?
+ ;; DESC
+ ;; If true, comments will be displayed, otherwise they are suppressed.
+ ;; Comments here refers to the 'Comment' element, which will be renamed
+ ;; 'Remark' in DocBook V4.0, not SGML/XML comments which are unavailable.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #t)
+
+(define firstterm-bold
+ ;; REFENTRY firstterm-bold
+ ;; PURP Make FIRSTTERM elements bold?
+ ;; DESC
+ ;; If '#t', FIRSTTERMs will be bold, to distinguish them from
+ ;; simple GLOSSTERMs.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ #f)
+
+(define %min-leading%
+ ;; REFENTRY min-leading
+ ;; PURP Minumum leading between lines
+ ;; DESC
+ ;; The '%min-leading%' parameter specifies the smallest amount of leading
+ ;; to allow between lines. The default value, '#f', has the side-effect
+ ;; that leading cannot change. This means that graphics that appear in
+ ;; a paragraph are truncated if they are taller than the current leading.
+ ;; By setting this parameter to some small value, we get stretchable
+ ;; space between lines.
+ ;; /DESC
+ ;; AUTHOR N/A
+ ;; /REFENTRY
+ 2pt)
+
+(define %hyphenation%
+ ;; REFENTRY hyphenation
+ ;; PURP Allow automatic hyphenation?
+ ;; DESC
+ ;; The '%hyphenation%' parameter indicates whether or
+ ;; not the backend should allow automatic hyphention of text, for example
+ ;; in paragraphs. The default value, '#f', indicates that
+ ;; it should not.
+ ;; /DESC
+ ;; /REFENTRY
+ #f)
+
+(declare-initial-value writing-mode %writing-mode%)
+
+(declare-initial-value input-whitespace-treatment 'collapse)
+
+(declare-initial-value left-margin %left-margin%)
+(declare-initial-value right-margin %right-margin%)
+
+(declare-initial-value page-width %page-width%)
+(declare-initial-value page-height %page-height%)
+
+(declare-initial-value min-leading %min-leading%)
+(declare-initial-value top-margin %top-margin%)
+(declare-initial-value bottom-margin %bottom-margin%)
+(declare-initial-value header-margin %header-margin%)
+(declare-initial-value footer-margin %footer-margin%)
+
+</style-specification-body>
+</style-specification>
+</style-sheet>
diff --git a/print/dbprint.dsl b/print/dbprint.dsl
new file mode 100644
index 0000000..01005d4
--- /dev/null
+++ b/print/dbprint.dsl
@@ -0,0 +1,205 @@
+;; $Id: dbprint.dsl,v 1.6 2004/10/09 19:46:33 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define (HSIZE n)
+ (let ((m (if (< n 0) 0 n)))
+ (* %bf-size%
+ (expt %hsize-bump-factor% m))))
+
+(define (print-backend)
+ (cond
+ (tex-backend 'tex)
+ (mif-backend 'mif)
+ (rtf-backend 'rtf)
+ (else default-backend)))
+
+;; ====================== COMMON STYLE TEMPLATES =======================
+
+(define ($block-container$)
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ start-indent: %body-start-indent%
+ (process-children)))
+
+(define (is-first-para #!optional (para (current-node)))
+ ;; A paragraph is the first paragraph if it is preceded by a title
+ ;; (or bridgehead) and the only elements that intervene between the
+ ;; title and the paragraph are *info elements, indexterms, and beginpage.
+ ;;
+ (let loop ((nd (ipreced para)))
+ (if (node-list-empty? nd)
+ ;; We've run out of nodes. We still might be the first paragraph
+ ;; preceded by a title if the parent element has an implied
+ ;; title.
+ (if (equal? (element-title-string (parent para)) "")
+ #f ;; nope
+ #t) ;; yep
+ (if (or (equal? (gi nd) (normalize "title"))
+ (equal? (gi nd) (normalize "titleabbrev"))
+ (equal? (gi nd) (normalize "bridgehead")))
+ #t
+ (if (or (not (equal? (node-property 'class-name nd) 'element))
+ (member (gi nd) (info-element-list)))
+ (loop (ipreced nd))
+ #f)))))
+
+(define (dsssl-language-code #!optional (node (current-node)))
+ (let* ((lang ($lang$))
+ (langcode (if (> (string-index lang "_") 0)
+ (substring lang 0 (string-index lang "_"))
+ lang)))
+ (string->symbol (case-fold-up langcode))))
+
+(define (dsssl-country-code #!optional (node (current-node)))
+ (let* ((lang ($lang$))
+ (ctrycode (if (> (string-index lang "_") 0)
+ (substring lang
+ (+ (string-index lang "_") 1)
+ (string-length lang))
+ #f)))
+ (if ctrycode
+ (string->symbol (case-fold-up ctrycode))
+ #f)))
+
+(define ($paragraph$)
+ (if (or (equal? (print-backend) 'tex)
+ (equal? (print-backend) #f))
+ ;; avoid using country: characteristic because of a JadeTeX bug...
+ (make paragraph
+ first-line-start-indent: (if (is-first-para)
+ %para-indent-firstpara%
+ %para-indent%)
+ space-before: %para-sep%
+ space-after: (if (INLIST?)
+ 0pt
+ %para-sep%)
+ quadding: %default-quadding%
+ hyphenate?: %hyphenation%
+ language: (dsssl-language-code)
+ (process-children-trim))
+ (make paragraph
+ first-line-start-indent: (if (is-first-para)
+ %para-indent-firstpara%
+ %para-indent%)
+ space-before: %para-sep%
+ space-after: (if (INLIST?)
+ 0pt
+ %para-sep%)
+ quadding: %default-quadding%
+ hyphenate?: %hyphenation%
+ language: (dsssl-language-code)
+ country: (dsssl-country-code)
+ (process-children-trim))))
+
+(define ($para-container$)
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: (if (member (current-node) (outer-parent-list))
+ %body-start-indent%
+ (inherited-start-indent))
+ (process-children-trim)))
+
+(define ($indent-para-container$)
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: (+ (inherited-start-indent) (* (ILSTEP) 2))
+ quadding: %default-quadding%
+ (process-children-trim)))
+
+(define nop-style
+ ;; a nop for use:
+ (style
+ font-family-name: (inherited-font-family-name)
+ font-weight: (inherited-font-weight)
+ font-size: (inherited-font-size)))
+
+(define default-text-style
+ (style
+ font-size: %bf-size%
+ font-weight: 'medium
+ font-posture: 'upright
+ font-family-name: %body-font-family%
+ line-spacing: (* %bf-size% %line-spacing-factor%)))
+
+(define ($bold-seq$ #!optional (sosofo (process-children)))
+ (make sequence
+ font-weight: 'bold
+ sosofo))
+
+(define ($italic-seq$ #!optional (sosofo (process-children)))
+ (make sequence
+ font-posture: 'italic
+ sosofo))
+
+(define ($bold-italic-seq$ #!optional (sosofo (process-children)))
+ (make sequence
+ font-weight: 'bold
+ font-posture: 'italic
+ sosofo))
+
+(define ($mono-seq$ #!optional (sosofo (process-children)))
+ (let ((%factor% (if %verbatim-size-factor%
+ %verbatim-size-factor%
+ 1.0)))
+ (make sequence
+ font-family-name: %mono-font-family%
+ font-size: (* (inherited-font-size) %factor%)
+ sosofo)))
+
+(define ($italic-mono-seq$ #!optional (sosofo (process-children)))
+ (let ((%factor% (if %verbatim-size-factor%
+ %verbatim-size-factor%
+ 1.0)))
+ (make sequence
+ font-family-name: %mono-font-family%
+ font-size: (* (inherited-font-size) %factor%)
+ font-posture: 'italic
+ sosofo)))
+
+(define ($bold-mono-seq$ #!optional (sosofo (process-children)))
+ (let ((%factor% (if %verbatim-size-factor%
+ %verbatim-size-factor%
+ 1.0)))
+ (make sequence
+ font-family-name: %mono-font-family%
+ font-size: (* (inherited-font-size) %factor%)
+ font-weight: 'bold
+ sosofo)))
+
+(define ($score-seq$ stype #!optional (sosofo (process-children)))
+ (make score
+ type: stype
+ sosofo))
+
+(define ($charseq$ #!optional (sosofo (process-children)))
+ (make sequence
+ sosofo))
+
+(define ($guilabel-seq$ #!optional (sosofo (process-children)))
+ (make sequence
+ font-family-name: %guilabel-font-family%
+ sosofo))
+
+;; Stolen from a posting by James on dssslist
+(define *small-caps*
+ (letrec ((signature (* #o375 256))
+ (make-afii
+ (lambda (n)
+ (glyph-id (string-append "ISO/IEC 10036/RA//Glyphs::"
+ (number->string n)))))
+ (gen
+ (lambda (from count)
+ (if (= count 0)
+ '()
+ (cons (cons (make-afii from)
+ (make-afii (+ from signature)))
+ (gen (+ 1 from)
+ (- count 1)))))))
+ (glyph-subst-table (gen #o141 26))))
+
diff --git a/print/dbprocdr.dsl b/print/dbprocdr.dsl
new file mode 100644
index 0000000..2627699
--- /dev/null
+++ b/print/dbprocdr.dsl
@@ -0,0 +1,38 @@
+;; $Id: dbprocdr.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================= PROCEDURES =============================
+
+(define (PROCSTEP ilvl)
+ (if (> ilvl 1) 2.0em 1.8em))
+
+(element procedure
+ (if (node-list-empty? (select-elements (children (current-node)) (normalize "title")))
+ ($informal-object$)
+ ($formal-object$)))
+
+(element (procedure title) (empty-sosofo))
+
+(element substeps
+ (make display-group
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: (+ (inherited-start-indent) (PROCSTEP 2))))
+
+(element step
+ (let ((stepcontent (children (current-node)))
+ (ilevel (length (hierarchical-number-recursive (normalize "step")))))
+ (make sequence
+ start-indent: (+ (inherited-start-indent) (PROCSTEP ilevel))
+
+ (make paragraph
+ space-before: %para-sep%
+ first-line-start-indent: (- (PROCSTEP ilevel))
+ (make line-field
+ field-width: (PROCSTEP ilevel)
+ (literal ($proc-step-number$ (current-node))))
+ (process-node-list (children (node-list-first stepcontent))))
+ (process-node-list (node-list-rest stepcontent)))))
diff --git a/print/dbqanda.dsl b/print/dbqanda.dsl
new file mode 100644
index 0000000..4ea9aef
--- /dev/null
+++ b/print/dbqanda.dsl
@@ -0,0 +1,126 @@
+;; $Id: dbqanda.dsl,v 1.1 2003/03/25 19:53:56 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== QANDASET ==============================
+
+(define (qanda-defaultlabel)
+ (normalize "number"))
+
+(element qandaset
+ (let ((title (select-elements (children (current-node))
+ (normalize "title"))))
+ (make display-group
+ (process-node-list title)
+ (process-qanda))))
+
+(element (qandaset title)
+ (let* ((enclsect (ancestor-member (current-node)
+ (list (normalize "section")
+ (normalize "simplesect")
+ (normalize "sect5")
+ (normalize "sect4")
+ (normalize "sect3")
+ (normalize "sect2")
+ (normalize "sect1")
+ (normalize "refsect3")
+ (normalize "refsect2")
+ (normalize "refsect1"))))
+ (sectlvl (SECTLEVEL enclsect))
+ (hs (HSIZE (- 4 (+ sectlvl 1)))))
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: (if (< sectlvl 5) 'bold 'medium)
+ font-posture: (if (< sectlvl 5) 'upright 'italic)
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: (* hs %head-before-factor%)
+ space-after: (* hs %head-after-factor%)
+ start-indent: %body-start-indent%
+ first-line-start-indent: 0pt
+ quadding: %section-title-quadding%
+ keep-with-next?: #t
+ (process-children))))
+
+(element qandadiv
+ (let ((title (select-elements (children (current-node))
+ (normalize "title"))))
+ (make sequence
+ (process-node-list title)
+ (make display-group
+ start-indent: (+ (inherited-start-indent) 2pi)
+ (process-qanda)))))
+
+(element (qandadiv title)
+ (let* ((hnr (hierarchical-number-recursive (normalize "qandadiv")
+ (current-node)))
+ (number (let loop ((numlist hnr) (number "") (sep ""))
+ (if (null? numlist)
+ number
+ (loop (cdr numlist)
+ (string-append number
+ sep
+ (number->string (car numlist)))
+ ".")))))
+ (make paragraph
+ font-weight: 'bold
+ space-after: %block-sep%
+ (literal number ". ")
+ (process-children))))
+
+(define (process-qanda #!optional (node (current-node)))
+ (let* ((preamble (node-list-filter-by-not-gi
+ (children node)
+ (list (normalize "title")
+ (normalize "qandadiv")
+ (normalize "qandaentry"))))
+ (divs (node-list-filter-by-gi (children node)
+ (list (normalize "qandadiv"))))
+ (entries (node-list-filter-by-gi (children node)
+ (list (normalize "qandaentry"))))
+ (inhlabel (inherited-attribute-string (normalize "defaultlabel")))
+ (deflabel (if inhlabel inhlabel (qanda-defaultlabel))))
+ (make sequence
+ (process-node-list preamble)
+ (process-node-list divs)
+ (process-node-list entries))))
+
+(element qandaentry
+ (process-children))
+
+(element question
+ (let* ((chlist (children (current-node)))
+ (firstch (node-list-first chlist))
+ (restch (node-list-rest chlist))
+ (label (question-answer-label (current-node))))
+ (make sequence
+ (make paragraph
+ space-after: (/ %para-sep% 2)
+ keep-with-next?: #t
+ (make sequence
+ (make sequence
+ font-weight: 'bold
+ (if (string=? label "")
+ (empty-sosofo)
+ (literal label " ")))
+ (process-node-list (children firstch)))
+ (process-node-list restch)))))
+
+(element answer
+ (let* ((chlist (children (current-node)))
+ (firstch (node-list-first chlist))
+ (restch (node-list-rest chlist))
+ (label (question-answer-label (current-node))))
+ (make display-group
+ space-after: %block-sep%
+ (make paragraph
+ (make sequence
+ (make sequence
+ font-weight: 'bold
+ (if (string=? label "")
+ (empty-sosofo)
+ (literal label " ")))
+ (process-node-list (children firstch))))
+ (process-node-list restch))))
diff --git a/print/dbrfntry.dsl b/print/dbrfntry.dsl
new file mode 100644
index 0000000..39833ab
--- /dev/null
+++ b/print/dbrfntry.dsl
@@ -0,0 +1,215 @@
+;; $Id: dbrfntry.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; =========================== REFERENCE PAGES ==========================
+
+;;(element reference ($component$))
+
+(element reference
+ (let* ((refinfo (select-elements (children (current-node))
+ (normalize "docinfo")))
+ (refintro (select-elements (children (current-node))
+ (normalize "partintro")))
+ (nl (titlepage-info-elements
+ (current-node)
+ refinfo
+ (if %generate-partintro-on-titlepage%
+ refintro
+ (empty-node-list)))))
+ (make sequence
+ (if %generate-reference-titlepage%
+ (make sequence
+ (reference-titlepage nl 'recto)
+ (reference-titlepage nl 'verso))
+ (empty-sosofo))
+
+ (if (not (generate-toc-in-front))
+ (process-children)
+ (empty-sosofo))
+
+ (if (and %generate-reference-toc%
+ (not %generate-reference-toc-on-titlepage%))
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-restart?: #t
+ page-number-format: ($page-number-format$ (normalize "toc"))
+ use: default-text-style
+ left-header: ($left-header$ (normalize "toc"))
+ center-header: ($center-header$ (normalize "toc"))
+ right-header: ($right-header$ (normalize "toc"))
+ left-footer: ($left-footer$ (normalize "toc"))
+ center-footer: ($center-footer$ (normalize "toc"))
+ right-footer: ($right-footer$ (normalize "toc"))
+ input-whitespace-treatment: 'collapse
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo))
+
+ (if (and (not (node-list-empty? refintro))
+ (not %generate-partintro-on-titlepage%))
+ ($process-partintro$ refintro #t)
+ (empty-sosofo))
+
+ (if (generate-toc-in-front)
+ (if %refentry-new-page%
+ (process-children)
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+ (process-children)))
+ (empty-sosofo)))))
+
+;; If each RefEntry begins on a new page, this title is going to wind
+;; up on its own page, too, so make it a divtitlepage instead. Otherwise,
+;; just let it be a component title.
+(element (reference title) (empty-sosofo))
+;; (if %refentry-new-page%
+;; ($divtitlepage$)
+;; (empty-sosofo)))
+
+(element refentry
+ (make display-group
+ keep: %refentry-keep%
+ (if (or %refentry-new-page%
+ (node-list=? (current-node) (sgml-root-element)))
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+ ($refentry-title$)
+ (process-children))
+ (make sequence
+ ($refentry-title$)
+ ($block-container$)))
+ (make-endnotes)))
+
+(define ($refentry-title$)
+ (let* ((refmeta (select-elements (children (current-node))
+ (normalize "refmeta")))
+ (refentrytitle (select-elements (children refmeta)
+ (normalize "refentrytitle")))
+ (refnamediv (select-elements (children (current-node))
+ (normalize "refnamediv")))
+ (refdescriptor (select-elements (children refnamediv)
+ (normalize "refdescriptor")))
+ (refname (select-elements (children refnamediv)
+ (normalize "refname")))
+ (title (if (node-list-empty? refentrytitle)
+ (if (node-list-empty? refdescriptor)
+ (node-list-first refname)
+ refdescriptor)
+ refentrytitle))
+ (slevel (SECTLEVEL)) ;; the true level in the section hierarchy
+ (hlevel (if (> slevel 2) 2 slevel)) ;; limit to sect2 equiv.
+ (hs (HSIZE (- 4 hlevel))))
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: (* hs %head-before-factor%)
+ space-after: (* hs %head-after-factor%)
+ start-indent: %body-start-indent%
+ first-line-start-indent: (- %body-start-indent%)
+ quadding: 'start
+ heading-level: (if %generate-heading-level% 2 0)
+ keep-with-next?: #t
+ (process-node-list (children title)))))
+;; nwalsh, this is wrong, 29 July 1999
+; (if %refentry-function%
+; (sosofo-append
+; (literal "\no-break-space;")
+; (process-first-descendant (normalize "manvolnum")))
+; (empty-sosofo)))))
+
+(element refmeta (empty-sosofo)) ;; handled by $refentry-title$
+
+(element manvolnum
+ (if %refentry-xref-manvolnum%
+ (sosofo-append
+ (literal "(")
+ (process-children)
+ (literal ")"))
+ (empty-sosofo)))
+
+(element refmiscinfo (empty-sosofo))
+
+(element refentrytitle ($charseq$))
+
+(element refnamediv
+ (make paragraph
+ space-before: %para-sep%
+ start-indent: %body-start-indent%
+ quadding: 'start
+ (process-children)))
+
+(element refname
+ (make sequence
+ (if (and %refentry-generate-name% (first-sibling? (current-node)))
+ ($lowtitlewithsosofo$ 1 3 (literal (gentext-element-name
+ (current-node))))
+ (empty-sosofo))
+ (make sequence
+ font-weight: 'medium
+ font-family-name: %refentry-name-font-family%
+ (process-children)
+ (if (last-sibling? (current-node))
+ (empty-sosofo)
+ (literal (gentext-intra-label-sep (gi (current-node))))))))
+
+(element refpurpose
+ (make sequence
+ font-family-name: %body-font-family%
+ (make sequence
+ (literal " \em-dash ")
+ (process-children))
+ (make paragraph-break)))
+
+(element refdescriptor (empty-sosofo))
+
+(element refclass
+ (let ((role (attribute-string "role")))
+ (make paragraph
+ space-before: %para-sep%
+ start-indent: %body-start-indent%
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal
+ (if role
+ (string-append role ": ")
+ "")))
+ (process-children-trim))))
+
+(element refsynopsisdiv ($section$))
+
+(element (refsynopsisdiv title) (empty-sosofo))
+
+(element refsect1 ($section$))
+(element (refsect1 title) (empty-sosofo))
+(element refsect2 ($section$))
+(element (refsect2 title) (empty-sosofo))
+(element refsect3 ($section$))
+(element (refsect3 title) (empty-sosofo))
+
+
diff --git a/print/dbsect.dsl b/print/dbsect.dsl
new file mode 100644
index 0000000..39b1f6a
--- /dev/null
+++ b/print/dbsect.dsl
@@ -0,0 +1,208 @@
+;; $Id: dbsect.dsl,v 1.6 2003/03/25 19:53:57 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ============================== SECTIONS ==============================
+
+(define (SECTLEVEL #!optional (sect (current-node)))
+ (section-level-by-node #f sect))
+
+;; BRIDGEHEAD isn't a proper section, but appears to be a section title
+(element bridgehead
+ (let* ((renderas (attribute-string "renderas"))
+ ;; the apparent section level
+ (hlevel
+ ;; if not real section level, then get the apparent level
+ ;; from "renderas"
+ (if renderas
+ (section-level-by-gi #f (normalize renderas))
+ ;; else use the real level
+ (SECTLEVEL)))
+ (hs (HSIZE (- 5 hlevel))))
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: (if (< hlevel 5) 'bold 'medium)
+ font-posture: (if (< hlevel 5) 'upright 'italic)
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: (* hs %head-before-factor%)
+ space-after: (* hs %head-after-factor%)
+ start-indent: (if (< hlevel 3)
+ 0pt
+ %body-start-indent%)
+ first-line-start-indent: 0pt
+ quadding: %section-title-quadding%
+ keep-with-next?: #t
+ (process-children))))
+
+(define ($section$)
+ (if (node-list=? (current-node) (sgml-root-element))
+ (make simple-page-sequence
+ page-n-columns: %page-n-columns%
+ page-number-restart?: (or %page-number-restart%
+ (book-start?)
+ (first-chapter?))
+ page-number-format: ($page-number-format$)
+ use: default-text-style
+ left-header: ($left-header$)
+ center-header: ($center-header$)
+ right-header: ($right-header$)
+ left-footer: ($left-footer$)
+ center-footer: ($center-footer$)
+ right-footer: ($right-footer$)
+ start-indent: %body-start-indent%
+ input-whitespace-treatment: 'collapse
+ quadding: %default-quadding%
+ (make sequence
+ ($section-title$)
+ (process-children)))
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ start-indent: %body-start-indent%
+ (make sequence
+ ($section-title$)
+ (process-children)))))
+
+(define ($section-title$)
+ (let* ((sect (current-node))
+ (info (info-element))
+ (exp-children (if (node-list-empty? info)
+ (empty-node-list)
+ (expand-children (children info)
+ (list (normalize "bookbiblio")
+ (normalize "bibliomisc")
+ (normalize "biblioset")))))
+ (parent-titles (select-elements (children sect) (normalize "title")))
+ (info-titles (select-elements exp-children (normalize "title")))
+ (titles (if (node-list-empty? parent-titles)
+ info-titles
+ parent-titles))
+ (subtitles (select-elements exp-children (normalize "subtitle")))
+ (renderas (inherited-attribute-string (normalize "renderas") sect))
+ ;; the apparent section level
+ (hlevel
+ ;; if not real section level, then get the apparent level
+ ;; from "renderas"
+ (if renderas
+ (section-level-by-gi #f (normalize renderas))
+ ;; else use the real level
+ (SECTLEVEL)))
+ (hs (HSIZE (- 5 hlevel))))
+ (make sequence
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: (if (< hlevel 5) 'bold 'medium)
+ font-posture: (if (< hlevel 5) 'upright 'italic)
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: (* hs %head-before-factor%)
+ space-after: (if (node-list-empty? subtitles)
+ (* hs %head-after-factor%)
+ 0pt)
+ start-indent: (if (or (>= hlevel 3)
+ (member (gi) (list (normalize "refsynopsisdiv")
+ (normalize "refsect1")
+ (normalize "refsect2")
+ (normalize "refsect3"))))
+ %body-start-indent%
+ 0pt)
+ first-line-start-indent: 0pt
+ quadding: %section-title-quadding%
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% hlevel 0)
+ ;; SimpleSects are never AUTO numbered...they aren't hierarchical
+ (if (string=? (element-label (current-node)) "")
+ (empty-sosofo)
+ (literal (element-label (current-node))
+ (gentext-label-title-sep (gi sect))))
+ (element-title-sosofo (current-node)))
+ (with-mode section-title-mode
+ (process-node-list subtitles))
+ ($proc-section-info$ info))))
+
+(mode section-title-mode
+ (element subtitle
+ (let* ((sect (parent (parent (current-node)))) ;; parent=>sect*info
+ (renderas (inherited-attribute-string "renderas" sect))
+ ;; the apparent section level
+ (hlevel
+ ;; if not real section level, then get the apparent level
+ ;; from "renderas"
+ (if renderas
+ (section-level-by-gi #f (normalize renderas))
+ ;; else use the real level
+ (SECTLEVEL)))
+ (hs (HSIZE (- 4 hlevel)))) ;; one smaller than the title...
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: (if (< hlevel 5) 'bold 'medium)
+ font-posture: (if (< hlevel 5) 'upright 'italic)
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: 0pt
+ space-after: (* hs %head-after-factor%)
+ start-indent:
+ (if (< hlevel 3)
+ 0pt
+ %body-start-indent%)
+ first-line-start-indent: 0pt
+ quadding: %section-subtitle-quadding%
+ keep-with-next?: #t
+ (process-children))))
+)
+
+(define ($proc-section-info$ info)
+ (cond ((equal? (gi) (normalize "sect1"))
+ ($sect1-info$ info))
+ ((equal? (gi) (normalize "sect2"))
+ ($sect2-info$ info))
+ ((equal? (gi) (normalize "sect3"))
+ ($sect3-info$ info))
+ ((equal? (gi) (normalize "sect4"))
+ ($sect4-info$ info))
+ ((equal? (gi) (normalize "sect5"))
+ ($sect5-info$ info))
+ ((equal? (gi) (normalize "section"))
+ ($section-info$ info))
+ ((equal? (gi) (normalize "refsect1"))
+ ($refsect1-info$ info))
+ ((equal? (gi) (normalize "refsect2"))
+ ($refsect2-info$ info))
+ ((equal? (gi) (normalize "refsect3"))
+ ($refsect3-info$ info))
+ (else (empty-sosofo))))
+
+(define ($sect1-info$ info) (empty-sosofo))
+(define ($sect2-info$ info) (empty-sosofo))
+(define ($sect3-info$ info) (empty-sosofo))
+(define ($sect4-info$ info) (empty-sosofo))
+(define ($sect5-info$ info) (empty-sosofo))
+(define ($section-info$ info) (empty-sosofo))
+(define ($refsect1-info$ info) (empty-sosofo))
+(define ($refsect2-info$ info) (empty-sosofo))
+(define ($refsect3-info$ info) (empty-sosofo))
+
+(element section ($section$))
+(element (section title) (empty-sosofo))
+
+(element sect1 ($section$))
+(element (sect1 title) (empty-sosofo))
+
+(element sect2 ($section$))
+(element (sect2 title) (empty-sosofo))
+
+(element sect3 ($section$))
+(element (sect3 title) (empty-sosofo))
+
+(element sect4 ($section$))
+(element (sect4 title) (empty-sosofo))
+
+(element sect5 ($section$))
+(element (sect5 title) (empty-sosofo))
+
+(element simplesect ($section$))
+(element (simplesect title) (empty-sosofo))
+
diff --git a/print/dbsynop.dsl b/print/dbsynop.dsl
new file mode 100644
index 0000000..2e04e5c
--- /dev/null
+++ b/print/dbsynop.dsl
@@ -0,0 +1,224 @@
+;; $Id: dbsynop.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+;; ========================= SYNTAX DEFINITIONS =========================
+
+(element synopsis ($verbatim-display$ %indent-synopsis-lines%
+ %number-synopsis-lines%))
+
+(element cmdsynopsis
+ ;; Can't be an $informal-object$ because it needs the paragraph
+ ;; wrapper around process-children
+ (make display-group
+ start-indent: (+ %block-start-indent% (inherited-start-indent))
+ space-before: %block-sep%
+ space-after: %block-sep%
+ (make paragraph
+ (process-children))))
+
+;; Support for ARG provided by James Bostock, augmented by norm
+;;
+
+(element (cmdsynopsis command)
+ (make sequence
+ (if (first-sibling? (current-node))
+ (empty-sosofo)
+ (make paragraph-break))
+ (next-match)
+ (literal " ")))
+
+(element group
+ (let ((choice (attribute-string (normalize "choice")))
+ (rep (attribute-string (normalize "rep")))
+ (sepchar (if (inherited-attribute-string (normalize "sepchar"))
+ (inherited-attribute-string (normalize "sepchar"))
+ " ")))
+ (make sequence
+ (if (equal? (absolute-child-number (current-node)) 1)
+ (empty-sosofo)
+ (literal sepchar))
+ (cond
+ ((equal? choice (normalize "plain")) (literal %arg-choice-plain-open-str%))
+ ((equal? choice (normalize "req")) (literal %arg-choice-req-open-str%))
+ ((equal? choice (normalize "opt")) (literal %arg-choice-opt-open-str%))
+ (else (literal %arg-choice-def-open-str%)))
+ (process-children)
+ (cond
+ ((equal? choice (normalize "plain")) (literal %arg-choice-plain-close-str%))
+ ((equal? choice (normalize "req")) (literal %arg-choice-req-close-str%))
+ ((equal? choice (normalize "opt")) (literal %arg-choice-opt-close-str%))
+ (else (literal %arg-choice-def-close-str%)))
+ (cond
+ ((equal? rep (normalize "repeat")) (literal %arg-rep-repeat-str%))
+ ((equal? rep (normalize "norepeat")) (literal %arg-rep-norepeat-str%))
+ (else (literal %arg-rep-def-str%))))))
+
+(element arg
+ (let ((choice (attribute-string (normalize "choice")))
+ (rep (attribute-string (normalize "rep")))
+ (sepchar (if (inherited-attribute-string (normalize "sepchar"))
+ (inherited-attribute-string (normalize "sepchar"))
+ " ")))
+ (make sequence
+ (if (equal? (absolute-child-number (current-node)) 1)
+ (empty-sosofo)
+ (literal sepchar))
+ (cond
+ ((equal? choice (normalize "plain")) (literal %arg-choice-plain-open-str%))
+ ((equal? choice (normalize "req")) (literal %arg-choice-req-open-str%))
+ ((equal? choice (normalize "opt")) (literal %arg-choice-opt-open-str%))
+ (else (literal %arg-choice-def-open-str%)))
+ (process-children)
+ (cond
+ ((equal? rep (normalize "repeat")) (literal %arg-rep-repeat-str%))
+ ((equal? rep (normalize "norepeat")) (literal %arg-rep-norepeat-str%))
+ (else (literal %arg-rep-def-str%)))
+ (cond
+ ((equal? choice (normalize "plain")) (literal %arg-choice-plain-close-str%))
+ ((equal? choice (normalize "req")) (literal %arg-choice-req-close-str%))
+ ((equal? choice (normalize "opt")) (literal %arg-choice-opt-close-str%))
+ (else (literal %arg-choice-def-close-str%))))))
+
+(element (group arg)
+ (let ((choice (attribute-string (normalize "choice")))
+ (rep (attribute-string (normalize "rep"))))
+ (make sequence
+ (if (not (first-sibling? (current-node)))
+ (literal %arg-or-sep%)
+ (empty-sosofo))
+ (process-children))))
+
+(element sbr
+ (make paragraph-break))
+
+;; ----------------------------------------------------------------------
+;; Syntax highlighting...
+
+(define (funcsynopsis-function #!optional (sosofo (process-children)))
+ (make sequence
+ font-weight: 'bold
+ sosofo))
+
+(define (paramdef-parameter #!optional (sosofo (process-children)))
+ (make sequence
+ font-posture: 'italic
+ sosofo))
+
+;; ----------------------------------------------------------------------
+
+(element synopfragmentref
+ (let* ((target (element-with-id (attribute-string (normalize "linkend"))))
+ (snum (child-number target)))
+ (make sequence
+ font-posture: 'italic
+ (make link
+ destination: (node-list-address target)
+ (make sequence
+ font-posture: 'upright
+ ($callout-bug$ snum)))
+ (process-children))))
+
+(element synopfragment
+ (let ((snum (child-number (current-node))))
+ (make paragraph
+ ($callout-bug$ snum)
+ (literal " ")
+ (process-children))))
+
+(element funcsynopsis
+ (let* ((width-in-chars (if (attribute-string "width")
+ (string->number (attribute-string "width"))
+ %verbatim-default-width%))
+ (fsize (lambda () (if (or (attribute-string (normalize "width"))
+ (not %verbatim-size-factor%))
+ (/ (/ (- %text-width% (inherited-start-indent))
+ width-in-chars)
+ 0.7)
+ (* (inherited-font-size)
+ %verbatim-size-factor%)))))
+ ;; This used to be a sequence, but that caused the start-indent to be
+ ;; wrong when it was the first element of a RefSect. Making it a
+ ;; paragraph makes the bug go away and doesn't seem to have any ill
+ ;; effects. Need to investigate further...
+ (make paragraph
+ font-family-name: %mono-font-family%
+ font-size: (fsize)
+ font-weight: 'medium
+ font-posture: 'upright
+ line-spacing: (* (fsize) %line-spacing-factor%)
+ ($informal-object$))))
+
+(element funcsynopsisinfo
+ ;; Fake out the font-size so that when verbatim-display calculates the
+ ;; verbatim-size-factor it doesn't get squared. This will fail if the
+ ;; "correct" size isn't bfsize, but what can I do?
+ (make sequence
+ font-size: %bf-size%
+ ($verbatim-display$ %indent-funcsynopsisinfo-lines%
+ %number-funcsynopsisinfo-lines%)))
+
+(element funcprototype
+ (let ((paramdefs (select-elements (children (current-node))
+ (normalize "paramdef"))))
+ (make sequence
+ (make paragraph
+ font-family-name: %mono-font-family%
+ (process-children))
+ (if (equal? %funcsynopsis-style% 'kr)
+ (with-mode kr-funcsynopsis-mode
+ (process-node-list paramdefs))
+ (empty-sosofo)))))
+
+(element funcdef (process-children))
+(element (funcdef function)
+ (if %funcsynopsis-decoration%
+ (funcsynopsis-function)
+ (process-children)))
+
+(element void
+ (if (equal? %funcsynopsis-style% 'ansi)
+ (literal "(void);")
+ (literal "();")))
+
+(element varargs (literal "(...);"))
+
+(element paramdef
+ (let ((param (select-elements (children (current-node)) (normalize "parameter"))))
+ (make sequence
+ (if (equal? (child-number (current-node)) 1)
+ (literal "(")
+ (empty-sosofo))
+ (if (equal? %funcsynopsis-style% 'ansi)
+ (process-children)
+ (process-node-list param))
+ (if (equal? (gi (ifollow (current-node))) (normalize "paramdef"))
+ (literal ", ")
+ (literal ");")))))
+
+(element (paramdef parameter)
+ (make sequence
+ (if %funcsynopsis-decoration%
+ (paramdef-parameter)
+ (process-children))
+ (if (equal? (gi (ifollow (current-node))) (normalize "parameter"))
+ (literal ", ")
+ (empty-sosofo))))
+
+(element funcparams
+ (make sequence
+ (literal "(")
+ (process-children)
+ (literal ")")))
+
+(mode kr-funcsynopsis-mode
+ (element paramdef
+ (make sequence
+ (make paragraph
+ font-family-name: %mono-font-family%
+ start-indent: (+ (inherited-start-indent) %kr-funcsynopsis-indent%)
+ (make sequence
+ (process-children)
+ (literal ";"))))))
diff --git a/print/dbtable.dsl b/print/dbtable.dsl
new file mode 100644
index 0000000..364ced8
--- /dev/null
+++ b/print/dbtable.dsl
@@ -0,0 +1,587 @@
+;; $Id: dbtable.dsl,v 1.3 2003/02/17 08:56:46 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+;; Table support completely reimplemented by norm 15/16 Nov 1997
+;;
+;; ======================================================================
+;;
+;; This code is intended to implement the SGML Open Exchange Table Model
+;; (http://www.sgmlopen.org/sgml/docs/techpubs.htm) as far as is possible
+;; in RTF. There are a few areas where this code probably fails to
+;; perfectly implement the model:
+;;
+;; - Mixed column width units (4*+2pi) are not supported.
+;; - The behavior that results from mixing relative units with
+;; absolute units has not been carefully considered.
+;; - TFOOT appears at the bottom of the table, but is not repeated
+;; across the bottom of pages (RTF limitation).
+;; - ENTRYTBL is not supported.
+;; - Rotated tables (e.g. landscape tables in a portrait document)
+;; cannot be supported in a simple-page-sequence
+;;
+;; ======================================================================
+;;
+;; My goal in reimplementing the table model was to provide correct
+;; formatting in tables that use MOREROWS. The difficulty is that
+;; correct formatting depends on calculating the column into which
+;; an ENTRY will fall.
+;;
+;; This is a non-trivial problem because MOREROWS can hang down from
+;; preceding rows and ENTRYs may specify starting columns (skipping
+;; preceding ones).
+;;
+;; A simple, elegant recursive algorithm exists. Unfortunately it
+;; requires calculating the column number of every preceding cell
+;; in the entire table. Without memoization, performance is unacceptable
+;; even in relatively small tables (5x5, for example).
+;;
+;; In order to avoid recursion, the algorithm used below is one that
+;; works forward from the beginning of the table and "passes along"
+;; the relevant information (column number of the preceding cell and
+;; overhang from the MOREROWS in preceding rows).
+;;
+;; Unfortunately, this means that element construction rules
+;; can't always be used to fire the appropriate rule. Instead,
+;; each TGROUP has to process each THEAD/BODY/FOOT explicitly.
+;; And each of those must process each ROW explicitly, then each
+;; ENTRY/ENTRYTBL explicitly.
+;;
+;; ----------------------------------------------------------------------
+;;
+;; I attempted to simplify this code by relying on inheritence from
+;; table-column flow objects, but that wasn't entirely successful.
+;; Horizontally spanning cells didn't seem to inherit from table-column
+;; flow objects that didn't specify equal spanning. There seemed to
+;; be other problems as well, but they could have been caused by coding
+;; errors on my part.
+;;
+;; Anyway, by the time I understood how I could use table-column
+;; flow objects for inheritence, I'd already implemented all the
+;; machinery below to "work it out by hand".
+;;
+;; ======================================================================
+;; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
+;; ----------------------------------------------------------------------
+;; A fairly large chunk of this code is in dbcommon.dsl!
+;; ======================================================================
+;;
+
+;; Default value for FRAME= on tables
+(define ($cals-frame-default$) (normalize "all"))
+
+;; Default for COLSEP/ROWSEP if unspecified.
+(define ($cals-rowsep-default$ #!optional (node (current-node)))
+ ;; Return "0" for #f, "1" for #t
+ ;; Default is to have rules if FRAME=ALL, otherwise not. Except
+ ;; that a separator between HEAD and BODY is controlled by
+ ;; %table-head-body-border%.
+ ;;
+ (let* ((table (ancestor-member node ($table-element-list$)))
+ (frame (if (attribute-string (normalize "frame") table)
+ (attribute-string (normalize "frame") table)
+ ($cals-frame-default$)))
+ (row (ancestor-member node (list (normalize "row")))))
+ (if (equal? frame (normalize "all"))
+ #t
+ (if (and (equal? (gi (parent row)) (normalize "thead"))
+ (last-sibling? row))
+ %table-head-body-border%
+ #f))))
+
+(define ($cals-colsep-default$ #!optional (node (current-node)))
+ ;; Default is to have rules if FRAME=ALL, otherwise not.
+ ;;
+ (let* ((table (ancestor-member node ($table-element-list$)))
+ (frame (if (attribute-string (normalize "frame") table)
+ (attribute-string (normalize "frame") table)
+ ($cals-frame-default$))))
+ (equal? frame (normalize "all"))))
+
+;; Default for VALIGN if unspecified
+(define ($cals-valign-default$) (normalize "top"))
+
+;; Margins around cell contents
+(define %cals-cell-before-row-margin% 3pt)
+(define %cals-cell-after-row-margin% 3pt)
+
+(define %cals-cell-before-column-margin% 3pt)
+
+(define %cals-cell-after-column-margin% 3pt)
+
+;; Inheritable start and end indent for cell contents
+(define %cals-cell-content-start-indent% 2pt)
+(define %cals-cell-content-end-indent% 2pt)
+
+;; How to indent pgwide tables? (Non-pgwide tables get inherited-start-indent
+(define %cals-pgwide-start-indent% %body-start-indent%)
+
+;; What alignment should tables have on the page
+(define %cals-display-align% 'start)
+
+;; ----------------------------------------------------------------------
+;; Table rule widths
+
+(define %table-before-row-border% #t)
+(define %table-after-row-border% #t)
+(define %table-before-column-border% #t)
+(define %table-after-column-border% #t)
+(define %table-head-body-border% #t)
+(define %table-cell-after-column-border% #t)
+(define %table-cell-after-row-border% #t)
+
+;;(define tbl-color-space
+;; (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
+;;
+;;(define tbl-red (color tbl-color-space 1 0 0))
+;;(define tbl-green (color tbl-color-space 0 1 0))
+;;(define tbl-blue (color tbl-color-space 0 0 1))
+
+(define calc-table-before-row-border
+ (if (boolean? %table-before-row-border%)
+ %table-before-row-border%
+ ;; Avoid problems with the DSSSL compiler when
+ ;; %table-before-row-border% is boolean.
+ (let ((border-width %table-before-row-border%))
+ (make table-border
+ line-thickness: border-width))))
+
+(define calc-table-after-row-border
+ (if (boolean? %table-after-row-border%)
+ %table-after-row-border%
+ (let ((border-width %table-after-row-border%))
+ (make table-border
+ line-thickness: border-width))))
+
+(define calc-table-before-column-border
+ (if (boolean? %table-before-column-border%)
+ %table-before-column-border%
+ (let ((border-width %table-before-column-border%))
+ (make table-border
+ line-thickness: border-width))))
+
+(define calc-table-after-column-border
+ (if (boolean? %table-after-column-border%)
+ %table-after-column-border%
+ (let ((border-width %table-after-column-border%))
+ (make table-border
+ line-thickness: border-width))))
+
+(define calc-table-head-body-border
+ (if (boolean? %table-head-body-border%)
+ %table-head-body-border%
+ (let ((border-width %table-head-body-border%))
+ (make table-border
+ line-thickness: border-width))))
+
+(define calc-table-cell-after-column-border
+ (if (boolean? %table-cell-after-column-border%)
+ %table-cell-after-column-border%
+ (let ((border-width %table-cell-after-column-border%))
+ (make table-border
+ line-thickness: border-width))))
+
+(define calc-table-cell-after-row-border
+ (if (boolean? %table-cell-after-row-border%)
+ %table-cell-after-row-border%
+ (let ((border-width %table-cell-after-row-border%))
+ (make table-border
+ line-thickness: border-width))))
+
+;; ----------------------------------------------------------------------
+;; Convert colwidth units into table-unit measurements
+
+(define (colwidth-unit lenstr)
+ (if (string? lenstr)
+ (let ((number (length-string-number-part lenstr))
+ (units (length-string-unit-part lenstr)))
+ (if (string=? units "*")
+ (if (string=? number "")
+ (table-unit 1)
+ (table-unit (string->number number)))
+ (if (string=? units "")
+ ;; no units, default to points
+ (* (string->number number) 1pt)
+ (let* ((unum (string->number number))
+ (uname (case-fold-down units)))
+ (case uname
+ (("mm") (* unum 1mm))
+ (("cm") (* unum 1cm))
+ (("in") (* unum 1in))
+ (("pi") (* unum 1pi))
+ (("pt") (* unum 1pt))
+ (("px") (* unum 1px))
+ ;; unrecognized units; use points
+ (else (* unum 1pt)))))))
+ ;; lenstr is not a string...probably #f
+ (table-unit 1)))
+
+
+(define (cell-align cell colnum)
+ (let* ((entry (ancestor-member cell (list (normalize "entry")
+ (normalize "entrytbl"))))
+ (tgroup (find-tgroup entry))
+ (spanname (attribute-string (normalize "spanname") entry))
+ (calsalign (if (attribute-string (normalize "align") entry)
+ (attribute-string (normalize "align") entry)
+ (if (and spanname
+ (spanspec-align (find-spanspec spanname)))
+ (spanspec-align (find-spanspec spanname))
+ (if (colspec-align (find-colspec-by-number colnum))
+ (colspec-align (find-colspec-by-number colnum))
+ (if (tgroup-align tgroup)
+ (tgroup-align tgroup)
+ (normalize "left")))))))
+ (cond
+ ((equal? calsalign (normalize "left")) 'start)
+ ((equal? calsalign (normalize "center")) 'center)
+ ((equal? calsalign (normalize "right")) 'end)
+ (else 'start))))
+
+(define (cell-valign cell colnum)
+ (let* ((entry (ancestor-member cell (list (normalize "entry")
+ (normalize "entrytbl"))))
+ (row (ancestor (normalize "row") entry))
+ (tbody (ancestor-member cell (list (normalize "tbody")
+ (normalize "thead")
+ (normalize "tfoot"))))
+ (tgroup (ancestor (normalize "tgroup") entry))
+ (calsvalign (if (attribute-string (normalize "valign") entry)
+ (attribute-string (normalize "valign") entry)
+ (if (attribute-string (normalize "valign") row)
+ (attribute-string (normalize "valign") row)
+ (if (attribute-string (normalize "valign") tbody)
+ (attribute-string (normalize "valign") tbody)
+ ($cals-valign-default$))))))
+ (cond
+ ((equal? calsvalign (normalize "top")) 'start)
+ ((equal? calsvalign (normalize "middle")) 'center)
+ ((equal? calsvalign (normalize "bottom")) 'end)
+ (else 'start))))
+
+;; ======================================================================
+;; Element rules
+
+(element tgroup
+ (let ((frame-attribute (if (inherited-attribute-string (normalize "frame"))
+ (inherited-attribute-string (normalize "frame"))
+ ($cals-frame-default$))))
+ (make table
+ ;; These values are used for the outer edges (well, the top, bottom
+ ;; and left edges for sure; I think the right edge actually comes
+ ;; from the cells in the last column
+ before-row-border: (if (cond
+ ((equal? frame-attribute (normalize "all")) #t)
+ ((equal? frame-attribute (normalize "sides")) #f)
+ ((equal? frame-attribute (normalize "top")) #t)
+ ((equal? frame-attribute (normalize "bottom")) #f)
+ ((equal? frame-attribute (normalize "topbot")) #t)
+ ((equal? frame-attribute (normalize "none")) #f)
+ (else #f))
+ calc-table-before-row-border
+ #f)
+ after-row-border: (if (cond
+ ((equal? frame-attribute (normalize "all")) #t)
+ ((equal? frame-attribute (normalize "sides")) #f)
+ ((equal? frame-attribute (normalize "top")) #f)
+ ((equal? frame-attribute (normalize "bottom")) #t)
+ ((equal? frame-attribute (normalize "topbot")) #t)
+ ((equal? frame-attribute (normalize "none")) #f)
+ (else #f))
+ calc-table-after-row-border
+ #f)
+ before-column-border: (if (cond
+ ((equal? frame-attribute (normalize "all")) #t)
+ ((equal? frame-attribute (normalize "sides")) #t)
+ ((equal? frame-attribute (normalize "top")) #f)
+ ((equal? frame-attribute (normalize "bottom")) #f)
+ ((equal? frame-attribute (normalize "topbot")) #f)
+ ((equal? frame-attribute (normalize "none")) #f)
+ (else #f))
+ calc-table-before-column-border
+ #f)
+ after-column-border: (if (cond
+ ((equal? frame-attribute (normalize "all")) #t)
+ ((equal? frame-attribute (normalize "sides")) #t)
+ ((equal? frame-attribute (normalize "top")) #f)
+ ((equal? frame-attribute (normalize "bottom")) #f)
+ ((equal? frame-attribute (normalize "topbot")) #f)
+ ((equal? frame-attribute (normalize "none")) #f)
+ (else #f))
+ calc-table-after-column-border
+ #f)
+ display-alignment: %cals-display-align%
+ (make table-part
+ content-map: '((thead header)
+ (tbody #f)
+ (tfoot footer))
+ ($process-colspecs$ (current-node))
+ (process-children)
+ (make-table-endnotes)))))
+
+(element colspec
+ ;; now handled by $process-colspecs$ at the top of each tgroup...
+ (empty-sosofo))
+
+(element spanspec
+ (empty-sosofo))
+
+(element thead
+ ($process-table-body$ (current-node)))
+
+(element tfoot
+ ($process-table-body$ (current-node)))
+
+(element tbody
+ ($process-table-body$ (current-node)))
+
+(element row
+ (empty-sosofo)) ;; this should never happen, they're processed explicitly
+
+(element entry
+ (empty-sosofo)) ;; this should never happen, they're processed explicitly
+
+;; ======================================================================
+;; Functions that handle processing of table bodies, rows, and cells
+
+(define ($process-colspecs$ tgroup)
+ (let* ((cols (string->number (attribute-string (normalize "cols")))))
+ (let loop ((colnum 1))
+ (if (> colnum cols)
+ (empty-sosofo)
+ (make sequence
+ (let ((colspec (find-colspec-by-number colnum)))
+ (if (node-list-empty? colspec)
+ (make table-column
+ column-number: colnum
+ width: (colwidth-unit "1*"))
+ ($process-colspec$ colspec colnum)))
+ (loop (+ colnum 1)))))))
+
+(define ($process-colspec$ colspec colnum)
+ (let* ((colwidth (if (attribute-string (normalize "colwidth") colspec)
+ (attribute-string (normalize "colwidth") colspec)
+ "1*")))
+ (make table-column
+ column-number: colnum
+ width: (colwidth-unit colwidth))))
+
+(define ($process-table-body$ body)
+ (let* ((tgroup (ancestor (normalize "tgroup") body))
+ (cols (string->number (attribute-string (normalize "cols") tgroup)))
+ (blabel (cond
+ ((equal? (gi body) (normalize "thead")) 'thead)
+ ((equal? (gi body) (normalize "tbody")) 'tbody)
+ ((equal? (gi body) (normalize "tfoot")) 'tfoot))))
+ (make sequence
+ label: blabel
+ (let loop ((rows (select-elements (children body) (normalize "row")))
+ (overhang (constant-list 0 cols)))
+ (if (node-list-empty? rows)
+ (empty-sosofo)
+ (make sequence
+ ($process-row$ (node-list-first rows) overhang)
+ (loop (node-list-rest rows)
+ (update-overhang (node-list-first rows) overhang))))))))
+
+(define ($process-row$ row overhang)
+ (let* ((tgroup (ancestor (normalize "tgroup") row))
+ (maxcol (string->number (attribute-string
+ (normalize "cols") tgroup)))
+ (lastentry (node-list-last (node-list-filter-out-pis
+ (children row))))
+ (table (parent tgroup)))
+ ;; there's no point calculating the row or colsep here, each cell
+ ;; specifies it which overrides anything we might say here...
+ (make table-row
+ (let loop ((cells (node-list-filter-out-pis (children row)))
+ (prevcell (empty-node-list)))
+ (if (node-list-empty? cells)
+ (empty-sosofo)
+ (make sequence
+ ($process-cell$ (node-list-first cells) prevcell row overhang)
+ (loop (node-list-rest cells) (node-list-first cells)))))
+
+ ;; add any necessary empty cells to the end of the row
+ (let loop ((colnum (+ (cell-column-number lastentry overhang)
+ (hspan lastentry))))
+ (if (> colnum maxcol)
+ (empty-sosofo)
+ (make sequence
+ ($process-empty-cell$ colnum row)
+ (loop (+ colnum 1))))))))
+
+(define ($process-cell$ entry preventry row overhang)
+ (let* ((colnum (cell-column-number entry overhang))
+ (lastcellcolumn (if (node-list-empty? preventry)
+ 0
+ (- (+ (cell-column-number preventry overhang)
+ (hspan preventry))
+ 1)))
+ (lastcolnum (if (> lastcellcolumn 0)
+ (overhang-skip overhang lastcellcolumn)
+ 0))
+ (font-name (if (have-ancestor? (normalize "thead") entry)
+ %title-font-family%
+ %body-font-family%))
+ (weight (if (have-ancestor? (normalize "thead") entry)
+ 'bold
+ 'medium))
+ (align (cell-align entry colnum)))
+
+ (make sequence
+ ;; This is a little bit complicated. We want to output empty cells
+ ;; to skip over missing data. We start count at the column number
+ ;; arrived at by adding 1 to the column number of the previous entry
+ ;; and skipping over any MOREROWS overhanging entrys. Then for each
+ ;; iteration, we add 1 and skip over any overhanging entrys.
+ (let loop ((count (overhang-skip overhang (+ lastcolnum 1))))
+ (if (>= count colnum)
+ (empty-sosofo)
+ (make sequence
+ ($process-empty-cell$ count row)
+ (loop (overhang-skip overhang (+ count 1))))))
+
+ ;; Now we've output empty cells for any missing entries, so we
+ ;; are ready to output the cell for this entry...
+ (make table-cell
+ column-number: colnum
+ n-columns-spanned: (hspan entry)
+ n-rows-spanned: (vspan entry)
+
+ cell-row-alignment: (cell-valign entry colnum)
+
+ cell-after-column-border: (if (cell-colsep entry colnum)
+ calc-table-cell-after-column-border
+ #f)
+
+ cell-after-row-border: (if (cell-rowsep entry colnum)
+ (if (last-sibling? (parent entry))
+ calc-table-head-body-border
+ calc-table-cell-after-row-border)
+ #f)
+
+ cell-before-row-margin: %cals-cell-before-row-margin%
+ cell-after-row-margin: %cals-cell-after-row-margin%
+ cell-before-column-margin: %cals-cell-before-column-margin%
+ cell-after-column-margin: %cals-cell-after-column-margin%
+
+ ;; If there is some additional indentation (because we're in a list,
+ ;; for example) make sure that gets passed along, but don't add
+ ;; the normal body-start-indent.
+ start-indent: (+ (- (inherited-start-indent) %body-start-indent%)
+ %cals-cell-content-start-indent%)
+ end-indent: %cals-cell-content-end-indent%
+ (if (equal? (gi entry) (normalize "entrytbl"))
+ (make paragraph
+ (literal "ENTRYTBL not supported."))
+ (make paragraph
+ font-family-name: font-name
+ font-weight: weight
+ quadding: align
+ (process-node-list (children entry))))))))
+
+(define (empty-cell-colsep colnum row)
+ (let* ((tgroup (ancestor (normalize "tgroup") row))
+ (table (parent tgroup))
+ (calscolsep
+ (if (tgroup-colsep tgroup)
+ (tgroup-colsep tgroup)
+ (if (attribute-string (normalize "colsep") table)
+ (attribute-string (normalize "colsep") table)
+ (if ($cals-colsep-default$ row)
+ "1"
+ "0")))))
+ (> (string->number calscolsep) 0)))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+(define (cell-colsep cell colnum)
+ (let* ((entry (ancestor-member cell (list (normalize "entry") (normalize "entrytbl"))))
+ (spanname (attribute-string (normalize "spanname") entry))
+ (tgroup (find-tgroup entry))
+ (table (parent tgroup))
+ (calscolsep
+ (if (attribute-string (normalize "colsep") entry)
+ (attribute-string (normalize "colsep") entry)
+ (if (and spanname
+ (spanspec-colsep (find-spanspec spanname)))
+ (spanspec-colsep (find-spanspec spanname))
+ (if (colspec-colsep (find-colspec-by-number colnum))
+ (colspec-colsep (find-colspec-by-number colnum))
+ (if (tgroup-colsep tgroup)
+ (tgroup-colsep tgroup)
+ (if (attribute-string (normalize "colsep") table)
+ (attribute-string (normalize "colsep") table)
+ (if ($cals-colsep-default$ cell)
+ "1"
+ "0"))))))))
+ (> (string->number calscolsep) 0)))
+
+(define (cell-rowsep cell colnum)
+ (let* ((entry (ancestor-member cell (list (normalize "entry")
+ (normalize "entrytbl"))))
+ (spanname (attribute-string (normalize "spanname") entry))
+ (row (ancestor (normalize "row") entry))
+ (tgroup (find-tgroup entry))
+ (table (parent tgroup))
+ (calsrowsep
+ (if (attribute-string (normalize "rowsep") entry)
+ (attribute-string (normalize "rowsep") entry)
+ (if (and spanname (spanspec-rowsep (find-spanspec spanname)))
+ (spanspec-rowsep (find-spanspec spanname))
+ (if (colspec-rowsep (find-colspec-by-number colnum))
+ (colspec-rowsep (find-colspec-by-number colnum))
+ (if (attribute-string (normalize "rowsep") row)
+ (attribute-string (normalize "rowsep") row)
+ (if (tgroup-rowsep tgroup)
+ (tgroup-rowsep tgroup)
+ (if (attribute-string (normalize "rowsep") table)
+ (attribute-string (normalize "rowsep") table)
+ (if ($cals-rowsep-default$ cell)
+ "1"
+ "0")))))))))
+ (> (string->number calsrowsep) 0)))
+
+(define (empty-cell-rowsep colnum row)
+ (let* ((tgroup (ancestor (normalize "tgroup") row))
+ (table (parent tgroup))
+ (calsrowsep
+ (if (attribute-string (normalize "rowsep") row)
+ (attribute-string (normalize "rowsep") row)
+ (if (tgroup-rowsep tgroup)
+ (tgroup-rowsep tgroup)
+ (if (attribute-string (normalize "rowsep") table)
+ (attribute-string (normalize "rowsep") table)
+ (if ($cals-rowsep-default$ row)
+ "1"
+ "0"))))))
+ (> (string->number calsrowsep) 0)))
+
+;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+(define ($process-empty-cell$ colnum row)
+ (make table-cell
+ column-number: colnum
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ cell-after-column-border: (if (empty-cell-colsep colnum row)
+ calc-table-cell-after-column-border
+ #f)
+
+ cell-after-row-border: (if (empty-cell-rowsep colnum row)
+ (if (last-sibling? row)
+ calc-table-head-body-border
+ calc-table-cell-after-row-border)
+ #f)
+
+ cell-before-row-margin: %cals-cell-before-row-margin%
+ cell-after-row-margin: %cals-cell-after-row-margin%
+ cell-before-column-margin: %cals-cell-before-column-margin%
+ cell-after-column-margin: %cals-cell-after-column-margin%
+ start-indent: %cals-cell-content-start-indent%
+ end-indent: %cals-cell-content-end-indent%
+ (empty-sosofo)))
+
+;; EOF
diff --git a/print/dbtitle.dsl b/print/dbtitle.dsl
new file mode 100644
index 0000000..8c4635b
--- /dev/null
+++ b/print/dbtitle.dsl
@@ -0,0 +1,52 @@
+;; $Id: dbtitle.dsl,v 1.4 2003/02/17 19:42:45 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define title-style
+ (style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ quadding: 'start))
+
+;; So we can pass different sosofo's to this routine and get identical
+;; treatment (see REFNAME in dbrfntry.dsl)
+;;
+(define ($lowtitlewithsosofo$ tlevel hlevel sosofo)
+ (let ((hs (HSIZE (- 3 tlevel))))
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ space-before: (* hs %head-before-factor%)
+ space-after: (* hs %head-after-factor%)
+ start-indent: %body-start-indent%
+ quadding: 'start
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% hlevel 0)
+ sosofo)))
+
+(define ($lowtitle$ tlevel hlevel)
+ ($lowtitlewithsosofo$ tlevel hlevel (process-children)))
+
+(define ($runinhead$)
+ (let* ((title (data (current-node)))
+ (titlelen (string-length title))
+ (lastchar (string-ref title (- titlelen 1)))
+ (punct (if (member lastchar %content-title-end-punct%)
+ ""
+ %default-title-end-punct%)))
+ (make sequence
+ font-weight: 'bold
+ (process-children-trim)
+ (literal punct " "))))
+
+(element title ($lowtitle$ 2 4)) ;; the default TITLE format
+(element titleabbrev (empty-sosofo))
+(element subtitle (empty-sosofo))
+
+(mode title-mode
+ (element title
+ (process-children)))
diff --git a/print/dbttlpg.dsl b/print/dbttlpg.dsl
new file mode 100644
index 0000000..733f0f5
--- /dev/null
+++ b/print/dbttlpg.dsl
@@ -0,0 +1,6772 @@
+;; $Id: dbttlpg.dsl,v 1.13 2004/10/10 21:15:06 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://nwalsh.com/docbook/dsssl/
+;;
+
+(define (have-sibling? sibling-gi #!optional (node (current-node)))
+ (let loop ((nl (children (parent node))))
+ (if (node-list-empty? nl)
+ #f
+ (if (equal? (gi (node-list-first nl)) sibling-gi)
+ #t
+ (loop (node-list-rest nl))))))
+
+(define (titlepage-content? elements gis)
+ (let giloop ((gilist gis))
+ (if (null? gilist)
+ #f
+ (if (not (node-list-empty? (node-list-filter-by-gi
+ elements
+ (list (car gilist)))))
+ #t
+ (giloop (cdr gilist))))))
+
+(define (titlepage-gi-list-by-elements elements nodelist)
+ ;; Elements is a list of GIs. Nodelist is a list of nodes.
+ ;; This function returns all of the nodes in nodelist that
+ ;; are in elements in the order they occur in elements.
+ (let loop ((gilist elements) (rlist (empty-node-list)))
+ (if (null? gilist)
+ rlist
+ (loop (cdr gilist)
+ (node-list rlist (node-list-filter-by-gi
+ nodelist (list (car gilist))))))))
+
+(define (titlepage-gi-list-by-nodelist elements nodelist)
+ ;; Elements is a list of GIs. Nodelist is a list of nodes.
+ ;; This function returns all of the nodes in nodelist that
+ ;; are in elements in the order they occur in nodelist.
+ (let loop ((nl nodelist) (rlist (empty-node-list)))
+ (if (node-list-empty? nl)
+ rlist
+ (if (member (gi (node-list-first nl)) elements)
+ (loop (node-list-rest nl)
+ (node-list rlist (node-list-first nl)))
+ (loop (node-list-rest nl) rlist)))))
+
+(define (titlepage-nodelist elements nodelist)
+ ;; We expand BOOKBIBLIO, BIBLIOMISC, and BIBLIOSET in the element
+ ;; list because that level of wrapper usually isn't significant.
+ (let ((exp-nodelist (expand-children nodelist (list (normalize "bookbiblio")
+ (normalize "bibliomisc")
+ (normalize "biblioset")))))
+ (if %titlepage-in-info-order%
+ (titlepage-gi-list-by-nodelist elements exp-nodelist)
+ (titlepage-gi-list-by-elements elements exp-nodelist))))
+
+(mode titlepage-address-mode
+ (default (process-children)))
+
+;; == Title pages for SETs ==============================================
+
+(define (set-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "graphic")
+ (normalize "mediaobject")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "editor")))
+
+(define (set-titlepage-verso-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "editor")
+ (normalize "edition")
+ (normalize "pubdate")
+ (normalize "copyright")
+ (normalize "legalnotice")
+ (normalize "revhistory")))
+
+(define (set-titlepage-content? elements side)
+ (titlepage-content? elements (if (equal? side 'recto)
+ (set-titlepage-recto-elements)
+ (set-titlepage-verso-elements))))
+
+(define (set-titlepage elements #!optional (side 'recto))
+ (let ((nodelist (titlepage-nodelist
+ (if (equal? side 'recto)
+ (set-titlepage-recto-elements)
+ (set-titlepage-verso-elements))
+ elements)))
+;; (make simple-page-sequence
+;; page-n-columns: %titlepage-n-columns%
+;; input-whitespace-treatment: 'collapse
+;; use: default-text-style
+ (make sequence
+
+ ;; 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 ""))
+
+ (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))))
+ (set-titlepage-before (node-list-first nl) side)
+ (empty-sosofo))
+ (cond
+ ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+ (set-titlepage-abbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+ (set-titlepage-abstract (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "address"))
+ (set-titlepage-address (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+ (set-titlepage-affiliation (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+ (set-titlepage-artpagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "author"))
+ (set-titlepage-author (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+ (set-titlepage-authorblurb (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+ (set-titlepage-authorgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+ (set-titlepage-authorinitials (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+ (set-titlepage-bibliomisc (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+ (set-titlepage-biblioset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+ (set-titlepage-bookbiblio (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+ (set-titlepage-citetitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "collab"))
+ (set-titlepage-collab (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+ (set-titlepage-confgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+ (set-titlepage-contractnum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+ (set-titlepage-contractsponsor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+ (set-titlepage-contrib (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+ (set-titlepage-copyright (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+ (set-titlepage-corpauthor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+ (set-titlepage-corpname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "date"))
+ (set-titlepage-date (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "edition"))
+ (set-titlepage-edition (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "editor"))
+ (set-titlepage-editor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+ (set-titlepage-firstname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+ (set-titlepage-graphic (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+ (set-titlepage-honorific (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+ (set-titlepage-indexterm (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+ (set-titlepage-invpartnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+ (set-titlepage-isbn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issn"))
+ (set-titlepage-issn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+ (set-titlepage-issuenum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+ (set-titlepage-itermset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+ (set-titlepage-keywordset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+ (set-titlepage-legalnotice (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+ (set-titlepage-lineage (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+ (set-titlepage-mediaobject (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+ (set-titlepage-modespec (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+ (set-titlepage-orgname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+ (set-titlepage-othercredit (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othername"))
+ (set-titlepage-othername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+ (set-titlepage-pagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+ (set-titlepage-printhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productname"))
+ (set-titlepage-productname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+ (set-titlepage-productnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+ (set-titlepage-pubdate (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+ (set-titlepage-publisher (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+ (set-titlepage-publishername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+ (set-titlepage-pubsnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+ (set-titlepage-releaseinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+ (set-titlepage-revhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+ (set-titlepage-seriesinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+ (set-titlepage-seriesvolnums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+ (set-titlepage-subjectset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+ (set-titlepage-subtitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "surname"))
+ (set-titlepage-surname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "title"))
+ (set-titlepage-title (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+ (set-titlepage-titleabbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+ (set-titlepage-volumenum (node-list-first nl) side))
+ (else
+ (set-titlepage-default (node-list-first nl) side)))
+ (loop (node-list-rest nl) (node-list-first nl))))))))
+
+(define (set-titlepage-before node side)
+ (if (equal? side 'recto)
+ (cond
+ ((equal? (gi node) (normalize "corpauthor"))
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;")))
+ ((equal? (gi node) (normalize "authorgroup"))
+ (if (have-sibling? (normalize "corpauthor") node)
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ ((equal? (gi node) (normalize "author"))
+ (if (or (have-sibling? (normalize "corpauthor") node)
+ (have-sibling? (normalize "authorgroup") node))
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ (else (empty-sosofo)))
+ (empty-sosofo)))
+
+(define (set-titlepage-default node side)
+ (let ((foo (debug (string-append "No set-titlepage-* for " (gi node) "!"))))
+ (empty-sosofo)))
+
+(define (set-titlepage-element node side)
+ (if (equal? side 'recto)
+ (with-mode set-titlepage-recto-mode
+ (process-node-list node))
+ (with-mode set-titlepage-verso-mode
+ (process-node-list node))))
+
+(define (set-titlepage-abbrev node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-abstract node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-address node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-affiliation node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-artpagenums node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-author node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-authorblurb node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-authorgroup node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-authorinitials node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-bibliomisc node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-biblioset node side)
+ (set-titlepage node side))
+(define (set-titlepage-bookbiblio node side)
+ (set-titlepage node side))
+(define (set-titlepage-citetitle node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-collab node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-confgroup node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-contractnum node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-contractsponsor node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-contrib node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-copyright node side)
+ (set-titlepage-element node side))
+
+(define (set-titlepage-corpauthor node side)
+ (if (equal? side 'recto)
+ (set-titlepage-element node side)
+ (if (first-sibling? node)
+ (make paragraph
+ (with-mode set-titlepage-verso-mode
+ (process-node-list
+ (select-elements (children (parent node))
+ (normalize "corpauthor")))))
+ (empty-sosofo))))
+
+(define (set-titlepage-corpname node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-date node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-edition node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-editor node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-firstname node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-graphic node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-honorific node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-indexterm node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-invpartnumber node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-isbn node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-issn node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-issuenum node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-itermset node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-keywordset node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-legalnotice node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-lineage node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-mediaobject node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-modespec node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-orgname node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-othercredit node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-othername node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-pagenums node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-printhistory node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-productname node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-productnumber node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-pubdate node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-publisher node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-publishername node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-pubsnumber node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-releaseinfo node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-revhistory node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-seriesinfo node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-seriesvolnums node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-subjectset node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-subtitle node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-surname node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-title node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-titleabbrev node side)
+ (set-titlepage-element node side))
+(define (set-titlepage-volumenum node side)
+ (set-titlepage-element node side))
+
+(define set-titlepage-recto-style
+ (style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 1)))
+
+(define set-titlepage-verso-style
+ (style
+ font-family-name: %body-font-family%))
+
+(mode set-titlepage-recto-mode
+ (element abbrev
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element abstract
+ (make display-group
+ use: set-titlepage-recto-style
+ quadding: 'start
+ ($semiformal-object$)))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element (abstract para)
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element address
+ (make display-group
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make display-group
+ use: set-titlepage-recto-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element author
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element authorblurb
+ (make display-group
+ use: set-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element (authorblurb para)
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element authorgroup
+ (make display-group
+ (process-children)))
+
+ (element authorinitials
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ (make sequence
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (process-children))
+ ;; This paragraph is a hack to get the spacing right.
+ ;; Authors always have an affiliation paragraph below them, even if
+ ;; it's empty, so corpauthors need one too.
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal "\no-break-space;"))))
+
+ (element corpname
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ (let ((editor-name (author-string)))
+ (make sequence
+ (if (first-sibling?)
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor% 6)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal (gentext-edited-by)))
+ (empty-sosofo))
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal editor-name)))))
+
+ (element firstname
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'center)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: set-titlepage-recto-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: 'start
+ line-spacing: (* 0.8 (inherited-line-spacing))
+ font-size: (* 0.8 (inherited-font-size))
+ (process-children)))
+
+ (element lineage
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element othercredit
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element othername
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element printhistory
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publisher
+ (make display-group
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: set-titlepage-recto-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: set-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 4)
+ line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+ space-before: (* (HSIZE 4) %head-before-factor%)
+ quadding: %division-subtitle-quadding%
+ keep-with-next?: #t
+ (process-children-trim)))
+
+ (element surname
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element title
+ (make paragraph
+ use: set-titlepage-recto-style
+ font-size: (HSIZE 5)
+ line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+ space-before: (* (HSIZE 5) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% 1 0)
+ (with-mode title-mode
+ (process-children-trim))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: set-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+)
+
+(mode set-titlepage-verso-mode
+ (element abbrev
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element abstract ($semiformal-object$))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element address
+ (make display-group
+ use: set-titlepage-verso-style
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element author
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element authorblurb
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element authorgroup
+ (make paragraph
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (process-children-trim))))
+
+ (element authorinitials
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: set-titlepage-verso-style
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ ;; note: set-titlepage-corpauthor takes care of wrapping multiple
+ ;; corpauthors
+ (make sequence
+ (if (first-sibling?)
+ (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+ (empty-sosofo)
+ (literal (gentext-by) " "))
+ (literal ", "))
+ (process-children)))
+
+ (element corpname
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ ;; Print the editor name.
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-edited-by))
+ (literal "\no-break-space;")
+ (literal (author-string))))
+ (make sequence
+ (literal (author-string))))))
+
+ (element firstname
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'start)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: set-titlepage-verso-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: set-titlepage-verso-style
+ font-size: (* (inherited-font-size) 0.8)
+ (process-children-trim)))
+
+ (element lineage
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element othercredit
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element othername
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element printhistory
+ (make display-group
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ (literal (gentext-element-name-space (gi (current-node))))
+ (process-children)))
+
+ (element publisher
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: set-titlepage-verso-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: set-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: set-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: set-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: set-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ ;(process-node-list revremark)))
+ (empty-sosofo)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: set-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (literal (if (first-sibling?) ": " "; "))
+ (process-children)))
+
+ (element surname
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+ (element title
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (with-mode title-mode
+ (process-children))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: set-titlepage-verso-style
+ (process-children)))
+
+)
+
+;; == Title pages for BOOKs =============================================
+
+(define (book-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "graphic")
+ (normalize "mediaobject")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "editor")))
+
+(define (book-titlepage-verso-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "editor")
+ (normalize "edition")
+ (normalize "pubdate")
+ (normalize "copyright")
+ (normalize "abstract")
+ (normalize "legalnotice")
+ (normalize "revhistory")))
+
+(define (book-titlepage-content? elements side)
+ (titlepage-content? elements (if (equal? side 'recto)
+ (book-titlepage-recto-elements)
+ (book-titlepage-verso-elements))))
+
+(define (book-titlepage elements #!optional (side 'recto))
+ (let ((nodelist (titlepage-nodelist
+ (if (equal? side 'recto)
+ (book-titlepage-recto-elements)
+ (book-titlepage-verso-elements))
+ elements)))
+;; (make simple-page-sequence
+;; page-n-columns: %titlepage-n-columns%
+;; input-whitespace-treatment: 'collapse
+;; use: default-text-style
+ (make sequence
+
+ ;; 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 ""))
+
+ (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))))
+ (book-titlepage-before (node-list-first nl) side)
+ (empty-sosofo))
+ (cond
+ ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+ (book-titlepage-abbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+ (book-titlepage-abstract (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "address"))
+ (book-titlepage-address (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+ (book-titlepage-affiliation (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+ (book-titlepage-artpagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "author"))
+ (book-titlepage-author (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+ (book-titlepage-authorblurb (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+ (book-titlepage-authorgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+ (book-titlepage-authorinitials (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+ (book-titlepage-bibliomisc (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+ (book-titlepage-biblioset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+ (book-titlepage-bookbiblio (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+ (book-titlepage-citetitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "collab"))
+ (book-titlepage-collab (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+ (book-titlepage-confgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+ (book-titlepage-contractnum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+ (book-titlepage-contractsponsor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+ (book-titlepage-contrib (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+ (book-titlepage-copyright (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+ (book-titlepage-corpauthor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+ (book-titlepage-corpname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "date"))
+ (book-titlepage-date (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "edition"))
+ (book-titlepage-edition (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "editor"))
+ (book-titlepage-editor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+ (book-titlepage-firstname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+ (book-titlepage-graphic (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+ (book-titlepage-honorific (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+ (book-titlepage-indexterm (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+ (book-titlepage-invpartnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+ (book-titlepage-isbn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issn"))
+ (book-titlepage-issn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+ (book-titlepage-issuenum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+ (book-titlepage-itermset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+ (book-titlepage-keywordset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+ (book-titlepage-legalnotice (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+ (book-titlepage-lineage (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+ (book-titlepage-mediaobject (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+ (book-titlepage-modespec (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+ (book-titlepage-orgname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+ (book-titlepage-othercredit (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othername"))
+ (book-titlepage-othername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+ (book-titlepage-pagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+ (book-titlepage-printhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productname"))
+ (book-titlepage-productname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+ (book-titlepage-productnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+ (book-titlepage-pubdate (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+ (book-titlepage-publisher (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+ (book-titlepage-publishername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+ (book-titlepage-pubsnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+ (book-titlepage-releaseinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+ (book-titlepage-revhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+ (book-titlepage-seriesinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+ (book-titlepage-seriesvolnums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+ (book-titlepage-subjectset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+ (book-titlepage-subtitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "surname"))
+ (book-titlepage-surname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "title"))
+ (book-titlepage-title (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+ (book-titlepage-titleabbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+ (book-titlepage-volumenum (node-list-first nl) side))
+ (else
+ (book-titlepage-default (node-list-first nl) side)))
+ (loop (node-list-rest nl) (node-list-first nl))))))))
+
+(define (book-titlepage-before node side)
+ (if (equal? side 'recto)
+ (cond
+ ((equal? (gi node) (normalize "corpauthor"))
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;")))
+ ((equal? (gi node) (normalize "authorgroup"))
+ (if (have-sibling? (normalize "corpauthor") node)
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ ((equal? (gi node) (normalize "author"))
+ (if (or (have-sibling? (normalize "corpauthor") node)
+ (have-sibling? (normalize "authorgroup") node))
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ (else (empty-sosofo)))
+ (empty-sosofo)))
+
+(define (book-titlepage-default node side)
+ (let ((foo (debug (string-append "No book-titlepage-* for " (gi node) "!"))))
+ (empty-sosofo)))
+
+(define (book-titlepage-element node side)
+ (if (equal? side 'recto)
+ (with-mode book-titlepage-recto-mode
+ (process-node-list node))
+ (with-mode book-titlepage-verso-mode
+ (process-node-list node))))
+
+(define (book-titlepage-abbrev node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-abstract node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-address node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-affiliation node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-artpagenums node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-author node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-authorblurb node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-authorgroup node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-authorinitials node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-bibliomisc node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-biblioset node side)
+ (book-titlepage node side))
+(define (book-titlepage-bookbiblio node side)
+ (book-titlepage node side))
+(define (book-titlepage-citetitle node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-collab node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-confgroup node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-contractnum node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-contractsponsor node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-contrib node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-copyright node side)
+ (book-titlepage-element node side))
+
+(define (book-titlepage-corpauthor node side)
+ (if (equal? side 'recto)
+ (book-titlepage-element node side)
+ (if (first-sibling? node)
+ (make paragraph
+ (with-mode book-titlepage-verso-mode
+ (process-node-list
+ (select-elements (children (parent node))
+ (normalize "corpauthor")))))
+ (empty-sosofo))))
+
+(define (book-titlepage-corpname node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-date node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-edition node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-editor node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-firstname node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-graphic node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-honorific node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-indexterm node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-invpartnumber node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-isbn node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-issn node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-issuenum node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-itermset node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-keywordset node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-legalnotice node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-lineage node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-mediaobject node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-modespec node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-orgname node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-othercredit node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-othername node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-pagenums node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-printhistory node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-productname node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-productnumber node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-pubdate node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-publisher node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-publishername node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-pubsnumber node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-releaseinfo node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-revhistory node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-seriesinfo node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-seriesvolnums node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-subjectset node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-subtitle node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-surname node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-title node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-titleabbrev node side)
+ (book-titlepage-element node side))
+(define (book-titlepage-volumenum node side)
+ (book-titlepage-element node side))
+
+(define book-titlepage-recto-style
+ (style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 1)))
+
+(define book-titlepage-verso-style
+ (style
+ font-family-name: %body-font-family%))
+
+(mode book-titlepage-recto-mode
+ (element abbrev
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element abstract
+ (make display-group
+ use: book-titlepage-recto-style
+ quadding: 'start
+ ($semiformal-object$)))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element (abstract para)
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element address
+ (make display-group
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make display-group
+ use: book-titlepage-recto-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element author
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element authorblurb
+ (make display-group
+ use: book-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element (authorblurb para)
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element authorgroup
+ (make display-group
+ (process-children)))
+
+ (element authorinitials
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ (make sequence
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (process-children))
+ ;; This paragraph is a hack to get the spacing right.
+ ;; Authors always have an affiliation paragraph below them, even if
+ ;; it's empty, so corpauthors need one too.
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal "\no-break-space;"))))
+
+ (element corpname
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ (let ((editor-name (author-string)))
+ (make sequence
+ (if (first-sibling?)
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor% 6)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal (gentext-edited-by)))
+ (empty-sosofo))
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal editor-name)))))
+
+ (element firstname
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'center)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: book-titlepage-recto-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: 'start
+ line-spacing: (* 0.8 (inherited-line-spacing))
+ font-size: (* 0.8 (inherited-font-size))
+ (process-children)))
+
+ (element lineage
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element othercredit
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element othername
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element printhistory
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publisher
+ (make display-group
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: book-titlepage-recto-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: book-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revremark)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 4)
+ line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+ space-before: (* (HSIZE 4) %head-before-factor%)
+ quadding: %division-subtitle-quadding%
+ keep-with-next?: #t
+ (process-children-trim)))
+
+ (element surname
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element title
+ (make paragraph
+ use: book-titlepage-recto-style
+ font-size: (HSIZE 5)
+ line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+ space-before: (* (HSIZE 5) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% 1 0)
+ (with-mode title-mode
+ (process-children-trim))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: book-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+)
+
+(mode book-titlepage-verso-mode
+ (element abbrev
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element abstract ($semiformal-object$))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element address
+ (make display-group
+ use: book-titlepage-verso-style
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element author
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element authorblurb
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element authorgroup
+ (let* ((editors (select-elements (children (current-node)) (normalize "editor"))))
+ (make paragraph
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (if (node-list-empty? editors)
+ (literal (gentext-by))
+ (literal (gentext-edited-by)))
+ (literal "\no-break-space;")
+ (process-children-trim)))))
+
+ (element authorinitials
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: book-titlepage-verso-style
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ ;; note: book-titlepage-corpauthor takes care of wrapping multiple
+ ;; corpauthors
+ (make sequence
+ (if (first-sibling?)
+ (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+ (empty-sosofo)
+ (literal (gentext-by) " "))
+ (literal ", "))
+ (process-children)))
+
+ (element corpname
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ ;; Print the editor name.
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (or #f (not in-group)) ; nevermind, always put out the Edited by
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-edited-by))
+ (literal "\no-break-space;")
+ (literal (author-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element firstname
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'start)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: book-titlepage-verso-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: book-titlepage-verso-style
+ font-size: (* (inherited-font-size) 0.8)
+ (process-children-trim)))
+
+ (element lineage
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element othercredit
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element othername
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element printhistory
+ (make display-group
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ (literal (gentext-element-name-space (gi (current-node))))
+ (process-children)))
+
+ (element publisher
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: book-titlepage-verso-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: book-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: book-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: book-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: book-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: book-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (literal (if (first-sibling?) ": " "; "))
+ (process-children)))
+
+ (element surname
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+
+ (element title
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (with-mode title-mode
+ (process-children))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: book-titlepage-verso-style
+ (process-children)))
+)
+
+;; == Title pages for PARTs =============================================
+
+(define (part-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")))
+
+(define (part-titlepage-verso-elements)
+ '())
+
+(define (part-titlepage-content? elements side)
+ (titlepage-content? elements (if (equal? side 'recto)
+ (part-titlepage-recto-elements)
+ (part-titlepage-verso-elements))))
+
+(define (part-titlepage elements #!optional (side 'recto))
+ (let ((nodelist (titlepage-nodelist
+ (if (equal? side 'recto)
+ (part-titlepage-recto-elements)
+ (part-titlepage-verso-elements))
+ elements))
+ ;; partintro is a special case...
+ (partintro (node-list-first
+ (node-list-filter-by-gi elements (list (normalize "partintro"))))))
+ (if (part-titlepage-content? elements side)
+;; (make simple-page-sequence
+;; page-n-columns: %titlepage-n-columns%
+;; input-whitespace-treatment: 'collapse
+;; use: default-text-style
+ (make sequence
+
+ ;; 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 ""))
+
+ (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 "abbrev"))
+ (part-titlepage-abbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+ (part-titlepage-abstract (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "address"))
+ (part-titlepage-address (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+ (part-titlepage-affiliation (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+ (part-titlepage-artpagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "author"))
+ (part-titlepage-author (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+ (part-titlepage-authorblurb (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+ (part-titlepage-authorgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+ (part-titlepage-authorinitials (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+ (part-titlepage-bibliomisc (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+ (part-titlepage-biblioset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+ (part-titlepage-bookbiblio (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+ (part-titlepage-citetitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "collab"))
+ (part-titlepage-collab (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+ (part-titlepage-confgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+ (part-titlepage-contractnum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+ (part-titlepage-contractsponsor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+ (part-titlepage-contrib (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+ (part-titlepage-copyright (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+ (part-titlepage-corpauthor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+ (part-titlepage-corpname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "date"))
+ (part-titlepage-date (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "edition"))
+ (part-titlepage-edition (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "editor"))
+ (part-titlepage-editor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+ (part-titlepage-firstname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+ (part-titlepage-graphic (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+ (part-titlepage-honorific (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+ (part-titlepage-indexterm (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+ (part-titlepage-invpartnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+ (part-titlepage-isbn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issn"))
+ (part-titlepage-issn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+ (part-titlepage-issuenum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+ (part-titlepage-itermset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+ (part-titlepage-keywordset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+ (part-titlepage-legalnotice (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+ (part-titlepage-lineage (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+ (part-titlepage-mediaobject (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+ (part-titlepage-modespec (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+ (part-titlepage-orgname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+ (part-titlepage-othercredit (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othername"))
+ (part-titlepage-othername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+ (part-titlepage-pagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+ (part-titlepage-printhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productname"))
+ (part-titlepage-productname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+ (part-titlepage-productnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+ (part-titlepage-pubdate (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+ (part-titlepage-publisher (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+ (part-titlepage-publishername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+ (part-titlepage-pubsnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+ (part-titlepage-releaseinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+ (part-titlepage-revhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+ (part-titlepage-seriesinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+ (part-titlepage-seriesvolnums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+ (part-titlepage-subjectset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+ (part-titlepage-subtitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "surname"))
+ (part-titlepage-surname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "title"))
+ (part-titlepage-title (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+ (part-titlepage-titleabbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+ (part-titlepage-volumenum (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))))
+
+(define (part-titlepage-before node side)
+ (if (equal? side 'recto)
+ (cond
+ ((equal? (gi node) (normalize "corpauthor"))
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;")))
+ ((equal? (gi node) (normalize "authorgroup"))
+ (if (have-sibling? (normalize "corpauthor") node)
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ ((equal? (gi node) (normalize "author"))
+ (if (or (have-sibling? (normalize "corpauthor") node)
+ (have-sibling? (normalize "authorgroup") node))
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ (else (empty-sosofo)))
+ (empty-sosofo)))
+
+(define (part-titlepage-default node side)
+ (let ((foo (debug (string-append "No part-titlepage-* for " (gi node) "!"))))
+ (empty-sosofo)))
+
+(define (part-titlepage-element node side)
+ (if (equal? side 'recto)
+ (with-mode part-titlepage-recto-mode
+ (process-node-list node))
+ (with-mode part-titlepage-verso-mode
+ (process-node-list node))))
+
+(define (part-titlepage-abbrev node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-abstract node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-address node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-affiliation node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-artpagenums node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-author node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-authorblurb node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-authorgroup node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-authorinitials node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-bibliomisc node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-biblioset node side)
+ (part-titlepage node side))
+(define (part-titlepage-bookbiblio node side)
+ (part-titlepage node side))
+(define (part-titlepage-citetitle node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-collab node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-confgroup node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-contractnum node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-contractsponsor node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-contrib node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-copyright node side)
+ (part-titlepage-element node side))
+
+(define (part-titlepage-corpauthor node side)
+ (if (equal? side 'recto)
+ (book-titlepage-element node side)
+ (if (first-sibling? node)
+ (make paragraph
+ (with-mode book-titlepage-verso-mode
+ (process-node-list
+ (select-elements (children (parent node))
+ (normalize "corpauthor")))))
+ (empty-sosofo))))
+
+(define (part-titlepage-corpname node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-date node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-edition node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-editor node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-firstname node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-graphic node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-honorific node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-indexterm node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-invpartnumber node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-isbn node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-issn node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-issuenum node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-itermset node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-keywordset node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-legalnotice node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-lineage node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-mediaobject node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-modespec node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-orgname node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-othercredit node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-othername node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-pagenums node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-printhistory node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-productname node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-productnumber node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-pubdate node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-publisher node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-publishername node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-pubsnumber node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-releaseinfo node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-revhistory node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-seriesinfo node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-seriesvolnums node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-subjectset node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-subtitle node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-surname node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-title node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-titleabbrev node side)
+ (part-titlepage-element node side))
+(define (part-titlepage-volumenum node side)
+ (part-titlepage-element node side))
+
+(define part-titlepage-recto-style
+ (style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 1)))
+
+(define part-titlepage-verso-style
+ (style
+ font-family-name: %body-font-family%))
+
+(mode part-titlepage-recto-mode
+ (element abbrev
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element abstract
+ (make display-group
+ use: part-titlepage-recto-style
+ quadding: 'start
+ ($semiformal-object$)))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element (abstract para)
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element address
+ (make display-group
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make display-group
+ use: part-titlepage-recto-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element author
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element authorblurb
+ (make display-group
+ use: part-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element (authorblurb para)
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element authorgroup
+ (make display-group
+ (process-children)))
+
+ (element authorinitials
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ (make sequence
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (process-children))
+ ;; This paragraph is a hack to get the spacing right.
+ ;; Authors always have an affiliation paragraph below them, even if
+ ;; it's empty, so corpauthors need one too.
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal "\no-break-space;"))))
+
+ (element corpname
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ (let ((editor-name (author-string)))
+ (make sequence
+ (if (first-sibling?)
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor% 6)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal (gentext-edited-by)))
+ (empty-sosofo))
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal editor-name)))))
+
+ (element firstname
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'center)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: part-titlepage-recto-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: 'start
+ line-spacing: (* 0.8 (inherited-line-spacing))
+ font-size: (* 0.8 (inherited-font-size))
+ (process-children)))
+
+ (element lineage
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element othercredit
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element othername
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element printhistory
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publisher
+ (make display-group
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: part-titlepage-recto-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: part-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 4)
+ line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+ space-before: (* (HSIZE 4) %head-before-factor%)
+ quadding: %division-subtitle-quadding%
+ keep-with-next?: #t
+ (process-children-trim)))
+
+ (element surname
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element title
+ (let ((division (ancestor-member (current-node) (division-element-list))))
+ (make paragraph
+ use: part-titlepage-recto-style
+ font-size: (HSIZE 5)
+ line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+ space-before: (* (HSIZE 5) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% 1 0)
+ (if (string=? (element-label division) "")
+ (empty-sosofo)
+ (literal (element-label division)
+ (gentext-label-title-sep (gi division))))
+ (with-mode title-mode
+ (process-children)))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: part-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+)
+
+(mode part-titlepage-verso-mode
+ (element abbrev
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element abstract ($semiformal-object$))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element address
+ (make display-group
+ use: part-titlepage-verso-style
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element author
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element authorblurb
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element authorgroup
+ (make paragraph
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (process-children-trim))))
+
+ (element authorinitials
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: part-titlepage-verso-style
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ ;; note: part-titlepage-corpauthor takes care of wrapping multiple
+ ;; corpauthors
+ (make sequence
+ (if (first-sibling?)
+ (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+ (empty-sosofo)
+ (literal (gentext-by) " "))
+ (literal ", "))
+ (process-children)))
+
+ (element corpname
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ ;; Print the editor name.
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-edited-by))
+ (literal "\no-break-space;")
+ (literal (author-string))))
+ (make sequence
+ (literal (author-string))))))
+
+ (element firstname
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'start)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: part-titlepage-verso-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: part-titlepage-verso-style
+ font-size: (* (inherited-font-size) 0.8)
+ (process-children-trim)))
+
+ (element lineage
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element othercredit
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element othername
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element printhistory
+ (make display-group
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ (literal (gentext-element-name-space (gi (current-node))))
+ (process-children)))
+
+ (element publisher
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: part-titlepage-verso-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: part-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: part-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: part-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: part-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: part-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revremark)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (literal (if (first-sibling?) ": " "; "))
+ (process-children)))
+
+ (element surname
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+
+ (element title
+ (let ((division (ancestor-member (current-node) (division-element-list))))
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (if (string=? (element-label division) "")
+ (empty-sosofo)
+ (literal (element-label division)
+ (gentext-label-title-sep (gi division))))
+ (with-mode title-mode
+ (process-children)))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: part-titlepage-verso-style
+ (process-children)))
+)
+
+;; == Title pages for ARTICLEs ==========================================
+;;
+;; Note: Article title pages are a little different in that they do not
+;; create their own simple-page-sequence.
+;;
+
+(define (article-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "releaseinfo")
+ (normalize "copyright")
+ (normalize "pubdate")
+ (normalize "revhistory")
+ (normalize "abstract")))
+
+(define (article-titlepage-verso-elements)
+ '())
+
+(define (article-titlepage-content? elements side)
+ (titlepage-content? elements (if (equal? side 'recto)
+ (article-titlepage-recto-elements)
+ (article-titlepage-verso-elements))))
+
+(define (article-titlepage elements #!optional (side 'recto))
+ (let* ((nodelist (titlepage-nodelist
+ (if (equal? side 'recto)
+ (article-titlepage-recto-elements)
+ (article-titlepage-verso-elements))
+ elements)))
+ (if (article-titlepage-content? elements side)
+ (make sequence
+ (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))))
+ (article-titlepage-before (node-list-first nl) side)
+ (empty-sosofo))
+ (cond
+ ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+ (article-titlepage-abbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+ (article-titlepage-abstract (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "address"))
+ (article-titlepage-address (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+ (article-titlepage-affiliation (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+ (article-titlepage-artpagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "author"))
+ (article-titlepage-author (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+ (article-titlepage-authorblurb (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+ (article-titlepage-authorgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+ (article-titlepage-authorinitials (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+ (article-titlepage-bibliomisc (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+ (article-titlepage-biblioset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+ (article-titlepage-bookbiblio (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+ (article-titlepage-citetitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "collab"))
+ (article-titlepage-collab (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+ (article-titlepage-confgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+ (article-titlepage-contractnum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+ (article-titlepage-contractsponsor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+ (article-titlepage-contrib (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+ (article-titlepage-copyright (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+ (article-titlepage-corpauthor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+ (article-titlepage-corpname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "date"))
+ (article-titlepage-date (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "edition"))
+ (article-titlepage-edition (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "editor"))
+ (article-titlepage-editor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+ (article-titlepage-firstname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+ (article-titlepage-graphic (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+ (article-titlepage-honorific (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+ (article-titlepage-indexterm (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+ (article-titlepage-invpartnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+ (article-titlepage-isbn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issn"))
+ (article-titlepage-issn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+ (article-titlepage-issuenum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+ (article-titlepage-itermset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+ (article-titlepage-keywordset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+ (article-titlepage-legalnotice (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+ (article-titlepage-lineage (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+ (article-titlepage-mediaobject (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+ (article-titlepage-modespec (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+ (article-titlepage-orgname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+ (article-titlepage-othercredit (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othername"))
+ (article-titlepage-othername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+ (article-titlepage-pagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+ (article-titlepage-printhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productname"))
+ (article-titlepage-productname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+ (article-titlepage-productnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+ (article-titlepage-pubdate (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+ (article-titlepage-publisher (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+ (article-titlepage-publishername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+ (article-titlepage-pubsnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+ (article-titlepage-releaseinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+ (article-titlepage-revhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+ (article-titlepage-seriesinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+ (article-titlepage-seriesvolnums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+ (article-titlepage-subjectset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+ (article-titlepage-subtitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "surname"))
+ (article-titlepage-surname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "title"))
+ (article-titlepage-title (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+ (article-titlepage-titleabbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+ (article-titlepage-volumenum (node-list-first nl) side))
+ (else
+ (article-titlepage-default (node-list-first nl) side)))
+ (loop (node-list-rest nl) (node-list-first nl)))))
+
+ (if (and %generate-article-toc%
+ %generate-article-toc-on-titlepage%
+ (equal? side 'recto))
+ (make display-group
+ (build-toc (current-node)
+ (toc-depth (current-node))))
+ (empty-sosofo)))
+ (empty-sosofo))))
+
+(define (article-titlepage-before node side)
+ (empty-sosofo))
+
+(define (article-titlepage-default node side)
+ (let ((foo (debug (string-append "No article-titlepage-* for " (gi node) "!"))))
+ (empty-sosofo)))
+
+(define (article-titlepage-element node side)
+ (if (equal? side 'recto)
+ (with-mode article-titlepage-recto-mode
+ (process-node-list node))
+ (with-mode article-titlepage-verso-mode
+ (process-node-list node))))
+
+(define (article-titlepage-abbrev node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-abstract node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-address node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-affiliation node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-artpagenums node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-author node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-authorblurb node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-authorgroup node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-authorinitials node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-bibliomisc node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-biblioset node side)
+ (article-titlepage node side))
+(define (article-titlepage-bookbiblio node side)
+ (article-titlepage node side))
+(define (article-titlepage-citetitle node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-collab node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-confgroup node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-contractnum node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-contractsponsor node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-contrib node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-copyright node side)
+ (article-titlepage-element node side))
+
+(define (article-titlepage-corpauthor node side)
+ (if (equal? side 'recto)
+ (book-titlepage-element node side)
+ (if (first-sibling? node)
+ (make paragraph
+ (with-mode book-titlepage-verso-mode
+ (process-node-list
+ (select-elements (children (parent node))
+ (normalize "corpauthor")))))
+ (empty-sosofo))))
+
+(define (article-titlepage-corpname node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-date node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-edition node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-editor node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-firstname node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-graphic node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-honorific node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-indexterm node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-invpartnumber node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-isbn node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-issn node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-issuenum node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-itermset node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-keywordset node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-legalnotice node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-lineage node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-mediaobject node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-modespec node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-orgname node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-othercredit node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-othername node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-pagenums node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-printhistory node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-productname node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-productnumber node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-pubdate node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-publisher node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-publishername node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-pubsnumber node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-releaseinfo node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-revhistory node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-seriesinfo node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-seriesvolnums node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-subjectset node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-subtitle node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-surname node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-title node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-titleabbrev node side)
+ (article-titlepage-element node side))
+(define (article-titlepage-volumenum node side)
+ (article-titlepage-element node side))
+
+(define article-titlepage-recto-style
+ (style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 1)))
+
+(define article-titlepage-verso-style
+ (style
+ font-family-name: %body-font-family%))
+
+(mode article-titlepage-recto-mode
+ (element abbrev
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element abstract
+ (make display-group
+ use: article-titlepage-verso-style ;; EVEN THOUGH IT'S RECTO!
+ quadding: 'start
+ start-indent: (+ (inherited-start-indent) (/ %body-width% 24))
+ end-indent: (+ (inherited-end-indent) (/ %body-width% 24))
+ ($semiformal-object$)))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element address
+ (make display-group
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make display-group
+ use: article-titlepage-recto-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element author
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %article-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element authorblurb
+ (make display-group
+ use: article-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element (authorblurb para)
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element authorgroup
+ (make display-group
+ (process-children)))
+
+ (element authorinitials
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ (make sequence
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %article-title-quadding%
+ keep-with-next?: #t
+ (process-children))
+ ;; This paragraph is a hack to get the spacing right.
+ ;; Authors always have an affiliation paragraph below them, even if
+ ;; it's empty, so corpauthors need one too.
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %article-title-quadding%
+ keep-with-next?: #t
+ (literal "\no-break-space;"))))
+
+ (element corpname
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ (let ((editor-name (author-string)))
+ (make sequence
+ (if (first-sibling?)
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor% 6)
+ quadding: %article-title-quadding%
+ keep-with-next?: #t
+ (literal (gentext-edited-by)))
+ (empty-sosofo))
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %article-title-quadding%
+ keep-with-next?: #t
+ (literal editor-name)))))
+
+ (element firstname
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'center)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element keyword
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: article-titlepage-recto-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: 'start
+ line-spacing: (* 0.8 (inherited-line-spacing))
+ font-size: (* 0.8 (inherited-font-size))
+ (process-children)))
+
+ (element lineage
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element othercredit
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %article-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element othername
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element printhistory
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element publisher
+ (make display-group
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: article-titlepage-recto-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: article-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 4)
+ line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+ space-before: (* (HSIZE 4) %head-before-factor%)
+ quadding: %article-subtitle-quadding%
+ keep-with-next?: #t
+ (process-children-trim)))
+
+ (element surname
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+
+ (element title
+ (make paragraph
+ use: article-titlepage-recto-style
+ font-size: (HSIZE 5)
+ line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+ space-before: (* (HSIZE 5) %head-before-factor%)
+ quadding: %article-title-quadding%
+ keep-with-next?: #t
+ (with-mode title-mode
+ (process-children-trim))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: article-titlepage-recto-style
+ quadding: %article-title-quadding%
+ (process-children)))
+)
+
+(mode article-titlepage-verso-mode
+ (element abbrev
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element abstract ($semiformal-object$))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element address
+ (make display-group
+ use: article-titlepage-verso-style
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element author
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element authorblurb
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element authorgroup
+ (make paragraph
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (process-children-trim))))
+
+ (element authorinitials
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: article-titlepage-verso-style
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ ;; note: article-titlepage-corpauthor takes care of wrapping multiple
+ ;; corpauthors
+ (make sequence
+ (if (first-sibling?)
+ (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+ (empty-sosofo)
+ (literal (gentext-by) " "))
+ (literal ", "))
+ (process-children)))
+
+ (element corpname
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ ;; Print the editor name.
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-edited-by))
+ (literal "\no-break-space;")
+ (literal (author-string))))
+ (make sequence
+ (literal (author-string))))))
+
+ (element firstname
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'start)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: article-titlepage-verso-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: article-titlepage-verso-style
+ font-size: (* (inherited-font-size) 0.8)
+ (process-children-trim)))
+
+ (element lineage
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element othercredit
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element othername
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element printhistory
+ (make display-group
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ (literal (gentext-element-name-space (gi (current-node))))
+ (process-children)))
+
+ (element publisher
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: article-titlepage-verso-style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (node-list-empty? revnumber)
+ (empty-sosofo)
+ (make paragraph
+ use: article-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (node-list-empty? revdate)
+ (empty-sosofo)
+ (make paragraph
+ use: article-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (node-list-empty? revauthor)
+ (empty-sosofo)
+ (make paragraph
+ use: article-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor)))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: article-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: article-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (literal (if (first-sibling?) ": " "; "))
+ (process-children)))
+
+ (element surname
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+ (element title
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (with-mode title-mode
+ (process-children))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: article-titlepage-verso-style
+ (process-children)))
+
+)
+
+;; == Title pages for REFERENCEs ========================================
+
+(define (reference-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "editor")))
+
+(define (reference-titlepage-verso-elements)
+ '())
+
+(define (reference-titlepage-content? elements side)
+ (titlepage-content? elements (if (equal? side 'recto)
+ (reference-titlepage-recto-elements)
+ (reference-titlepage-verso-elements))))
+
+(define (reference-titlepage elements #!optional (side 'recto))
+ (let ((nodelist (titlepage-nodelist
+ (if (equal? side 'recto)
+ (reference-titlepage-recto-elements)
+ (reference-titlepage-verso-elements))
+ elements))
+ ;; partintro is a special case...
+ (partintro (node-list-first
+ (node-list-filter-by-gi elements (list (normalize "partintro"))))))
+ (if (reference-titlepage-content? elements side)
+ (make simple-page-sequence
+ page-n-columns: %titlepage-n-columns%
+ input-whitespace-treatment: 'collapse
+ use: default-text-style
+
+ ;; 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 ""))
+
+ (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))))
+ (reference-titlepage-before (node-list-first nl) side)
+ (empty-sosofo))
+ (cond
+ ((equal? (gi (node-list-first nl)) (normalize "abbrev"))
+ (reference-titlepage-abbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "abstract"))
+ (reference-titlepage-abstract (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "address"))
+ (reference-titlepage-address (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "affiliation"))
+ (reference-titlepage-affiliation (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "artpagenums"))
+ (reference-titlepage-artpagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "author"))
+ (reference-titlepage-author (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorblurb"))
+ (reference-titlepage-authorblurb (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorgroup"))
+ (reference-titlepage-authorgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "authorinitials"))
+ (reference-titlepage-authorinitials (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bibliomisc"))
+ (reference-titlepage-bibliomisc (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "biblioset"))
+ (reference-titlepage-biblioset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "bookbiblio"))
+ (reference-titlepage-bookbiblio (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "citetitle"))
+ (reference-titlepage-citetitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "collab"))
+ (reference-titlepage-collab (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "confgroup"))
+ (reference-titlepage-confgroup (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractnum"))
+ (reference-titlepage-contractnum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contractsponsor"))
+ (reference-titlepage-contractsponsor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "contrib"))
+ (reference-titlepage-contrib (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "copyright"))
+ (reference-titlepage-copyright (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpauthor"))
+ (reference-titlepage-corpauthor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "corpname"))
+ (reference-titlepage-corpname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "date"))
+ (reference-titlepage-date (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "edition"))
+ (reference-titlepage-edition (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "editor"))
+ (reference-titlepage-editor (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "firstname"))
+ (reference-titlepage-firstname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "graphic"))
+ (reference-titlepage-graphic (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "honorific"))
+ (reference-titlepage-honorific (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "indexterm"))
+ (reference-titlepage-indexterm (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "invpartnumber"))
+ (reference-titlepage-invpartnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "isbn"))
+ (reference-titlepage-isbn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issn"))
+ (reference-titlepage-issn (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "issuenum"))
+ (reference-titlepage-issuenum (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "itermset"))
+ (reference-titlepage-itermset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "keywordset"))
+ (reference-titlepage-keywordset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "legalnotice"))
+ (reference-titlepage-legalnotice (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "lineage"))
+ (reference-titlepage-lineage (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "mediaobject"))
+ (reference-titlepage-mediaobject (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "modespec"))
+ (reference-titlepage-modespec (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "orgname"))
+ (reference-titlepage-orgname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othercredit"))
+ (reference-titlepage-othercredit (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "othername"))
+ (reference-titlepage-othername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pagenums"))
+ (reference-titlepage-pagenums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "printhistory"))
+ (reference-titlepage-printhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productname"))
+ (reference-titlepage-productname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "productnumber"))
+ (reference-titlepage-productnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubdate"))
+ (reference-titlepage-pubdate (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publisher"))
+ (reference-titlepage-publisher (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "publishername"))
+ (reference-titlepage-publishername (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "pubsnumber"))
+ (reference-titlepage-pubsnumber (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "releaseinfo"))
+ (reference-titlepage-releaseinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "revhistory"))
+ (reference-titlepage-revhistory (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesinfo"))
+ (reference-titlepage-seriesinfo (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "seriesvolnums"))
+ (reference-titlepage-seriesvolnums (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subjectset"))
+ (reference-titlepage-subjectset (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "subtitle"))
+ (reference-titlepage-subtitle (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "surname"))
+ (reference-titlepage-surname (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "title"))
+ (reference-titlepage-title (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "titleabbrev"))
+ (reference-titlepage-titleabbrev (node-list-first nl) side))
+ ((equal? (gi (node-list-first nl)) (normalize "volumenum"))
+ (reference-titlepage-volumenum (node-list-first nl) side))
+ (else
+ (reference-titlepage-default (node-list-first nl) side)))
+ (loop (node-list-rest nl) (node-list-first nl)))))
+
+ (if (and %generate-reference-toc%
+ %generate-reference-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))))
+
+(define (reference-titlepage-before node side)
+ (if (equal? side 'recto)
+ (cond
+ ((equal? (gi node) (normalize "corpauthor"))
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;")))
+ ((equal? (gi node) (normalize "authorgroup"))
+ (if (have-sibling? (normalize "corpauthor") node)
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ ((equal? (gi node) (normalize "author"))
+ (if (or (have-sibling? (normalize "corpauthor") node)
+ (have-sibling? (normalize "authorgroup") node))
+ (empty-sosofo)
+ (make paragraph
+ space-after: (* (HSIZE 5) %head-after-factor% 8)
+ (literal "\no-break-space;"))))
+ (else (empty-sosofo)))
+ (empty-sosofo)))
+
+(define (reference-titlepage-default node side)
+ (let ((foo (debug (string-append "No reference-titlepage-* for " (gi node) "!"))))
+ (empty-sosofo)))
+
+(define (reference-titlepage-element node side)
+ (if (equal? side 'recto)
+ (with-mode reference-titlepage-recto-mode
+ (process-node-list node))
+ (with-mode reference-titlepage-verso-mode
+ (process-node-list node))))
+
+(define (reference-titlepage-abbrev node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-abstract node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-address node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-affiliation node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-artpagenums node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-author node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-authorblurb node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-authorgroup node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-authorinitials node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-bibliomisc node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-biblioset node side)
+ (reference-titlepage node side))
+(define (reference-titlepage-bookbiblio node side)
+ (reference-titlepage node side))
+(define (reference-titlepage-citetitle node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-collab node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-confgroup node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-contractnum node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-contractsponsor node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-contrib node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-copyright node side)
+ (reference-titlepage-element node side))
+
+(define (reference-titlepage-corpauthor node side)
+ (if (equal? side 'recto)
+ (book-titlepage-element node side)
+ (if (first-sibling? node)
+ (make paragraph
+ (with-mode book-titlepage-verso-mode
+ (process-node-list
+ (select-elements (children (parent node))
+ (normalize "corpauthor")))))
+ (empty-sosofo))))
+
+(define (reference-titlepage-corpname node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-date node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-edition node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-editor node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-firstname node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-graphic node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-honorific node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-indexterm node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-invpartnumber node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-isbn node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-issn node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-issuenum node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-itermset node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-keywordset node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-legalnotice node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-lineage node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-mediaobject node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-modespec node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-orgname node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-othercredit node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-othername node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-pagenums node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-printhistory node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-productname node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-productnumber node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-pubdate node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-publisher node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-publishername node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-pubsnumber node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-releaseinfo node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-revhistory node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-seriesinfo node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-seriesvolnums node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-subjectset node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-subtitle node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-surname node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-title node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-titleabbrev node side)
+ (reference-titlepage-element node side))
+(define (reference-titlepage-volumenum node side)
+ (reference-titlepage-element node side))
+
+(define reference-titlepage-recto-style
+ (style
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 1)))
+
+(define reference-titlepage-verso-style
+ (style
+ font-family-name: %body-font-family%))
+
+(mode reference-titlepage-recto-mode
+ (element abbrev
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element abstract
+ (make display-group
+ use: reference-titlepage-recto-style
+ quadding: 'start
+ ($semiformal-object$)))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element (abstract para)
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element address
+ (make display-group
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make display-group
+ use: reference-titlepage-recto-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element author
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element authorblurb
+ (make display-group
+ use: reference-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element (authorblurb para)
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: 'start
+ (process-children)))
+
+ (element authorgroup
+ (make display-group
+ (process-children)))
+
+ (element authorinitials
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ (make sequence
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (process-children))
+ ;; This paragraph is a hack to get the spacing right.
+ ;; Authors always have an affiliation paragraph below them, even if
+ ;; it's empty, so corpauthors need one too.
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal "\no-break-space;"))))
+
+ (element corpname
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ (let ((editor-name (author-string)))
+ (make sequence
+ (if (first-sibling?)
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 1)
+ line-spacing: (* (HSIZE 1) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor% 6)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal (gentext-edited-by)))
+ (empty-sosofo))
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor% 4)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal editor-name)))))
+
+ (element firstname
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'center)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: reference-titlepage-recto-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: 'start
+ line-spacing: (* 0.8 (inherited-line-spacing))
+ font-size: (* 0.8 (inherited-font-size))
+ (process-children)))
+
+ (element lineage
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element othercredit
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 3)
+ line-spacing: (* (HSIZE 3) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ (literal author-name))
+ (process-node-list author-affil))))
+
+ (element othername
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element printhistory
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publisher
+ (make display-group
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: reference-titlepage-recto-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: reference-titlepage-recto-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 4)
+ line-spacing: (* (HSIZE 4) %line-spacing-factor%)
+ space-before: (* (HSIZE 4) %head-before-factor%)
+ quadding: %division-subtitle-quadding%
+ keep-with-next?: #t
+ (process-children-trim)))
+
+ (element surname
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+
+ (element title
+ (let ((ref (ancestor-member (current-node)
+ (list (normalize "reference")))))
+ (make paragraph
+ use: reference-titlepage-recto-style
+ font-size: (HSIZE 5)
+ line-spacing: (* (HSIZE 5) %line-spacing-factor%)
+ space-before: (* (HSIZE 5) %head-before-factor%)
+ quadding: %division-title-quadding%
+ keep-with-next?: #t
+ heading-level: (if %generate-heading-level% 1 0)
+ (literal (element-label ref)
+ (gentext-label-title-sep (gi ref)))
+ (with-mode title-mode
+ (process-children)))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: reference-titlepage-recto-style
+ quadding: %division-title-quadding%
+ (process-children)))
+)
+
+(mode reference-titlepage-verso-mode
+ (element abbrev
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element abstract ($semiformal-object$))
+
+ (element (abstract title) (empty-sosofo))
+
+ (element address
+ (make display-group
+ use: reference-titlepage-verso-style
+ (with-mode titlepage-address-mode
+ ($linespecific-display$ %indent-address-lines% %number-address-lines%))))
+
+ (element affiliation
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element artpagenums
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element author
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element authorblurb
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element authorgroup
+ (make paragraph
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (process-children-trim))))
+
+ (element authorinitials
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element bibliomisc (process-children))
+
+ (element bibliomset (process-children))
+
+ (element collab
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element confgroup
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element contractnum
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element contractsponsor
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element contrib
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element copyright
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (literal (gentext-element-name (current-node)))
+ (literal "\no-break-space;")
+ (literal (dingbat "copyright"))
+ (literal "\no-break-space;")
+ (process-children)))
+
+ (element (copyright year)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling? (current-node)))
+ (literal ", ")
+ (literal " "))))
+
+ (element (copyright holder) ($charseq$))
+
+ (element corpauthor
+ ;; note: reference-titlepage-corpauthor takes care of wrapping multiple
+ ;; corpauthors
+ (make sequence
+ (if (first-sibling?)
+ (if (equal? (gi (parent (current-node))) (normalize "authorgroup"))
+ (empty-sosofo)
+ (literal (gentext-by) " "))
+ (literal ", "))
+ (process-children)))
+
+ (element corpname
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element date
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element edition
+ (make paragraph
+ (process-children)
+ (literal "\no-break-space;")
+ (literal (gentext-element-name-space (gi (current-node))))))
+
+ (element editor
+ ;; Print the editor name.
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (or #t (not in-group)) ; nevermind, always put out the Edited by
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-edited-by))
+ (literal "\no-break-space;")
+ (literal (author-string))))
+ (make sequence
+ (literal (author-string))))))
+
+ (element firstname
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element graphic
+ (let* ((nd (current-node))
+ (fileref (attribute-string "fileref" nd))
+ (entityref (attribute-string "entityref" nd))
+ (format (attribute-string "format" nd))
+ (align (attribute-string "align" nd)))
+ (if (or fileref entityref)
+ (make external-graphic
+ notation-system-id: (if format format "")
+ entity-system-id: (if fileref
+ (graphic-file fileref)
+ (if entityref
+ (entity-generated-system-id entityref)
+ ""))
+ display?: #t
+ display-alignment: 'start)
+ (empty-sosofo))))
+
+ (element honorific
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element isbn
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element issn
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element itermset (empty-sosofo))
+
+ (element invpartnumber
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element issuenum
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element jobtitle
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element keywordset
+ (make paragraph
+ quadding: 'start
+ (make sequence
+ font-weight: 'bold
+ (literal "Keywords: "))
+ (process-children)))
+
+ (element (keyword)
+ (make sequence
+ (process-children)
+ (if (not (last-sibling?))
+ (literal ", ")
+ (literal ""))))
+
+ (element legalnotice
+ (make display-group
+ use: reference-titlepage-verso-style
+ ($semiformal-object$)))
+
+ (element (legalnotice title) (empty-sosofo))
+
+ (element (legalnotice para)
+ (make paragraph
+ use: reference-titlepage-verso-style
+ font-size: (* (inherited-font-size) 0.8)
+ (process-children-trim)))
+
+ (element lineage
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element modespec (empty-sosofo))
+
+ (element orgdiv
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element orgname
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element othercredit
+ ;; Print the author name. Handle the case where there's no AUTHORGROUP
+ (let ((in-group (have-ancestor? (normalize "authorgroup") (current-node))))
+ (if (not in-group)
+ (make paragraph
+ ;; Hack to get the spacing right below the author name line...
+ space-after: (* %bf-size% %line-spacing-factor%)
+ (make sequence
+ (literal (gentext-by))
+ (literal "\no-break-space;")
+ (literal (author-list-string))))
+ (make sequence
+ (literal (author-list-string))))))
+
+ (element othername
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element pagenums
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element printhistory
+ (make display-group
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element productname
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element productnumber
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element pubdate
+ (make paragraph
+ (literal (gentext-element-name-space (gi (current-node))))
+ (process-children)))
+
+ (element publisher
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element publishername
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element pubsnumber
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element releaseinfo
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element revhistory
+ (make sequence
+ (make paragraph
+ use: reference-titlepage-verso-style
+ space-before: (* (HSIZE 3) %head-before-factor%)
+ space-after: (/ (* (HSIZE 1) %head-before-factor%) 2)
+ (literal (gentext-element-name (current-node))))
+ (make table
+ before-row-border: #f
+ (process-children))))
+
+ (element (revhistory revision)
+ (let ((revnumber (select-elements (descendants (current-node))
+ (normalize "revnumber")))
+ (revdate (select-elements (descendants (current-node))
+ (normalize "date")))
+ (revauthor (select-elements (descendants (current-node))
+ (normalize "authorinitials")))
+ (revremark (select-elements (descendants (current-node))
+ (normalize "revremark")))
+ (revdescription (select-elements (descendants (current-node))
+ (normalize "revdescription"))))
+ (make sequence
+ (make table-row
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (if (not (node-list-empty? revnumber))
+ (make paragraph
+ use: reference-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-element-name-space (current-node)))
+ (process-node-list revnumber))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 2
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revdate))
+ (make paragraph
+ use: reference-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdate))
+ (empty-sosofo)))
+ (make table-cell
+ column-number: 3
+ n-columns-spanned: 1
+ n-rows-spanned: 1
+ start-indent: 0pt
+ cell-before-column-margin: (if (equal? (print-backend) 'tex)
+ 6pt
+ 0pt)
+ (if (not (node-list-empty? revauthor))
+ (make paragraph
+ use: reference-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (literal (gentext-revised-by))
+ (process-node-list revauthor))
+ (empty-sosofo))))
+ (make table-row
+ cell-after-row-border: #f
+ (make table-cell
+ column-number: 1
+ n-columns-spanned: 3
+ n-rows-spanned: 1
+ start-indent: 0pt
+ (cond ((not (node-list-empty? revremark))
+ (make paragraph
+ use: reference-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ space-after: (if (last-sibling?)
+ 0pt
+ (/ %block-sep% 2))
+ (process-node-list revremark)))
+ ((not (node-list-empty? revdescription))
+ (make sequence
+ use: reference-titlepage-verso-style
+ font-size: %bf-size%
+ font-weight: 'medium
+ (process-node-list revdescription)))
+ (else (empty-sosofo))))))))
+
+ (element (revision revnumber) (process-children-trim))
+ (element (revision date) (process-children-trim))
+ (element (revision authorinitials) (process-children-trim))
+ (element (revision revremark) (process-children-trim))
+ (element (revision revdescription) (process-children))
+
+ (element seriesvolnums
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element shortaffil
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element subjectset (empty-sosofo))
+
+ (element subtitle
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (literal (if (first-sibling?) ": " "; "))
+ (process-children)))
+
+ (element surname
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+ (element title
+ (let ((ref (ancestor-member (current-node)
+ (list (normalize "reference")))))
+ (make sequence
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ (literal (element-label ref)
+ (gentext-label-title-sep (gi ref)))
+ (with-mode title-mode
+ (process-children)))))
+
+ (element formalpara ($para-container$))
+ (element (formalpara title) ($runinhead$))
+ (element (formalpara para) (make sequence (process-children)))
+
+ (element titleabbrev (empty-sosofo))
+
+ (element volumenum
+ (make paragraph
+ use: reference-titlepage-verso-style
+ (process-children)))
+
+)
diff --git a/print/dbverb.dsl b/print/dbverb.dsl
new file mode 100644
index 0000000..cb22cb1
--- /dev/null
+++ b/print/dbverb.dsl
@@ -0,0 +1,222 @@
+;; $Id: dbverb.dsl,v 1.6 2004/10/09 19:46:33 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define verbatim-style
+ (style
+ font-family-name: %mono-font-family%
+ font-size: (* (inherited-font-size)
+ (if %verbatim-size-factor%
+ %verbatim-size-factor%
+ 1.0))
+ font-weight: 'medium
+ font-posture: 'upright
+ line-spacing: (* (* (inherited-font-size)
+ (if %verbatim-size-factor%
+ %verbatim-size-factor%
+ 1.0))
+ %line-spacing-factor%)
+ first-line-start-indent: 0pt
+ lines: 'asis
+ input-whitespace-treatment: 'preserve))
+
+(define inline-verbatim-style
+ (style
+ font-family-name: %mono-font-family%
+ font-size: (* (inherited-font-size)
+ (if %verbatim-size-factor%
+ %verbatim-size-factor%
+ 1.0))
+ font-weight: 'medium
+ font-posture: 'upright
+ lines: 'asis
+ input-whitespace-treatment: 'preserve))
+
+(define linespecific-style
+ (style
+ first-line-start-indent: 0pt
+ lines: 'asis
+ input-whitespace-treatment: 'preserve))
+
+(define ($format-indent$ indent)
+ (literal indent))
+
+(define ($format-linenumber$ linenumber)
+ ;; A line-field would make more sense here, and allow proportional
+ ;; fonts, but you can't put line-fields in the middle of a paragraph
+ ;; in the current RTF backend of Jade
+ (let ((%factor% (if %verbatim-size-factor%
+ %verbatim-size-factor%
+ 1.0)))
+ (if (equal? (remainder linenumber %linenumber-mod%) 0)
+ (make sequence
+ use: verbatim-style
+ (literal (pad-string (format-number linenumber "1")
+ %linenumber-length% %linenumber-padchar%))
+ ($linenumber-space$))
+ (make sequence
+ use: verbatim-style
+ (literal (pad-string "" %linenumber-length% " "))
+ ($linenumber-space$)))))
+
+(define ($line-start$ indent line-numbers? #!optional (line-number 1))
+ (make sequence
+ (if indent
+ ($format-indent$ indent)
+ (empty-sosofo))
+ (if line-numbers?
+ ($format-linenumber$ line-number)
+ (empty-sosofo))))
+
+(define ($linespecific-display$ indent line-numbers?)
+ (let ((vspace (if (INBLOCK?)
+ 0pt
+ (if (INLIST?)
+ %para-sep%
+ %block-sep%))))
+ (make paragraph
+ use: linespecific-style
+ space-before: (if (and (string=? (gi (parent)) (normalize "entry"))
+ (absolute-first-sibling?))
+ 0pt
+ vspace)
+ space-after: (if (and (string=? (gi (parent)) (normalize "entry"))
+ (absolute-last-sibling?))
+ 0pt
+ vspace)
+ start-indent: (if (INBLOCK?)
+ (inherited-start-indent)
+ (+ %block-start-indent% (inherited-start-indent)))
+ (if (or indent line-numbers?)
+ ($linespecific-line-by-line$ indent line-numbers?)
+ (process-children)))))
+
+(define ($linespecific-line-by-line$ indent line-numbers?)
+ (let ((expanded-content
+ ;; this is the content with
+ ;; inlinemediaobject/imageobject[@format='linespecific']
+ ;; expanded
+ (let loop ((kl (children (current-node))) (rl (empty-node-list)))
+ (if (node-list-empty? kl)
+ rl
+ (if (equal? (gi (node-list-first kl))
+ (normalize "inlinemediaobject"))
+ (let* ((imgobj (node-list-filter-by-gi
+ (children (node-list-first kl))
+ (list (normalize "imageobject"))))
+ (datobj (node-list-filter-by-gi
+ (children imgobj)
+ (list (normalize "imagedata")))))
+ (if (and (not (node-list-empty? imgobj))
+ (not (node-list-empty? datobj))
+ (equal? (attribute-string (normalize "format") datobj)
+ (normalize "linespecific")))
+ (loop (node-list-rest kl)
+ (node-list rl (string->nodes (include-characters
+ (if (attribute-string (normalize "fileref") datobj)
+ (attribute-string (normalize "fileref") datobj)
+ (entity-generated-system-id (attribute-string (normalize "entityref") datobj)))))))
+ (loop (node-list-rest kl)
+ (node-list rl (node-list-first kl)))))
+ (loop (node-list-rest kl) (node-list rl (node-list-first kl))))))))
+ (make sequence
+ ($line-start$ indent line-numbers? 1)
+ (let loop ((kl expanded-content)
+ (linecount 1)
+ (res (empty-sosofo)))
+ (if (node-list-empty? kl)
+ res
+ (loop
+ (node-list-rest kl)
+ (if (char=? (node-property 'char (node-list-first kl)
+ default: #\U-0000) #\U-000D)
+ (+ linecount 1)
+ linecount)
+ (let ((c (node-list-first kl)))
+ (if (char=? (node-property 'char c default: #\U-0000)
+ #\U-000D)
+ (sosofo-append res
+ (process-node-list c)
+ ($line-start$ indent line-numbers?
+ (+ linecount 1)))
+ (sosofo-append res (process-node-list c))))))))))
+
+(define ($verbatim-display$ indent line-numbers?)
+ (let* ((width-in-chars (if (attribute-string (normalize "width"))
+ (string->number (attribute-string (normalize "width")))
+ %verbatim-default-width%))
+ (fsize (lambda () (if (or (attribute-string (normalize "width"))
+ (not %verbatim-size-factor%))
+ (/ (/ (- %text-width% (inherited-start-indent))
+ width-in-chars)
+ 0.7)
+ (* (inherited-font-size)
+ %verbatim-size-factor%))))
+ (vspace-before (if (INBLOCK?)
+ 0pt
+ (if (INLIST?)
+ %para-sep%
+ %block-sep%)))
+ (vspace-after (if (INBLOCK?)
+ 0pt
+ (if (INLIST?)
+ 0pt
+ %block-sep%))))
+ (make paragraph
+ use: verbatim-style
+ space-before: (if (and (string=? (gi (parent)) (normalize "entry"))
+ (absolute-first-sibling?))
+ 0pt
+ vspace-before)
+ space-after: (if (and (string=? (gi (parent)) (normalize "entry"))
+ (absolute-last-sibling?))
+ 0pt
+ vspace-after)
+ font-size: (fsize)
+ line-spacing: (* (fsize) %line-spacing-factor%)
+ start-indent: (if (INBLOCK?)
+ (inherited-start-indent)
+ (+ %block-start-indent% (inherited-start-indent)))
+ (if (or indent line-numbers?)
+ ($linespecific-line-by-line$ indent line-numbers?)
+ (process-children)))))
+
+(element literallayout
+ (if (equal? (attribute-string "class") (normalize "monospaced"))
+ ($verbatim-display$
+ %indent-literallayout-lines%
+ (or %number-literallayout-lines%
+ (equal? (attribute-string (normalize "linenumbering"))
+ (normalize "numbered"))))
+ ($linespecific-display$
+ %indent-literallayout-lines%
+ (or %number-literallayout-lines%
+ (equal? (attribute-string (normalize "linenumbering"))
+ (normalize "numbered"))))))
+
+(element address
+ ($linespecific-display$
+ %indent-address-lines%
+ (or %number-address-lines%
+ (equal? (attribute-string (normalize "linenumbering"))
+ (normalize "numbered")))))
+
+(element programlisting
+ ($verbatim-display$
+ %indent-programlisting-lines%
+ (or %number-programlisting-lines%
+ (equal? (attribute-string (normalize "linenumbering"))
+ (normalize "numbered")))))
+
+(element screen
+ ($verbatim-display$
+ %indent-screen-lines%
+ (or %number-screen-lines%
+ (equal? (attribute-string (normalize "linenumbering"))
+ (normalize "numbered")))))
+
+(element screenshot (process-children))
+(element screeninfo (empty-sosofo))
+
diff --git a/print/docbook.dsl b/print/docbook.dsl
new file mode 100644
index 0000000..512eba1
--- /dev/null
+++ b/print/docbook.dsl
@@ -0,0 +1,197 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+
+<!ENTITY % dbl10n.ent SYSTEM "../common/dbl10n.ent">
+%dbl10n.ent;
+
+<!ENTITY dbl10n.dsl SYSTEM "../common/dbl10n.dsl">
+
+
+<!ENTITY dblib.dsl
+ PUBLIC "-//Norman Walsh//DOCUMENT DSSSL Library V2//EN" CDATA DSSSL>
+
+<!ENTITY dbparam.dsl SYSTEM "dbparam.dsl" CDATA DSSSL>
+
+
+<!ENTITY VERSION SYSTEM "../VERSION">
+
+<!ENTITY dbcommon.dsl SYSTEM "../common/dbcommon.dsl">
+<!ENTITY dbctable.dsl SYSTEM "../common/dbtable.dsl">
+
+<!ENTITY dbadmon.dsl SYSTEM "dbadmon.dsl">
+<!ENTITY dbautoc.dsl SYSTEM "dbautoc.dsl">
+<!ENTITY dbbibl.dsl SYSTEM "dbbibl.dsl">
+<!ENTITY dbblock.dsl SYSTEM "dbblock.dsl">
+<!ENTITY dbcallou.dsl SYSTEM "dbcallou.dsl">
+<!ENTITY dbcompon.dsl SYSTEM "dbcompon.dsl">
+<!ENTITY dbdivis.dsl SYSTEM "dbdivis.dsl">
+<!ENTITY dbgloss.dsl SYSTEM "dbgloss.dsl">
+<!ENTITY dbgraph.dsl SYSTEM "dbgraph.dsl">
+<!ENTITY dbindex.dsl SYSTEM "dbindex.dsl">
+<!ENTITY dbinfo.dsl SYSTEM "dbinfo.dsl">
+<!ENTITY dbinline.dsl SYSTEM "dbinline.dsl">
+<!ENTITY dblink.dsl SYSTEM "dblink.dsl">
+<!ENTITY dblists.dsl SYSTEM "dblists.dsl">
+<!ENTITY dblot.dsl SYSTEM "dblot.dsl">
+<!ENTITY dbmath.dsl SYSTEM "dbmath.dsl">
+<!ENTITY dbmsgset.dsl SYSTEM "dbmsgset.dsl">
+<!ENTITY dbprint.dsl SYSTEM "dbprint.dsl">
+<!ENTITY dbprocdr.dsl SYSTEM "dbprocdr.dsl">
+<!ENTITY dbqanda.dsl SYSTEM "dbqanda.dsl">
+<!ENTITY dbrfntry.dsl SYSTEM "dbrfntry.dsl">
+<!ENTITY dbsect.dsl SYSTEM "dbsect.dsl">
+<!ENTITY dbsynop.dsl SYSTEM "dbsynop.dsl">
+<!ENTITY dbefsyn.dsl SYSTEM "dbefsyn.dsl">
+<!ENTITY dbtable.dsl SYSTEM "dbtable.dsl">
+<!ENTITY dbtitle.dsl SYSTEM "dbtitle.dsl">
+<!ENTITY dbttlpg.dsl SYSTEM "dbttlpg.dsl">
+<!ENTITY dbverb.dsl SYSTEM "dbverb.dsl">
+<!ENTITY version.dsl SYSTEM "version.dsl">
+]>
+
+<style-sheet>
+<style-specification id="docbook"
+ use="af bg bs ca cs da de el en es et eu fi fr hu id it ja ko nl nn no pl pt ptbr ro ru sk sl sr sv tr uk xh zhcn zhtw dbparam dblib">
+
+<style-specification-body>
+
+;; $Id: docbook.dsl,v 1.10 2004/10/09 21:36:35 petere78 Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+
+(define if-front-page
+ (external-procedure "UNREGISTERED::James Clark//Procedure::if-front-page"))
+
+(define if-first-page
+ (external-procedure "UNREGISTERED::James Clark//Procedure::if-first-page"))
+
+(declare-characteristic heading-level
+ "UNREGISTERED::James Clark//Characteristic::heading-level" 0)
+
+(declare-characteristic page-number-format
+ "UNREGISTERED::James Clark//Characteristic::page-number-format" "1")
+
+(declare-characteristic page-number-restart?
+ "UNREGISTERED::James Clark//Characteristic::page-number-restart?" #f)
+
+(declare-characteristic page-two-side?
+ "UNREGISTERED::OpenJade//Characteristic::page-two-side?" %two-side%)
+
+(declare-characteristic two-side-start-on-right?
+ "UNREGISTERED::OpenJade//Characteristic::two-side-start-on-right?" %two-side%)
+
+(declare-characteristic page-n-columns
+ "UNREGISTERED::James Clark//Characteristic::page-n-columns" 1)
+
+(declare-characteristic page-column-sep
+ "UNREGISTERED::James Clark//Characteristic::page-column-sep" %page-column-sep%)
+
+(declare-characteristic page-balance-columns?
+ "UNREGISTERED::James Clark//Characteristic::page-balance-columns?" %page-balance-columns?%)
+
+;; This allows bottom-of-page footnotes
+(declare-flow-object-class page-footnote
+ "UNREGISTERED::Sebastian Rahtz//Flow Object Class::page-footnote")
+
+;; This allows formal objects to float
+(declare-flow-object-class page-float
+ "UNREGISTERED::Sebastian Rahtz//Flow Object Class::page-float")
+
+(define read-entity
+ (external-procedure "UNREGISTERED::James Clark//Procedure::read-entity"))
+
+(define all-element-number
+ (external-procedure "UNREGISTERED::James Clark//Procedure::all-element-number"))
+
+(define debug
+ (external-procedure "UNREGISTERED::James Clark//Procedure::debug"))
+
+;; Make text that comes from unimplemented tags easy to spot
+(default
+ (let* ((colr-space (color-space
+ "ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
+ (red (color colr-space 1 0 0)))
+ (make sequence
+ color: red
+ (process-children))))
+
+&dbcommon.dsl; <!-- Common ("stock") stylesheet functions -->
+&dbctable.dsl; <!-- Common table stylesheet functions -->
+
+&dbl10n.dsl; <!-- Localization -->
+
+&dbadmon.dsl; <!-- Admonitions -->
+&dbautoc.dsl; <!-- Automatic TOC generation -->
+&dbbibl.dsl; <!-- Bibliographies -->
+&dbblock.dsl; <!-- Miscellaneous block elements -->
+&dbcallou.dsl; <!-- Callouts -->
+&dbcompon.dsl; <!-- Components; chapter-level elements -->
+&dbdivis.dsl; <!-- Divisions; Sets, Books, Articles, Parts -->
+&dbgloss.dsl; <!-- Glossaries -->
+&dbgraph.dsl; <!-- Graphics -->
+&dbindex.dsl; <!-- Indexes -->
+&dbinfo.dsl; <!-- Infopools (SetInfo, BookInfo, Sect1Info, etc.) -->
+&dbinline.dsl; <!-- Inline elements -->
+&dblink.dsl; <!-- Links -->
+&dblists.dsl; <!-- Lists -->
+&dblot.dsl; <!-- Lists of Tables (ToC, LoT, etc.) -->
+&dbmath.dsl; <!-- Math (Equations) -->
+&dbmsgset.dsl; <!-- MsgSet -->
+&dbprint.dsl; <!-- Print macros -->
+&dbprocdr.dsl; <!-- Procedures -->
+&dbqanda.dsl; <!-- QandASet -->
+&dbrfntry.dsl; <!-- References and RefEntrys -->
+&dbsect.dsl; <!-- Sections -->
+&dbsynop.dsl; <!-- Synopsis -->
+&dbefsyn.dsl; <!-- Class Synopsis -->
+&dbtable.dsl; <!-- Tables -->
+&dbtitle.dsl; <!-- Titles -->
+&dbttlpg.dsl; <!-- Title Page -->
+&dbverb.dsl; <!-- Verbatim (ProgramListing, LiteralLayout, etc.) -->
+&version.dsl;
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="dbparam" document="dbparam.dsl">
+<external-specification id="dblib" document="dblib.dsl">
+
+<external-specification id="af" document="dbl1af">
+<external-specification id="bg" document="dbl1bg">
+<external-specification id="bs" document="dbl1bs">
+<external-specification id="ca" document="dbl1ca">
+<external-specification id="cs" document="dbl1cs">
+<external-specification id="da" document="dbl1da">
+<external-specification id="de" document="dbl1de">
+<external-specification id="el" document="dbl1el">
+<external-specification id="en" document="dbl1en">
+<external-specification id="es" document="dbl1es">
+<external-specification id="et" document="dbl1et">
+<external-specification id="eu" document="dbl1eu">
+<external-specification id="fi" document="dbl1fi">
+<external-specification id="fr" document="dbl1fr">
+<external-specification id="hu" document="dbl1hu">
+<external-specification id="id" document="dbl1id">
+<external-specification id="it" document="dbl1it">
+<external-specification id="ja" document="dbl1ja">
+<external-specification id="ko" document="dbl1ko">
+<external-specification id="nl" document="dbl1nl">
+<external-specification id="nn" document="dbl1nn">
+<external-specification id="no" document="dbl1no">
+<external-specification id="pl" document="dbl1pl">
+<external-specification id="pt" document="dbl1pt">
+<external-specification id="ptbr" document="dbl1ptbr">
+<external-specification id="ro" document="dbl1ro">
+<external-specification id="ru" document="dbl1ru">
+<external-specification id="sk" document="dbl1sk">
+<external-specification id="sl" document="dbl1sl">
+<external-specification id="sr" document="dbl1sr">
+<external-specification id="sv" document="dbl1sv">
+<external-specification id="tr" document="dbl1tr">
+<external-specification id="uk" document="dbl1uk">
+<external-specification id="xh" document="dbl1xh">
+<external-specification id="zhcn" document="dbl1zhcn">
+<external-specification id="zhtw" document="dbl1zhtw">
+
+</style-sheet>
diff --git a/print/notoc.dsl b/print/notoc.dsl
new file mode 100644
index 0000000..ffa8c56
--- /dev/null
+++ b/print/notoc.dsl
@@ -0,0 +1,29 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl SYSTEM "docbook.dsl" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification id="docbook-notoc" use="docbook">
+<style-specification-body>
+
+;; $Id: notoc.dsl,v 1.3 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+;; Example of a customization layer on top of the modular docbook style
+;; sheet. Definitions inserted in this file take precedence over
+;; definitions in the 'use'd stylesheet(s).
+
+(define %generate-set-toc% #f)
+(define %generate-book-toc% #f)
+(define %generate-part-toc% #f)
+(define %generate-reference-toc% #f)
+(define %generate-article-toc% #f)
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/print/plain.dsl b/print/plain.dsl
new file mode 100644
index 0000000..d049df4
--- /dev/null
+++ b/print/plain.dsl
@@ -0,0 +1,37 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+;; $Id: plain.dsl,v 1.2 2003/01/15 08:24:23 adicarlo Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
+;;
+;; Example of a customization layer on top of the modular docbook style
+;; sheet. Definitions inserted in this file take precedence over
+;; definitions in the 'use'd stylesheet(s).
+
+(define %generate-set-titlepage% #f)
+(define %generate-book-titlepage% #f)
+(define %generate-part-titlepage% #f)
+(define %generate-reference-titlepage% #f)
+(define %generate-article-titlepage% #f)
+
+(define %generate-set-toc% #f)
+(define %generate-book-toc% #f)
+(define %generate-part-toc% #f)
+(define %generate-reference-toc% #f)
+(define %generate-article-toc% #f)
+
+(define %generate-book-lot-list% '())
+
+</style-specification-body>
+</style-specification>
+
+<external-specification id="docbook" document="docbook.dsl">
+
+</style-sheet>
diff --git a/print/version.dsl b/print/version.dsl
new file mode 100644
index 0000000..cee6faf
--- /dev/null
+++ b/print/version.dsl
@@ -0,0 +1,14 @@
+;; $Id: version.dsl,v 1.2 2004/07/11 06:21:00 nyraghu Exp $
+;;
+;; This file is part of the Modular DocBook Stylesheet distribution.
+;; See ../README or http://www.nwalsh.com/docbook/dsssl/
+;;
+
+;; If **ANY** change is made to this file, you _MUST_ alter the
+;; following definition:
+
+(define (stylesheet-version)
+ (string-append
+ "Modular DocBook Print Stylesheet Version "
+ ;; Trim off bounding white space.
+ (strip "&VERSION;")))