summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/mom/BUGS31
-rw-r--r--contrib/mom/ChangeLog112
-rw-r--r--contrib/mom/NEWS13
-rw-r--r--contrib/mom/TODO17
-rw-r--r--contrib/mom/examples/mom.vim143
-rw-r--r--contrib/mom/momdoc/docelement.html119
-rw-r--r--contrib/mom/momdoc/docprocessing.html13
-rw-r--r--contrib/mom/momdoc/headfootpage.html8
-rw-r--r--contrib/mom/momdoc/macrolist.html2
-rw-r--r--contrib/mom/momdoc/reserved.html24
-rw-r--r--contrib/mom/om.tmac346
11 files changed, 670 insertions, 158 deletions
diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS
index e92e0ad6..b87085f7 100644
--- a/contrib/mom/BUGS
+++ b/contrib/mom/BUGS
@@ -18,6 +18,35 @@ Also, please--no html email. That, too, gets nuked.
--Peter Schaffter
========================================================================
+Version 1.3-e_2
+===============
+TOC formatting incorrect when the pound/number sign (#) is used in
+head elements.
+---Fixed---
+
+[Documentation]: The docs erroneously state that TOC control macros
+can be entered anywhere in a file prior to invoking TOC (they should
+be entered before START).
+---Fixed---
+
+Page numbers in the bottom margin being printed too low on output
+pages preceding an invocation of COLLATE or macros that call it.
+---Fixed---
+
+A superfluous blank, numbered page is being generated by COLLATE
+(and macros that call it, namely TOC and ENDNOTES) when the last
+line of output text before it falls on the last valid baseline of
+an output page. Same thing happening occasionally with normal
+document termination.
+---Fixed---
+
+SHIFT_LIST not being observed when moving *back* to a shifted list;
+the list is reverting to the left margin.
+---Fixed---
+
+NUMBER_SUBHEADS not working with TYPESET when PARA_SPACE is on.
+---Fixed---
+
Version 1.3-e_1
===============
Missing #COLLATE register (accidentally wiped out) creating various
@@ -290,7 +319,7 @@ Version 1.1.6-e
The " mark (doublequote), when entered while not in document
processing mode (i.e. just straightforward typesetting), outputs
-nothing unless SMARTQUOTES is invoked explicitly.
+nothing unless SMARQUOTES is invoked explicitly.
---Fixed---
Version 1.1.6-c
diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 6e70c177..a876eb05 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,7 +1,63 @@
-*Tue Mar 28 2006
+*Wed Apr 26 2006
-o Fix an endless loop which prevented compilation of
- examples/typesetting.mom.
+o Corrected doc entry that stated TOC control macros can be entered
+ anywhere in a file prior to invoking TOC (TOC control macros must
+ come before START).
+
+o Removed spurious .nop from .ie \\n[#PRE_COLLATE]=1 clause in
+ FAMILY (fixes bug that was causing page numbers on pages before
+ COLLATE or TOC to be printed too low).
+
+o Added a test at top of COLLATE to set register #NO_BREAK to 1
+ if the distance to the next trap is less than one linespace; used
+ in NEWPAGE to determine whether to do a 'br or .br. (fixes BUG
+ that was causing COLLATE, NEWPAGE, and TOC to spit out a blank
+ page when the last line of text before them happened to fall on
+ the last legal baseline of the page).
+
+o Changed pad marker used to format TOC entries to permit use of
+ the pound/number sign (#) in head elements.
+
+o New macro, PREFIX_CHAPTER_NUMBER, to allow users to prepend
+ chapter numbers to the numbering scheme used in head element
+ numbering.
+
+o Added missing periods at the ends of head, subhead, parahead
+ numbers.
+
+o CHAPTER, with a numeric argument, can now be used to identify any
+ document as a "chapter" for the purposes of prefixing the
+ argument to CHAPTER to the numbering scheme of head elements.
+
+o Fixed alignment of TOC entries.
+
+o Removed .rr #DOC_HEADER and replaced with
+
+ .if \\n[#DOC_HEADER]=1 \{ .nr #DOC_HEADER 2 \}
+
+ near the end of START. I.e., #DOC_HEADER becomes "2" if
+ docheaders were on in the previous document. COLLATE tests for 2
+ in order to reset #DOC_HEADER to 1 for use in the user-invoked START
+ that comes after a COLLATE.
+
+o Added register, #CHAPTER_CALLED, to CHAPTER; tested for in
+ PREFIX_CHAPTER_NUMBER to determine whether the argument to CHAPTER
+ can be used to establish a chapter number for chapter number
+ prefixes in head element numbering.
+
+*Mon Apr 17 2006
+
+o Fixed bug that was causing shifted lists, when returned to, to
+ revert to the left margin instead of observing the correct
+ indent+shift for the list.
+
+o Added a check in LIST so that if user invokes LIST with RETURN,
+ mom doesn't get confused by the initial `R' (which she was using
+ to check if the arg to LIST was ROMAN or roman).
+
+o Replaced an incorrectly copied code block in SUBHEAD that was
+ preventing SUBHEAD from processing subheads properly when
+ PARA_SPACE was on.
*Wed Mar 15 2006
@@ -39,11 +95,6 @@ o Changed .PRINT "\h'\\n[#LIST_INDENT\\n[#DEPTH]]u' in the
.PRINT "\h'\\n[#HL_INDENT\\n[#DEPTH]]u' to fix bug associated
with using both PAD_LIST_DIGITS LEFT and SHIFT_LIST.
-*Sun Feb 26 2006
-
-o Makefile.sub: Add DESTDIR to install and uninstall targets to support
- staged installations.
-
*Fri Feb 24 2006
o Removed superfluous "if" from FONT, line 492
@@ -83,32 +134,6 @@ o Fixed MN_INIT macro routine that reads MN_INIT args into strings
and \B (correctly, I hope) for each of its args, the @ character
should be safe.
-*Thu Sep 15 2005
-
-o First baseline of type isn't going where it's supposed to when the
- docheader is turned off.
-
-*Thu Aug 11 2005
-
-o Makefile.sub (HTMLDOCFILES): Add `refer.html'
-
-*Mon Jun 20 2005
-
-o Makefile.sub (HTMLDOCFILES_, EXAMPLEFILES_, PROCESSEDEXAMPLEFILES_): New
- variables.
- (install_data): Install files in `mom' subdirectories.
- Make it work actually.
- (uninstall_sub): Updated.
-
-*Thu Jun 16 2005
-
-o Makefile.sub (install_data, uninstall_sub): Use $(exampledir) for example
-files. Reported by Keith Marshall.
-
-*Mon May 16 2005
-
-o Update groff_mom.man.
-
*Thu May 12 2005
o Added margin notes capability
@@ -267,7 +292,7 @@ o Addtion of font "styles" to om.tmac, plus changes to the FAMILY
and FT macros to manage them. New section in the doc appendices
on adding fonts and managing the new font styles.
-o Mom now uses a "fallback font" whenever there's an invalid call
+o Mom now uses a "fallback font" whenever there's an illegal call
to FAMILY.
o RW and EW now affect only the font in effect. A change of family
@@ -311,11 +336,7 @@ o Fairly extensive list of .sty's added to om.tmac. Hopefully,
o Altered kerning slightly for footnote markers in text. Daggers
and double-daggers were getting a bit jammed
-*Fri Jun 4 2004
-
-o Makefile.sub (HTMLDOCFILES, EXAMPLEFILES, PROCESSEDEXAMPLEFILES): Updated.
-
-*Thu Jun 3 2004
+*Jun 3 2004
o Rewrote the routines dealing with _FAMILY, _FONT, _SIZE, _COLOR
and _QUAD. A single macro for each checks for the calling alias
@@ -425,6 +446,17 @@ o Added a .bp after .if \\n[#START]=1 in FOOTER. Without it,
*Fri Jun 6 2003
o Changed register #DOCHEADER_LEAD_ADJ to string
+ $DOCHEADER_LEAD_ADJ. This means that .DOCHEADER_LEAD no longer
+ requires a unit of measure; points is assumed.
+
+*Tue Jun 3 2003
+
+o Added SHIM macro, which, when invoked, calculates and moves to
+ the next "legal" baseline in document processing.
+
+o Corrected handling of DOCHEADER OFF <distance> so that the first
+ line of running text falls on a "legal" baseline when <distance>
+ is given.
*Wed May 21 2003
diff --git a/contrib/mom/NEWS b/contrib/mom/NEWS
index 57f4bd0f..42c359ed 100644
--- a/contrib/mom/NEWS
+++ b/contrib/mom/NEWS
@@ -1,5 +1,10 @@
-Release 1.3-e
--------------
+Release 1.3-e_<#>
+-----------------
+New macro, PREFIX_CHAPTER_NUMBER, to allow users to prepend chapter
+numbers to the numbering scheme used in head element numbering.
+
+Indented TOC entries now line up better.
+
Line numbering now has control macros for family, font, point size
and color.
@@ -223,13 +228,13 @@ requires a unit of measure; points is assumed.
Release 1.1.6-b
---------------
-Added a SHIM macro that calculates and moves to the next "valid"
+Added a SHIM macro that calculates and moves to the next "legal"
baseline during document processing (useful if user starts playing
around with spacing/leading on a page and needs to get the leading
back on track).
Fixed handling of DOCHEADER OFF <distance> so that the first line of
-running text falls on a "valid" baseline when <distance> is given.
+running text falls on a "legal" baseline when <distance> is given.
Release 1.1.6-a
---------------
diff --git a/contrib/mom/TODO b/contrib/mom/TODO
index 1297bbd6..d46dc511 100644
--- a/contrib/mom/TODO
+++ b/contrib/mom/TODO
@@ -1,6 +1,23 @@
As of version 1.2, the items on this TODO list will only be dealt
with if users request they be implemented.
+HEAD, SUBHEAD & PARAHEAD NUMBERING
+----------------------------------
+Add capability of prefixing head, etc. numbers with the chapter
+number as well.
+
+CROSS-REFERENCING
+-----------------
+
+TOC
+---
+Capability of generating a separate file for TOCs, for collating
+and processing with gs/ps2pdf.
+
+DOCS
+----
+Re-write in xhtml (put closing tags after every tag)?
+
UNDERLINING
-----------
Explore "the ultimative underline macro" for possible inclusion
diff --git a/contrib/mom/examples/mom.vim b/contrib/mom/examples/mom.vim
new file mode 100644
index 00000000..2bbdab49
--- /dev/null
+++ b/contrib/mom/examples/mom.vim
@@ -0,0 +1,143 @@
+" Vim syntax file
+" Language: mom
+" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
+" Last Change: So 06 Mär 2005 17:28:13 CET
+" Filenames: *.mom
+" URL: http://www.cvjb.de/comp/vim/mom.vim
+" Note: Remove or overwrite troff syntax for *.mom-files with filetype/filedetect.
+" Version: 0.1
+"
+" Mom: Macro set for easy typesetting with troff/nroff/groff.
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Mom is case sensitive
+syn case match
+
+" Synchronization, I know it is a huge number, but normal texts can be
+" _very_ long ;-)
+syn sync lines=1000
+
+" Characters allowed in keywords
+if version >= 600
+ setlocal iskeyword=@,#,$,%,48-57,.,@-@,_,192-255
+else
+ set iskeyword=@,#,$,%,48-57,.,@-@,_,192-255
+endif
+
+" Some special keywords
+syn keyword momTodo contained TODO FIXME
+syn keyword momDefine .de .. .ALIAS .ALIASN
+
+" Preprocessor keywords
+syn keyword momPreprocessor .EQ .EN .GS .GE .GF .PS .PE .R1 .R2 .TS .TE .TH
+syn keyword momPreprocessor .G1 .G2 .IS .IE .cstart .cend
+
+" Number Registers
+syn match momNumberReg '\.#[A-Za-z][_0-9A-Za-z]*'
+
+" String Registers
+syn match momStringReg '\.\$[A-Za-z][_0-9A-Za-z]*'
+
+" Strings
+syn region momString start='"' end='"' contains=momNoLineBreak,momGreek,momInteger,momFloatEN,momFloatDE,momBracketRegion,momBracketError,momSpecialMove
+
+" Special characters
+syn match momSpecialChar '\\([-+A-Za-z0-9*<>=~!]\+'
+
+" Greek symbols
+syn match momGreek '\\(\*[A-Za-z]\+'
+
+" Hyphenation marks
+syn match momHyphenation '\\%'
+
+" Masking of line breaks
+syn match momNoLineBreak '\\\s*$'
+
+" Numbers (with optional units)
+syn match momInteger '[-+]\=[0-9]\+[iPpv]\='
+syn match momFloatEN '[-+]\=[0-9]*\.[0-9]\+[iPpv]\='
+syn match momFloatDE '[-+]\=[0-9]\+,[0-9]\+'
+
+" Mom Macros
+syn match momKeyword '\(^\|\s\+\)\.[A-Za-z][_0-9A-Za-z]*'
+syn match momKeywordParam '\(^\|\s\+\)\.[A-Za-z][_0-9A-Za-z]*\s\+[^-\\"]\+' contains=momInteger,momFloatEN,momString,momSpecialParam
+syn keyword momSpecialParam contained ON OFF T H C R I B L J N QUAD CLEAR NAMED DRAFT FINAL DEFAULT TYPESET TYPEWRITE CHAPTER BLOCK
+
+" Brackets
+syn match momBrackets '[[]]'
+syn match momBracketError '\]'
+syn region momBracketRegion transparent matchgroup=Delimiter start='\[' matchgroup=Delimiter end='\]' contains=ALLBUT,momBracketError
+
+" Special movements, e.g. \*[BU<#>] or \*[BP<#>]
+syn region momSpecialMove matchgroup=Delimiter start='\\\*\[' matchgroup=Delimiter end='\]' contains=ALLBUT,momBracketError
+
+" Quotes
+syn region momQuote matchgroup=momKeyword start='\<\.QUOTE\>' matchgroup=momKeyword end='\<\.QUOTE\s\+OFF\>' skip='$' contains=ALL
+syn region momBlockQuote matchgroup=momKeyword start='\<\.BLOCKQUOTE\>' matchgroup=momKeyword end='\<\.BLOCKQUOTE\s\+OFF\>' skip='$' contains=ALL
+syn keyword momBreakQuote .BREAK_QUOTE'
+
+" Footnotes
+syn region momFootnote matchgroup=momKeyword start='\<\.FOOTNOTE\>' matchgroup=momKeyword end='\<\.FOOTNOTE\s\+OFF\>' skip='$' contains=ALL
+
+" Comments
+syn region momCommentLine start='\(\\!\)\|\(\\"\)\|\(\\#\)' end='$' contains=momTodo
+syn region momCommentRegion matchgroup=momKeyword start='\<\.\(COMMENT\)\|\(SILENT\)\>' matchgroup=momKeyword end='\<\.\(COMMENT\s\+OFF\)\|\(SILENT\s\+OFF\)\>' skip='$'
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_mom_syn_inits")
+ if version < 508
+ let did_mom_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ " The default methods for highlighting. Can be overrriden later.
+ HiLink momTodo Todo
+ HiLink momDefine Define
+ HiLink momPreprocessor PreProc
+ HiLink momNumberReg Special
+ HiLink momStringReg Special
+ HiLink momCommentLine Comment
+ HiLink momCommentRegion Comment
+ HiLink momInteger Number
+ HiLink momFloatEN Number
+ HiLink momFloatDE Number
+ HiLink momString String
+ HiLink momHyphenation Tag
+ HiLink momNoLineBreak Special
+ HiLink momKeyword Keyword
+ HiLink momSpecialParam Special
+ HiLink momKeywordParam Keyword
+
+ HiLink momBracketError Error
+ HiLink momBrackets Delimiter
+
+ hi momNormal term=none cterm=none gui=none
+ hi momItalic term=italic cterm=italic gui=italic
+ hi momBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
+ HiLink momGreek momBoldItalic
+ HiLink momSpecialChar momItalic
+ HiLink momSpecialMove momBoldItalic
+
+ HiLink momQuote momBoldItalic
+ HiLink momBlockQuote momBoldItalic
+ HiLink momBreakQuote momNormal
+
+ HiLink momFootnote momItalic
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "mom"
+
+" vim:ts=8:sw=4:nocindent:smartindent:
diff --git a/contrib/mom/momdoc/docelement.html b/contrib/mom/momdoc/docelement.html
index 2613fef1..38b7fa59 100644
--- a/contrib/mom/momdoc/docelement.html
+++ b/contrib/mom/momdoc/docelement.html
@@ -916,6 +916,9 @@ Should you wish to stop head numbering, invoke
END, X</strong>...). Head numbering will cease, and the head number
will not be included in the numbering of subheads and/or paraheads.
<p>
+See also
+<a href="#PREFIX_CHAPTER_NUMBER">PREFIX_CHAPTER_NUMBER</a>
+if you'd like chapter numbers prepended to the head numbers.
<a name="RESET_HEAD_NUMBER"><h3><u>6. Reset head numbering -- RESET_HEAD_NUMBER</u></h3></a>
<p>
@@ -1057,8 +1060,11 @@ Should you wish to stop subhead numbering, invoke
END, X</strong>...). Subhead numbering will cease, and the subhead
number will not be included in the numbering of paraheads.
<p>
+See also
+<a href="#PREFIX_CHAPTER_NUMBER">PREFIX_CHAPTER_NUMBER</a>
+if you'd like chapter numbers prepended to the subhead numbers.
-<a name="RESET_SUBHEAD_NUMBER"><h3><u>3. Reset head numbering -- RESET_SUBHEAD_NUMBER</u></h3></a>
+<a name="RESET_SUBHEAD_NUMBER"><h3><u>3. Reset subhead numbering -- RESET_SUBHEAD_NUMBER</u></h3></a>
<p>
Should you wish to reset the subhead number to &quot;1&quot;, invoke
<strong>RESET_SUBHEAD_NUMBER</strong> with no argument. If, for some
@@ -1206,8 +1212,12 @@ Should you wish to stop parahead numbering, invoke
<strong>NUMBER_PARAHEADS</strong> with any argument (<strong>OFF,
QUIT, END, X</strong>...). Parahead numbering will cease.
<p>
+See also
+<a href="#PREFIX_CHAPTER_NUMBER">PREFIX_CHAPTER_NUMBER</a>
+if you'd like chapter numbers prepended to the paragraph head
+numbers.
-<a name="RESET_PARAHEAD_NUMBER"><h3><u>4. Reset head numbering -- RESET_PARAHEAD_NUMBER</u></h3></a>
+<a name="RESET_PARAHEAD_NUMBER"><h3><u>4. Reset paragraph head numbering -- RESET_PARAHEAD_NUMBER</u></h3></a>
<p>
Should you wish to reset the parahead number to &quot;1&quot;, invoke
<strong>RESET_PARAHEAD_NUMBER</strong> with no argument. If, for some
@@ -1222,6 +1232,95 @@ the next in ascending order (i.e. the last parahead number + 1), invoke
Your next parahead will be numbered &quot;7&quot; and subsequent
paraheads will be numbered in ascending order from &quot;7&quot;.
<p>
+
+<!====================================================================>
+
+<hr width="66%" align="left">
+<p>
+<a name="PREFIX_CHAPTER_NUMBER">
+ <nobr>Macro: <strong>PREFIX_CHAPTER_NUMBER</strong> &lt;none&gt; | &lt;chapter number as digit&gt; | &lt;anything&gt;
+</a>
+
+<p>
+If you've requested numbering of heads, subheads and/or paragraph
+heads (with
+<a href="#NUMBER_HEADS">NUMBER_HEADS</a>,
+<a href="#NUMBER_SUBHEADS">NUMBER_SUBHEADS</a>
+and/or
+<a href="#NUMBER_PARAHEADS">NUMBER_PARAHEADS</a>)
+and you'd like <strong>mom</strong>, in addition, to prefix
+a chapter number to the numbering scheme, you can do so with
+<strong>PREFIX_CHAPTER_NUMBERS</strong>.
+After you invoke <strong>PREFIX_CHAPTER_NUMBERS</strong>,
+<strong>mom</strong> will prepend the current chapter number to
+all subsequent head elements (main heads, subheads or paragraph heads)
+for which you have requested numbering. Thus, assuming chapter
+number twelve (12),
+<p>
+<pre>
+ 1. FIRST MAIN HEAD
+ ------------------
+
+1.1. First Subhead Under Main Head
+</pre>
+
+becomes
+<p>
+<pre>
+ 12.1. FIRST MAIN HEAD
+ ---------------------
+
+12.1.1. First Subhead Under Main Head
+</pre>
+
+When you invoke <strong>PREFIX_CHAPTER_NUMBERS</strong> without an
+argument, <strong>mom</strong> checks to see whether the argument
+you passed to
+<a href="docprocessing.html#CHAPTER">CHAPTER</a>
+is a digit. If it is, she immediately starts pre-pending the
+current chapter number to numbered head elements. If it isn't (say
+you've called your chapter &quot;One&quot; instead of
+&quot;1&quot;), <strong>mom</strong> will abort with a request that
+you pass <strong>PREFIX_CHAPTER_NUMBER</strong> a digit
+representing the current chapter number.
+<p>
+In collated documents, <strong>mom</strong> automatically increments
+the digit used by <strong>PREFIX_CHAPTER_NUMBER</strong> by one
+(current chapter digit + 1) every time you invoke
+<a href="rectoverso.html#COLLATE">COLLATE</a>,
+even if you've (temporarily) turned off the prefixing of chapter
+numbers. Thus, even if you call your chapters &quot;One&quot;,
+&quot;Two&quot;, &quot;Three&quot; instead of &quot;1&quot;,
+&quot;2&quot;, &quot;3&quot;, <strong>mom</strong> will Do
+The Right Thing with respect to numbering head elements in
+all collated chapters following the first invocation of
+<strong>PREFIX_CHAPTER_NUMBER</strong> (assuming, of course, that
+the collated chapters are in incrementing order; if not, you
+<em>must</em> must put
+<kbd>.PREFIX_CHAPTER_NUMBER &lt;chapter number&gt;</kbd>
+somewhere after the invocation of <strong>COLLATE</strong> and before
+the first numbered head element of each collated document).
+<p>
+<strong>PREFIX_CHAPTER_NUMBER</strong> can be disabled by passing it
+any argument other than a digit (e.g. <strong>OFF, QUIT, END,
+X</strong>, etc), although, as noted above, <strong>mom</strong>
+will keep, and--in the case of collated documents--increment the
+chapter number, allowing you to turn prefixing of chapter numbers
+to numbered head elements off and on according to your needs or whims.
+<p>
+<strong>NOTE:</strong> Because <strong>PREFIX_CHAPTER_NUMBER</strong>
+takes an (optional) digit representing the chapter number, it's use
+need not be restricted to
+<a href="docprocessing.html#DOCTYPE">DOCTYPE CHAPTER</a>.
+You can use it with any document type. Furthermore, even if your
+doctype isn't &quot;CHAPTER&quot;, you can identify the document as
+a chapter <em>for the purposes of numbering head elements</em> by
+invoking the macro,
+<a href="docprocessing.html#CHAPTER">CHAPTER</a>,
+with a
+<a href="definitions.html#TERMS_NUMERICARGUMENT">numeric argument</a>
+in your document setup.
+<p>
<hr>
<!====================================================================>
@@ -2179,7 +2278,8 @@ as most of her other document processing macros. The reason is
that groff's underlying line-numbering
<a href="definitions.html#TERMS_PRIMITIVES">primitive</a>,
<kbd>.nm</kbd>, is, well...primtive. It is not possible, for
-example, to set the
+example, to select a particular family or font for use exclusively
+with line numbers. Nor is it possible to set the
<a href="definitions.html#TERMS_GUTTER">gutter</a>
using any
<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>
@@ -4624,11 +4724,14 @@ in a document. <strong>Mom</strong> takes care of the rest.
<a name="TOC_CONTROL"><h3><u>TOC control macros</u></h3></a>
<p>
-Toc entries are not actually processed when <strong>mom</strong>
-collects them, so you can put any toc control macros anywhere you
-like in your document. Some may prefer to place them at the top of
-the file. Others may prefer to place them just before outputting
-the toc. The choice is yours.
+TOC control macros must be placed prior to invoking
+<a href="docprocessing.html#START">START</a>.
+<p>
+<strong>ERRATUM:</strong> In versions of <strong>mom</strong> prior to
+1.3-e_3, the documentation stated that TOC control macros could go
+anywhere in a <strong>mom</strong> file prior to invoking
+<strong>.TOC</strong>.
+That convenience has been removed for Very Good Reasons.
<br>
<ol>
<li><a href="#TOC_GENERAL"><strong>General toc page style control</strong></a>
diff --git a/contrib/mom/momdoc/docprocessing.html b/contrib/mom/momdoc/docprocessing.html
index 16a5d543..21e97b30 100644
--- a/contrib/mom/momdoc/docprocessing.html
+++ b/contrib/mom/momdoc/docprocessing.html
@@ -819,8 +819,14 @@ Please note that if your argument to <strong>CHAPTER</strong> runs
to more than one word, you must enclose the argument in
double-quotes.
<p>
-If you're not using <strong>DOCTYPE CHAPTER</strong>, the macro serves
-no purpose and <strong>mom</strong> ignores it.
+If you're not using <strong>DOCTYPE CHAPTER</strong>, the macro can
+be used to identify any document as a chapter <em>for the purpose of
+prepending a chapter number to numbered head elements</em>, provided
+you pass it a
+<a href="definitions.html#TERMS_NUMERICARGUMENT">numeric argument</a>.
+See
+<a href="docelement.html#PREFIX_CHAPTER_NUMBER">PREFIX_CHAPTER_NUMBER</a>.
+
<p>
<a name="CHAPTER_STRING"><strong>CHAPTER_STRING</strong></a>
<p>
@@ -1457,7 +1463,8 @@ and revision information in this circumstance, use
<li>no draft or revision number appears in the page headers
</ol>
<p>
-<strong>NOTE:</strong> The centre part of page headers can get crowded,
+<a name="COPYSTYLE_NOTE"><strong>NOTE:</strong></a>
+The centre part of page headers can get crowded,
especially with
<a href="docprocessing.html#DOCTYPE">DOCTYPE CHAPTER</a>
and
diff --git a/contrib/mom/momdoc/headfootpage.html b/contrib/mom/momdoc/headfootpage.html
index 723b1811..65b8bd7a 100644
--- a/contrib/mom/momdoc/headfootpage.html
+++ b/contrib/mom/momdoc/headfootpage.html
@@ -1561,8 +1561,14 @@ it instead to the document's page numbering, in the form
Draft #, Rev. # / &lt;pagenumber&gt;
</pre>
+If you have not supplied <strong>mom</strong> with a draft number
+(with
+<a href="docprocessing.html#DRAFT">DRAFT</a>)
+<strong>DRAFT_WITH_PAGENUMBER</strong> will assume &quot;Draft 1&quot;,
+and will print it before the page number.
+<p>
See the note in
-<a href="docprocessing.html#COPYSTYLE">COPYSTYLE DRAFT</a>
+<a href="docprocessing.html#COPYSTYLE_NOTE">COPYSTYLE DRAFT</a>
for other ways of dealing with crowded page headers when formatting
draft-style copy.
<p>
diff --git a/contrib/mom/momdoc/macrolist.html b/contrib/mom/momdoc/macrolist.html
index 209ae21c..01125f72 100644
--- a/contrib/mom/momdoc/macrolist.html
+++ b/contrib/mom/momdoc/macrolist.html
@@ -545,7 +545,7 @@ sensibly.
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
- <td><a href="docelement.html#RESET_LIST">RESET_LIST</a></td>
+ <td><a href="docelement.html##RESET_LIST">RESET_LIST</a></td>
</tr>
<tr>
<td>&nbsp;</td>
diff --git a/contrib/mom/momdoc/reserved.html b/contrib/mom/momdoc/reserved.html
index c04ead76..ef7edef4 100644
--- a/contrib/mom/momdoc/reserved.html
+++ b/contrib/mom/momdoc/reserved.html
@@ -281,6 +281,7 @@ p Output line horiz position at end of
#RESTORE_PREV_INDENT Tells LIST OFF what kind of indent was active
prior to first invocation of LIST
#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)
#SIZE_FOR_PAD Used to ensure that the size in effect prior
to PAD is restored at the start of every
@@ -755,6 +756,12 @@ NUMBER_PARAHEADS Print parahead numbers
PARAHEAD_INDENT How much to indent paraheads
RESET_PARAHEAD_NUMBER Reset parahead number
+PREFIX_CH_NUM_WARNING Macro to abort PREFIX_CHAPTER_NUMBER
+ with a warning if the arg to CHAPTER isn't
+ a digit, and user hasn't supplied a digit
+ to PREFIX_CHAPTER_NUMBER
+PREFIX_CHAPTER_NUMBER Prefix the chapter number to numbered
+ heads, subheads and paraheads
***Paragraphs***
INDENT_FIRST_PARAS Indent 1st paras? (doc default=not indented)
@@ -999,6 +1006,11 @@ TOC_ENTRIES TOC entries
(toggle)
#CENTER_CAP_HEIGHT Cap height of CENTER string in
headers/footers
+#CH_NUM The chapter number obtained by PREFIX_CHAPTER_NUMBER
+#CHAPTER_CALLED Has CHAPTER been invoked? (toggle); used
+ by PREFIX_CHAPTER_NUMBER to see whether
+ to try to get the chapter number from
+ the arg passed to CHAPTER
#CHAPTER_TITLE_COLOR Colored chapter title? (toggle)
#CLOSING Is there a closing (for letters)? 1=yes
#COL_L_LENGTH Line length of columns
@@ -1322,6 +1334,10 @@ dc "mark" register for document columns
subtract 1 line of footnote lead from
FN_OVERFLOW in a PREV_FN_DEFERRED
situation.
+#NO_BREAK Set to 1 in COLLATE if last line of
+ text before COLLATE falls at the bottom
+ of the page; instructs NEWPAGE to use
+ 'br instead of .br
#NO_SHIM Should SHIM shim? (toggle)
#NO_SPACE When para spacing is active, instructs
PP not to add space after a quote or blockquote.
@@ -1333,6 +1349,9 @@ dc "mark" register for document columns
#NUMBER_PH Are paraheads numbered? (toggle)
#NUMBER_SH Are subheads numbered? (toggle)
#NUM_COLS Number of columns per page
+#NUMBERED If set to 1, lets PARAHEAD know that
+ main- and subhead numbers have already been prefixed
+ to the parahead string
#NUM_FIELDS Incrementing register used to match
#TOTAL_FIELDS
#OK_PROCESS_LEAD Initial processing of TOC and endnote
@@ -1380,6 +1399,10 @@ dc "mark" register for document columns
#PP_STYLE_PREV In footnotes, stores PP style in effect
prior to invoking FOOTNOTE
#PP_STYLE Regular para=1; quote or epi para=2
+#PRE_COLLATE Set to 1 in COLLATE; prevents FAMILY
+ from clobbering a user-set DOC_FAMILY
+#PREFIX_CH_NUM Prefix the chapter number to numbered
+ heads, subheads and/or paraheads? (toggle)
#PRINT_PAGENUM_ON_PAGE_1 Should we print the page number on first
page of doc when footers are on? (toggle)
#PRINT_STYLE Typewrite=1, typeset=2
@@ -1601,6 +1624,7 @@ $BQUOTE_QUAD Quad value for blockquotes
$BQUOTE_SIZE_CHANGE ps in/decrease of blockquotes*
$CENTER_TITLE What to put in the middle of header
title
+$CH_NUM Register #CH_NUM with a period added.
$CHAPTER The chapter number
$CHAPTER_STRING What to print whenever the word
"chapter" is required
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index cec87509..7ebc2125 100644
--- a/contrib/mom/om.tmac
+++ b/contrib/mom/om.tmac
@@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License along
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_2
+Version 1.3-e_3
---------------
Antoine de St-Exupéry asserted that elegance in engineering is
achieved not when there is nothing left to add, but when there is
@@ -337,7 +337,13 @@ described).
\# breaks to a new page.
\#
.MAC NEWPAGE END
-. br
+. ie \\n[#NO_BREAK] \{\
+' br
+. rr #NO_BREAK
+. \}
+. el \{\
+. br
+. \}
. nr #NEWPAGE 1
. ie \\n[#B_MARGIN_SET]=1 \{\
. ie !\\n[#DOCS]=1 \{\
@@ -457,9 +463,7 @@ described).
. ft 0
. \}
. \}
-. ie \\n[#PRE_COLLATE]=1 \{\
-. nop
-. \}
+. ie \\n[#PRE_COLLATE]=1 \{ . \}
. el \{\
. if \\n[#COLLATE]=1 \{\
. if !r#START \{ .DOC_FAM \\*[$FAMILY] \}
@@ -1426,7 +1430,7 @@ text to groff fill mode.
. ce 0
. nf
. nr #PSEUDO_FILL 1
-.\" Fix for a little conflict with DOCTYPE LETTER
+.\" Fix for a little conflict with DOCTYPE LETTER
. if '\\n(.z'LETTERHEAD1' \{ .rr #DATE_FIRST \}
.END
\#
@@ -3774,26 +3778,26 @@ y\\R'#DESCENDER \\n[.cdp]'
. ie '\\*[$DRAFT]'' \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_TITLE], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. el \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_TITLE], \
\\*[$DRAFT_STRING]\\*[$DRAFT], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. \}
. el \{\
. ie '\\*[$DRAFT]'' \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_STRING], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. el \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_STRING], \
\\*[$DRAFT_STRING]\\*[$DRAFT], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. \}
. \}
@@ -3802,26 +3806,26 @@ y\\R'#DESCENDER \\n[.cdp]'
. ie '\\*[$DRAFT]'' \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_TITLE], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. el \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_TITLE], \
\\*[$DRAFT_STRING]\\*[$DRAFT], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. \}
. el \{\
. ie '\\*[$DRAFT]'' \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_STRING] \\*[$CHAPTER], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. el \{\
. ds $HDRFTR_CENTER \
\\*[$CHAPTER_STRING] \\*[$CHAPTER], \
\\*[$DRAFT_STRING]\\*[$DRAFT], \
- \\*[$REVISION_STRING] \\*[$REVISION]
+ \\*[$REVISION_STRING] \\*[$REVISION]
. \}
. \}
. \}
@@ -3926,7 +3930,13 @@ y\\R'#DESCENDER \\n[.cdp]'
\#
\#
.MAC CHAPTER END \"If document is a chapter, the chapter number
+. nr #CHAPTER_CALLED 1
. ds $CHAPTER \\$1
+. if r#CH_NUM \{\
+. if \B'\\*[$CHAPTER]' \{\
+. nr #CH_NUM \\*[$CHAPTER]
+. \}
+. \}
.END
\#
\#
@@ -4277,7 +4287,7 @@ the macro whose style is to be changed.
. if '\\$0'ENDNOTE_NUMBER_SIZE' .ds $EN_NUMBER_SIZE_CHANGE \\$1
. if '\\$0'ENDNOTE_LINENUMBER_SIZE' .ds $EN_LN_SIZE_CHANGE \\$1
. if '\\$0'ENDNOTE_STRING_SIZE' .ds $EN_STRING_SIZE_CHANGE \\$1
-. if '\\$0'ENDNOTE_TITLE_SIZE' .ds $EN_TITLE_SIZE_CHANGE \\$1
+. if '\\$0'ENDNOTE_TITLE_SIZE' .ds $EN_TITLE_SIZE_CHANGE \\$1
. if '\\$0'EPIGRAPH_SIZE' .ds $EPI_SIZE_CHANGE \\$1
. if '\\$0'FOOTNOTE_SIZE' .ds $FN_SIZE_CHANGE \\$1
. if '\\$0'HDRFTR_CENTER_SIZE' .ds $HDRFTR_CENTER_SIZE_CHANGE \\$1
@@ -4673,9 +4683,6 @@ the macro whose style is to be changed.
. if !d$TOC_PN_STYLE \{ .TOC_PAGENUM_STYLE roman \}
. if !r#TOC_PN_PADDING \{ .TOC_PADDING 3 \}
. if !r#TOC_TITLE_INDENT \{ .TOC_TITLE_INDENT 0 \}
-. if !r#TOC_HEAD_INDENT \{ .TOC_HEAD_INDENT 18p \}
-. if !r#TOC_SH_INDENT \{ .TOC_SUBHEAD_INDENT 30p \}
-. if !r#TOC_PH_INDENT \{ .TOC_PARAHEAD_INDENT 42p \}
.\" String defaults for both PRINTSTYLEs
. ie \\n[#DOC_TYPE]=1 \{\
. ie '\\*[$DOC_TITLE]'' \{\
@@ -4929,7 +4936,7 @@ the macro whose style is to be changed.
. if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE -2 \}
. if !r#FN_AUTOLEAD \{ .FOOTNOTE_AUTOLEAD 2 \}
.\" +Endnotes
-. if !r#EN_PS \{ .ENDNOTE_PT_SIZE \\n[#DOC_PT_SIZE]u \}
+. if !r#EN_PS \{ .ENDNOTE_PT_SIZE (\\n[#DOC_PT_SIZE]u)\}
. if !d$EN_STRING_FT \{ .ENDNOTE_STRING_FONT B \}
. if !d$EN_STRING_SIZE_CHANGE \{ .ENDNOTE_STRING_SIZE +1 \}
. if !d$EN_TITLE_FT \{ .ENDNOTE_TITLE_FONT B \}
@@ -4938,13 +4945,13 @@ the macro whose style is to be changed.
. if !d$EN_NUMBER_SIZE_CHANGE \{ .ENDNOTE_NUMBER_SIZE +0 \}
. if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT 1.5m \}
.\" +Bibliography
-. if !r#BIB_LIST \{ .BIBLIOGRAPHY_TYPE LIST . \}
-. if !r#BIB_PS \{ .BIBLIOGRAPHY_PT_SIZE \\n[#DOC_PT_SIZE]u \}
-. if !d$BIB_STRING_FT \{ .BIBLIOGRAPHY_STRING_FONT B \}
-. if !d$BIB_STRING_SIZE_CHANGE \{ .BIBLIOGRAPHY_STRING_SIZE +1 \}
+. if !r#BIB_LIST \{ .BIBLIOGRAPHY_TYPE LIST . \}
+. if !r#BIB_PS \{ .BIBLIOGRAPHY_PT_SIZE (\\n[#DOC_PT_SIZE]u) \}
+. if !d$BIB_STRING_FT \{ .BIBLIOGRAPHY_STRING_FONT B \}
+. if !d$BIB_STRING_SIZE_CHANGE \{ .BIBLIOGRAPHY_STRING_SIZE +1 \}
.\" +Table of contents
. if !d$TOC_FAM \{ .TOC_FAMILY \\*[$DOC_FAM] \}
-. if !r#TOC_PS \{ .TOC_PT_SIZE \\n[#DOC_PT_SIZE]u \}
+. if !r#TOC_PS \{ .TOC_PT_SIZE (\\n[#DOC_PT_SIZE]u) \}
. if !r#TOC_LEAD \{ .TOC_LEAD \\n[#DOC_LEAD]u ADJUST \}
. if !d$TOC_HEADER_FAM \{ .TOC_HEADER_FAMILY \\*[$TOC_FAM] \}
. if !d$TOC_HEADER_SIZE_CHANGE \{ .TOC_HEADER_SIZE +4 \}
@@ -4964,9 +4971,18 @@ the macro whose style is to be changed.
. if !d$TOC_HEAD_SIZE_CHANGE \{ .TOC_HEAD_SIZE +.5 \}
. if !d$TOC_SH_SIZE_CHANGE \{ .TOC_SUBHEAD_SIZE +0 \}
. if !d$TOC_PH_SIZE_CHANGE \{ .TOC_PARAHEAD_SIZE +0 \}
+. ps \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE]
+. if !r#TOC_HEAD_INDENT \{ .TOC_HEAD_INDENT \w'\0\0.' \}
+. ps
+. ps \\n[#TOC_PS]u\\*[$TOC_HEAD_SIZE_CHANGE]
+. if !r#TOC_SH_INDENT \{ .TOC_SUBHEAD_INDENT \\n[#TOC_HEAD_INDENT]+\w'\0\0.' \}
+. ps
+. ps \\n[#TOC_PS]u\\*[$TOC_SH_SIZE_CHANGE]
+. if !r#TOC_PH_INDENT \{ .TOC_PARAHEAD_INDENT \\n[#TOC_SH_INDENT]+\w'\0\0.' \}
+. ps
. \}
.\" +Refer support
-. if !r#ENDNOTE_REFS \{ .nr #FN_REFS 1 \}
+. if !r#ENDNOTE_REFS \{ .nr #FN_REFS 1 \}
. if '\\*[$REF_FN_INDENT]'' \{\
. if \\n[#PRINT_STYLE]=1 \{ .INDENT_REFS FOOTNOTE 2m \}
. if \\n[#PRINT_STYLE]=2 \{ .INDENT_REFS FOOTNOTE 1.5m \}
@@ -5872,7 +5888,7 @@ the macro whose style is to be changed.
. CENTER
. PRINT "You neglected to enter a PRINTSTYLE"
. fl
-. ab PRINTSTYLE missing
+. ab [mom]: PRINTSTYLE missing. Aborting.
. \}
. nr #DOCS 1
. if \\n[#LINENUMBERS]=1 \{\
@@ -5975,12 +5991,14 @@ the macro whose style is to be changed.
\!. 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]"
+\!. 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
@@ -5995,7 +6013,7 @@ the macro whose style is to be changed.
\!. TRAP
\!. PRINT \\n[#TOC_ENTRY_PN]
\!. TQ
-. di
+. di
. ev
. \}
. el \{\
@@ -6327,7 +6345,8 @@ the macro whose style is to be changed.
. rr #DEPTH_1
. rr #DEPTH_2
. rr #DOC_COVER_LEAD
-. rr #DOC_HEADER
+\#. rr #DOC_HEADER
+. if \\n[#DOC_HEADER]=1 \{ .nr #DOC_HEADER 2 \}
. rr #DOCHEADER_ADVANCE
. rr #DOCHEADER_EXTRA_SPACE
. rr #DOCHEADER_LEAD
@@ -6664,7 +6683,6 @@ the macro whose style is to be changed.
\# Default is "END".
\#
.MAC FINIS_STRING END
-. nr #FINIS 1
. CAPS
. ds $FINIS_STRING \\$1
. CAPS OFF
@@ -8447,7 +8465,61 @@ Default is OFF.
\#
.MAC RESET_PARAHEAD_NUMBER END
. ie '\\$1'' \{ .nr #PH_NUM 0 1 \}
-. el \{ nr #SH_NUM \\$1-1 1 \}
+. el \{ .nr #SH_NUM \\$1-1 1 \}
+.END
+\#
+\#
+\# PREFIX CHAPTER NUMBERS TO NUMBERED HEADS, SUBHEADS AND PARAHEADS
+\# ----------------------------------------------------------------
+\# *Arguments:
+\# <none> | <chapter number> | <anything>
+\# *Function:
+\# Toggles register #PREFIX_CH_NUM. Sets register #CH_NUM from
+\# string $CHAPTER if $CHAPTER is a digit; if <chapter number> arg
+\# given, sets #CH_NUM to arg.
+\# *Notes:
+\# Default is OFF.
+\#
+.MAC PREFIX_CHAPTER_NUMBER END
+. ie '\\$1'' \{\
+. ie r#CH_NUM \{\
+. nr #PREFIX_CH_NUM 1
+. if \\n[#CHAPTER_CALLED] \{\
+. ie \B'\\*[$CHAPTER]' \{\
+. nr #CH_NUM \\*[$CHAPTER]
+. \}
+. el \{\
+. PREFIX_CH_NUM_WARNING
+. \}
+. rr #CHAPTER_CALLED
+. \}
+. \}
+. el \{\
+. ie \B'\\*[$CHAPTER]' \{\
+. nr #PREFIX_CH_NUM 1
+. nr #CH_NUM \\*[$CHAPTER]
+. \}
+. el \{\
+. PREFIX_CH_NUM_WARNING
+. \}
+. \}
+. \}
+. el \{\
+. ie \B'\\$1' \{\
+. nr #CH_NUM \\$1
+. nr #PREFIX_CH_NUM 1
+. \}
+. el \{\
+. rr #PREFIX_CH_NUM
+. \}
+. \}
+.END
+\#
+.MAC PREFIX_CH_NUM_WARNING END
+. tm1 "[mom]: PREFIX_CHAPTER_NUMBER cannot determine a chapter number.
+. tm1 " Please enter the current chapter number as a digit after
+. tm1 " PREFIX_CHAPTER_NUMBER.
+. ab Aborting on PREFIX_CHAPTER_NUMBER at line \\n(.c.
.END
\#
\#
@@ -8527,15 +8599,15 @@ Default is OFF.
.\" space after it.
. ie \\n[#NUMBER_HEAD] \{\
. ie \\n[#ARG_NUM]=0 \{\
-. as $TOC_HEAD_ITEM \\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\
+. as $TOC_HEAD_ITEM \\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\ \"
. nr #HEAD_NUM \\n-[#HEAD_NUM]
. \}
. el \{\
-. as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\
+. as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\ \"
. \}
. \}
. el \{\
-. as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\
+. as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\ \"
. \}
. \}
.\}
@@ -8555,12 +8627,14 @@ Default is OFF.
\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_HEAD_SIZE_CHANGE]
. \}
\!. TRAP OFF
+\!. PAD_MARKER ^
. ie \\n[#PRINT_STYLE]=1 \{\
\!. PAD "\\h'2m'\\*[$TOC_HEAD_ITEM]\\*[$TOC_PN_TYPEWRITE]"
. \}
. el \{\
\!. PAD "\\h'\\n[#TOC_HEAD_INDENT]u'\\*[$TOC_HEAD_ITEM]\\*[$TOC_PN]"
. \}
+\!. PAD_MARKER #
\!. EOL
\!. ST 100 L
\!. ST 101 R
@@ -8575,7 +8649,7 @@ Default is OFF.
\!. TRAP
\!. PRINT \\n[#TOC_ENTRY_PN]
\!. TQ
-. di
+. di
. ev
.\" End collection of head for TOC
.\" Process head
@@ -8659,9 +8733,15 @@ Default is OFF.
. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
. ie \\n[#NUMBER_HEAD] \{\
. ie \\n[#ARG_NUM]=0 \{\
+. ie \\n[#PREFIX_CH_NUM]=1 \{\
+. ds $CH_NUM \\n[#CH_NUM].
+. \}
+. el \{\
+. rm $CH_NUM
+. \}
. br
-. ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\}
-. el \{ .UNDERSCORE "\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\}
+. ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\*[$CH_NUM]\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\}
+. el \{ .UNDERSCORE "\\*[$CH_NUM]\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\}
. br
. \}
. el \{\
@@ -8682,8 +8762,8 @@ Default is OFF.
. CAPS OFF
. ev
. ALD \\n[#DOC_LEAD]u
-. RESET_SUBHEAD_NUMBER
-. RESET_PARAHEAD_NUMBER
+. if \\n[#NUMBER_HEAD] \{ .RESET_SUBHEAD_NUMBER \}
+. if \\n[#NUMBER_SH] \{ .RESET_PARAHEAD_NUMBER \}
. if r#START \{ .rr #START \}
. if r#EPIGRAPH \{ .rr #EPIGRAPH \}
. if r#QUOTE \{ .rr #QUOTE \}
@@ -8728,15 +8808,15 @@ Default is OFF.
.\" space after it.
. ie \\n[#NUMBER_SH] \{\
. ie \\n[#ARG_NUM]=0 \{\
-. as $TOC_SH_ITEM \\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]\
+. as $TOC_SH_ITEM \\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]\ \"
. nr #SH_NUM \\n-[#SH_NUM]
. \}
. el \{\
-. as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\
+. as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\ \"
. \}
. \}
. el \{\
-. as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\
+. as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\ \"
. \}
. \}
.\}
@@ -8756,12 +8836,14 @@ Default is OFF.
\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_SH_SIZE_CHANGE]
. \}
\!. TRAP OFF
+\!. PAD_MARKER ^
. ie \\n[#PRINT_STYLE]=1 \{\
\!. PAD "\\h'4m'\\*[$TOC_SH_ITEM]\\*[$TOC_PN_TYPEWRITE]"
. \}
. el \{\
\!. PAD "\\h'\\n[#TOC_SH_INDENT]u'\\*[$TOC_SH_ITEM]\\*[$TOC_PN]"
. \}
+\!. PAD_MARKER #
\!. EOL
\!. ST 100 L
\!. ST 101 R
@@ -8776,7 +8858,7 @@ Default is OFF.
\!. TRAP
\!. PRINT \\n[#TOC_ENTRY_PN]
\!. TQ
-. di
+. di
. ev
.\" End collection of head for TOC
.\" Process subhead
@@ -8835,21 +8917,26 @@ Default is OFF.
. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
. ie \\n[#NUMBER_SH] \{\
. ie \\n[#ARG_NUM]=0 \{\
+. ie \\n[#PREFIX_CH_NUM]=1 \{\
+. ds $CH_NUM \\n[#CH_NUM].
+. \}
+. el \{\
+. rm $CH_NUM
+. \}
. ie \\n[#NUMBER_HEAD] \{\
. br
-. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\n[#HEAD_NUM].\\n+[#SH_NUM]\0\\$[\\n+[#ARG_NUM]]
+. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\*[$CH_NUM]\\n[#HEAD_NUM].\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
. br
. \}
. el \{\
. br
-. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
+. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\*[$CH_NUM]\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
. br
. \}
. \}
. el \{\
. br
-. ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]\}
-. el \{ .UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]\}
+. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
. br
. \}
. \}
@@ -8869,26 +8956,32 @@ Default is OFF.
. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
. ie \\n[#NUMBER_SH] \{\
. ie \\n[#ARG_NUM]=0 \{\
+. ie \\n[#PREFIX_CH_NUM]=1 \{\
+. ds $CH_NUM \\n[#CH_NUM].
+. \}
+. el \{\
+. rm $CH_NUM
+. \}
. ie \\n[#NUMBER_HEAD] \{\
. br
-. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\n[#HEAD_NUM].\\n+[#SH_NUM]\0\\$[\\n+[#ARG_NUM]]
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\*[$CH_NUM]\\n[#HEAD_NUM].\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
. br
. \}
. el \{\
. br
-. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\*[$CH_NUM]\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
. br
. \}
. \}
. el \{\
. br
-. PRINT "\\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
. br
. \}
. \}
. el \{\
. br
-. PRINT "\\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
. br
. \}
.\}
@@ -8899,14 +8992,43 @@ Default is OFF.
. if \\n[#END_QUOTE] \{ .RLD \\n[#DOC_LEAD]u \}
. if \\n[#EPIGRAPH] \{ .RLD \\n[#DOC_LEAD]u \}
. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
-. PRINT "\\$[\\n+[#ARG_NUM]]
+. ie \\n[#NUMBER_SH] \{\
+. ie \\n[#ARG_NUM]=0 \{\
+. ie \\n[#PREFIX_CH_NUM]=1 \{\
+. ds $CH_NUM \\n[#CH_NUM].
+. \}
+. el \{\
+. rm $CH_NUM
+. \}
+. ie \\n[#NUMBER_HEAD] \{\
+. br
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\*[$CH_NUM]\\n[#HEAD_NUM].\\n+[#SH_NUM]\0\\$[\\n+[#ARG_NUM]]
+. br
+. \}
+. el \{\
+. br
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\*[$CH_NUM]\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
+. br
+. \}
+. \}
+. el \{\
+. br
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
+. br
+. \}
+. \}
+. el \{\
+. br
+. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
+. br
+. \}
.\}
. ALD \\n[#DOC_LEAD]u
. \}
. \}
. REMOVE_INDENT
. ev
-. RESET_PARAHEAD_NUMBER
+. if \\n[#NUMBER_SH] \{ .RESET_PARAHEAD_NUMBER \}
. if r#START \{ .rr #START \}
. if r#EPIGRAPH \{ .rr #EPIGRAPH \}
. if r#Q_FITS \{ .rr #Q_FITS \}
@@ -8966,12 +9088,14 @@ Default is OFF.
\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PH_SIZE_CHANGE]
. \}
\!. TRAP OFF
+\!. PAD_MARKER ^
. ie \\n[#PRINT_STYLE]=1 \{\
-\!. PAD "\\h'6m'\\*[$TOC_PH_ITEM]\\*[$TOC_PN_TYPEWRITE]"
+\!. PAD "\\h'6m'\\*[$TOC_PH_ITEM]\\*[$TOC_PN_TYPEWRITE]"
. \}
. el \{\
\!. PAD "\\h'\\n[#TOC_PH_INDENT]u'\\*[$TOC_PH_ITEM]\\*[$TOC_PN]"
. \}
+\!. PAD_MARKER #
\!. EOL
\!. ST 100 L
\!. ST 101 R
@@ -8986,7 +9110,7 @@ Default is OFF.
\!. TRAP
\!. PRINT \\n[#TOC_ENTRY_PN]
\!. TQ
-. di
+. di
. ev
.\" End collection of parahead for TOC
.\" Process parahead
@@ -9000,29 +9124,35 @@ Default is OFF.
. \}
. \}
. el \{ .ti \\n[#PH_INDENT]u \}
+. ie \\n[#PREFIX_CH_NUM]=1 \{\
+. ds $CH_NUM \\n[#CH_NUM].
+. \}
+. el \{\
+. rm $CH_NUM
+. \}
. if \\n[#PRINT_STYLE]=1 \{\
. TYPEWRITER
. UNDERLINE OFF
. ie \\n[#NUMBER_PH] \{\
. if \\n[#NUMBER_HEAD] \{\
. ie \\n[#NUMBER_SH] \{\
-. UNDERSCORE "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1"
+. UNDERSCORE "\R'#NUMBERED 1'\\*[$CH_NUM]\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1"
\0
. \}
. el \{\
-. UNDERSCORE "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\\ \\$1
+. UNDERSCORE "\R'#NUMBERED 1'\\*[$CH_NUM]\\n[#HEAD_NUM].\\n+[#PH_NUM].\\ \\$1
\0
. \}
. \}
. ie \\n[#NUMBER_SH] \{\
. if !\\n[#NUMBERED] \{\
-. UNDERSCORE "\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1
+. UNDERSCORE "\\*[$CH_NUM]\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1
\0
. \}
. \}
. el \{\
. if !\\n[#NUMBERED] \{\
-. UNDERSCORE "\\n+[#PH_NUM].\\ \\$1
+. UNDERSCORE "\\*[$CH_NUM]\\n+[#PH_NUM].\\ \\$1
\0
. \}
. \}
@@ -9045,22 +9175,28 @@ Default is OFF.
. PT_SIZE \\*[$PH_SIZE_CHANGE]
. if \\n[#PH_COLOR]=1 \{ .COLOR \\*[$PH_COLOR] \}
. ie \\n[#NUMBER_PH] \{\
+. ie \\n[#PREFIX_CH_NUM]=1 \{\
+. ds $CH_NUM \\n[#CH_NUM].
+. \}
+. el \{\
+. rm $CH_NUM
+. \}
. if \\n[#NUMBER_HEAD] \{\
. ie \\n[#NUMBER_SH] \{\
-. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
+. PRINT "\R'#NUMBERED 1'\\*[$CH_NUM]\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
. \}
. el \{\
-. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
+. PRINT "\R'#NUMBERED 1'\\*[$CH_NUM]\\n[#HEAD_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
. \}
. \}
. ie \\n[#NUMBER_SH] \{\
. if !\\n[#NUMBERED] \{\
-. PRINT "\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
+. PRINT "\\*[$CH_NUM]\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
. \}
. \}
. el \{\
. if !\\n[#NUMBERED] \{\
-. PRINT "\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
+. PRINT "\\*[$CH_NUM]\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
. \}
. \}
. \}
@@ -10309,7 +10445,7 @@ The macros are heavily commented.
. if '\\$1'STAR' \{\
. if \\n[#FN_MARKER_STYLE]=3 \{\
. if !\\n[#NEWPAGE]=1 \{\
-. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is LINE.
+. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is LINE.
. tm1 " You cannot change footnote marker style without
. tm1 " first breaking to a new page with NEWPAGE.
. tm1 " Ignoring request FOOTNOTE_MARKER_STYLE STAR at line \\n(.c.
@@ -10328,7 +10464,7 @@ The macros are heavily commented.
. if '\\$1'NUMBER' \{\
. if \\n[#FN_MARKER_STYLE]=3 \{\
. if !\\n[#NEWPAGE]=1 \{\
-. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is NUMBER.
+. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is NUMBER.
. tm1 " You cannot change footnote marker style without
. tm1 " first breaking to a new page with NEWPAGE.
. tm1 " Ignoring request FOOTNOTE_MARKER_STYLE NUMBER at line \\n(.c.
@@ -10419,7 +10555,7 @@ The macros are heavily commented.
. \}
.END
\#
-\#
+\#
\# RESET FOOTNOTE NUMBER
\# ---------------------
\# *Arguments:
@@ -11010,7 +11146,7 @@ The macros are heavily commented.
. \}
. \}
. if \\n[#REF]=1 \{\
-\!. in
+\!. in
. \}
.\" Terminate FOOTNOTES or FN_IN_DIVER diversion
. di
@@ -11229,7 +11365,7 @@ The macros are heavily commented.
. if \\n[#DIVERTED] \{\
. if !\\n[#FN_DEPTH]=\\n[#SAVED_FN_DEPTH_1] \{\
. nr #FN_DEPTH +\\n[#FN_LEAD]
-. nr #VARIABLE_FOOTER_POS -\\n[#FN_LEAD]
+. nr #VARIABLE_FOOTER_POS -\\n[#FN_LEAD]
. rr #PREV_FN_DEFERRED
. \}
. \}
@@ -11278,7 +11414,7 @@ manipulation of them.
\#
\# a) A footnote inside a diversion will be moved entirely (marker
\# in running text and text of footnote) to the next page/column.
-\#
+\#
.MAC DIVER_FN_1_PRE END
. nr #RESET_FN_COUNTERS 1
. nr #COUNTERS_RESET 1
@@ -11419,7 +11555,7 @@ FOOTER outputs the diversion, FOOTNOTES, before PROCESS_FN_LEFTOVER
is run (either in HEADER, or in FOOTER if moving col to col).
..
\#
-.MAC FN_OVERFLOW_TRAP END
+.MAC FN_OVERFLOW_TRAP END
. if \\n[#FN_COUNT] \{\
. di FN_OVERFLOW
. ie !\\n[#NO_BACK_UP]=1 \{\
@@ -11529,7 +11665,7 @@ to the next).
. FOOTNOTE OFF
. if \\n[#PREV_FN_DEFERRED] \{\
. nr #FN_DEPTH -\\n[#FN_LEAD]
-. nr #VARIABLE_FOOTER_POS +\\n[#FN_LEAD]
+. nr #VARIABLE_FOOTER_POS +\\n[#FN_LEAD]
. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
. if \\n[#PREV_FN_DEFERRED]=2 \{\
. nr #PREV_FN_DEFERRED 1
@@ -11666,7 +11802,7 @@ document, or to output them at the end of the entire document.
.END
\#
\#
-\# ENDNOTE STRING
+\# ENDNOTE STRING
\# --------------
\# *Argument:
\# <title for endnotes page>
@@ -11855,7 +11991,7 @@ document, or to output them at the end of the entire document.
. ds $EN_LN_GAP \\$1
.END
\#
-\#
+\#
\# ENDNOTE NUMBERS ALIGN RIGHT
\# ---------------------------
\# *Argument:
@@ -12363,7 +12499,7 @@ document, or to output them at the end of the entire document.
. \}
\!. TRAP OFF
. ie \\n[#PRINT_STYLE]=1 \{\
-\!. PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]"
+\!. PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]"
. \}
. el \{\
\!. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]"
@@ -12382,7 +12518,7 @@ document, or to output them at the end of the entire document.
\!. TRAP
\!. PRINT \\n[#TOC_ENTRY_PN]
\!. TQ
-. di
+. di
. ev
.\" End collection of endnotes title string for TOC
.\" Process endnotes
@@ -12756,7 +12892,7 @@ Arguments, Function and Notes.
. \}
\!. TRAP OFF
. ie \\n[#PRINT_STYLE]=1 \{\
-\!. PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]"
+\!. PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]"
. \}
. el \{\
\!. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]"
@@ -12775,7 +12911,7 @@ Arguments, Function and Notes.
\!. TRAP
\!. PRINT \\n[#TOC_ENTRY_PN]
\!. TQ
-. di
+. di
. ev
.\" End collection of bibliography title string for TOC
.\" Process bibliography
@@ -12891,8 +13027,8 @@ Arguments, Function and Notes.
\#
\# Strings to allocate space for leaders and entry page numbers
\#
-.ds $TOC_PN \\*[ST100]\\F[\\*[$TOC_PN_FAM]]\\f[\\*[$TOC_PN_FT]]\\s[\\n[#TOC_PS]u]#\\*[ST100X]\\*[ST101]\\s[\\*[$TOC_PN_SIZE_CHANGE]]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\*[ST101X]
-.ds $TOC_PN_TYPEWRITE \\*[ST100]#\\*[ST100X]\\*[ST101]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\\*[ST101X]
+.ds $TOC_PN \\*[ST100]\\F[\\*[$TOC_PN_FAM]]\\f[\\*[$TOC_PN_FT]]\\s[\\n[#TOC_PS]u]^\\*[ST100X]\\*[ST101]\\s[\\*[$TOC_PN_SIZE_CHANGE]]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\*[ST101X]
+.ds $TOC_PN_TYPEWRITE \\*[ST100]^\\*[ST100X]\\*[ST101]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\\*[ST101X]
\#
\# TOC ENTRIES PAGE NUMBERS PADDING
\# --------------------------------
@@ -12938,7 +13074,7 @@ Arguments, Function and Notes.
\# See notes for ENDNOTE_PT_SIZE for explanation. No unit of
\# measure required.
\#
-\# No unit of measure required (points assumed). Default is 11.5
+\# No unit of measure required (points assumed). Default is 12.5
\# for TYPESET.
\#
.MAC TOC_PT_SIZE END
@@ -12993,7 +13129,7 @@ Arguments, Function and Notes.
\# Creates or modifies string $TOC_PN_STYLE
\# *Notes:
\# Page numbering style for page numbers that appear in the
-\# headers/footers of toc pages. See notes for PAGENUM_STYLE.
+\# headers/footers of toc pages. See notes for PAGENUM_STYLE.
\#
\# Default is roman.
\#
@@ -13034,7 +13170,7 @@ Arguments, Function and Notes.
\#
\# - for TOC entries page number numerals
\#
-\# Control macros for toc doc titles, heads, subheads and paraheads
+\# Control macros for toc doc titles, heads, subheads and paraheads
\# ----------------------------------------------------------------
\#
\# All these control macros behave the same way, setting the family,
@@ -13043,7 +13179,7 @@ Arguments, Function and Notes.
\# operate is identical to all other _FAMILY, _FONT and _SIZE
\# control macros. _INDENT takes an absolute value.
\# TOC_APPENDS_AUTHORS is unique in this section.
-\#
+\#
\# - for title entries
\#
.MAC TOC_TITLE_INDENT END
@@ -13194,12 +13330,14 @@ Arguments, Function and Notes.
. FT \\*[$TOC_TITLE_FT]
. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE]
. \}
+. PAD_MARKER ^
. ie \\n[#PRINT_STYLE]=1 \{\
-. PAD "\\*[$FIRST_DOC_TITLE]\\*[$TOC_PN_TYPEWRITE]"
+. PAD "\\*[$FIRST_DOC_TITLE]\\*[$TOC_PN_TYPEWRITE]"
. \}
. el \{\
. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$FIRST_DOC_TITLE]\\*[$TOC_PN]"
. \}
+. PAD_MARKER #
. EOL
. ST 100 L
. ST 101 R
@@ -13313,6 +13451,14 @@ Arguments, Function and Notes.
. ds $LAST_CHAR \\$1
. substring $LAST_CHAR -1
. if !\B'\\*[$LAST_CHAR]' \{\
+. if !'\\$1'ROMAN' \{\
+. LIST OFF
+. return
+. \}
+. if !'\\$1'roman' \{\
+. LIST OFF
+. return
+. \}
. tm1 "[mom]: You must append a number to the \\$1 argument to LIST at line \\n(.c.
. tm1 " The number should be the total number of items in this list.
. tm1 " See the documentation.
@@ -13463,7 +13609,7 @@ Arguments, Function and Notes.
. el \{\
. QUIT_LISTS
. return
-. \}
+. \}
. \}
. el \{\
. SET_LIST_INDENT
@@ -13537,7 +13683,7 @@ Arguments, Function and Notes.
. nr #KERN_WAS_ON 1
. KERN OFF
. \}
-. IL
+. IL
. ll \\n[#CURRENT_L_LENGTH]u \" Set ll again because IL turns IB off.
. TRAP OFF
. HI \\n[#HL_INDENT\\n[#DEPTH]]u
@@ -13845,15 +13991,9 @@ Arguments, Function and Notes.
\# Requires a unit of measure.
\#
.MAC SHIFT_LIST END
-. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'roman' \{\
. nr #SHIFT_LIST\\n[#DEPTH] (\\$1)
-. nr #LIST_INDENT\\n[#DEPTH] \\n(.i+\\n[#L_INDENT]+\\n[#SHIFT_LIST\\n[#DEPTH]]
-. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]]
-. \}
-. el \{\
-. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT]+(\\$1)
+. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT]+\\n[#SHIFT_LIST\\n[#DEPTH]]
. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]]
-. \}
.END
\#
\#
@@ -13971,8 +14111,8 @@ Arguments, Function and Notes.
. nr #QUIT 1
. return
. \}
-. nr #L_INDENT -\\n[#LIST_INDENT\\n[#DEPTH]]
-. nr #HL_INDENT \\n[#HL_INDENT\\n-[#DEPTH]]
+. nr #L_INDENT \\n[#LIST_INDENT\\n-[#DEPTH]]
+. nr #HL_INDENT \\n[#HL_INDENT\\n[#DEPTH]]
.END
\#
\# ====================================================================
@@ -13996,10 +14136,12 @@ Arguments, Function and Notes.
\# macros that alter mom's behaviour).
\#
.MAC COLLATE END
+. if ( \\n[.t] < \\n[.v] ) \{ .nr #NO_BREAK 1 \}
. nr #COLLATE 1
. nr #PRE_COLLATE 1
. nr #HEADER_STATE \\n[#HEADERS_ON]
. HEADERS OFF
+. if \\n[#DOC_HEADER]=2 \{ .nr #DOC_HEADER 1 \}
. if \\n[#PAGE_NUM_V_POS]=1 \{\
. nr #PAGINATION_STATE \\n[#PAGINATE]
. PAGINATION OFF
@@ -14056,6 +14198,7 @@ Arguments, Function and Notes.
. PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE]
. rm $RESTORE_PAGENUM_STYLE
. \}
+. if \\n[#CH_NUM] \{ .nr #CH_NUM +1 \}
. rm $EN_TITLE
. rr #PAGENUM_STYLE_SET
.END
@@ -14284,7 +14427,7 @@ Arguments, Function and Notes.
.
.\}
. nr #LINES_PER_PAGE -1
-.\" Add machine units, 1 at a time, increasing the leading until the
+.\" Add machine units, 1 at a time, increasing the leading until the
.\" new leading fills the page properly
. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]+\\n+[#DOC_LEAD_ADJ]*\\n[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\
.
@@ -15055,7 +15198,7 @@ Arguments, Function and Notes.
\# Support aliases
\#
.ALIAS COL_BREAK COL_NEXT
-.ALIAS DOC_COVER_ADVANCE COVER_ADVANCE
+.ALIAS DOC_COVER_ADVANCE COVER_ADVANCE
.ALIAS DOC_COVER COVER
.ALIAS DOC_COVERS COVERS
.ALIAS DOC_COVER_LEAD COVER_LEAD
@@ -15812,7 +15955,7 @@ from Werner Lemberg's MN.tmac.
\# MN
\# --
\# Usage:
-\#
+\#
\# MN LEFT|RIGHT
\# margin note text
\# MN
@@ -15824,7 +15967,7 @@ from Werner Lemberg's MN.tmac.
.de MN
.ds MN-dir \\$1
.if !'\\$1'LEFT' \{\
-. if !'\\$1'RIGHT' \{\
+. if !'\\$1'RIGHT' \{\
. MN_QUIT
. return
. \}
@@ -15840,7 +15983,7 @@ from Werner Lemberg's MN.tmac.
. \}
.\}
. if !\\n[#MNinit]=1 \{\
-. tm [mom]: Macro MN: You must set parameters with MN_INIT before using MN.
+. tm [mom]: Macro MN: You must set parameters with MN_INIT before using MN.
. ab Aborting
. \}
. ie !'\\$1'' \{\
@@ -16007,3 +16150,6 @@ from Werner Lemberg's MN.tmac.
' sp |\\n[MN-curr-pos]u
. if !\\n[#no-repeat-MN-right]=1 .vpt 1
..
+\#
+\#
+\# vim: ft=groff: