groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff/contrib/mom BUGS ChangeLog NEWS om.tmac m...


From: Peter Schaffter
Subject: [Groff-commit] groff/contrib/mom BUGS ChangeLog NEWS om.tmac m...
Date: Fri, 19 May 2006 21:49:07 +0000

CVSROOT:        /sources/groff
Module name:    groff
Branch:         
Changes by:     Peter Schaffter <address@hidden>        06/05/19 21:49:07

Modified files:
        contrib/mom    : BUGS ChangeLog NEWS om.tmac 
        contrib/mom/momdoc: cover.html docelement.html 
                            docprocessing.html goodies.html 
                            reserved.html toc.html 

Log message:
        o Updated docs
        
        o Added macro, CODE
        
        o DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and
        DOC_COVERTITLE now accept multiple arguments; each is printed
        on a separate line in docheaders and on cover pages.  Where the
        macros also supply reference information to page headers,
        endnotes and tables of contents, the args are concatenated.
        
        o Changed default DOCHEADER_LEAD to +0 when there's both the chapter
        number and a chapter title in DOCTYPE CHAPTER.  Compensated by
        adding 1/4 of the leading in effect for docheaders between them.
        Applies equally similar situations on covers and doc covers.
        
        o Added missing default ENDNOTES_ALLOWS_HEADERS to DEFAULTS.
        
        o Added missing temporary change of the pad marker from # to ^ to
        the toc title collection routine of .ENDNOTES.
        
        o Added string $SAVED_PP_FT to start of .COLLATE; string is tested
        for in .PP
        
        o Improved testing for $FONT and $PP_FT in DEFAULTS
        
        o Trivial changes to docheader spacing for doctypes DEFAULT and
        NAMED when PRINTSTYLE is TYPEWRITE.
        
        o Call to .ne in HEAD moved higher in macro, and .ne's reduced each
        by 1.
        
        o Handling of "how much space is needed for subheads + 1 line of
        text" in SUBHEAD changed to a simple .ne.  Fixes bug that was
        causing overprinting of columns when s/h was deferred to next
        page/column.
        
        o In macro, PRINT_HDRFTR, removed .EOL from clause .if 
\\n[#HDRFTR_COLOR]=1
        
        o Fixed broken link to DOCTITLE in docs.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/BUGS.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/ChangeLog.diff?tr1=1.44&tr2=1.45&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/NEWS.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/om.tmac.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/momdoc/cover.html.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/momdoc/docelement.html.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/momdoc/docprocessing.html.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/momdoc/goodies.html.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/momdoc/reserved.html.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/mom/momdoc/toc.html.diff?tr1=1.20&tr2=1.21&r1=text&r2=text

Patches:
Index: groff/contrib/mom/BUGS
diff -u groff/contrib/mom/BUGS:1.27 groff/contrib/mom/BUGS:1.28
--- groff/contrib/mom/BUGS:1.27 Tue May  9 21:41:36 2006
+++ groff/contrib/mom/BUGS      Fri May 19 21:49:07 2006
@@ -18,6 +18,35 @@
 --Peter Schaffter
 
 ========================================================================
+Version 1.3-e_3
+===============
+ENDNOTES is not, by default, printing headers on endnotes pages.
+---Fixed---
+
+Processing of the "Endnotes" title for the TOC is putting the
+page number 1 line too high and not inserting leader.
+---Fixed---
+
+Collated docs not respecting $PP_FT (it's picking up the font from
+the pagenumber font)
+---Fixed---
+
+Docheader spacing sometimes depositing too much space between
+various docheader elements in TYPEWRITE when DOCTYPE is DEFAULT or
+NAMED.
+---Fixed---
+
+When COLUMNS are on, subheads that are deferred to the next
+column/page because there isn't enough room for the s/h and one
+line of text are causing columns to overprint.
+---Fixed---
+
+HDRFTR_LEFT printing one line too high when .HEADER_COLOR is used.
+---Fixed---
+
+DOCTITLE link broken in the docs.
+---Fixed---
+
 Version 1.3-e_2
 ===============
 TOC formatting incorrect when the pound/number sign (#) is used in
Index: groff/contrib/mom/ChangeLog
diff -u groff/contrib/mom/ChangeLog:1.44 groff/contrib/mom/ChangeLog:1.45
--- groff/contrib/mom/ChangeLog:1.44    Tue May  9 21:41:36 2006
+++ groff/contrib/mom/ChangeLog Fri May 19 21:49:07 2006
@@ -1,3 +1,55 @@
+*Fri May 19 2006
+
+o Updated docs
+
+o Added macro, CODE
+
+o DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and
+  DOC_COVERTITLE now accept multiple arguments; each is printed
+  on a separate line in docheaders and on cover pages.  Where the
+  macros also supply reference information to page headers,
+  endnotes and tables of contents, the args are concatenated.
+
+*Thu May 18 2006
+
+o Changed default DOCHEADER_LEAD to +0 when there's both the chapter
+  number and a chapter title in DOCTYPE CHAPTER.  Compensated by
+  adding 1/4 of the leading in effect for docheaders between them.
+  Applies equally similar situations on covers and doc covers.
+
+*Mon May 15 2006
+
+o Added missing default ENDNOTES_ALLOWS_HEADERS to DEFAULTS.
+
+o Added missing temporary change of the pad marker from # to ^ to
+  the toc title collection routine of .ENDNOTES.
+
+o Added string $SAVED_PP_FT to start of .COLLATE; string is tested
+  for in .PP
+
+o Improved testing for $FONT and $PP_FT in DEFAULTS
+
+o Trivial changes to docheader spacing for doctypes DEFAULT and
+  NAMED when PRINTSTYLE is TYPEWRITE.
+
+*Sun May 14 2006
+
+o Call to .ne in HEAD moved higher in macro, and .ne's reduced each
+  by 1.
+
+o Handling of "how much space is needed for subheads + 1 line of
+  text" in SUBHEAD changed to a simple .ne.  Fixes bug that was
+  causing overprinting of columns when s/h was deferred to next
+  page/column.
+
+o In macro, PRINT_HDRFTR, removed .EOL from clause .if \\n[#HDRFTR_COLOR]=1
+
+*Sat May 13 2006
+
+o Fixed broken link to DOCTITLE in docs.
+
+------------------------------------------------------------------------
+
 *Wed Apr 26 2006
 
 o Corrected doc entry that stated TOC control macros can be entered
Index: groff/contrib/mom/NEWS
diff -u groff/contrib/mom/NEWS:1.22 groff/contrib/mom/NEWS:1.23
--- groff/contrib/mom/NEWS:1.22 Tue May  9 21:41:36 2006
+++ groff/contrib/mom/NEWS      Fri May 19 21:49:07 2006
@@ -1,3 +1,11 @@
+Release 1.4
+-----------
+DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and
+DOC_COVERTITLE now accept multiple arguments; each is printed
+on a separate line.
+
+New macro, CODE, to facilitate setting programming code snippets.
+
 Release 1.3-e_<#>
 -----------------
 New macro, PREFIX_CHAPTER_NUMBER, to allow users to prepend chapter
Index: groff/contrib/mom/momdoc/cover.html
diff -u groff/contrib/mom/momdoc/cover.html:1.6 
groff/contrib/mom/momdoc/cover.html:1.7
--- groff/contrib/mom/momdoc/cover.html:1.6     Sun Aug  7 08:17:17 2005
+++ groff/contrib/mom/momdoc/cover.html Fri May 19 21:49:07 2006
@@ -181,6 +181,7 @@
 <a name="COVER"></a>
        Macro: <strong>COVER</strong>
        <br>
+<a name="DOC_COVER"></a>
        Macro: <strong>DOC_COVER</strong>
        <br>
        Required argument: <nobr>TITLE | DOCTITLE | COVERTITLE | CHAPTER | 
CHAPTER_TITLE | CHAPTER+TITLE</nobr>
Index: groff/contrib/mom/momdoc/docelement.html
diff -u groff/contrib/mom/momdoc/docelement.html:1.22 
groff/contrib/mom/momdoc/docelement.html:1.23
--- groff/contrib/mom/momdoc/docelement.html:1.22       Tue May  9 21:41:36 2006
+++ groff/contrib/mom/momdoc/docelement.html    Fri May 19 21:49:07 2006
@@ -1518,48 +1518,6 @@
 for normal running text, meaning that multiple quotes on the same
 page are all spaced identically.
 <p>
-<a name="QUOTE_TIP"><strong>TIP:</strong></a>
-If you want to include snippets of programming code in
-<strong>mom</strong> documents, you may come acropper of the fact
-that groff (and <strong>mom</strong>'s) escape character is the
-backslash.  In order for <strong>mom</strong> not to interpret
-backslashes that occur in code snippets as escapes, you have to
-tell <strong>mom</strong> that the backslash character is
-(temporarily) no longer the escape character.  The easiest way
-to do this is to set the escape character to something else for
-the duration of the code snippet.  You accomplish this with
-<strong>ESC_CHAR</strong>, like this:
-<p>
-<pre>
-       .ESC_CHAR c
-</pre>
-
-where &quot;c&quot;, above, is the alternate escape character
-(which should be a character that does not appear in the code).  To
-set the escape character back to the backslash, simply invoke
-<strong>.ESC_CHAR</strong> by itself (i.e. with no argument).
-<p>
-Because <strong>mom</strong>, by default, sets the text after
-<strong>.QUOTE</strong> in italic (for <strong>PRINTSTYLE
-TYPESET</strong>) or underlined (for <strong>PRINTSTYLE
-TYPEWRITE</strong>), you'll want to change that behaviour as
-well.  Therefore, a recipe for setting verbatim code snippets using
-<strong>QUOTE</strong> could be (assuming you want a fixed width
-font like Courier):
-<p>
-<pre>
-       \# You only need the first two lines before the first invocation
-       \# of QUOTE.  They stay in effect for all subsequent invocations.
-       \#
-       .QUOTE_FONT       CR    \" Set quote font to Courier roman
-       .UNDERLINE_QUOTES OFF   \" Don't underline quotes in TYPEWRITE
-       .QUOTE
-       .ESC_CHAR ^             \" Change escape character to ^
-       &lt;code snippet&gt;
-       .ESC_CHAR               \" Restore escape character to \
-       .QUOTE OFF
-
-</pre>
 
 <!---QUOTE--->
 
@@ -1781,6 +1739,40 @@
 
 <!====================================================================>
 
+<a name="CODE"><h2><u>Inserting code snippets into documents</u></h2></a>
+       <nobr>Macro: <strong>CODE</strong> toggle</nobr>
+</a>
+
+<p>
+<strong>CODE</strong> is a little convenience macro that
+facilitates entering code snippets into documents.  Its use is not
+restricted to documents created using <strong>mom</strong>'s
+document processing macros; in other words, it can be used for
+&quot;manually&quot; typeset documents as well.
+<p>
+When you invoke <strong>CODE</strong>, <strong>mom</strong> changes
+the font to Courier Roman and turns
+<a href="goodies.html#SMARTQUOTES">SMARTQUOTES</a>
+off.  Additionally, if you invoke <strong>CODE</strong> inside
+<a href="docelement.html#QUOTE">QUOTE</a>
+while using
+<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>
+with the default underlining of quotes turned on, it disables
+the underlining for the duration of <strong>CODE</strong>.
+<p>
+<strong>NOTE</strong>: If your code snippet includes the backslash
+character, which is <strong>groff</strong>'s escape character, you
+will have to change the escape character temporarily to something
+else with the macro,
+<a href="goodies.html#ESC_CHAR">ESC_CHAR</a>.
+<strong>Mom</strong> has no way of knowing what special characters
+you're going to use in code snippets, therefore she cannot
+automatically replace the escape character with something else.
+
+<p>
+<hr>
+<!====================================================================>
+
 <a name="LIST_INTRO"><h2><u>Nested lists</u></h2></a>
 <ul>
        <li><a href="#LIST">Tag: LIST</a>
@@ -3345,7 +3337,7 @@
 <a href="#FN_AND_PUNCT">Footnote markers and punctuation in the running 
text</a>,
 for an explanation.
 <p>
-<strong>***End version 1.3 change***</strong>
+<strong>***End version 1.3-d change***</strong>
 
 <p>
 Endnotes differ from footnotes in two ways (other than the fact that
Index: groff/contrib/mom/momdoc/docprocessing.html
diff -u groff/contrib/mom/momdoc/docprocessing.html:1.26 
groff/contrib/mom/momdoc/docprocessing.html:1.27
--- groff/contrib/mom/momdoc/docprocessing.html:1.26    Tue May  9 21:41:36 2006
+++ groff/contrib/mom/momdoc/docprocessing.html Fri May 19 21:49:07 2006
@@ -678,9 +678,9 @@
 <hr width="66%" align="left">
 <p>
 <a name="TITLE"></a>
-<nobr>Macro: <strong>TITLE</strong> &quot;&lt;title&gt;&quot;</nobr>
+<nobr>Macro: <strong>TITLE</strong> &quot;&lt;title string&gt;&quot; 
[&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</nobr> 
 <br>
-<em>*Argument must be enclosed in double-quotes</em>
+<em>*Arguments must be enclosed in double-quotes</em>
 
 <p>
 The title string can be caps or caps/lower-case; it's up to you.
@@ -696,6 +696,10 @@
 <a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
 the title always gets converted to caps.
 <p>
+<strong>TITLE</strong> accepts multiple arguments, each surrounded
+by double-quotes.  Each argument is printed on a separate line,
+permitting you to create multi-line titles in your docheaders.
+<p>
 <strong>NOTE:</strong> If your
 <a href="#DOCTYPE">DOCTYPE</a>
 is <strong>CHAPTER</strong>, <strong>TITLE</strong> should be the
@@ -706,16 +710,20 @@
 
 <hr width="66%" align="left">
 <p>
-<a name="DOCTITLE"></a>
-<nobr>Macro: <strong>DOCTITLE</strong> &quot;&lt;overall document 
title&gt;&quot;</nobr>
+<a name="DOC_TITLE"></a>
+<nobr>Macro: <strong>DOCTITLE</strong> &quot;&lt;overall document 
title&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... 
] ]</nobr> 
 <br>
-<em>*Argument must be enclosed in double-quotes</em>
+<em>*Arguments must be enclosed in double-quotes</em>
 
 <p>
 <strong>NOTE:</strong> This macro should be used only if your
 <a href="#DOCTYPE">DOCTYPE</a>
 is <strong>DEFAULT</strong> (which is <strong>mom</strong>'s
-default).
+default).  If your <strong>DOCTYPE</strong> is
+<strong>CHAPTER</strong>, use
+<a href="#TITLE">TITLE</a>
+to set the overall document title for cover pages, document cover
+pages, and page headers or footers.
 <p>
 When you're creating a single document, say, an essay or a short
 story, you have no need of this macro.
@@ -725,8 +733,8 @@
 However if you're 
 <a href="rectoverso.html#COLLATE">collating</a>
 a bunch of documents together, say, to print out a report containing
-many articles with different titles, or a book of short stories, you
-need <strong>DOCTITLE</strong>.
+many articles with different titles, or a book of short stories with
+different authors, you need <strong>DOCTITLE</strong>.
 <p>
 <strong>DOCTITLE</strong> tells <strong>mom</strong> the title
 of the complete document (as opposed to the title of each article
@@ -742,6 +750,13 @@
 <a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
 the doctitle always gets converted to caps.
 <p>
+<strong>DOCTITLE</strong> accepts multiple arguments, each surrounded
+by double-quotes.  Each argument is printed on a separate line,
+permitting you to create multi-line document titles for use on
+<a href="cover.html#COVER">Covers</a>
+and/or
+<a href="cover.html#DOC_COVER">Doc covers</a>.
+<p>
 <strong>NOTE:</strong> If your
 <a href="#DOCTYPE">DOCTYPE</a>
 is <strong>CHAPTER</strong>, you don't need
@@ -754,9 +769,9 @@
 <hr width="66%" align="left">
 <p>
 <a name="SUBTITLE"></a>
-<nobr>Macro: <strong>SUBTITLE</strong> &quot;&lt;subtitle&gt;&quot;</nobr>
+<nobr>Macro: <strong>SUBTITLE</strong> &quot;&lt;subtitle&gt;&quot; 
[&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</nobr> 
 <br>
-<em>*Argument must be enclosed in double-quotes</em>
+<em>*Arguments must be enclosed in double-quotes</em>
 
 <p>
 The subtitle string can be caps or caps/lower-case.  Since a
@@ -764,15 +779,19 @@
 <a href="definitions.html#TERMS_DOCHEADER">docheader</a>,
 and the title is most likely in caps, I recommend caps/lower case.
 <p>
+<strong>SUBTITLE</strong> accepts multiple arguments, each surrounded
+by double-quotes.  Each argument is printed on a separate line,
+permitting you to create multi-line subtitles in your docheaders.
+<p>
 
 <!---AUTHOR--->
 
 <hr width="66%" align="left">
 <p>
 <a name="AUTHOR"></a>
-<nobr>Macro: <strong>AUTHOR</strong> &quot;&lt;author string&gt;&quot; [ 
&quot;&lt;author2 string&gt;&quot; &quot;&lt;author3 string&gt;&quot; ... 
]</nobr>
+<nobr>Macro: <strong>AUTHOR</strong> &quot;&lt;author&gt;&quot; [ 
&quot;&lt;author2&gt;&quot; [&quot;&lt;author3&gt;&quot; ... ] ]</nobr>
 <br>
-<em>*Multiple arguments must all be enclosed in double-quotes</em>
+<em>*Arguments must be enclosed in double-quotes</em>
 
 <p>
 Each author string can hold as many names as you like, e.g.
@@ -849,9 +868,9 @@
 <hr width="66%" align="left">
 <p>
 <a name="CHAPTER_TITLE"></a>
-<nobr>Macro: <strong>CHAPTER_TITLE</strong> &quot;&lt;chapter 
title&gt;&quot;</nobr>
+<nobr>Macro: <strong>CHAPTER_TITLE</strong> &quot;&lt;chapter title&gt;&quot; 
[&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</nobr> 
 <br>
-<em>*Argument must be enclosed in double-quotes</em>
+<em>*Arguments must be enclosed in double-quotes</em>
 
 <p>
 If, either in addition to or instead of &quot;Chapter #&quot; appearing
@@ -863,6 +882,12 @@
        .CHAPTER_TITLE "The DMCA Nazis"
 </pre>
 
+<p>
+<strong>CHAPTER_TITLE</strong> accepts multiple arguments, each
+surrounded by double-quotes.  Each argument is printed on a separate
+line, permitting you to create multi-line chapter titles in your
+docheaders.
+<p>
 If you've used
 <a href="#CHAPTER">CHAPTER</a> to give the chapter a number,
 both &quot;Chapter #&quot; and the chapter title will appear at the
@@ -1091,15 +1116,16 @@
 <hr width="66%" align="left">
 <p>
 <a name="COVERTITLE"></a>
-<nobr>Macro: <strong>COVERTITLE</strong> &quot;&lt;user defined cover page 
title&gt;&quot;</nobr>
+<nobr>Macro: <strong>COVERTITLE</strong> &quot;&lt;user defined cover page 
title&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... 
] ]</nobr> 
 <br>
-<nobr>Macro: <strong>DOC_COVERTITLE</strong> &quot;&lt;user defined document 
cover page title&gt;&quot;</nobr>
+<a name="DOC_COVERTITLE"></a>
+<nobr>Macro: <strong>DOC_COVERTITLE</strong> &quot;&lt;user defined document 
cover page title&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd 
line&gt;&quot; ... ] ]</nobr> 
 <br>
-<em>*Argument must be enclosed in double-quotes</em>
+<em>*Arguments must be enclosed in double-quotes</em>
 
 <p>
-The argument passed to <strong>COVERTITLE</strong> or
-<strong>DOC_COVERTITLE</strong> is only used on cover or doc cover
+The arguments passed to <strong>COVERTITLE</strong> or
+<strong>DOC_COVERTITLE</strong> are only used on cover or doc cover
 pages, and then only if the argument COVERTITLE is passed to
 <a href="cover.html#COVER">COVER</a>
 or
@@ -1110,6 +1136,11 @@
 arguments to <strong>COVER</strong> or <strong>DOC_COVER</strong>
 fits your needs for the title you want to appear on cover (or doc
 cover) pages.
+<p>
+<strong>COVERTITLE</strong> and <strong>DOC_COVERTITLE</strong>
+accept multiple arguments, each surrounded by double-quotes.  Each
+argument is printed on a separate line, permitting you to create
+multi-line titles on your cover and/or doc cover pages.
 
 <p>
 <hr>
@@ -1927,20 +1958,23 @@
 <p>
 <strong>NOTE:</strong> If your <strong>DOCTYPE</strong> is
 <strong>CHAPTER</strong> and you have both &quot;Chapter #&quot;
-and a &quot;Chapter Title&quot; (as above), you may find the
+and a &quot;Chapter Title&quot; (as above), <strong>mom</strong>
+inserts a small amount of whitespace between them, equal to
+one-quarter of the
 <a href="definitions.html#TERMS_LEADING">leading</a>
-a bit cramped (owing to <strong>mom</strong>'s default docheader
-leading).  If this is the case, you can adjust the leading either
-with
-<a href="#ADJUST_LEADING">DOCHEADER_LEAD</a>
-or by including the
-<a name="definitions.html#TERMS_INLINES">inline escape</a>,
+in effect.  If this doesn't suit you, you can alter the space
+by including the
+<a name="definitions.html#TERMS_INLINES">inline escapes</a>,
+<a href="inlines.html#UP">\*[UP]</a>
+or
 <a href="inlines.html#DOWN">\*[DOWN]</a>,
 in the argument you pass to
 <a href="#CHAPTER_TITLE">CHAPTER_TITLE</a>, like this:
 <p>
 <pre>
        .CHAPTER_TITLE "\*[DOWN 2p]Why Not Patent Calculus?"
+               or
+       .CHAPTER_TITLE "\*[UP 2p]Why Not Patent Calculus?"
 </pre>
 
 
@@ -2021,14 +2055,9 @@
 <p>
 The
 <a href="definitions.html#TERMS_LEADING">leading</a>
-of docheaders is the same as running text (except when
-<a href="#DOCTYPE">DOCTYPE</a>
-is <strong>CHAPTER</strong> <em>and</em> both a chapter number and a
-chapter title have been supplied, in which case the default is 4 points
-more than running text.)
-<p>
-If you'd like your docheaders to have a different leading, say, 2
-points more than the lead of running text, use:
+of docheaders is the same as running text.  If you'd like your
+docheaders to have a different leading, say, 2 points more than the
+lead of running text, use:
 <p>
 <pre>
        .DOCHEADER_LEAD +2
Index: groff/contrib/mom/momdoc/goodies.html
diff -u groff/contrib/mom/momdoc/goodies.html:1.15 
groff/contrib/mom/momdoc/goodies.html:1.16
--- groff/contrib/mom/momdoc/goodies.html:1.15  Sun Aug  7 08:56:38 2005
+++ groff/contrib/mom/momdoc/goodies.html       Fri May 19 21:49:07 2006
@@ -32,6 +32,7 @@
        <li><a href="#SMARTQUOTES">SMARTQUOTES</a> (convert typewriter 
doublequotes to proper doublequotes)
        <li><a href="#CAPS">CAPS</a> (convert to upper case)
        <li><a href="#STRING">STRING</a> (user-definable strings)
+       <li><a href="#ESC_CHAR">ESC_CHAR</a> (change to escape character to 
something other than a backslash{
        <br>
        <li><strong>Underscore/underline</strong>
        <ul>
@@ -438,6 +439,34 @@
 You can use either, or mix 'n' match with impunity.
 <p>
 
+<!---ESC_CHAR--->
+
+<hr width="66%" align="left">
+<a name="ESC_CHAR"><h3><u>Change the escape character</u></h3></a>
+<br>
+<nobr>Macro: <strong>ESC_CHAR</strong> &lt;new character&gt; | 
&lt;anything&gt;</nobr>
+
+<p>
+<strong>Groff</strong>'s and <strong>mom</strong>'s default escape
+character is the backslash.  Sometimes, you may want to include a
+literal backslash in your document.  There are two ways to
+accomplish this.  One is simply to double the backslash character
+(<strong>\\</strong>), which is convenient if you don't have a lot
+of backslashes to input.  If you need to input a whole batch of
+backslashes (say, when including code snippets in your document),
+you can use <strong>ESC_CHAR</strong> to make the change permanent
+(until you decide to restore the escape character to its default,
+the backslash).
+<p>
+<strong>ESC_CHAR</strong> with a single character argument changes
+the escape character to whatever the argument is.
+<strong>ESC_CHAR</strong> with no argument restores the escape
+character to the backslash.
+<p>
+<strong>Experts</strong>: <strong>ESC_CHAR</strong> is an alias of
+<strong>.ec</strong>.  Mix 'n' match the two with impunity.
+<p>
+
 <!---UNDERSCORE--->
 
 <hr width="66%" align="left">
Index: groff/contrib/mom/momdoc/reserved.html
diff -u groff/contrib/mom/momdoc/reserved.html:1.23 
groff/contrib/mom/momdoc/reserved.html:1.24
--- groff/contrib/mom/momdoc/reserved.html:1.23 Tue May  9 21:41:37 2006
+++ groff/contrib/mom/momdoc/reserved.html      Fri May 19 21:49:07 2006
@@ -280,6 +280,8 @@
 #R_MARGIN               Right margin
 #RESTORE_PREV_INDENT    Tells LIST OFF what kind of indent was active
                         prior to first invocation of LIST
+#RESTORE_SQ             Instructs SMARTQUOTES to restore smartquotes if
+                        SMARTQUOTES invoked without an arg
 #RLD                    RLD value
 #SHIFT_LIST&lt;n&gt;          Value to add to #LIST_INDENT&lt;n&gt; for 
shifted lists
 #SILENT                 Is silent on? (toggle)
@@ -287,8 +289,9 @@
                         to PAD is restored at the start of every
                         iteration of $PAD_STRING
 #SLANT_ON               Is SLANT on? (toggle)
-#SMART_QUOTES           Smartquotes on? (toggle)
 #SPACE_TO_END           Whitespace at end of string passed to PAD
+#SQ_WAS_ON              Instructs CODE OFF to restore smartquotes if they
+                        were on prior to CODE
 #ST&lt;#&gt;_LENGTH           Length of ST&lt;#&gt;; calculated during ST 
&lt;#&gt;
 #ST&lt;#&gt;_MARK             Page offset of autotab &lt;#&gt; at ST&lt;#&gt;X
 #ST_NUM                 Incrementing counter for autotab identification
@@ -344,6 +347,7 @@
                      iteration of $PAD_STRING
 $PAD_MARKER          Character to mark off padding in PAD
 $PAD_STRING          Arg passed to PAD
+$PRE_CODE_FT         Font family+style in effect prior to CODE being invoked
 $QUAD_VALUE          Quad value (left, right, centre, justify)
 $QUOTE0              Open quotation marks
 $QUOTE1              Close quotation marks
@@ -359,6 +363,7 @@
                      running text after a dropcap
 $RESTORE_QUAD_VALUE  Quad value for use in restoring L, R, C, J
                      (after tabs)
+$RESTORE_SQ          The smartquoting string last passed to SMARTQUOTES
 $SAVED_STYLE         Current style, if there is one (used in FAMILY)
 $SEPARATOR&lt;n&gt;        Separator for depth &lt;n&gt; in lists
 $SS_VAR              Holds + or - sentence space value
@@ -962,8 +967,6 @@
                            macro
 #ARGS_TO_LIST              Was LIST passed some args? (toggle)
 #AUTHOR_[n]                Strings passed to AUTHOR
-#AUTHOR_LINES              # of lines of authors in doc header; odd=0
-                           even=1
 #AUTHOR_NUM                Keeps track of user-defined string
                            AUTHOR_&lt;#&gt; in AUTHOR
 #AUTHORS                   Equals final value of AUTHOR_NUM;
@@ -1071,8 +1074,6 @@
 #DOCHEADER_COLOR           Colored docheader? (toggle)
 #DOCHEADER_LEAD            Lead of doc header
                            (#DOC_LEAD + #DOCHEADER_LEAD_ADJ)
-#DOCHEADER_SPACE_ADJ       Lead difference between #DEPTH_1 and
-                           #DEPTH_2
 #DOC_COVER_START_POS       Vertical starting pos of doc cover material
 #DOC_COVERS                Print doc covers? (toggle)
 #DOC_COVER_COLOR           Colored cover? (toggle)
@@ -1458,6 +1459,8 @@
                            not currently used
 #RESTORE_TOC_PN_PADDING    Saves #TOC_PN_PADDING in TOC prior to
                            processing $FIRST_DOC_TITLE
+#RESTORE_UNDERLINE         Instructs CODE OFF to restore underlining of italics
+                           (TYPEWRITE) if underlining was formerly on 
 #RIGHT_CAP_HEIGHT          Cap height of right string in
                            headers/footers
 #RULED                     Tells FOOTNOTE if a rule (or space has been
@@ -1628,7 +1631,7 @@
 $CHAPTER                         The chapter number
 $CHAPTER_STRING                  What to print whenever the word
                                  "chapter" is required
-$CHAPTER_TITLE                   Chapter title (if there is one)
+$CHAPTER_TITLE                   Concatenated args passed to CHAPTER_TITLE
 $CHAPTER_TITLE_FAM               Family of chapter title
 $CHAPTER_TITLE_FT                Font of chapter title
 $CHAPTER_TITLE_SIZE_CHANGE       ps in/decrease of chapter title*
@@ -1701,10 +1704,7 @@
                                  document
 $DOC_QUAD                        Quad used for body text (justified or
                                  left) 
-$DOC_TITLE                       Overall doc title that gets printed in
-                                 headers/footers (mostly for use with
-                                 collated docs where each doc is an
-                                 article with a different title)
+$DOC_TITLE                       Concatenated args passed to DOCTITLE
 $DOC_TYPE                        Document type (default, chapter, named,
                                  letter)
 $DOCHEADER_COLOR                 Color of docheader
@@ -1868,18 +1868,21 @@
 #REVISION                        The revision number (string valued)
 $REVISION_STRING                 What to print whenever the word
                                  "revision" is required
+$SAVED_PP_FT                     $PP_FT in effect at start of
+                                 .COLLATE; tested for and removed
+                                 in .PP
 $SH_FAM                          Family to use in subheads
 $SH_FT                           Font to use in subheads
 $SH_SIZE_CHANGE                  ps in/decrease of subheads*
 $SH_COLOR                        Subhead color
-$SUBTITLE                        Document subtitle
+$SUBTITLE                        Concatenated args passed to SUBTITLE
 $SUBTITLE_FAM                    Family to use for subtitle in doc
                                  header
 $SUBTITLE_FT                     Font to use for subtitle in doc header
 $SUBTITLE_SIZE_CHANGE            ps in/decrease of subtitle*
 $SUBTITLE_PT_SIZE                Absolute ps of subtitle
 $SUITE                           The #SUITE number register
-$TITLE                           Document title
+$TITLE                           Concatenated args pass to TITLE
 $TITLE_FAM                       Family to use for title in doc header
 $TITLE_FT                        Font to use for title in doc header
 $TITLE_PT_SIZE                   Absolute point size of title in docheader
Index: groff/contrib/mom/momdoc/toc.html
diff -u groff/contrib/mom/momdoc/toc.html:1.20 
groff/contrib/mom/momdoc/toc.html:1.21
--- groff/contrib/mom/momdoc/toc.html:1.20      Fri Mar 17 21:51:05 2006
+++ groff/contrib/mom/momdoc/toc.html   Fri May 19 21:49:07 2006
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
-<title>Mom, version 1.3-e -- Table of Contents</title>
+<title>Mom, version 1.4 -- Table of Contents</title>
 </head>
 <body bgcolor="#dfdfdf">
 
 <!====================================================================>
 
-<h1 align="center"><u>Table of Contents for mom, version 1.3-e</u></h1>
+<h1 align="center"><u>Table of Contents for mom, version 1.4</u></h1>
 
 The table of contents has grown quite large.  If you've been using
 <strong>mom</strong> for a while, you might prefer the
@@ -161,7 +161,8 @@
                <li><a href="goodies.html#GOODIES"><strong>4.11 
Goodies</strong></a> -- aliases,
                        transparent lines, smartquotes, caps,
                        underscoring/underlining, padding lines, leaders, drop
-                       caps, superscripts, (nested) lists, user-definable 
strings
+                       caps, superscripts, (nested) lists, user-definable
+                       strings, changing the escape character
                <ul>
                        <li><a href="goodies.html#INDEX_GOODIES">4.11.1 Macro 
list</a>
                </ul>
@@ -255,14 +256,15 @@
                        <li><a href="docelement.html#LINEBREAK_INTRO">5.4.7 
Linebreaks</a> -- author linebreaks (section breaks)
                        <li><a href="docelement.html#QUOTE_INTRO">5.4.8 
Quotes</a> -- line for line poetic quotes or unformatted, verbatim text (e.g. 
code snippets)
                        <li><a href="docelement.html#BLOCKQUOTE_INTRO">5.4.9 
Blockquotes</a> -- cited material
-                       <li><a href="docelement.html#LIST_INTRO">5.4.10 
Lists</a> -- (nested) lists
-                       <li><a href="docelement.html#NUMBER_LINES_INTRO">5.4.11 
Line numbering</a>
-                       <li><a href="docelement.html#FOOTNOTE_INTRO">5.4.12 
Footnotes</a>
-                       <li><a href="docelement.html#ENDNOTE_INTRO">5.4.13 
Endnotes</a>
-                       <li><a href="docelement.html#MARGIN_NOTES_INTRO">5.4.14 
Margin notes</a>
-                       <li><a href="docelement.html#BLANK_PAGE_TITLE">5.4.15 
Blank pages</a>
-                       <li><a href="docelement.html#TOC_INTRO">5.4.16 Table of 
contents</a>
-                       <li><a href="docelement.html#FINIS_INTRO">5.4.17 
Document termination</a> -- FINIS
+                       <li><a href="docelement.html#CODE">5.4.10 Code</a> -- 
inserting code snippets into documents
+                       <li><a href="docelement.html#LIST_INTRO">5.4.11 
Lists</a> -- (nested) lists
+                       <li><a href="docelement.html#NUMBER_LINES_INTRO">5.4.12 
Line numbering</a>
+                       <li><a href="docelement.html#FOOTNOTE_INTRO">5.4.13 
Footnotes</a>
+                       <li><a href="docelement.html#ENDNOTE_INTRO">5.4.14 
Endnotes</a>
+                       <li><a href="docelement.html#MARGIN_NOTES_INTRO">5.4.15 
Margin notes</a>
+                       <li><a href="docelement.html#BLANK_PAGE_TITLE">5.4.16 
Blank pages</a>
+                       <li><a href="docelement.html#TOC_INTRO">5.4.17 Table of 
contents</a>
+                       <li><a href="docelement.html#FINIS_INTRO">5.4.18 
Document termination</a> -- FINIS
                </ul>
 <a name="HDRFTR"></a>
                <li><a href="headfootpage.html#HEADFOOTPAGE"><strong>5.5 
DOCUMENT HEADERS AND FOOTERS</strong></a>
Index: groff/contrib/mom/om.tmac
diff -u groff/contrib/mom/om.tmac:1.37 groff/contrib/mom/om.tmac:1.38
--- groff/contrib/mom/om.tmac:1.37      Tue May  9 21:41:36 2006
+++ groff/contrib/mom/om.tmac   Fri May 19 21:49:07 2006
@@ -21,8 +21,8 @@
 with groff; see the file COPYING.  If not, write to the Free Software
 Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-Version 1.3-e_3
----------------
+Version 1.4
+-----------
 Antoine de St-Exupéry asserted that elegance in engineering is
 achieved not when there is nothing left to add, but when there is
 nothing left to take away.
@@ -1197,75 +1197,94 @@
 \#
 .MAC SMARTQUOTES END
 .    rr #ARGS_TO_SQ
+.    if \\n[#RESTORE_SQ]=1 \{\
+.       rr #RESTORE_SQ
+.       SMARTQUOTES \\*[$RESTORE_SQ]
+.       return
+.    \}
 .    ie '\\$1'' \{\
 .       nr #OPEN_CLOSE 0
 .       ds $QUOTE0 \\[lq]
 .       ds $QUOTE1 \\[rq]
+.       ds $RESTORE_SQ \\$1
 .    \}
 .    el \{\
 .       if '\\$1',,' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Bq]
 .          ds $QUOTE1 \\[lq]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'<<' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fo]
 .          ds $QUOTE1 \\[Fc]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'>>' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fc]
 .          ds $QUOTE1 \\[Fo]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'DA' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fc]
 .          ds $QUOTE1 \\[Fo]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'DE' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Bq]
 .          ds $QUOTE1 \\[lq]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'ES' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[lq]
 .          ds $QUOTE1 \\[rq]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'FR' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fo]\\|
 .          ds $QUOTE1 \\|\\[Fc]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'IT' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fo]\\|
 .          ds $QUOTE1 \\|\\[Fc]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'NL' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[rq]
 .          ds $QUOTE1 \\[rq]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'NO' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fo]
 .          ds $QUOTE1 \\[Fc]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'PT' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fo]
 .          ds $QUOTE1 \\[Fc]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if '\\$1'SV' \{\
 .          nr #ARGS_TO_SQ 1
 .          ds $QUOTE0 \\[Fc]
 .          ds $QUOTE1 \\[Fc]
+.          ds $RESTORE_SQ \\$1
 .       \}
 .       if !r#ARGS_TO_SQ \{\
 .          ds $QUOTE0 \\[dq]
 .          ds $QUOTE1 \\[dq]
+.          nr #RESTORE_SQ 1
 .       \}
 .    \}
 .END
@@ -3360,6 +3379,7 @@
 .ALIAS    CONDENSE        CONDENSE_OR_EXTEND
 .ALIAS    EXTEND          CONDENSE_OR_EXTEND
 .ALIAS    FAM             FAMILY
+.ALIAS    FONT            FT
 .ALIAS    HYPHENATE       HY
 .ALIAS    HYPHENATION     HY
 .ALIAS    HYSET           HY_SET
@@ -3711,13 +3731,13 @@
 .          if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
 .             ie \\n[#DRAFT_WITH_PAGENUM] \{\
 .                ie '\\*[$CHAPTER]'' \{\
-.                   ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                   ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                      ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
 .                   \}
 .                   el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING]
 .                \}
 .                el \{\
-.                   ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                   ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                      ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
 .                   \}
 .                   el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER]
@@ -3726,7 +3746,7 @@
 .             el \{\
 .                ie '\\*[$REVISION]'' \{\
 .                   ie '\\*[$CHAPTER]'' \{\
-.                      ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                      ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                         ie '\\*[$DRAFT]'' \{\
 .                            ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
 .                         \}
@@ -3749,13 +3769,13 @@
 .                      \}
 .                   \}
 .                   el \{\
-.                      ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                      ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                         ie '\\*[$DRAFT]'' \{\
 .                            ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
 .                         \}
 .                         el \{\
 .                            ds $HDRFTR_CENTER \
-                             \\*[$CHAPTER_TITLE], \
+                             \\*[$CHAPTER_TITLE_1], \
                              \\*[$DRAFT_STRING]\\*[$DRAFT]
 .                         \}
 .                      \}
@@ -3774,7 +3794,7 @@
 .                \}
 .                el \{\
 .                   ie '\\*[$CHAPTER]'' \{\
-.                      ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                      ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                         ie '\\*[$DRAFT]'' \{\
 .                            ds $HDRFTR_CENTER \
                              \\*[$CHAPTER_TITLE], \
@@ -3802,7 +3822,7 @@
 .                      \}
 .                   \}
 .                   el \{\
-.                      ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                      ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                         ie '\\*[$DRAFT]'' \{\
 .                            ds $HDRFTR_CENTER \
                              \\*[$CHAPTER_TITLE], \
@@ -3840,7 +3860,7 @@
 .             ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] 
\}
 .             el \{ .PAGENUM_STYLE DIGIT \}
 .             ie '\\*[$CHAPTER]'' \{\
-.                ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                   ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
 .                \}
 .                el \{\
@@ -3848,7 +3868,7 @@
 .                \}
 .             \}
 .             el \{\
-.                ie !'\\*[$CHAPTER_TITLE]'' \{\
+.                ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .                   ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
 .                \}
 .                el \{\
@@ -3916,16 +3936,31 @@
 \#
 \#
 .MAC DOCTITLE END
-.    ds $DOC_TITLE \\$1
+.    rr #DOCTITLE_NUM
+.    nr #DOCTITLE_NUM -1 1
+.    while \\n[#NUM_ARGS]>\\n[#DOCTITLE_NUM] \{\
+.       ds $DOC_TITLE_\\n+[#DOCTITLE_NUM] \\$\\n[#DOCTITLE_NUM]
+.\}
+.    ds $DOC_TITLE \\$*
 .END
 \#
 .MAC TITLE END \"Document title
-.    ds $TITLE \\$1
+.    rr #TITLE_NUM
+.    nr #TITLE_NUM -1 1
+.    while \\n[#NUM_ARGS]>\\n[#TITLE_NUM] \{\
+.       ds $TITLE_\\n+[#TITLE_NUM] \\$\\n[#TITLE_NUM]
+.\}
+.    ds $TITLE \\$*
 .END
 \#
 \#
 .MAC SUBTITLE END \"Document sub-title
-.    ds $SUBTITLE \\$1
+.    rr #SUBTITLE_NUM
+.    nr #SUBTITLE_NUM -1 1
+.    while \\n[#NUM_ARGS]>\\n[#SUBTITLE_NUM] \{\
+.       ds $SUBTITLE_\\n+[#SUBTITLE_NUM] \\$\\n[#SUBTITLE_NUM]
+.\}
+.    ds $SUBTITLE \\$*
 .END
 \#
 \#
@@ -3941,7 +3976,12 @@
 \#
 \#
 .MAC CHAPTER_TITLE END \" This defines what comes after Chapter #
-.    ds $CHAPTER_TITLE \\$1
+.    rr #CHAPTER_TITLE_NUM
+.    nr #CHAPTER_TITLE_NUM -1 1
+.    while \\n[#NUM_ARGS]>\\n[#CHAPTER_TITLE_NUM] \{\
+.       ds $CHAPTER_TITLE_\\n+[#CHAPTER_TITLE_NUM] \\$\\n[#CHAPTER_TITLE_NUM]
+.\}
+.    ds $CHAPTER_TITLE \\$*
 .END
 \#
 \#
@@ -3966,9 +4006,6 @@
 .    while \\n[#NUM_ARGS]>\\n[#AUTHOR_NUM] \{\
 .       ds $AUTHOR_\\n+[#AUTHOR_NUM] \\$\\n[#AUTHOR_NUM]
 .\}
-.    nr #NUM_AUTHORS \\n[#NUM_ARGS]%2 \"Use mod 2 to test if odd or even # of 
authors
-.    ie \\n[#NUM_AUTHORS]=1 \{ .nr #AUTHOR_LINES 0  \}
-.    el \{ .nr #AUTHOR_LINES 1 \}
 .END
 \#
 \#
@@ -4605,8 +4642,14 @@
 .          DOC_LEAD_ADJUST
 .       \}
 .    \}
-.    ds $DOC_QUAD     \\*[$QUAD_VALUE]
-.    ds $PP_FT        \\*[$FONT]
+.    ds $DOC_QUAD      \\*[$QUAD_VALUE]
+.    if '\\*[$FONT]''  \{ .FT R \}
+.    if '\\*[$PP_FT]'' \{\
+.       ds $PP_FT \\*[$FONT]
+.    \}
+.    if !'\\*[$PP_FT]'' \{\
+.       ds $PP_FT \\*[$FONT]
+.    \}
 .\" Counters
 .    nr #PP 0
 .    nr #FN_NUMBER 0 1
@@ -4656,9 +4699,15 @@
 .    if !r#EN_STRING_CAPS       \{ .ENDNOTE_STRING_CAPS                \}
 .    if !d$EN_TITLE \{\
 .       ie \\n[#DOC_TYPE]=2 \{\
-.          ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING]" \}
-.          el \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"    \}
-.       \}
+.          ie !'\\*[$CHAPTER_TITLE_1]'' \{\
+.             ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_TITLE]" \}
+.             el \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]: 
\\*[$CHAPTER_TITLE]" \}
+.          \}
+.             el \{\
+.                ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING]" 
\}
+.                el \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"    
\}
+.             \}
+.          \}
 .       el \{ .ENDNOTE_TITLE "\\*[$TITLE]" \}
 .    \}
 .    if !d$EN_TITLE_FAM          \{ .ENDNOTE_TITLE_FAMILY \\*[$EN_FAM]  \}
@@ -4668,7 +4717,8 @@
 .    if !r#EN_NUMBERS_ALIGN_LEFT \{\
 .       if !r#EN_NUMBERS_ALIGN_RIGHT \{ .ENDNOTE_NUMBERS_ALIGN_RIGHT 2  \}
 .    \}
-.    if !d$EN_LN_GAP             \{ .ENDNOTE_LINENUMBER_GAP 1.5n              
\}
+.    if !d$EN_LN_GAP             \{ .ENDNOTE_LINENUMBER_GAP 1.5n        \}
+.    if !r#EN_ALLOWS_HEADERS     \{ .ENDNOTES_ALLOWS_HEADERS            \}
 .    if !d$BIB_PN_STYLE          \{ .BIBLIOGRAPHY_PAGENUM_STYLE digit         
\}
 .    if !d$BIB_FAM               \{ .BIBLIOGRAPHY_FAMILY \\*[$DOC_FAM]        
\}
 .    if !d$BIB_FT                \{ .BIBLIOGRAPHY_FONT R                      
\}
@@ -4743,15 +4793,7 @@
 .    \}
 .\" Defaults for printstyle TYPESET
 .    if \\n[#PRINT_STYLE]=2 \{\
-.       if !d$DOCHEADER_LEAD_ADJ \{\
-.          ie !'\\*[$CHAPTER_TITLE]'' \{\
-.             ie !'\\*[$CHAPTER_STRING]'' \{\
-.                DOCHEADER_LEAD +4
-.             \}
-.             el \{ .DOCHEADER_LEAD +0 \}
-.          \}
-.          el \{ .DOCHEADER_LEAD +0 \}
-.       \}
+.       if !d$DOCHEADER_LEAD_ADJ \{ .DOCHEADER_LEAD +0 \}
 .\" +Cover
 .       if !d$COVER_LEAD_ADJ \{ .COVER_LEAD +0 \}
 .       if !d$COVER_FAM \{ .COVER_FAMILY \\*[$DOC_FAM] \}
@@ -5146,23 +5188,35 @@
 .END
 \#
 .MAC DEFAULT_DOCHEADER END
-.    CENTER
-.    FAMILY  \\*[$TITLE_FAM]
-.    FT      \\*[$TITLE_FT]
-.    PT_SIZE \\*[$TITLE_PT_SIZE]
-.    LS      \\n[#DOCHEADER_LEAD]u
-.    ie \\n[#TITLE_COLOR]=1 \{\
-.       PRINT \m[\\*[$TITLE_COLOR]]\\*[$TITLE]\m[]
+.    if !'\\*[$TITLE_1]'' \{\
+.       CENTER
+.       FAMILY  \\*[$TITLE_FAM]
+.       FT      \\*[$TITLE_FT]
+.       PT_SIZE \\*[$TITLE_PT_SIZE]
+.       LS      \\n[#DOCHEADER_LEAD]u
+.       nr #ARG_NUM 0 1
+.       while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.          ie \\n[#TITLE_COLOR]=1 \{\
+.             PRINT "\m[\\*[$TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
+.          \}
+.          el \{\
+.             PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
+.          \}
+.\}
 .    \}
-.    el \{ .PRINT \\*[$TITLE] \}
-.    if !'\\*[$SUBTITLE]'' \{\
+.    if !'\\*[$SUBTITLE_1]'' \{\
 .       FAMILY  \\*[$SUBTITLE_FAM]
 .       FT      \\*[$SUBTITLE_FT]
 .       PT_SIZE \\*[$SUBTITLE_PT_SIZE]
-.       ie \\n[#SUBTITLE_COLOR]=1 \{\
-.          PRINT \m[\\*[$SUBTITLE_COLOR]]\\*[$TITLE]\m[]
-.       \}
-.       el \{ .PRINT \\*[$SUBTITLE] \}
+.       nr #ARG_NUM 0 1
+.       while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.          ie \\n[#SUBTITLE_COLOR]=1 \{\
+.             PRINT "\m[\\*[$SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n[#ARG_NUM]]\m[]
+.          \}
+.          el \{\
+.             PRINT "\\*[$SUBTITLE_\\n[#ARG_NUM]]
+.          \}
+.\}
 .    \}
 .    if !'\\*[$AUTHOR_1]'' \{\
 .       FAMILY  \\*[$AUTHOR_FAM]
@@ -5187,17 +5241,20 @@
 .    LS      \\n[#DOCHEADER_LEAD]u
 .\" Chapter title only
 .    ie '\\*[$CHAPTER]'' \{\
-.       ie !'\\*[$CHAPTER_TITLE]'' \{\
+.       ie !'\\*[$CHAPTER_TITLE_1]'' \{\
 .          if \\n[#PRINT_STYLE]=2 \{\
 .             FAMILY  \\*[$CHAPTER_TITLE_FAM]
 .             FT      \\*[$CHAPTER_TITLE_FT]
 .             PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE]
 .             LS      \\n[#DOCHEADER_LEAD]u
 .          \}
-.          ie \\n[#TITLE_COLOR]=1 \{\
-.             PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[]
-.          \}
-.          el \{ .PRINT \\*[$CHAPTER_TITLE] \}
+.          nr #ARG_NUM 0 1
+.          while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.             ie \\n[#TITLE_COLOR]=1 \{\
+.                PRINT 
\m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
+.             \}
+.             el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .       \}
 .       el \{\
 .          ie \\n[#TITLE_COLOR]=1 \{\
@@ -5212,17 +5269,23 @@
 .          PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[]
 .       \}
 .       el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
-.       if !'\\*[$CHAPTER_TITLE]'' \{\
-.          if \\n[#PRINT_STYLE]=1 \{ .PRINT \\*[$CHAPTER_TITLE] \}
+.       if !'\\*[$CHAPTER_TITLE_1]'' \{\
+.          if \\n[#PRINT_STYLE]=1 \{\
+.             PRINT \\*[$CHAPTER_TITLE]
+.          \}
 .          if \\n[#PRINT_STYLE]=2 \{\
 .             FAMILY  \\*[$CHAPTER_TITLE_FAM]
 .             FT      \\*[$CHAPTER_TITLE_FT]
 .             PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE]
 .             LS      \\n[#DOCHEADER_LEAD]u
-.             ie \\n[#CHAPTER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[]
-.             \}
-.             el \{ .PRINT \\*[$CHAPTER_TITLE] \}
+.             ALD \\n[.v]u/4u \"Put a little space before the chapter title
+.             nr #ARG_NUM 0 1
+.             while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                ie \\n[#CHAPTER_TITLE_COLOR]=1 \{\
+.                   PRINT 
\m[\\*[$CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
+.                \}
+.             el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .             RLD \\n[#DOC_LEAD]u \" Just looks better this way
 .          \}
 .       \}
@@ -5236,18 +5299,30 @@
 .    FT      \\*[$TITLE_FT]
 .    PT_SIZE \\*[$TITLE_PT_SIZE]
 .    LS      \\n[#DOCHEADER_LEAD]u
-.    ie \\n[#TITLE_COLOR]=1 \{\
-.       PRINT \m[\\*[$TITLE_COLOR]]\\*[$TITLE]\m[]
+.    if !'\\*[$TITLE_1]'' \{\
+.       nr #ARG_NUM 0 1
+.       while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.          ie \\n[#TITLE_COLOR]=1 \{\
+.             PRINT "\m[\\*[$TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
+.          \}
+.          el \{\
+.             PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
+.          \}
+.\}
 .    \}
-.    el \{ .PRINT \\*[$TITLE] \}
 .    if !'\\*[$SUBTITLE]'' \{\
 .       FAMILY  \\*[$SUBTITLE_FAM]
 .       FT      \\*[$SUBTITLE_FT]
 .       PT_SIZE \\*[$SUBTITLE_PT_SIZE]
-.       ie \\n[#SUBTITLE_COLOR]=1 \{\
-.          PRINT \m[\\*[$SUBTITLE_COLOR]]\\*[$TITLE]\m[]
-.       \}
-.       el \{ .PRINT \\*[$SUBTITLE] \}
+.       nr #ARG_NUM 0 1
+.       while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.          ie \\n[#SUBTITLE_COLOR]=1 \{\
+.             PRINT "\m[\\*[$SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n[#ARG_NUM]]\m[]
+.          \}
+.          el \{\
+.             PRINT "\\*[$SUBTITLE_\\n[#ARG_NUM]]
+.          \}
+.\}
 .    \}
 .    if !'\\*[$AUTHOR_1]'' \{\
 .       FAMILY  \\*[$AUTHOR_FAM]
@@ -5344,8 +5419,22 @@
 \#
 \#
 .MAC COVERTITLE END
-.    ie '\\$0'DOC_COVERTITLE' .ds $DOC_COVER_TITLE \\$1
-.    el .ds $COVER_TITLE \\$1
+.    ie '\\$0'DOC_COVERTITLE' \{\ 
+.       rr #DOC_COVER_TITLE_NUM
+.       nr #DOC_COVER_TITLE_NUM -1 1
+.       while \\n[#NUM_ARGS]>\\n[#DOC_COVER_TITLE_NUM] \{\
+.          ds $DOC_COVER_TITLE_\\n+[#DOC_COVER_TITLE_NUM] 
\\$\\n[#DOC_COVER_TITLE_NUM]
+.\}
+.       ds $DOC_COVER_TITLE \\$*
+.    \}
+.    el \{\
+.       rr #COVER_TITLE_NUM
+.       nr #COVER_TITLE_NUM -1 1
+.       while \\n[#NUM_ARGS]>\\n[#COVER_TITLE_NUM] \{\
+.          ds $COVER_TITLE_\\n+[#COVER_TITLE_NUM] \\$\\n[#COVER_TITLE_NUM]
+.\}
+.       ds $COVER_TITLE \\$*
+.    \}
 .END
 \#
 \#
@@ -5477,27 +5566,41 @@
 .       if \\n[#DOC_COVER_TITLE]=1 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
 .             CAPS
-.             UNDERSCORE "\\*[$TITLE]"
+.             nr #ARG_NUM 0 1
+.             while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]
+.\}
 .             CAPS OFF
 .          \}
 .          el \{\
+.          nr #ARG_NUM 0 1
+.          while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
 .             ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$TITLE]\m[]
+.                PRINT 
"\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
+.             \}
+.             el \{\
+.                PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
 .             \}
-.             el \{ .PRINT \\*[$TITLE] \}
+.\}
 .          \}
 .       \}
 .       if \\n[#DOC_COVER_TITLE]=2 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
 .             CAPS
-.             UNDERSCORE "\\*[$DOC_TITLE]"
+.             nr #ARG_NUM 0 1
+.             while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$DOC_TITLE_\\n[#ARG_NUM]]"
+.\}
 .             CAPS OFF
 .          \}
 .          el \{\
+.          nr #ARG_NUM 0 1
+.          while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
 .             ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_TITLE]\m[]
+.                PRINT 
\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_TITLE_\\n[#ARG_NUM]]\m[]
 .             \}
-.             el \{ .PRINT \\*[$DOC_TITLE] \}
+.             el \{ .PRINT \\*[$DOC_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .          \}
 .       \}
 .       if \\n[#DOC_COVER_TITLE]=3 \{\
@@ -5516,14 +5619,28 @@
 .       if \\n[#DOC_COVER_TITLE]=4 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
 .             CAPS
-.             UNDERSCORE "\\*[$CHAPTER_TITLE]"
+.             nr #ARG_NUM 0 1
+.                ie \\n[#SINGLE_SPACE]=0 \{\
+.                   vs \\n[#DOC_LEAD]u/2u
+.                \}
+.                el \{\
+.                   vs \\n[#DOC_LEAD]u
+.                \}
+.                sp
+.             while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.\}
 .             CAPS OFF
+.             if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
 .          \}
 .          el \{\
+.          nr #ARG_NUM 0 1
+.          while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
 .             ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[]
+.                PRINT 
\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
 .             \}
-.             el \{ .PRINT \\*[$CHAPTER_TITLE] \}
+.             el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .          \}
 .       \}
 .       if \\n[#DOC_COVER_TITLE]=5 \{\
@@ -5538,46 +5655,80 @@
 .             \}
 .             el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
 .          \}
-.          if !'\\*[$CHAPTER_TITLE]'' \{\
+.          if !'\\*[$CHAPTER_TITLE_1]'' \{\
 .             ie \\n[#PRINT_STYLE]=1 \{\
-.                UNDERSCORE "\\*[$CHAPTER_TITLE]"
+.                ie \\n[#SINGLE_SPACE]=0 \{\
+.                   vs \\n[#DOC_LEAD]u/2u
+.                \}
+.                el \{\
+.                   vs \\n[#DOC_LEAD]u
+.                \}
+.                sp
+.                nr #ARG_NUM 0 1
+.                while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.\}
+.                if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
 .             \}
 .             el \{\
 .                FAMILY  \\*[$DOC_COVER_CHAPTER_TITLE_FAM]
 .                FT      \\*[$DOC_COVER_CHAPTER_TITLE_FT]
 .                PT_SIZE \\*[$DOC_COVER_CHAPTER_TITLE_PT_SIZE]
-.                ie \\n[#DOC_COVER_CHAPTER_TITLE_COLOR]=1 \{\
-.                   PRINT 
\m[\\*[$DOC_COVER_CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[]
-.                \}
-.                el \{ .PRINT \\*[$CHAPTER_TITLE] \}
+.                nr #ARG_NUM 0 1
+.                ALD \\n[.v]u/4u \"Put a little space before the chapter title
+.                while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
+.                      PRINT 
\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
+.                   \}
+.                   el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .             \}
 .          \}
 .       \}
 .       if \\n[#DOC_COVER_TITLE]=6 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
 .             CAPS
-.             UNDERSCORE "\\*[$DOC_COVER_TITLE]"
+.             nr #ARG_NUM 0 1
+.             while \\n[#DOC_COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$DOC_COVER_TITLE_\\n[#ARG_NUM]]"
+.\}
 .             CAPS OFF
 .          \}
 .          el \{\
+.             nr #ARG_NUM 0 1
+.             while \\n[#DOC_COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
 .             ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_COVER_TITLE]\m[]
+.                PRINT 
\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_COVER_TITLE_\\n[#ARG_NUM]]\m[]
 .             \}
-.             el \{ .PRINT \\*[$DOC_COVER_TITLE] \}
+.             el \{ .PRINT \\*[$DOC_COVER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .          \}
 .       \}
-.       if \\n[#DOC_COVER_SUBTITLE]=1 \{\
-.          FAMILY  \\*[$DOC_COVER_SUBTITLE_FAM]
-.          FT      \\*[$DOC_COVER_SUBTITLE_FT]
-.          PT_SIZE \\*[$DOC_COVER_SUBTITLE_PT_SIZE]
-.          if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \}
-.          ie \\n[#DOC_COVER_SUBTITLE_COLOR]=1 \{\
-.             PRINT \m[\\*[$DOC_COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE]\m[]
+.       if !\\n[#DOC_TYPE]=2 \{\
+.          if \\n[#DOC_COVER_SUBTITLE]=1 \{\
+.             FAMILY  \\*[$DOC_COVER_SUBTITLE_FAM]
+.             FT      \\*[$DOC_COVER_SUBTITLE_FT]
+.             PT_SIZE \\*[$DOC_COVER_SUBTITLE_PT_SIZE]
+.             if \\n[#PRINT_STYLE]=1 \{\
+.                TYPEWRITER
+.                ie \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u/2u \}
+.                el \{ .vs \\n[#DOC_LEAD]u \}
+.                sp
+.             \}
+.             nr #ARG_NUM 0 1
+.             while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                ie \\n[#DOC_COVER_SUBTITLE_COLOR]=1 \{\
+.                   PRINT 
\m[\\*[$DOC_COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n[#ARG_NUM]]\m[]
+.                \}
+.                el \{ .PRINT \\*[$SUBTITLE_\\n[#ARG_NUM]] \}
+.\}
+.             if \\n[#PRINT_STYLE]=1 \{\
+.                if \\n[#SINGLE_SPACE]=0 \{ .vs \}
+.             \}
+.          \}
+.          if \\n[#PRINT_STYLE]=1 \{\
+.             if !r#DOC_COVER_SUBTITLE \{ .sp \}
 .          \}
-.          el \{ .PRINT \\*[$SUBTITLE] \}
-.       \}
-.       if \\n[#PRINT_STYLE]=1 \{\
-.          if !r#DOC_COVER_SUBTITLE \{ .SP \}
 .       \}
 .       if \\n[#DOC_COVER_AUTHOR]=1 \{\
 .          FAMILY  \\*[$DOC_COVER_AUTHOR_FAM]
@@ -5585,7 +5736,9 @@
 .          PT_SIZE \\*[$DOC_COVER_AUTHOR_PT_SIZE]
 .          if \\n[#PRINT_STYLE]=1 \{\
 .             TYPEWRITER
-.             vs \\n[#DOC_LEAD]u/2u
+.             ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u \}
+.             el \{ .vs \\n[#DOC_LEAD]u/2u \}
+.             sp
 .          \}
 .          if !'\\*[$ATTRIBUTE_STRING]'' \{\
 .             ie \\n[#DOC_COVER_ATTRIBUTE_COLOR]=1 \{\
@@ -5599,18 +5752,20 @@
 .       FT      \\*[$DOC_COVER_DOCTYPE_FT]
 .       PT_SIZE \\*[$DOC_COVER_DOCTYPE_PT_SIZE]
 .       SP
-.       if \\n[#DOC_COVER_DOCTYPE]=1 \{\
-.          ie \\n[#PRINT_STYLE]=1 \{\
-.             TYPEWRITER
-.             vs \\n[#DOC_LEAD]u
-.             UNDERSCORE2 "\\*[$DOC_TYPE]
-.          \}
-.          el \{\
-.             ie \\n[#DOC_COVER_DOCTYPE_COLOR]=1 \{\
-.                COLOR \\*[$DOC_COVER_DOCTYPE_COLOR]
-.                UNDERSCORE "\\*[$DOC_TYPE]
+.       if \\n[#DOC_TYPE]=3 \{\
+.          if \\n[#DOC_COVER_DOCTYPE]=1 \{\
+.             ie \\n[#PRINT_STYLE]=1 \{\
+.                TYPEWRITER
+.                vs \\n[#DOC_LEAD]u
+.                UNDERSCORE2 "\\*[$DOC_TYPE]
+.             \}
+.             el \{\
+.                ie \\n[#DOC_COVER_DOCTYPE_COLOR]=1 \{\
+.                   COLOR \\*[$DOC_COVER_DOCTYPE_COLOR]
+.                   UNDERSCORE "\\*[$DOC_TYPE]
+.                \}
+.                el .UNDERSCORE "\\*[$DOC_TYPE]
 .             \}
-.             el .UNDERSCORE "\\*[$DOC_TYPE]
 .          \}
 .       \}
 .       sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u
@@ -5679,27 +5834,41 @@
 .       if \\n[#COVER_TITLE]=1 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
 .             CAPS
-.             UNDERSCORE "\\*[$TITLE]"
+.             nr #ARG_NUM 0 1
+.             while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]
+.\}
 .             CAPS OFF
 .          \}
 .          el \{\
+.          nr #ARG_NUM 0 1
+.          while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
 .             ie \\n[#COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$TITLE]\m[]
+.                PRINT 
"\m[\\*[$COVER_TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
+.             \}
+.             el \{\
+.                PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
 .             \}
-.             el \{ .PRINT \\*[$TITLE] \}
+.\}
 .          \}
 .       \}
 .       if \\n[#COVER_TITLE]=2 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
 .             CAPS
-.             UNDERSCORE "\\*[$DOC_TITLE]"
+.             nr #ARG_NUM 0 1
+.             while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$DOC_TITLE_\\n[#ARG_NUM]]"
+.\}
 .             CAPS OFF
 .          \}
 .          el \{\
-.             ie \\n[#COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$DOC_TITLE]\m[]
+.          nr #ARG_NUM 0 1
+.          while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.             ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
+.                PRINT 
\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_TITLE_\\n[#ARG_NUM]]\m[]
 .             \}
-.             el \{ .PRINT \\*[$DOC_TITLE] \}
+.             el \{ .PRINT \\*[$DOC_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .          \}
 .       \}
 .       if \\n[#COVER_TITLE]=3 \{\
@@ -5717,15 +5886,29 @@
 .       \}
 .       if \\n[#COVER_TITLE]=4 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
+.                ie \\n[#SINGLE_SPACE]=0 \{\
+.                   vs \\n[#DOC_LEAD]u/2u
+.                \}
+.                el \{\
+.                   vs \\n[#DOC_LEAD]u
+.                \}
+.                sp
 .             CAPS
-.             UNDERSCORE "\\*[$CHAPTER_TITLE]"
+.             nr #ARG_NUM 0 1
+.             while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.\}
 .             CAPS OFF
+.             if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
 .          \}
 .          el \{\
-.             ie \\n[#COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[]
+.          nr #ARG_NUM 0 1
+.          while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.             ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
+.                PRINT 
\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
 .             \}
-.             el \{ .PRINT \\*[$CHAPTER_TITLE] \}
+.             el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .          \}
 .       \}
 .       if \\n[#COVER_TITLE]=5 \{\
@@ -5740,46 +5923,83 @@
 .             \}
 .             el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
 .          \}
-.          if !'\\*[$CHAPTER_TITLE]'' \{\
+.          if !'\\*[$CHAPTER_TITLE_1]'' \{\
 .             ie \\n[#PRINT_STYLE]=1 \{\
-.                UNDERSCORE "\\*[$CHAPTER_TITLE]"
+.                ie \\n[#SINGLE_SPACE]=0 \{\
+.                   vs \\n[#DOC_LEAD]u/2u
+.                \}
+.                el \{\
+.                   vs \\n[#DOC_LEAD]u
+.                \}
+.                sp
+.                nr #ARG_NUM 0 1
+.                while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.\}
+.                if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
 .             \}
 .             el \{\
 .                FAMILY  \\*[$COVER_CHAPTER_TITLE_FAM]
 .                FT      \\*[$COVER_CHAPTER_TITLE_FT]
 .                PT_SIZE \\*[$COVER_CHAPTER_TITLE_PT_SIZE]
-.                ie \\n[#COVER_CHAPTER_TITLE_COLOR]=1 \{\
-.                   PRINT 
\m[\\*[$COVER_CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[]
-.                \}
-.                el \{ .PRINT \\*[$CHAPTER_TITLE] \}
+.                ALD \\n[.v]u/4u \"Put a little space before the chapter title
+.                nr #ARG_NUM 0 1
+.                while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
+.                      PRINT 
\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
+.                   \}
+.                   el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .             \}
 .          \}
 .       \}
 .       if \\n[#COVER_TITLE]=6 \{\
 .          ie \\n[#PRINT_STYLE]=1 \{\
 .             CAPS
-.             UNDERSCORE "\\*[$COVER_TITLE]"
+.             nr #ARG_NUM 0 1
+.             while \\n[#COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                UNDERSCORE "\\*[$COVER_TITLE_\\n[#ARG_NUM]]"
+.\}
 .             CAPS OFF
 .          \}
 .          el \{\
+.             nr #ARG_NUM 0 1
+.             while \\n[#COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
 .             ie \\n[#COVER_TITLE_COLOR]=1 \{\
-.                PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$COVER_TITLE]\m[]
+.                PRINT 
\m[\\*[$COVER_TITLE_COLOR]]\\*[$COVER_TITLE_\\n[#ARG_NUM]]\m[]
 .             \}
-.             el \{ .PRINT \\*[$COVER_TITLE] \}
+.             el \{ .PRINT \\*[$COVER_TITLE_\\n[#ARG_NUM]] \}
+.\}
 .          \}
 .       \}
-.       if \\n[#COVER_SUBTITLE]=1 \{\
-.          FAMILY  \\*[$COVER_SUBTITLE_FAM]
-.          FT      \\*[$COVER_SUBTITLE_FT]
-.          PT_SIZE \\*[$COVER_SUBTITLE_PT_SIZE]
-.          if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \}
-.          ie \\n[#COVER_SUBTITLE_COLOR]=1 \{\
-.             PRINT \m[\\*[$COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE]\m[]
+.       if !\\n[#DOC_TYPE]=2 \{\
+.          if \\n[#COVER_SUBTITLE]=1 \{\
+.             FAMILY  \\*[$COVER_SUBTITLE_FAM]
+.             FT      \\*[$COVER_SUBTITLE_FT]
+.             PT_SIZE \\*[$COVER_SUBTITLE_PT_SIZE]
+.             if \\n[#PRINT_STYLE]=1 \{\
+.                TYPEWRITER
+.                if \\n[#PRINT_STYLE]=1 \{\
+.                   TYPEWRITER
+.                   ie \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u/2u \}
+.                   el \{ .vs \\n[#DOC_LEAD]u \}
+.                   sp
+.                \}
+.             \}
+.             nr #ARG_NUM 0 1
+.             while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                ie \\n[#COVER_SUBTITLE_COLOR]=1 \{\
+.                   PRINT 
\m[\\*[$COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n[#ARG_NUM]]\m[]
+.                \}
+.                el \{ .PRINT \\*[$SUBTITLE_\\n[#ARG_NUM]] \}
+.\}
+.             if \\n[#PRINT_STYLE]=1 \{\
+.                if \\n[#SINGLE_SPACE]=0 \{ .vs \}
+.             \}
+.          \}
+.          if \\n[#PRINT_STYLE]=1 \{\
+.             if !r#COVER_SUBTITLE \{ .sp \}
 .          \}
-.          el \{ .PRINT \\*[$SUBTITLE] \}
-.       \}
-.       if \\n[#PRINT_STYLE]=1 \{\
-.          if !r#COVER_SUBTITLE \{ .SP \}
 .       \}
 .       if \\n[#COVER_AUTHOR]=1 \{\
 .          FAMILY  \\*[$COVER_AUTHOR_FAM]
@@ -5787,7 +6007,9 @@
 .          PT_SIZE \\*[$COVER_AUTHOR_PT_SIZE]
 .          if \\n[#PRINT_STYLE]=1 \{\
 .             TYPEWRITER
-.             vs \\n[#DOC_LEAD]u/2u
+.             ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u \}
+.             el \{ .vs \\n[#DOC_LEAD]u/2u \}
+.             sp
 .          \}
 .          if !'\\*[$ATTRIBUTE_STRING]'' \{\
 .             ie \\n[#COVER_ATTRIBUTE_COLOR]=1 \{\
@@ -5801,18 +6023,20 @@
 .       FT      \\*[$COVER_DOCTYPE_FT]
 .       PT_SIZE \\*[$COVER_DOCTYPE_PT_SIZE]
 .       SP
-.       if \\n[#COVER_DOCTYPE]=1 \{\
-.          ie \\n[#PRINT_STYLE]=1 \{\
-.             TYPEWRITER
-.             vs \\n[#DOC_LEAD]u
-.             UNDERSCORE2 "\\*[$DOC_TYPE]
-.          \}
-.          el \{\
-.             ie \\n[#COVER_DOCTYPE_COLOR]=1 \{\
-.                COLOR \\*[$COVER_DOCTYPE_COLOR]
-.                UNDERSCORE "\\*[$DOC_TYPE]
+.       if \\n[#DOC_TYPE]=3 \{\
+.          if \\n[#COVER_DOCTYPE]=1 \{\
+.             ie \\n[#PRINT_STYLE]=1 \{\
+.                TYPEWRITER
+.                vs \\n[#DOC_LEAD]u
+.                UNDERSCORE2 "\\*[$DOC_TYPE]
+.             \}
+.             el \{\
+.                ie \\n[#COVER_DOCTYPE_COLOR]=1 \{\
+.                   COLOR \\*[$COVER_DOCTYPE_COLOR]
+.                   UNDERSCORE "\\*[$DOC_TYPE]
+.                \}
+.                el .UNDERSCORE "\\*[$DOC_TYPE]
 .             \}
-.             el .UNDERSCORE "\\*[$DOC_TYPE]
 .          \}
 .       \}
 .       sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u
@@ -6072,58 +6296,34 @@
 .          if \\n[#PRINT_STYLE]=1 \{\
 .             CENTER
 .             TYPEWRITER
-.             ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
-.             el \{ .vs \\n[#DOC_LEAD]u \}
-.             CAPS
-.             if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\}
-.             CAPS OFF
-.             if !'\\*[$SUBTITLE]'' \{\
-.                ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
-.                el \{ .vs \\n[#DOC_LEAD]u \}
-.             PRINT \\*[$SUBTITLE]
+.             if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u/2u \}
+.             if !'\\*[$TITLE_1]'' \{\
+.                CAPS
+.                nr #ARG_NUM 0 1
+.                while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]
+.\}
+.                CAPS OFF
 .             \}
-.             if '\\*[$SUBTITLE]'' \{\
-.                ALD \\n[#DOC_LEAD]u
+.             if !'\\*[$SUBTITLE]'' \{\
+.                sp
+.                nr #ARG_NUM 0 1
+.                while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   UNDERSCORE "\\*[$SUBTITLE_\\n[#ARG_NUM]]
+.\}
 .             \}
-.             ie !'\\*[$AUTHOR_1]'' \{\
-.                ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \}
-.                el \{ .vs \\n[#DOC_LEAD]u/2u \}
-.                if !d$SUBTITLE \{\
-.                   ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
-.                   el \{ .ALD \\n[#DOC_LEAD]u*2u \}
-.                \}
+.             if !'\\*[$AUTHOR_1]'' \{\
+.                sp
 .                PRINT \\*[$ATTRIBUTE_STRING]
 .                nr #AUTHORS \\n[#AUTHOR_NUM]
 .                nr #NEXT_AUTHOR 0 1
 .                while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
 .                   PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]
 .\}
-.                if \\n[#AUTHOR_LINES]=1 \{\
-.                    ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \}
-.                    el \{ .ALD \\n[#DOC_LEAD]u/2u \}
-.                \}
-.             \}
-.             el \{\
-.                ie !d$SUBTITLE \{\
-.                   ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \}
-.                   el \{ .RLD \\n[#DOC_LEAD]u \}
-.                \}
-.                el \{\
-.                   ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \}
-.                   el \{ .ALD \\n[#DOC_LEAD]u \}
-.                \}
 .             \}
 .          \}
 .          if \\n[#PRINT_STYLE]=2 \{\
 .             DEFAULT_DOCHEADER
-.             di DOCHEADER_DIVERSION \" This diversion is only
-.             br                     \" necessary to find the depth of the
-.             DEFAULT_DOCHEADER      \" docheader
-.             br
-.             di
-.             nr #DOCHEADER_DEPTH \\n(dn-\\n[#DOCHEADER_LEAD] \"Storing the 
depth (height) of the diversion
-.                                                             \"in 
#DOCHEADER_DEPTH
-.             rm DOCHEADER_DIVERSION                          \" Removing the 
diversion macro
 .          \}
 .          ev
 .       \}
@@ -6144,27 +6344,36 @@
 .             CENTER
 .             TYPEWRITER
 .             vs \\n[#DOC_LEAD]u
+.             if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u/2u \}
 .             ie '\\*[$CHAPTER]'' \{\
 .                CAPS
 .                ie !'\\*[$CHAPTER_TITLE]'' \{\
-.                   PRINT \\*[$CHAPTER_TITLE]
+.                   nr #ARG_NUM 0 1
+.                   while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                      UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.\}
 .                \}
 .                el \{\
 .                   CAPS
-.                   PRINT \\*[$CHAPTER_STRING]
+.                   UNDERSCORE \\*[$CHAPTER_STRING]
 .                \}
 .                CAPS OFF
+.                RLD 1v
 .             \}
 .             el \{\
 .                CAPS
 .                PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER]
 .                CAPS OFF
 .                if !'\\*[$CHAPTER_TITLE]'' \{\
-.                   if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
-.                   UNDERSCORE "\\*[$CHAPTER_TITLE]
+.                   sp
+.                   nr #ARG_NUM 0 1
+.                   while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                      UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.\}
 .                \}
+.                RLD 1v
 .             \}
-.             if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
+.             if \\n[#SINGLE_SPACE] \{ .ALD 2v \}
 .          \}
 .          if \\n[#PRINT_STYLE]=2 \{\
 .             CHAPTER_DOCHEADER
@@ -6195,72 +6404,46 @@
 .          if \\n[#PRINT_STYLE]=1 \{\
 .             CENTER
 .             TYPEWRITER
-.             ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
-.             el \{ .vs \\n[#DOC_LEAD]u \}
+.             if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u/2u \}
 .             CAPS
-.             if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\}
+.             if !'\\*[$TITLE]'' \{\
+.                nr #ARG_NUM 0 1
+.                while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]
+.\}
+.             \}
 .             CAPS OFF
 .             if !'\\*[$SUBTITLE]'' \{\
-.                ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
-.                el \{ .vs \\n[#DOC_LEAD]u \}
-.                PRINT \\*[$SUBTITLE]
-.             \}
-.             if '\\*[$SUBTITLE]'' \{\
-.                ALD \\n[#DOC_LEAD]u
+.                sp
+.                nr #ARG_NUM 0 1
+.                while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+.                   UNDERSCORE "\\*[$SUBTITLE_\\n[#ARG_NUM]]
+.\}
 .             \}
-.             ie !'\\*[$AUTHOR_1]'' \{\
-.                ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \}
-.                el \{ .vs \\n[#DOC_LEAD]u/2u \}
-.                if !d$SUBTITLE \{\
-.                   ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
-.                   el \{ .ALD \\n[#DOC_LEAD]u*2u \}
-.                \}
+.             if !'\\*[$AUTHOR_1]'' \{\
+.                sp
 .                PRINT \\*[$ATTRIBUTE_STRING]
 .                nr #AUTHORS \\n[#AUTHOR_NUM]
 .                nr #NEXT_AUTHOR 0 1
 .                while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
 .                   PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]
 .\}
-.                if \\n[#AUTHOR_LINES]=1 \{\
-.                    ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \}
-.                    el \{ .ALD \\n[#DOC_LEAD]u/2u \}
-.                 \}
-.             vs  \\n[#DOC_LEAD]u
 .             \}
-.             el \{\
-.                ie !d$SUBTITLE \{\
-.                   ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \}
-.                   el \{ .RLD \\n[#DOC_LEAD]u \}
-.                \}
-.                el \{\
-.                   ie \\n[#SINGLE_SPACE] \{ . \}
-.                   el \{ .RLD \\n[#DOC_LEAD]u \}
-.                \}
-.             \}
-.             ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u*2u \}
-.             el \{ .ALD \\n[#DOC_LEAD]u \}
+.             ie \\n[#SINGLE_SPACE]=0 \{ .sp 2 \}
+.             el \{ .sp \}
 .             UNDERSCORE2 "\\*[$DOC_TYPE]
-.             if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
+.             if \\n[#SINGLE_SPACE]=1 \{ .sp \}
 .          \}
 .          if \\n[#PRINT_STYLE]=2 \{\
 .             NAMED_DOCHEADER
-.             di DOCHEADER_DIVERSION \" This diversion is only
-.             br                     \" necessary to find the depth of the
-.             NAMED_DOCHEADER        \" docheader
-.             br
-.             di
-.             nr #DOCHEADER_DEPTH \\n(dn-\\n[#DOCHEADER_LEAD] \"Storing the 
depth (height) of the diversion
-.                                                             \"in 
#DOCHEADER_DEPTH
-.             rm DOCHEADER_DIVERSION                          \" Removing the 
diversion macro
 .          \}
 .          ev
 .       \}
 .       if !\\n[#DOC_TYPE]=4 \{\
-.          if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \}
-.          nr #DOCHEADER_SPACE_ADJ \\n[#DOCHEADER_DEPTH]%\\n[#DOC_LEAD]
-.          ie !\\n[#DOCHEADER_SPACE_ADJ]=0 \{ .nr #DOCHEADER_EXTRA_SPACE 
\\n[#DOC_LEAD]-\\n[#DOCHEADER_SPACE_ADJ] \}
-.          el \{ .nr #DOCHEADER_EXTRA_SPACE 0 \}
-.          if \\n[#PRINT_STYLE]=2 \{ .ALD 
(\\n[#DOC_LEAD]u*2u)+\\n[#DOCHEADER_EXTRA_SPACE]u \}
+.          if \\n[#PRINT_STYLE]=1 \{\
+.             sp
+.          \}
+.          if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#DOC_LEAD]u*2u \}
 .          if \\n[#COLUMNS] \{\
 .             nr #COL_NUM 0 1
 .             nr #L_LENGTH_FOR_EPI \\n[#L_LENGTH]
@@ -6339,13 +6522,10 @@
 .\" Various registers
 .    rr #ADJ_DOC_LEAD
 .    rr #ADVANCE_FROM_TOP
-.    rr #AUTHOR_NUM
-.    rr #AUTHORS
 .    rr #COVER_LEAD
 .    rr #DEPTH_1
 .    rr #DEPTH_2
 .    rr #DOC_COVER_LEAD
-\#.    rr #DOC_HEADER
 .    if \\n[#DOC_HEADER]=1 \{ .nr #DOC_HEADER 2 \}
 .    rr #DOCHEADER_ADVANCE
 .    rr #DOCHEADER_EXTRA_SPACE
@@ -6355,7 +6535,6 @@
 .    rr #MISCS
 .    rr #NEXT_AUTHOR
 .    rr #NEXT_MISC
-.    rr #NUM_AUTHORS
 .END
 \#
 \# ====================================================================
@@ -6987,11 +7166,6 @@
 .    br
 .    ie \\n[#START] \{\
 .       if \\n[#PRINT_STYLE]=1 \{\
-.          ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
-.          el \{\
-.             ie \\n[#EPI_LINES]%2=1 \{ .ALD \\n[#DOC_LEAD]u \}
-.             el \{ .ALD \\n[#DOC_LEAD]u/2u \}
-.          \}
 .          SHIM
 .       \}
 .       if \\n[#PRINT_STYLE]=2 \{\
@@ -7635,7 +7809,6 @@
 .       if \\n[#HDRFTR_COLOR]=1 \{\
 .          nf
 \m[\\*[$HDRFTR_COLOR]]
-.          EOL
 .       \}
 .       fam     \\*[$HDRFTR_LEFT_FAM]
 .       ft      \\*[$HDRFTR_LEFT_FT]
@@ -8655,6 +8828,11 @@
 .\" Process head
 .    nr #HEAD 1
 .    ev HEAD
+.    if \\n[#PRINT_STYLE]=1 \{ .ne \\n[#NUM_ARGS]+1 \}
+.    if \\n[#PRINT_STYLE]=2 \{\
+.       ie \\n[#HEAD_SPACE] \{ .ne \\n[#NUM_ARGS]+2 \}
+.       el \{ .ne \\n[#NUM_ARGS]+1 \}
+.    \}
 .    ll \\n[#L_LENGTH]u
 .    ta \\n(.lu
 .    if \\n[#COLUMNS] \{\
@@ -8676,11 +8854,6 @@
 .    \}
 .    if r#QUOTE             \{ .rr #QUOTE \}
 .    if r#EPIGRAPH          \{ .rr #EPIGRAPH \}
-.    if \\n[#PRINT_STYLE]=1 \{ .ne \\n[#NUM_ARGS]+2 \}
-.    if \\n[#PRINT_STYLE]=2 \{\
-.       ie \\n[#HEAD_SPACE] \{ .ne \\n[#NUM_ARGS]+3 \}
-.       el \{ .ne \\n[#NUM_ARGS]+2 \}
-.    \}
 .    ie \\n[#START] \{\
 .       if \\n[#DOC_HEADER]=0 \{ .RLD 1v \}
 .    \}
@@ -8866,6 +9039,7 @@
 .    if r#QUOTE    \{ .rr #QUOTE    \}
 .    if r#Q_AT_TOP \{ .rr #Q_AT_TOP \}
 .    ev SUBHEAD
+.    ne \\n[#NUM_ARGS]
 .    ll \\n[#L_LENGTH]u
 .    ta \\n(.lu
 .    if \\n[#COLUMNS] \{\
@@ -8890,24 +9064,18 @@
 .    if \\n[#PRINT_STYLE]=2 \{ .nr #SH_LEAD_ADJUST \\n[#LEAD]/8 \}
 .    ie \\n[#START] \{ .RLD 1v \}
 .    el \{\
-.       ie ( \\n[#TRAP_DISTANCE] < (\\n[#DOC_LEAD]*(\\n[#NUM_ARGS]+1)) ) \{\
-.          ie \\n[#COLUMNS] \{ .COL_NEXT \}
-.          el \{ .bp \}
-.       \}
+.       ie \\n[#HEAD]=1 \{ . \}
 .       el \{\
-.          ie \\n[#HEAD]=1 \{ . \}
-.          el \{\
-.             if \\n[#PRINT_STYLE]=1 \{\
-.                if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
+.          if \\n[#PRINT_STYLE]=1 \{\
+.             if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
+.          \}
+.          if \\n[#PRINT_STYLE]=2 \{\
+.             ie \\n[#PP_SPACE]=1 \{\
+.                ie !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
+.                el \{ .RLD \\n[#DOC_LEAD]u \}
 .             \}
-.             if \\n[#PRINT_STYLE]=2 \{\
-.                ie \\n[#PP_SPACE]=1 \{\
-.                   ie !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
-.                   el \{ .RLD \\n[#DOC_LEAD]u \}
-.                \}
-.                el \{\
-.                   if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
-.                \}
+.             el \{\
+.                if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
 .             \}
 .          \}
 .       \}
@@ -9435,7 +9603,11 @@
 .          \}
 .          el \{\
 .             FAMILY  \\*[$DOC_FAM]
-.             FT      \\*[$PP_FT]
+.             ie !'\\*[$SAVED_PP_FT]'' \{\
+.                ds $PP_FT \\*[$SAVED_PP_FT]
+.                rm $SAVED_PP_FT
+.             \}
+.             el \{ .FT \\*[$PP_FT] \}
 .             PT_SIZE \\n[#DOC_PT_SIZE]u
 .             LS      \\n[#DOC_LEAD]u
 .             QUAD    \\*[$DOC_QUAD]
@@ -9562,7 +9734,7 @@
 \#
 .MAC UNDERLINE_QUOTES END
 .    ie '\\$1'' \{ .nr #UNDERLINE_QUOTES 1 \}
-.    el \{ .rr #UNDERLINE_QUOTES   \}
+.    el \{ .rr #UNDERLINE_QUOTES \}
 .END
 \#
 \#
@@ -9700,6 +9872,48 @@
 .    el \{ .DO_QUOTE \}
 .END
 \#
+\#
+\# CODE
+\# ----
+\# *Arguments:
+\#   <none> | <anything>
+\# *Function:
+\#   Takes care of admistrivia associated with setting code snippets.
+\#
+.MAC CODE END
+.    ie '\\$1'' \{\
+.        ds $PRE_CODE_FT \\n[.fam]\\n[.sty]
+.        ft CR
+.        if \\n[#UNDERLINE_QUOTES]=1 \{\
+.            nr #RESTORE_UNDERLINE 1
+.            UNDERLINE_QUOTES OFF
+.            FT R
+.        \}
+.       if \\n[#PRINT_STYLE]=2 \{\
+.          tr `'
+.       \}
+.       if \\n[#RESTORE_SQ]=1 \{\
+.          nr #SQ_WAS_ON 1
+.          SMARTQUOTES OFF
+.       \}
+.    \}
+.    el \{\
+.       ft \\*[$PRE_CODE_FT]
+.       rr $RESTORE_FT
+.       if \\n[#RESTORE_UNDERLINE]=1 \{\
+.          rr #RESTORE_UNDERLINE
+.          UNDERLINE_QUOTES
+.       \}
+.       if \\n[#SQ_WAS_ON]=1 \{\
+.          rr #SQ_WAS_ON
+.          SMARTQUOTES
+.       \}
+.       if \\n[#PRINT_STYLE]=2 \{\
+.          tr ``
+.       \}
+.    \}
+.END
+\#
 \# ---Blockquotes---
 \#
 \# BLOCKQUOTE
@@ -12097,8 +12311,8 @@
 .          nr #EN_ALLOWS_HEADERS_ALL 1
 .       \}
 .       el \{\
-.          rr #EN_ALLOWS_HEADERS
-.          rr #EN_ALLOWS_HEADERS_ALL
+.          nr #EN_ALLOWS_HEADERS 0
+.          nr #EN_ALLOWS_HEADERS_ALL 0
 .       \}
 .    \}
 .END
@@ -12280,14 +12494,16 @@
 .             \}
 .          \}
 .       \}
-.       ie \\n[#EN_NUMBER]=1 \{\
-.          if !'\\*[$EN_TITLE]'' \{ .sp \}
-.       \}
-.       el \{ .sp \}
 .       if \\n[#PRINT_STYLE]=1 \{\
 .          TYPEWRITER
+.          if \\n[#EN_NUMBER]=1 \{\
+.             if \\n[#SINGLE_SPACE]=1 \{ .sp \}
+.          \}
 .       \}
 .       if \\n[#PRINT_STYLE]=2 \{\
+.          if \\n[#EN_NUMBER]=1 \{\
+.             if !'\\*[$EN_TITLE]'' \{ .sp \}
+.          \}
 .          if \\n[#EN_MARKER_STYLE]=1 \{\
 .             FAMILY  \\*[$EN_NUMBER_FAM]
 .             FT      \\*[$EN_NUMBER_FT]
@@ -12498,12 +12714,14 @@
 \!.     PT_SIZE \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE]
 .    \}
 \!.  TRAP OFF
+\!.  PAD_MARKER ^
 .    ie \\n[#PRINT_STYLE]=1 \{\
 \!.     PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]"
 .    \}
 .    el \{\
 \!.     PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]"
 .    \}
+\!.  PAD_MARKER #
 \!.  EOL
 \!.  ST 100 L
 \!.  ST 101 R
@@ -14137,6 +14355,7 @@
 \#
 .MAC COLLATE END
 .    if ( \\n[.t] < \\n[.v] ) \{ .nr #NO_BREAK 1 \}
+.    ds $SAVED_PP_FT \\*[$PP_FT]
 .    nr #COLLATE 1
 .    nr #PRE_COLLATE 1
 .    nr #HEADER_STATE \\n[#HEADERS_ON]
@@ -14200,6 +14419,9 @@
 .    \}
 .    if \\n[#CH_NUM] \{ .nr #CH_NUM +1 \}
 .    rm $EN_TITLE
+.    rm $SUBTITLE
+.    rm $CHAPTER
+.    rm $CHAPTER_TITLE_1
 .    rr #PAGENUM_STYLE_SET
 .END
 \#




reply via email to

[Prev in Thread] Current Thread [Next in Thread]