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: Thu, 08 Jun 2006 21:11:04 +0000

CVSROOT:        /sources/groff
Module name:    groff
Changes by:     Peter Schaffter <PTPi>  06/06/08 21:11:04

Modified files:
        contrib/mom    : BUGS ChangeLog NEWS om.tmac 
        contrib/mom/momdoc: color.html docelement.html goodies.html 
                            headfootpage.html letters.html 
                            macrolist.html rectoverso.html reserved.html 
                            toc.html 

Log message:
        o Changed distance of the underscores used in docheaders when
          PRINTSTYLE is TYPEWRITE from the default 2p to 4p.  This is to
          leave room for the descenders if the strings are caps/lowercase.
        
        o Added strings $AUTHOR and $AUTHORS.  $AUTHOR = $AUTHOR_1 (i.e.
          the first arg passed to .AUTHOR); $AUTHORS = a comma-separated
          concatenated string of all the args passed to .AUTHOR.
        
        o Updated docs.
        
        o Converted all .ig blocks in om.tmac to comment lines beginning
          with \#.  This so that the comments will be stripped from om.tmac
          during make.  The groff sources still contain the commented
          version of om.tmac, as do the tarballs posted on mom's homepage.
        
        o Added new macro, HEADERS_AND_FOOTERS, to allow having both
          headers and footers on a page.
        
        o Fixed whitespace around epigraphs after .DOCTYPE CHAPTER
          docheaders.
        
        o Added test in .PP_FONT for existence of $SAVED_PP_FT; if it's
          there, remove it (fixes bug that was causing .PP to ignore
          .PP_FONT after .COLLATE).  Also fixed .PP so that it properly
          passes $PP_FT to .FT if $PP_FT has been re-defined to
          $SAVED_PP_FT.
        
        o Added a note about colorizing underscored text in the docs.
        
        o Adjusted the .ne value for heads and subheads (again)
        
        o In the documentation, removed the section stating that setting
          the family, font, pointsize and colour of line numbers wasn't
          possible. 
        
        o Updated documentation entry for TOCs to include instructions for
          using psselect.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/BUGS?cvsroot=groff&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/ChangeLog?cvsroot=groff&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/NEWS?cvsroot=groff&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/om.tmac?cvsroot=groff&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/color.html?cvsroot=groff&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/docelement.html?cvsroot=groff&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/goodies.html?cvsroot=groff&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/headfootpage.html?cvsroot=groff&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/letters.html?cvsroot=groff&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/macrolist.html?cvsroot=groff&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/rectoverso.html?cvsroot=groff&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/reserved.html?cvsroot=groff&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/toc.html?cvsroot=groff&r1=1.21&r2=1.22

Patches:
Index: BUGS
===================================================================
RCS file: /sources/groff/groff/contrib/mom/BUGS,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- BUGS        20 May 2006 19:27:50 -0000      1.29
+++ BUGS        8 Jun 2006 21:11:03 -0000       1.30
@@ -20,6 +20,16 @@
 ========================================================================
 Version 1.4
 ===========
+Invoking .FOOTERS isn't automatically putting pagination in the top
+margin.
+---Fixed---
+
+.PP_FONT after .COLLATE not being respected.
+---Fixed---
+
+$SAVED_PP_FT not being fed to .FT in .PP after .COLLATE
+---Fixed---
+
 .CODE OFF not always restoring previous family and font.
 ---Fixed---
 
@@ -99,6 +109,7 @@
 
 Windows user reports COLLATE fails with a bottom margin error
 (generated by mom).
+---Fixed---
 
 Version 1.3-d
 =============

Index: ChangeLog
===================================================================
RCS file: /sources/groff/groff/contrib/mom/ChangeLog,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- ChangeLog   20 May 2006 19:27:50 -0000      1.46
+++ ChangeLog   8 Jun 2006 21:11:03 -0000       1.47
@@ -1,3 +1,54 @@
+* Thu Jun 8 2006
+
+o Changed distance of the underscores used in docheaders when
+  PRINTSTYLE is TYPEWRITE from the default 2p to 4p.  This is to
+  leave room for the descenders if the strings are caps/lowercase.
+
+* Wed Jun 7 2006
+
+o Added strings $AUTHOR and $AUTHORS.  $AUTHOR = $AUTHOR_1 (i.e.
+  the first arg passed to .AUTHOR); $AUTHORS = a comma-separated
+  concatenated string of all the args passed to .AUTHOR.
+
+* Tue Jun 6 2006
+
+o Updated docs.
+
+o Converted all .ig blocks in om.tmac to comment lines beginning
+  with \#.  This so that the comments will be stripped from om.tmac
+  during make.  The groff sources still contain the commented
+  version of om.tmac, as do the tarballs posted on mom's homepage.
+
+o Added new macro, HEADERS_AND_FOOTERS, to allow having both
+  headers and footers on a page.
+
+o Fixed whitespace around epigraphs after .DOCTYPE CHAPTER
+  docheaders.
+
+o Added test in .PP_FONT for existence of $SAVED_PP_FT; if it's
+  there, remove it (fixes bug that was causing .PP to ignore
+  .PP_FONT after .COLLATE).  Also fixed .PP so that it properly
+  passes $PP_FT to .FT if $PP_FT has been re-defined to
+  $SAVED_PP_FT.
+
+* Sun Jun 4 2006
+
+o Added a note about colorizing underscored text in the docs.
+
+* Wed May 24 2006
+
+o Adjusted the .ne value for heads and subheads (again)
+
+* Sun May 21 2006
+
+o In the documentation, removed the section stating that setting
+  the family, font, pointsize and colour of line numbers wasn't
+  possible. 
+
+o Updated documentation entry for TOCs to include instructions for
+  using psselect.
+
+------------------------------------------------------------------------
 * Sat May 20 2006
 
 o Added string $PRE_CODE_FAM to CODE; fixes bug that kept
@@ -5,8 +56,6 @@
 
 o Added a test for existence of register #DEPTH to .ITEM; if it
   doesn't exist, ignore ITEM
-
-------------------------------------------------------------------------
 *Fri May 19 2006
 
 o Updated docs

Index: NEWS
===================================================================
RCS file: /sources/groff/groff/contrib/mom/NEWS,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- NEWS        19 May 2006 21:49:07 -0000      1.23
+++ NEWS        8 Jun 2006 21:11:03 -0000       1.24
@@ -1,3 +1,8 @@
+Release 1.4-a
+-------------
+Added a new macro, HEADERS_AND_FOOTERS, to allow having both
+headers and footers on a page.
+
 Release 1.4
 -----------
 DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and

Index: om.tmac
===================================================================
RCS file: /sources/groff/groff/contrib/mom/om.tmac,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- om.tmac     20 May 2006 19:27:50 -0000      1.39
+++ om.tmac     8 Jun 2006 21:11:03 -0000       1.40
@@ -2,7 +2,7 @@
 .ig
 Mom -- a typesetting/document-processing macro set for groff.
 
-Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
      Written by Peter Schaffter (address@hidden)
 
 This file is part of groff.
@@ -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.4
------------
+Version 1.4-a
+-------------
 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.
@@ -42,6 +42,7 @@
 "<anything>" in the description of arguments that can be passed
 to a macro means that any argument turns the feature off.
 ..
+.\" %beginstrip%
 \#
 \# ====================================================================
 \#
@@ -130,30 +131,28 @@
 .cflags 4 /\(en      \" So slash and en-dashes get broken
 .warn 8192
 \#
-.ig
-About the warn level
---------------------
-
-There's a lot of testing for the presence of number registers and
-strings in this macro file.  Many of the registers and strings
-pop into and out of existence on the fly.  For convenience, I
-often use
-
-    .if \\n[whatever]    and    .if !\\n[whatever]
-
-to test "if the register exists and is (not) empty."  Groff,
-encountering such tests when called with the -ww options, emits
-
-    warning: number register whatever not defined.
-
-Groff also warns about strings similarly tested for.
-
-The warn level, above, is high in order to shut off those
-warnings.  If you're futzing in this file and need more verbose
-warnings, either comment out ".warn 8192" or set the warnlevel
-to the one you need (but be ready for lots of what I've just
-described).
-..
+\# About the warn level
+\# --------------------
+\# 
+\# There's a lot of testing for the presence of number registers and
+\# strings in this macro file.  Many of the registers and strings
+\# pop into and out of existence on the fly.  For convenience, I
+\# often use
+\# 
+\#     .if \\n[whatever]    and    .if !\\n[whatever]
+\# 
+\# to test "if the register exists and is (not) empty."  Groff,
+\# encountering such tests when called with the -ww options, emits
+\# 
+\#     warning: number register whatever not defined.
+\# 
+\# Groff also warns about strings similarly tested for.
+\# 
+\# The warn level, above, is high in order to shut off those
+\# warnings.  If you're futzing in this file and need more verbose
+\# warnings, either comment out ".warn 8192" or set the warnlevel
+\# to the one you need (but be ready for lots of what I've just
+\# described).
 \#
 \# ====================================================================
 \#
@@ -665,35 +664,33 @@
 .END
 \#
 \#
-.ig
-INLINE KERNING AND HORIZONTAL MOVEMENT
---------------------------------------
-Kerning
-
-Inline kerning provides a simple method for users to adjust the
-amount of space between any two letters.  It's predicated on a
-unit of measure "U", which is 1/36 of the current point size as
-returned by \n[.ps].  E.g., if the current point size is 18,
-\n[.ps] returns 18000u, therefore U=500u.  Since U remains
-proportional relative to the current point size, the amount
-of kerning between two letters as expressed in Us remains
-visually similar regardless of changes in point size.
-
-N.B.--the amount of inline kerning supplied by \*[BU<n>] or
-\*[FU<n>] is added to or subtracted from any kerning that already
-takes place between two characters when automatic kerning is
-turned on.
-
-In groff v. 1.17.2, it was not possible to pass arguments to macros that
-were called with inline escapes, nor thence to evaluate conditional
-expressions.  Consequently, each pseudo-escape \[BU<n>] had to be defined
-separately with ".char".
-
-As of v. 1.18, one can pass arguments to inline strings/macros,
-hence it is now possible to do \*[BU n] where n, inline, is the desired
-number of kern units.  The original .char definitions have been left in
-for backward compatibility with documents created prior to mom-1.1.3c.
-..
+\# INLINE KERNING AND HORIZONTAL MOVEMENT
+\# --------------------------------------
+\# Kerning
+\# 
+\# Inline kerning provides a simple method for users to adjust the
+\# amount of space between any two letters.  It's predicated on a
+\# unit of measure "U", which is 1/36 of the current point size as
+\# returned by \n[.ps].  E.g., if the current point size is 18,
+\# \n[.ps] returns 18000u, therefore U=500u.  Since U remains
+\# proportional relative to the current point size, the amount
+\# of kerning between two letters as expressed in Us remains
+\# visually similar regardless of changes in point size.
+\# 
+\# N.B.--the amount of inline kerning supplied by \*[BU<n>] or
+\# \*[FU<n>] is added to or subtracted from any kerning that already
+\# takes place between two characters when automatic kerning is
+\# turned on.
+\# 
+\# In groff v. 1.17.2, it was not possible to pass arguments to macros that
+\# were called with inline escapes, nor thence to evaluate conditional
+\# expressions.  Consequently, each pseudo-escape \[BU<n>] had to be defined
+\# separately with ".char".
+\# 
+\# As of v. 1.18, one can pass arguments to inline strings/macros,
+\# hence it is now possible to do \*[BU n] where n, inline, is the desired
+\# number of kern units.  The original .char definitions have been left in
+\# for backward compatibility with documents created prior to mom-1.1.3c.
 \#
 .nr #KERN_UNIT 36
 .ds BU   \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)'
@@ -712,15 +709,14 @@
 .\}
 .rr #LOOP
 \#
-.ig
-Horizontal movements
-
-BP1...12.75 and FP1...12.75 move backwards or forwards inline by the
-specified number of points.
-Left in for backward compatibility with mom-1.1.3c, the
-preferred methods for inline horizontal movements are now
-\*[BCK <n><unit>] and \*[FWD <n><unit>].
-..
+\# Horizontal movements
+\# --------------------
+\# BP1...12.75 and FP1...12.75 move backwards or forwards inline by the
+\# specified number of points.
+\#
+\# Left in for backward compatibility with mom-1.1.3c, the
+\# preferred methods for inline horizontal movements are now
+\# \*[BCK <n><unit>] and \*[FWD <n><unit>].
 \#
 .ds BCK  \h'-\\$1'
 .ds FWD  \h'\\$1'
@@ -832,13 +828,10 @@
 \#
 \# WHOLE LINE KERNING (RW and EW)
 \# -----------------------------
-\#
-.ig
-The line kerning macros are special instances of track kerning,
-used where a complete line needs to be tightened (or relaxed) in
-order to accomodate or remove one or two more characters
-than the default justification permits.
-..
+\# The line kerning macros are special instances of track kerning,
+\# used where a complete line needs to be tightened (or relaxed) in
+\# order to accomodate or remove one or two more characters
+\# than the default justification permits.
 \#
 \# *Argument:
 \#   <amount of overall "kerning" (letter spacing) to apply to the line>
@@ -852,24 +845,22 @@
 \# *Notes:
 \#   Decimal values are acceptable.
 \#
-.ig
-The groff documentation is a tad confusing about what unit of
-measure is used in track kerning, only that the width of each
-character is increased or decreased by the amount(s) passed as
-arguments to .tkf, and something about linear function of point
-size.  In fact, with the way I've put this macro together, it
-doesn't matter.  All the user needs to know is that a value of
-one will produce an unacceptably tight or loose line at most text
-point sizes; therefore, effective use of RW and EW is in the
-fractional range below 1 (e.g. .25, .5).  Given that RW and EW
-are for massaging type, a certain amount of experimentation and
-previewing is expected and necessary.
-
-\n(.f holds the current font number, which is acceptable to .tkf.
-
-RW and EW must be reset to 0 to cancel their effect on subsequent
-output lines.
-..
+\# The groff documentation is a tad confusing about what unit of
+\# measure is used in track kerning, only that the width of each
+\# character is increased or decreased by the amount(s) passed as
+\# arguments to .tkf, and something about linear function of point
+\# size.  In fact, with the way I've put this macro together, it
+\# doesn't matter.  All the user needs to know is that a value of
+\# one will produce an unacceptably tight or loose line at most text
+\# point sizes; therefore, effective use of RW and EW is in the
+\# fractional range below 1 (e.g. .25, .5).  Given that RW and EW
+\# are for massaging type, a certain amount of experimentation and
+\# previewing is expected and necessary.
+\# 
+\# \n(.f holds the current font number, which is acceptable to .tkf.
+\# 
+\# RW and EW must be reset to 0 to cancel their effect on subsequent
+\# output lines.
 \#
 .MAC RW END
 .    if \\n[#BR_AT_LINE_KERN] \{\
@@ -1037,13 +1028,11 @@
 \#
 \# ALD/RLD STRINGS
 \# ---------------
-.ig
-The strings \*[ALD.25]...\*[ALD12.75] and their corresponding
-\*[RLD] forms have been left in for backward compatibility with
-documents created using mom-1.1.3c or earlier.  The prefered methods
-of advancing and reversing on the page inline are \*[UP <n><unit>]
-and \*[DOWN <n><unit>].
-..
+\# The strings \*[ALD.25]...\*[ALD12.75] and their corresponding
+\# \*[RLD] forms have been left in for backward compatibility with
+\# documents created using mom-1.1.3c or earlier.  The prefered methods
+\# of advancing and reversing on the page inline are \*[UP <n><unit>]
+\# and \*[DOWN <n><unit>].
 \#
 .ds DOWN      \v'\\$1'
 .ds UP        \v'-\\$1'
@@ -1417,16 +1406,13 @@
 \#
 \# LEFT, RIGHT, AND CENTER
 \# -----------------------
-\#
-.ig
-The purpose of these macros is to allow the user to enter lines of
-text that will be quadded LRC *without* the user having to enter .BR
-or .br between lines.  For the sake of consistency, all three appear
-to behave similarly (from the point of view of the user), although
-the underlying primitives don't.  For this reason, LEFT, RIGHT, and
-CENTER must be followed by .QUAD [L R C J] or .JUSTIFY to restore
-text to groff fill mode.
-..
+\# The purpose of these macros is to allow the user to enter lines of
+\# text that will be quadded LRC *without* the user having to enter .BR
+\# or .br between lines.  For the sake of consistency, all three appear
+\# to behave similarly (from the point of view of the user), although
+\# the underlying primitives don't.  For this reason, LEFT, RIGHT, and
+\# CENTER must be followed by .QUAD [L R C J] or .JUSTIFY to restore
+\# text to groff fill mode.
 \#
 \# LEFT
 \# ----
@@ -1501,39 +1487,36 @@
 \#
 \# +++TABS+++
 \#
-.ig
-There are two different kinds of tabs available: typesetting tabs
-and string tabs.
-
-Typesetting tabs are set with TAB_SET, which requires a tab number,
-an indent (offset) from the left margin and a length (optionally
-with a quad direction and an instruction to fill lines).  After tabs
-are set with TAB_SET, they are called with .TAB n, where "n"
-corresponds to the number passed to TAB_SET as a valid tab number.
-
-String tabs allow the user to mark off tab positions inline.  Tab
-indents and lengths are calculated from the beginning and end
-positions of the marks.  Up to 19 string tabs may be created,
-numbered 1-19.  Once created, they are called with .TAB n,
-just like typesetting tabs.
-
-Setting up string tabs is a two-step procedure.  First, the user
-enters an input line in which s/he wants to mark off string tabs.
-The beginning of a tab is marked with \*[STn], where "n" is
-the desired number of the tab.  The end of the the tab is marked
-with \*[STnX].  All ST's must have a matching STX.  String tabs
-may be nested.
-
-Next, the user invokes .ST n for every string tab defined, and
-optionally passes quad information to it.  That done, string tabs
-can be called just like typesetting tabs.
-
-String tabs don't preview properly with gxditview.  Use gv instead.
-..
+\# There are two different kinds of tabs available: typesetting tabs
+\# and string tabs.
+\# 
+\# Typesetting tabs are set with TAB_SET, which requires a tab number,
+\# an indent (offset) from the left margin and a length (optionally
+\# with a quad direction and an instruction to fill lines).  After tabs
+\# are set with TAB_SET, they are called with .TAB n, where "n"
+\# corresponds to the number passed to TAB_SET as a valid tab number.
+\# 
+\# String tabs allow the user to mark off tab positions inline.  Tab
+\# indents and lengths are calculated from the beginning and end
+\# positions of the marks.  Up to 19 string tabs may be created,
+\# numbered 1-19.  Once created, they are called with .TAB n,
+\# just like typesetting tabs.
+\# 
+\# Setting up string tabs is a two-step procedure.  First, the user
+\# enters an input line in which s/he wants to mark off string tabs.
+\# The beginning of a tab is marked with \*[STn], where "n" is
+\# the desired number of the tab.  The end of the the tab is marked
+\# with \*[STnX].  All ST's must have a matching STX.  String tabs
+\# may be nested.
+\# 
+\# Next, the user invokes .ST n for every string tab defined, and
+\# optionally passes quad information to it.  That done, string tabs
+\# can be called just like typesetting tabs.
+\# 
+\# String tabs don't preview properly with gxditview.  Use gv instead.
 \#
 \# Strings for string tab inlines
 \# ------------------------------
-\#
 \# Initialize string tab markers numbered 1 to 19.
 \#
 .nr #LOOP 0 1
@@ -1606,43 +1589,41 @@
 \#
 \#   N.B. -- indents *must* be turned off before setting tabs
 \#
-.ig
-Examples:
---------
-
-.TAB_SET 1 2P+6p 12P C
-
-means "create a tab numbered 1 that starts 2 picas and 6 points from
-the left margin, is 12 picas long, and centre each input line."
-
-.TAB_SET 1 2P+6P 12P C QUAD
-
-means exactly the same thing, except that input lines are joined and
-the area delimted by the tab filled with centered text.
-
-TAB n can be called at any time after being set.
-
-Tabs are NOT columnar in behaviour.  If the text inside a
-tab runs to several lines, when you call the next tab a break
-occurs, meaning that the new tab starts one line below the last
-line in the previous tab.  For columnar behaviour, you must
-use the multi-column macros in addition to tabs.
-
-If you want tabs to line up bottom-line to bottom-line (most likely
-single line tabs), use .TN (provided the tabs are numbered sequentially).
-Otherwise, you must use .EL then .TAB <n> if you want them to align.
-
-If you want to reset tabs, you must use .TQ before .TAB_SET.
-
-Note that indents are turned off automatically whenever a new
-tab is called with TAB <n>.
-
-Tabs themselves are user-invoked using the TAB macro with a numeric
-argument, e.g. TAB 1.
-
-Generally, in order not to get confused, it's a good idea
-to make sure all indents are off before setting tabs.
-..
+\# Examples:
+\# --------
+\# 
+\# .TAB_SET 1 2P+6p 12P C
+\# 
+\# means "create a tab numbered 1 that starts 2 picas and 6 points from
+\# the left margin, is 12 picas long, and centre each input line."
+\# 
+\# .TAB_SET 1 2P+6P 12P C QUAD
+\# 
+\# means exactly the same thing, except that input lines are joined and
+\# the area delimted by the tab filled with centered text.
+\# 
+\# TAB n can be called at any time after being set.
+\# 
+\# Tabs are NOT columnar in behaviour.  If the text inside a
+\# tab runs to several lines, when you call the next tab a break
+\# occurs, meaning that the new tab starts one line below the last
+\# line in the previous tab.  For columnar behaviour, you must
+\# use the multi-column macros in addition to tabs.
+\# 
+\# If you want tabs to line up bottom-line to bottom-line (most likely
+\# single line tabs), use .TN (provided the tabs are numbered sequentially).
+\# Otherwise, you must use .EL then .TAB <n> if you want them to align.
+\# 
+\# If you want to reset tabs, you must use .TQ before .TAB_SET.
+\# 
+\# Note that indents are turned off automatically whenever a new
+\# tab is called with TAB <n>.
+\# 
+\# Tabs themselves are user-invoked using the TAB macro with a numeric
+\# argument, e.g. TAB 1.
+\# 
+\# Generally, in order not to get confused, it's a good idea
+\# to make sure all indents are off before setting tabs.
 \#
 .MAC TAB_SET END
 .    br
@@ -2483,15 +2464,13 @@
 \#
 \# +++LEADERS+++
 \#
-.ig
-The leader mechanism is primitive, but it works.  Basically, every
-macro in this set that includes a line length also sets a single
-groff tab stop at the right hand end of the line.  That way,
-whenever Ctrl-A is invoked (always at the end of an input line),
-leader of the correct length gets deposited.  Ctrl-A is accessed by
-the string LEADER (i.e. inline, as \*[LEADER]).  Leaders within tabs
-get their length from the tab line length.
-..
+\# The leader mechanism is primitive, but it works.  Basically, every
+\# macro in this set that includes a line length also sets a single
+\# groff tab stop at the right hand end of the line.  That way,
+\# whenever Ctrl-A is invoked (always at the end of an input line),
+\# leader of the correct length gets deposited.  Ctrl-A is accessed by
+\# the string LEADER (i.e. inline, as \*[LEADER]).  Leaders within tabs
+\# get their length from the tab line length.
 \#
 \# SET LEADER CHARACTER
 \# --------------------
@@ -2810,88 +2789,86 @@
 \#
 \# +++INDENTS+++
 \#
-.ig
-There are five styles of indents: left, right, both, temporary,
-and hanging.  Each is set/invoked with a different macro.
-Indent macros begin with the letter "I", hence .IL means "indent left,"
-.IR means "indent right," and so on.
-
-The first time any of the indent macros is used, it requires an
-argument--the size of the indent (with a unit of measure).  The
-size may also be entered using the \w escape--very useful
-for numbered lists using HI.  The unit of measure is required.
-Subsequent invocations don't require the argument; the indent
-measure remains the same until it's changed by invoking the macro
-with an argument again.
-
-If no indents are in effect, the arguments passed to indent macros are
-measured from the left and right margins of the page.  If a left indent
-or a right indent is already in effect, the arguments passed to
-the indent macros are calculated from the current values; in other words,
-the arguments are additive.  If you quit an indent and later return
-to it, its value will be the value last in effect, unless you pass
-it an argument.  If you do pass an argument, it is added to the last
-value in effect, unless you cleared the indent with one of
-.I<LRB>X/Q macros.
-
-Example
--------
-
-.IL 2P
-...some text...
-.IL 2P
-...some text...
-.IQ
-...some text...
-.IL
-...some text...
-
-The first .IL 2P indents text 2P from the left margin.  The second
-.IL 2P indents text by an additional 2P, i.e. 4P from the left margin.
-.IQ turns the indent off.  The last .IL (which has no argument)
-takes its value from the total of all arguments passed to .IL (in
-this case, 2P and 2P), therefore it indents 2P+2P from the left
-margin, i.e. 4P.  If you wanted the last .IL to indent just 2P,
-you'd either have to reset the .IL prior to .IQ (.IL -2P), or pass
-the last .IL the argument 2P.
-
-To reverse the sense of an indent added to an indent, you may use
-negative values.
-
-Indents can be turned off individually with ILX, IRX, and IBX.
-LEFT and RIGHT indents may be combined and manipulated
-separately, (e.g. you can have an IL of 2P and an IR of 4P
-operative at the same time, and then change, say, the IL to
-4P--thereby left indenting 6P--while the IR remains at 4P.
-
-IB automatically turns off IL and IR.  They have to be reinvoked
-again when needed. IL and IR automatically turn IB off; it, too,
-has to be reinvoked with needed.
-
-All indents can be turned off at once with IQ.  The ILX, IRX, IBX,
-and IQ macros simply turn the indents off; the values stored in
-the respective indent macros (IL, IR, IB) remain in effect.  If
-the user wishes to clear the values, the I<LRB>X macros should be
-invoked with the single argument CLEAR.  IQ CLEAR clears out
-the values stored for all indent styles.
-
-Indents *must* be turned off before settting string tabs
-inside PAD.  Generally, in order not to get confused, it's a
-good idea to turn all indents off before setting any tabs.
-
-TI and HI are special cases.  There's no need to turn them off,
-since they affect only one line--the first after their
-invocation.  Like the other indent styles, the first time
-they're invoked, they require a value in iPpcm; each subsequent
-invocation without an argument will use the same value.  To
-change the value, simply pass a new value.  Values for TI and HI
-are *not* additive.
-
-HI presupposes that you already have a left or both indent on.
-HI will never hang a line outside the left margin of a document
-or column.  In other words, you must have IL or IB on before you
-can use HI.
-..
+\# There are five styles of indents: left, right, both, temporary,
+\# and hanging.  Each is set/invoked with a different macro.
+\# Indent macros begin with the letter "I", hence .IL means "indent left,"
+\# .IR means "indent right," and so on.
+\# 
+\# The first time any of the indent macros is used, it requires an
+\# argument--the size of the indent (with a unit of measure).  The
+\# size may also be entered using the \w escape--very useful
+\# for numbered lists using HI.  The unit of measure is required.
+\# Subsequent invocations don't require the argument; the indent
+\# measure remains the same until it's changed by invoking the macro
+\# with an argument again.
+\# 
+\# If no indents are in effect, the arguments passed to indent macros are
+\# measured from the left and right margins of the page.  If a left indent
+\# or a right indent is already in effect, the arguments passed to
+\# the indent macros are calculated from the current values; in other words,
+\# the arguments are additive.  If you quit an indent and later return
+\# to it, its value will be the value last in effect, unless you pass
+\# it an argument.  If you do pass an argument, it is added to the last
+\# value in effect, unless you cleared the indent with one of
+\# .I<LRB>X/Q macros.
+\# 
+\# Example
+\# -------
+\# 
+\# .IL 2P
+\# ...some text...
+\# .IL 2P
+\# ...some text...
+\# .IQ
+\# ...some text...
+\# .IL
+\# ...some text...
+\# 
+\# The first .IL 2P indents text 2P from the left margin.  The second
+\# .IL 2P indents text by an additional 2P, i.e. 4P from the left margin.
+\# .IQ turns the indent off.  The last .IL (which has no argument)
+\# takes its value from the total of all arguments passed to .IL (in
+\# this case, 2P and 2P), therefore it indents 2P+2P from the left
+\# margin, i.e. 4P.  If you wanted the last .IL to indent just 2P,
+\# you'd either have to reset the .IL prior to .IQ (.IL -2P), or pass
+\# the last .IL the argument 2P.
+\# 
+\# To reverse the sense of an indent added to an indent, you may use
+\# negative values.
+\# 
+\# Indents can be turned off individually with ILX, IRX, and IBX.
+\# LEFT and RIGHT indents may be combined and manipulated
+\# separately, (e.g. you can have an IL of 2P and an IR of 4P
+\# operative at the same time, and then change, say, the IL to
+\# 4P--thereby left indenting 6P--while the IR remains at 4P.
+\# 
+\# IB automatically turns off IL and IR.  They have to be reinvoked
+\# again when needed. IL and IR automatically turn IB off; it, too,
+\# has to be reinvoked with needed.
+\# 
+\# All indents can be turned off at once with IQ.  The ILX, IRX, IBX,
+\# and IQ macros simply turn the indents off; the values stored in
+\# the respective indent macros (IL, IR, IB) remain in effect.  If
+\# the user wishes to clear the values, the I<LRB>X macros should be
+\# invoked with the single argument CLEAR.  IQ CLEAR clears out
+\# the values stored for all indent styles.
+\# 
+\# Indents *must* be turned off before settting string tabs
+\# inside PAD.  Generally, in order not to get confused, it's a
+\# good idea to turn all indents off before setting any tabs.
+\# 
+\# TI and HI are special cases.  There's no need to turn them off,
+\# since they affect only one line--the first after their
+\# invocation.  Like the other indent styles, the first time
+\# they're invoked, they require a value in iPpcm; each subsequent
+\# invocation without an argument will use the same value.  To
+\# change the value, simply pass a new value.  Values for TI and HI
+\# are *not* additive.
+\# 
+\# HI presupposes that you already have a left or both indent on.
+\# HI will never hang a line outside the left margin of a document
+\# or column.  In other words, you must have IL or IB on before you
+\# can use HI.
 \#
 \# INDENT LEFT
 \# -----------
@@ -3937,7 +3914,7 @@
 \#
 .MAC DOCTITLE END
 .    rr #DOCTITLE_NUM
-.    nr #DOCTITLE_NUM -1 1
+.    nr #DOCTITLE_NUM 0 1
 .    while \\n[#NUM_ARGS]>\\n[#DOCTITLE_NUM] \{\
 .       ds $DOC_TITLE_\\n+[#DOCTITLE_NUM] \\$\\n[#DOCTITLE_NUM]
 .\}
@@ -3946,7 +3923,7 @@
 \#
 .MAC TITLE END \"Document title
 .    rr #TITLE_NUM
-.    nr #TITLE_NUM -1 1
+.    nr #TITLE_NUM 0 1
 .    while \\n[#NUM_ARGS]>\\n[#TITLE_NUM] \{\
 .       ds $TITLE_\\n+[#TITLE_NUM] \\$\\n[#TITLE_NUM]
 .\}
@@ -3956,7 +3933,7 @@
 \#
 .MAC SUBTITLE END \"Document sub-title
 .    rr #SUBTITLE_NUM
-.    nr #SUBTITLE_NUM -1 1
+.    nr #SUBTITLE_NUM 0 1
 .    while \\n[#NUM_ARGS]>\\n[#SUBTITLE_NUM] \{\
 .       ds $SUBTITLE_\\n+[#SUBTITLE_NUM] \\$\\n[#SUBTITLE_NUM]
 .\}
@@ -3977,7 +3954,7 @@
 \#
 .MAC CHAPTER_TITLE END \" This defines what comes after Chapter #
 .    rr #CHAPTER_TITLE_NUM
-.    nr #CHAPTER_TITLE_NUM -1 1
+.    nr #CHAPTER_TITLE_NUM 0 1
 .    while \\n[#NUM_ARGS]>\\n[#CHAPTER_TITLE_NUM] \{\
 .       ds $CHAPTER_TITLE_\\n+[#CHAPTER_TITLE_NUM] \\$\\n[#CHAPTER_TITLE_NUM]
 .\}
@@ -4002,10 +3979,13 @@
 \#
 \#
 .MAC AUTHOR END \"Author.  Enclose all args fully in double quotes.
-.    nr #AUTHOR_NUM -1 1
+.    nr #AUTHOR_NUM 0 1
 .    while \\n[#NUM_ARGS]>\\n[#AUTHOR_NUM] \{\
 .       ds $AUTHOR_\\n+[#AUTHOR_NUM] \\$\\n[#AUTHOR_NUM]
+.       as $AUTHORS \\*[$AUTHOR_\\n[#AUTHOR_NUM]], \"
 .\}
+.    substring $AUTHORS 0 -3
+.    ds $AUTHOR \\*[$AUTHOR_1]
 .END
 \#
 \#
@@ -4015,7 +3995,7 @@
 \#
 \#
 .MAC MISC END \"For use on cover page only; enclose all args in double quotes
-.    nr #MISC_NUM -1 1
+.    nr #MISC_NUM 0 1
 .    while \\n[#NUM_ARGS]>\\n[#MISC_NUM] \{\
 .       ds $MISC_\\n+[#MISC_NUM] \\$\\n[#MISC_NUM]
 .\}
@@ -4184,15 +4164,12 @@
 \#
 \# TYPE-STYLE CONTROL MACROS
 \# -------------------------
-\#
-.ig
-The control macros for family, font, size, quad and color are here
-grouped together.  Each (e.g. _FAMILY or _FONT) tests for a calling
-alias before performing the action(s) appropriate to the calling
-macro.  Defaults for all these guys are set in DEFAULTS, and listed
-in the "Control Macros" section of the documentation pertinent to
-the macro whose style is to be changed.
-..
+\# The control macros for family, font, size, quad and color are here
+\# grouped together.  Each (e.g. _FAMILY or _FONT) tests for a calling
+\# alias before performing the action(s) appropriate to the calling
+\# macro.  Defaults for all these guys are set in DEFAULTS, and listed
+\# in the "Control Macros" section of the documentation pertinent to
+\# the macro whose style is to be changed.
 \#
 .MAC _FAMILY END
 .    if '\\$0'AUTHOR_FAMILY'                  .ds $AUTHOR_FAM \\$1
@@ -5270,15 +5247,13 @@
 .       \}
 .       el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
 .       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
 .             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 \{\
@@ -5289,7 +5264,6 @@
 .             RLD \\n[#DOC_LEAD]u \" Just looks better this way
 .          \}
 .       \}
-.    \}
 .END
 \#
 \#
@@ -5421,7 +5395,7 @@
 .MAC COVERTITLE END
 .    ie '\\$0'DOC_COVERTITLE' \{\ 
 .       rr #DOC_COVER_TITLE_NUM
-.       nr #DOC_COVER_TITLE_NUM -1 1
+.       nr #DOC_COVER_TITLE_NUM 0 1
 .       while \\n[#NUM_ARGS]>\\n[#DOC_COVER_TITLE_NUM] \{\
 .          ds $DOC_COVER_TITLE_\\n+[#DOC_COVER_TITLE_NUM] 
\\$\\n[#DOC_COVER_TITLE_NUM]
 .\}
@@ -5429,7 +5403,7 @@
 .    \}
 .    el \{\
 .       rr #COVER_TITLE_NUM
-.       nr #COVER_TITLE_NUM -1 1
+.       nr #COVER_TITLE_NUM 0 1
 .       while \\n[#NUM_ARGS]>\\n[#COVER_TITLE_NUM] \{\
 .          ds $COVER_TITLE_\\n+[#COVER_TITLE_NUM] \\$\\n[#COVER_TITLE_NUM]
 .\}
@@ -6301,7 +6275,7 @@
 .                CAPS
 .                nr #ARG_NUM 0 1
 .                while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
-.                   UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]
+.                   UNDERSCORE 4p "\\*[$TITLE_\\n[#ARG_NUM]]
 .\}
 .                CAPS OFF
 .             \}
@@ -6309,7 +6283,7 @@
 .                sp
 .                nr #ARG_NUM 0 1
 .                while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
-.                   UNDERSCORE "\\*[$SUBTITLE_\\n[#ARG_NUM]]
+.                   UNDERSCORE 4p "\\*[$SUBTITLE_\\n[#ARG_NUM]]
 .\}
 .             \}
 .             if !'\\*[$AUTHOR_1]'' \{\
@@ -6350,12 +6324,12 @@
 .                ie !'\\*[$CHAPTER_TITLE]'' \{\
 .                   nr #ARG_NUM 0 1
 .                   while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
-.                      UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.                      UNDERSCORE 4p "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
 .\}
 .                \}
 .                el \{\
 .                   CAPS
-.                   UNDERSCORE \\*[$CHAPTER_STRING]
+.                   UNDERSCORE 4p \\*[$CHAPTER_STRING]
 .                \}
 .                CAPS OFF
 .                RLD 1v
@@ -6368,7 +6342,7 @@
 .                   sp
 .                   nr #ARG_NUM 0 1
 .                   while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
-.                      UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+.                      UNDERSCORE 4p "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
 .\}
 .                \}
 .                RLD 1v
@@ -6409,7 +6383,7 @@
 .             if !'\\*[$TITLE]'' \{\
 .                nr #ARG_NUM 0 1
 .                while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
-.                   UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]
+.                   UNDERSCORE 4p "\\*[$TITLE_\\n[#ARG_NUM]]
 .\}
 .             \}
 .             CAPS OFF
@@ -6417,7 +6391,7 @@
 .                sp
 .                nr #ARG_NUM 0 1
 .                while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
-.                   UNDERSCORE "\\*[$SUBTITLE_\\n[#ARG_NUM]]
+.                   UNDERSCORE 4p "\\*[$SUBTITLE_\\n[#ARG_NUM]]
 .\}
 .             \}
 .             if !'\\*[$AUTHOR_1]'' \{\
@@ -6431,7 +6405,7 @@
 .             \}
 .             ie \\n[#SINGLE_SPACE]=0 \{ .sp 2 \}
 .             el \{ .sp \}
-.             UNDERSCORE2 "\\*[$DOC_TYPE]
+.             UNDERSCORE2 4p "\\*[$DOC_TYPE]
 .             if \\n[#SINGLE_SPACE]=1 \{ .sp \}
 .          \}
 .          if \\n[#PRINT_STYLE]=2 \{\
@@ -7103,8 +7077,17 @@
 .       while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
 .             nr #EPI_WHITESPACE -\\n[#DOC_LEAD]
 .\}
+.       if \\n[#PRINT_STYLE]=1 \{\
+.          if !\\n[#SINGLE_SPACE]=1 \{ .ALD \\n[#DOC_LEAD]u \}
+.       \}
 .       if \\n[#PRINT_STYLE]=2 \{\
-.          RLD \\n[#DOC_LEAD]u
+.          ie !\\n[#DOC_TYPE]=2 \{ .RLD \\n[#DOC_LEAD]u \}
+.          el \{\
+.             ie '\\*[$CHAPTER_TITLE]'' \{ .RLD \\n[#DOC_LEAD]u \}
+.             el \{\
+.                if '\\*[$CHAPTER]'' \{ .RLD \\n[#DOC_LEAD]u \}
+.             \}
+.          \}
 .          if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\
 .             ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)
 .          \}
@@ -7510,7 +7493,7 @@
 \#    on or off.
 \#
 .MAC HDRFTR_RULE END   \"To print rule under header/over footer.
-.    ie '\\$0'HDRFTR_RULE_INTERNAL' \{\
+.    if '\\$0'HDRFTR_RULE_INTERNAL' \{\
 .       ie \\n[#USERDEF_HDRFTR] \{\
 .          nr #CAP_HEIGHT_ADJUST \\n[#HDRFTR_HEIGHT]
 .          ps 12
@@ -7562,7 +7545,27 @@
 .          br
 .       \}
 .    \}
+.    if '\\$0'HEADER_RULE' \{\
+.       ie '\\$1'' \{\
+.          nr #HEADER_RULE 1
+.          nr #HDRFTR_RULE 1
+.       \}
 .    el \{\
+.          nr #HEADER_RULE 0
+.          nr #HDRFTR_RULE 0
+.       \}
+.    \}
+.    if '\\$0'FOOTER_RULE' \{\
+.       ie '\\$1'' \{\
+.          nr #FOOTER_RULE 1
+.          nr #HDRFTR_RULE 1
+.       \}
+.       el \{\
+.          nr #FOOTER_RULE 0
+.          nr #HDRFTR_RULE 0
+.       \}
+.    \}
+.    if '\\$0'HDRFTR_RULE' \{\
 .       ie '\\$1'' \{ .nr #HDRFTR_RULE 1 \}
 .       el \{ .nr #HDRFTR_RULE 0 \}
 .    \}
@@ -7607,23 +7610,20 @@
 \#   Creates or modifies register #SWITCH_HDRFTR, used to switch
 \#   default location of HDRFTR_LEFT and HDRFTR_RIGHT.
 \# *Notes:
+\#   Default is OFF.
 \#
-.ig
-Typically, the author string appears at the left of header/footers,
-and the title string appears at the right.  This switches the
-location of the two.  Useful in conjuction with RECTO_VERSO to tweak
-switches on alternate pages to come out as the user wishes.  The
-assumption of RECTO_VERSO is that the first page of the document
-(recto) is odd, and even though it has no header/footer, if it did
-have one, it would print as AUTHOR...CENTER...TITLE (or whatever
-strings the user has supplied for HDRFTR_LEFT/RIGHT), meaning that
-the next page, which does have a header/footer, will come out as
-TITLE...CENTER...AUTHOR (or whatever strings the user has supplied
-for HDRFTR_LEFT/RIGHT).  SWITCH_HDRFTRS allows the user to get the
-desired string in the desired place on the desired recto/verso page.
-
-Default is OFF.
-..
+\# Typically, the author string appears at the left of header/footers,
+\# and the title string appears at the right.  This switches the
+\# location of the two.  Useful in conjuction with RECTO_VERSO to tweak
+\# switches on alternate pages to come out as the user wishes.  The
+\# assumption of RECTO_VERSO is that the first page of the document
+\# (recto) is odd, and even though it has no header/footer, if it did
+\# have one, it would print as AUTHOR...CENTER...TITLE (or whatever
+\# strings the user has supplied for HDRFTR_LEFT/RIGHT), meaning that
+\# the next page, which does have a header/footer, will come out as
+\# TITLE...CENTER...AUTHOR (or whatever strings the user has supplied
+\# for HDRFTR_LEFT/RIGHT).  SWITCH_HDRFTRS allows the user to get the
+\# desired string in the desired place on the desired recto/verso page.
 \#
 .MAC SWITCH_HDRFTR END
 .    ie '\\$1'' \{ .nr #SWITCH_HDRFTR 1 \}
@@ -7733,7 +7733,17 @@
 .    if \\n[#FOOTERS_ON] \{\
 .       if \\n[#START_FOR_FOOTERS] \{\
 .          rr #START_FOR_FOOTERS
-.          if !\\n[#PRINT_FOOTER_ON_PAGE_1] \{ .return \}
+.          if !\\n[#PRINT_FOOTER_ON_PAGE_1] \{\
+.             ie !\\n[#HDRFTR_BOTH] \{ .return \}
+.             el \{\
+.                rr #FOOTERS_ON
+.                nr #HEADERS_ON 1
+.                ie \\n[#HEADER_RULE]=1 \{ .HEADER_RULE \}
+.                el \{ .HEADER_RULE OFF \}
+.                HEADER_RECTO \\*[$HDR_RECTO_QUAD] "\\*[$HDR_RECTO_STRING]"
+.                return
+.             \}
+.          \}
 .       \}
 .    \}
 .    if \\n[#USERDEF_HDRFTR] \{\
@@ -8273,8 +8283,9 @@
 \#
 .MAC FOOTERS END
 .    ie '\\$1''   \{\
+.       rr #HEADERS_ON
 .       nr #FOOTERS_ON 1
-.       PAGE_NUM_POS TOP CENTER
+.       PAGENUM_POS TOP CENTER
 .    \}
 .    el \{ .nr #FOOTERS_ON 0 \}
 .END
@@ -8521,6 +8532,109 @@
 \#
 \# ====================================================================
 \#
+\# +++HEADERS AND FOOTERS+++
+\#
+\# HEADERS_AND_FOOTERS
+\# -------------------
+\# *Arguments:
+\#   HEADER_RECTO_QUAD \
+\#   HEADER_RECTO_STRING \
+\#   FOOTER_RECTO_QUAD \
+\#   FOOTER_RECTO_STRING \
+\#   HEADER_VERSO_QUAD \
+\#   HEADER_VERSO_STRING \
+\#   FOOTER_VERSO_QUAD \
+\#   FOOTER_VERSO_STRING
+\#   | <anything>
+\# *Function:
+\#   Allows having both headers and footers.  Sets register
+\#   #HDRFTR_BOTH to 1; collects HEADER/FOOTER_RECTO/VERSO
+\#   information; appends FOOTER_RECTO and FOOTER_VERSO to
+\#   START and turns off pagination; appends to macros
+\#   PRINT_USERDEF_HDRFTR and HEADER the necessary number
+\#   register manipulations and redefinitions of the
+\#   HEADER/FOOTER_RECTO/VERSO strings so that both
+\#   headers and footers get printed, with the appropriate
+\#   strings for each
+\# *Notes:
+\#   Works in conjunction with HDRFTR_RECTO and HDRFTR_VERSO (qqv.),
+\#   ergo all style changes must be done inline in the strings
+\#   passed as arguments.
+\#
+.MAC HEADERS_AND_FOOTERS END
+.    ie \\n[#NUM_ARGS]>1 \{\
+.    nr #HDRFTR_BOTH 1
+.    nr #FOOTERS_ON  1
+.    if !r#HEADER_RULE .nr #HEADER_RULE 1
+.    if !r#FOOTER_RULE .nr #FOOTER_RULE 1
+.    ds $HDR_RECTO_QUAD   \\$1
+.    ds $HDR_RECTO_STRING \\$2
+.    ds $FTR_RECTO_QUAD   \\$3
+.    ds $FTR_RECTO_STRING \\$4
+.    ds $HDR_VERSO_QUAD   \\$5
+.    ds $HDR_VERSO_STRING \\$6
+.    ds $FTR_VERSO_QUAD   \\$7
+.    ds $FTR_VERSO_STRING \\$8
+.am START DONE
+.   if \\\\n[#HDRFTR_BOTH]=1 \{\
+.      FOOTER_RECTO \\*[$FTR_RECTO_QUAD] "\\*[$FTR_RECTO_STRING]"
+.      FOOTER_VERSO \\*[$FTR_VERSO_QUAD] "\\*[$FTR_VERSO_STRING]"
+.      if \\\\n[#HEADER_RULE]=1 \{ .HEADER_RULE \}
+.      ie \\\\n[#FOOTER_RULE]=1 \{ .FOOTER_RULE \}
+.      el \{ .FOOTER_RULE OFF \}
+.      if r#PAGINATE .rr #PAGINATE
+.      if r#PAGE_NUM_V_POS .rr #PAGE_NUM_V_POS
+.\}
+.DONE
+.am PRINT_USERDEF_HDRFTR DONE
+.   if \\\\n[#HDRFTR_BOTH]=1 \{\
+.      if \\n[#FOOTERS_ON]=1 \{\
+.         if !\\\\n[#COLLATE]=1 \{\
+.         HEADER_RECTO \\*[$HDR_RECTO_QUAD] "\\*[$HDR_RECTO_STRING]"
+.         HEADER_VERSO \\*[$HDR_VERSO_QUAD] "\\*[$HDR_VERSO_STRING]"
+.         rr #FOOTERS_ON
+.         nr #HEADERS_ON 1
+.         ie \\\\n[#HEADER_RULE]=1 \{ .HEADER_RULE \}
+.         el \{ .HEADER_RULE OFF \}
+.      \}
+.      \}
+.      if \\n[#HEADERS_ON]=1 \{\
+.         FOOTER_RECTO \\*[$FTR_RECTO_QUAD] "\\*[$FTR_RECTO_STRING]"
+.         FOOTER_VERSO \\*[$FTR_VERSO_QUAD] "\\*[$FTR_VERSO_STRING]"
+.      \}
+.   \}
+.DONE
+.am HEADER DONE
+.   if \\\\n[#HDRFTR_BOTH]=1 \{\
+.      if r#START_FOR_FOOTERS .rr #START_FOR_FOOTERS
+.      rr #HEADERS_ON
+.      nr #FOOTERS_ON 1
+.      FOOTER_RECTO \\*[$FTR_RECTO_QUAD] "\\*[$FTR_RECTO_STRING]"
+.      FOOTER_VERSO \\*[$FTR_VERSO_QUAD] "\\*[$FTR_VERSO_STRING]"
+.      ie \\\\n[#FOOTER_RULE]=1 \{ .FOOTER_RULE \}
+.      el \{ .FOOTER_RULE OFF \}
+.   \}
+.DONE
+.    \}
+.    el \{\
+.       rr #HDRFTR_BOTH
+.       rr #USERDEF_HDRFTR
+.       rm $USERDEF_HDRFTR_RECTO
+.       rm $USERDEF_HDRFTR_VERSO
+.       FOOTERS OFF
+.       HEADERS
+.       if \\n[#COLLATE]=1 \{\
+.          nr #HEADER_STATE 1
+.          nr #PAGINATION_STATE 1
+.       \}
+.       PAGINATE
+.       PAGENUM_POS BOTTOM CENTER
+.       nr #HF_OFF 1
+.    \}
+.END
+\#
+\# ====================================================================
+\#
 \# +++HEADS+++
 \#
 \# ---Head numbers---
@@ -8828,10 +8942,10 @@
 .\" Process head
 .    nr #HEAD 1
 .    ev HEAD
-.    if \\n[#PRINT_STYLE]=1 \{ .ne \\n[#NUM_ARGS]+1 \}
+.    if \\n[#PRINT_STYLE]=1 \{ .ne \\n[#NUM_ARGS]+2 \}
 .    if \\n[#PRINT_STYLE]=2 \{\
-.       ie \\n[#HEAD_SPACE] \{ .ne \\n[#NUM_ARGS]+2 \}
-.       el \{ .ne \\n[#NUM_ARGS]+1 \}
+.       ie \\n[#HEAD_SPACE] \{ .ne \\n[#NUM_ARGS]+3 \}
+.       el \{ .ne \\n[#NUM_ARGS]+2 \}
 .    \}
 .    ll \\n[#L_LENGTH]u
 .    ta \\n(.lu
@@ -9039,7 +9153,7 @@
 .    if r#QUOTE    \{ .rr #QUOTE    \}
 .    if r#Q_AT_TOP \{ .rr #Q_AT_TOP \}
 .    ev SUBHEAD
-.    ne \\n[#NUM_ARGS]
+.    ne \\n[#NUM_ARGS]+2
 .    ll \\n[#L_LENGTH]u
 .    ta \\n(.lu
 .    if \\n[#COLUMNS] \{\
@@ -9470,6 +9584,9 @@
 .MAC PP_FONT END
 .    if \\n[#IGNORE] \{ .return \}
 .    br
+.    if \\n[#COLLATE]=1 \{\
+.       if !'\\*[$SAVED_PP_FT]'' \{ .rm $SAVED_PP_FT \}
+.    \}
 .    ds $PP_FT \\$1
 .    FT \\*[$PP_FT]
 .END
@@ -9603,11 +9720,11 @@
 .          \}
 .          el \{\
 .             FAMILY  \\*[$DOC_FAM]
-.             ie !'\\*[$SAVED_PP_FT]'' \{\
+.             if !'\\*[$SAVED_PP_FT]'' \{\
 .                ds $PP_FT \\*[$SAVED_PP_FT]
 .                rm $SAVED_PP_FT
 .             \}
-.             el \{ .FT \\*[$PP_FT] \}
+.             FT \\*[$PP_FT]
 .             PT_SIZE \\n[#DOC_PT_SIZE]u
 .             LS      \\n[#DOC_LEAD]u
 .             QUAD    \\*[$DOC_QUAD]
@@ -10401,6 +10518,10 @@
 .MAC PAGINATE END
 .    ie '\\$1'' \{ .nr #PAGINATE 1 \}
 .    el \{ .nr #PAGINATE 0 \}
+.    if \\n[#HF_OFF]=1 \{\
+.       rr #PAGINATION_STATE
+.       rr #HF_OFF
+.    \}
 .END
 \#
 \#
@@ -10609,14 +10730,12 @@
 \#
 \# +++FOOTNOTES+++
 \#
-.ig
-Mom's footnote handling is baroque, to say the least.  There are
-redundancies in a number of the macros involved, as well as some
-registers that probably don't get used anymore.  The baggage is left
-in in case some new footnote oddity/challenge gets thrown my way.
-
-The macros are heavily commented.
-..
+\# Mom's footnote handling is baroque, to say the least.  There are
+\# redundancies in a number of the macros involved, as well as some
+\# registers that probably don't get used anymore.  The baggage is left
+\# in in case some new footnote oddity/challenge gets thrown my way.
+\# 
+\# The macros are heavily commented.
 \#
 \# FOOTNOTE AUTOLEAD
 \# -----------------
@@ -11621,11 +11740,9 @@
 \# Utility macros to manage footnotes that occur inside diversions
 \# ---------------------------------------------------------------
 \#
-.ig
-There are some redundancies here; they're left in in case unforeseen
-footnote situations crop up in the future that might require
-manipulation of them.
-..
+\# There are some redundancies here; they're left in in case unforeseen
+\# footnote situations crop up in the future that might require
+\# manipulation of them.
 \#
 \# 1. Pre-footnote processing for footnotes in diversions
 \#
@@ -11716,21 +11833,18 @@
 \#
 \# The main macros that handle footnote processing.
 \# -----------------------------------------------
+\# Sometimes, #VARIABLE_FOOTER_POS sets FOOTER at a location that gives
+\# the impression another line of running text could fit on the page.
+\# VFP_CHECK is always set to the line just above the one where FOOTER
+\# will be sprung, and checks for this condition.  If it exists, FOOTER
+\# is set one line lower on the page, thus squeezing in an extra line
+\# of running text.  This is a judgment call on my part, but seems to
+\# work well.  If there are problems (e.g. footnotes really do look
+\# jammed), the user should probably adjust FOOTNOTE_AUTOLEAD and/or
+\# FOOTNOTE_RULE_ADJ.
 \#
-.ig
-Sometimes, #VARIABLE_FOOTER_POS sets FOOTER at a location that gives
-the impression another line of running text could fit on the page.
-VFP_CHECK is always set to the line just above the one where FOOTER
-will be sprung, and checks for this condition.  If it exists, FOOTER
-is set one line lower on the page, thus squeezing in an extra line
-of running text.  This is a judgment call on my part, but seems to
-work well.  If there are problems (e.g. footnotes really do look
-jammed), the user should probably adjust FOOTNOTE_AUTOLEAD and/or
-FOOTNOTE_RULE_ADJ.
-
-The macro has to be run in its own environment, otherwise the first
-word of the last line before the footnotes gets chopped.
-..
+\# The macro has to be run in its own environment, otherwise the first
+\# word of the last line before the footnotes gets chopped.
 \#
 .MAC VFP_CHECK END
 .    ev VFP_CHECK
@@ -11763,14 +11877,12 @@
 .    ev
 .END
 \#
-.ig
-FN_OVERFLOW_TRAP starts off "underneath" FOOTER, but is revealed
-as #VARIABLE_FOOTER_POSITION changes the position of FOOTER.
-FN_OVERFLOW_TRAP simply starts diversion FN_OVERFLOW to "catch"
-the overflow.  The diversion is ended in FOOTER, immediately after
-FOOTER outputs the diversion, FOOTNOTES, before PROCESS_FN_LEFTOVER
-is run (either in HEADER, or in FOOTER if moving col to col).
-..
+\# FN_OVERFLOW_TRAP starts off "underneath" FOOTER, but is revealed
+\# as #VARIABLE_FOOTER_POSITION changes the position of FOOTER.
+\# FN_OVERFLOW_TRAP simply starts diversion FN_OVERFLOW to "catch"
+\# the overflow.  The diversion is ended in FOOTER, immediately after
+\# 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
 .    if \\n[#FN_COUNT] \{\
@@ -11809,14 +11921,12 @@
 .    nr #FROM_DIVERT_FN 1
 .END
 \#
-.ig
-PROCESS_FN_LEFTOVER is called at the top of HEADER, and in
-FOOTER if we're moving from one column to the next (i.e. after
-outputting FOOTNOTES).  It checks for whether we have a "deferred
-footnote" situation, and resets counters and number registers
-accordingly.  Lastly, if we have some footnote overflow, it calls
-DIVERT_FN_OVERFLOW.
-..
+\# PROCESS_FN_LEFTOVER is called at the top of HEADER, and in
+\# FOOTER if we're moving from one column to the next (i.e. after
+\# outputting FOOTNOTES).  It checks for whether we have a "deferred
+\# footnote" situation, and resets counters and number registers
+\# accordingly.  Lastly, if we have some footnote overflow, it calls
+\# DIVERT_FN_OVERFLOW.
 \#
 .MAC PROCESS_FN_LEFTOVER END
 .    if \\n[#PREV_FN_DEFERRED]=2 \{\
@@ -11867,11 +11977,9 @@
 .    rr #FROM_DIVERT_FN
 .END
 \#
-.ig
-DIVERT_FN_LEFTOVER is called in PROCESS_FN_LEFTOVER (at
-the top of HEADER, and in FOOTER if we're moving from one column
-to the next).
-..
+\# DIVERT_FN_LEFTOVER is called in PROCESS_FN_LEFTOVER (at
+\# the top of HEADER, and in FOOTER if we're moving from one column
+\# to the next).
 \#
 .MAC DIVERT_FN_LEFTOVER END
 .    nr #NO_FN_MARKER 1
@@ -11892,12 +12000,10 @@
 .    rr #FN_OVERFLOW_DEPTH
 .END
 \#
-.ig
-This is a special macro to deal with footnotes that are set inside
-diversions (QUOTE, BLOCKQUOTE and EPIGRAPH).  It's called in HEADER
-(and in FOOTER, if we're moving from column to column), and comes
-after PROCESS_FOOTNOTE_LEFTOVER in those two macros.
-..
+\# This is a special macro to deal with footnotes that are set inside
+\# diversions (QUOTE, BLOCKQUOTE and EPIGRAPH).  It's called in HEADER
+\# (and in FOOTER, if we're moving from column to column), and comes
+\# after PROCESS_FOOTNOTE_LEFTOVER in those two macros.
 \#
 .MAC PROCESS_FN_IN_DIVER END
 .    nr #SPACE_REMAINING 0
@@ -11924,20 +12030,19 @@
 \#
 \# +++ENDNOTES+++
 \#
-.ig
-When endnotes are output, the spacing between the notes is always
-1 extra linespace.  This can have bottom margin consequences.  If
-this doesn't bother you, don't worry about it.  If it does bother
-you, and you want to adjust the spacing between any two endnotes (as
-they're output), make the spacing adjustments (.ALD/.RLD) at the
-*end* of endnotes (i.e. just before .ENDNOTE OFF), not at the top.
-
-Endnotes must be output manually with .ENDNOTES. This allows user
-the flexibility to output endnotes at the end of each collated
-document, or to output them at the end of the entire document.
-..
+\# When endnotes are output, the spacing between the notes is always
+\# 1 extra linespace.  This can have bottom margin consequences.  If
+\# this doesn't bother you, don't worry about it.  If it does bother
+\# you, and you want to adjust the spacing between any two endnotes (as
+\# they're output), make the spacing adjustments (.ALD/.RLD) at the
+\# *end* of endnotes (i.e. just before .ENDNOTE OFF), not at the top.
+\# 
+\# Endnotes must be output manually with .ENDNOTES. This allows user
+\# the flexibility to output endnotes at the end of each collated
+\# document, or to output them at the end of the entire document.
 \#
 \# Control macros
+\# --------------
 \#
 \# ENDNOTE POINT SIZE
 \# ------------------
@@ -12844,25 +12949,23 @@
 \#
 \# +++BIBLIOGRAPHY+++
 \#
-.ig
-Mom treats bibliographies and endnotes very similarly.  The chief
-difference is that endnotes are collected and formatted inside a
-diversion, while bibliographies are built "by hand."  ENDNOTES sets
-up the endnotes page and outputs the formatted diversion.
-BIBLIOGRAPHY sets up the bibliography page, then awaits refer
-commands.
-
-All of the bibliography control macros have their exact
-counterparts in the endnotes control macros.  It was tempting to do
-fancy stuff with aliases to avoid the repetition, but for reasons
-of my own sanity, and for the benefit of anyone wanting to play
-around with the bibliography control macros, I decided to keep them
-separate.
-
-Because the bibliography control macros all have endnotes
-equivalents, refer to the appropriate, similar endnote macro for
-Arguments, Function and Notes.
-..
+\# Mom treats bibliographies and endnotes very similarly.  The chief
+\# difference is that endnotes are collected and formatted inside a
+\# diversion, while bibliographies are built "by hand."  ENDNOTES sets
+\# up the endnotes page and outputs the formatted diversion.
+\# BIBLIOGRAPHY sets up the bibliography page, then awaits refer
+\# commands.
+\# 
+\# All of the bibliography control macros have their exact
+\# counterparts in the endnotes control macros.  It was tempting to do
+\# fancy stuff with aliases to avoid the repetition, but for reasons
+\# of my own sanity, and for the benefit of anyone wanting to play
+\# around with the bibliography control macros, I decided to keep them
+\# separate.
+\# 
+\# Because the bibliography control macros all have endnotes
+\# equivalents, refer to the appropriate, similar endnote macro for
+\# Arguments, Function and Notes.
 \# Bibliography control macros
 \#
 .MAC BIBLIOGRAPHY_PT_SIZE END
@@ -14423,9 +14526,13 @@
 .    \}
 .    if \\n[#CH_NUM] \{ .nr #CH_NUM +1 \}
 .    rm $EN_TITLE
-.    rm $SUBTITLE
-.    rm $CHAPTER
-.    rm $CHAPTER_TITLE_1
+.    COVERTITLE
+.    DOCCOVERTITLE
+.    MISC
+.    TITLE
+.    SUBTITLE
+.    CHAPTER
+.    CHAPTER_TITLE
 .    rr #PAGENUM_STYLE_SET
 .END
 \#
@@ -15573,23 +15680,21 @@
 .    \}
 .END
 \#
-.ig
-The remainder of the definitions in this section are modified
-versions of the definitions found in the refer module of s.tmac.
-..
+\# The remainder of the definitions in this section are modified
+\# versions of the definitions found in the refer module of s.tmac.
 \#
 \# This one is directly from s.tmac.
+\#
 .de @error
 .tm \\n(.F:\\n(.c: macro error: \\$*
 ..
 \#
-.ig
-The following strings define the order of entries for different
-types of references.  Each letter in the string refers to a database
-field (A for author, T1/T2 for article and book titles, etc).
-Mom is set up for MLA-style bibliographies.  Other styles can be
-implemented here by re-ordering the fields.
-..
+\# The following strings define the order of entries for different
+\# types of references.  Each letter in the string refers to a database
+\# field (A for author, T1/T2 for article and book titles, etc).
+\# Mom is set up for MLA-style bibliographies.  Other styles can be
+\# implemented here by re-ordering the fields.
+\#
 \# Book - type 2
 .ds ref*spec!2 Q A T1 d t l r E S e V a C I D P O
 \# Article within book - type 3
@@ -15699,14 +15804,12 @@
 \#
 \# Build up the ref*string
 \#
-.ig
-Correct MLA "typewritten" style (printstyle TYPEWRITE) demands
-two spaces after each period.  The spaces are hardwired into the
-string definitions (ref*add-<x>), so we have to make sure that there
-aren't two spaces when the printstyle is TYPESET.  Since I find that
-references look a bit crowded with 0 sentence space, I've bumped it
-up to +4.  User's sentence spacing is reset in FOOTNOTES and ENDNOTES.
-..
+\# Correct MLA "typewritten" style (printstyle TYPEWRITE) demands
+\# two spaces after each period.  The spaces are hardwired into the
+\# string definitions (ref*add-<x>), so we have to make sure that there
+\# aren't two spaces when the printstyle is TYPESET.  Since I find that
+\# references look a bit crowded with 0 sentence space, I've bumped it
+\# up to +4.  User's sentence spacing is reset in FOOTNOTES and ENDNOTES.
 \#
 .de ref*build
 .if \\n[#PRINT_STYLE]=2 \{\
@@ -15736,15 +15839,13 @@
 \# The following macros determine how entries are formatted WRT
 \# punctuation, type style, additional strings, etc.
 \#
-.ig
-o First argument is the database field letter.
-o Second argument is the punctuation character to use to separate this
-  field from the previous field.
-o Third argument is a string with which to prefix this field.
-o Fourth argument is a string with which to postfix this field.
-o Fifth argument is a string to add after the punctuation character
-  supplied by the next field.
-..
+\# o First argument is the database field letter.
+\# o Second argument is the punctuation character to use to separate this
+\#   field from the previous field.
+\# o Third argument is a string with which to prefix this field.
+\# o Fourth argument is a string with which to postfix this field.
+\# o Fifth argument is a string to add after the punctuation character
+\#   supplied by the next field.
 \#
 \# %A Author(s)
 .de ref*add-A
@@ -16038,10 +16139,8 @@
 .    rr #OVERFLOW_RIGHT
 .END
 \#
-.ig
-The remainder of the margin notes macros and routines are adapted
-from Werner Lemberg's MN.tmac.
-..
+\# The remainder of the margin notes macros and routines are adapted
+\# from Werner Lemberg's MN.tmac.
 \#
 \# MNinit
 \# ------
@@ -16377,5 +16476,4 @@
 .  if !\\n[#no-repeat-MN-right]=1 .vpt 1
 ..
 \#
-\#
 \# vim: ft=groff:

Index: momdoc/color.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/color.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- momdoc/color.html   24 Feb 2006 08:08:42 -0000      1.5
+++ momdoc/color.html   8 Jun 2006 21:11:03 -0000       1.6
@@ -296,7 +296,9 @@
 <p>
 <a name="COLOR_INLINE"></a>
 Once you've told <strong>mom</strong> about a colour (via
-<strong>NEWCOLOR</strong> or <strong>XCOLOR</strong>), you use either
+<a href="#NEWCOLOR">NEWCOLOR</a>
+or
+<a href="#XCOLOR">XCOLOR</a>, you use either
 the macro, <strong>COLOR</strong>, or the
 <a href="definitions.html#TERMS_INLINES">inline escape</a>,
 <kbd>\*[&lt;colorname&gt;]</kbd>, to cause <strong>mom</strong> to
@@ -326,7 +328,11 @@
 all of the head(s), subhead(s) or parahead(s), including the
 numbers, colourized by invoking the appropriate
 <a href="docelement.html#DOCELEMENT_CONTROL">control macro</a>.
-
+<p>
+For colorizing underscored text, see
+<a href="goodies.html#UNDERSCORE_COLOR">Colorizing underscored text</a>
+in the notes at the end of
+<a href="goodies.html#UNDERSCORE">UNDERSCORE</a>.
 <br>
 
 <hr>

Index: momdoc/docelement.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/docelement.html,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- momdoc/docelement.html      19 May 2006 21:49:07 -0000      1.23
+++ momdoc/docelement.html      8 Jun 2006 21:11:03 -0000       1.24
@@ -288,6 +288,7 @@
                <li><a href="#FINIS_STRING">Changing the FINIS string</a>
                <li><a href="#FINIS_COLOR">Changing the FINIS colour</a>
        </ul>
+       <li><a href="#PSPIC">Inserting images into a document -- the PSPIC 
macro</a>
 </ul>
 <hr>
 
@@ -1328,7 +1329,7 @@
 <a name="LINEBREAK_INTRO"><h2><u>Author linebreaks</u></h2></a>
 <ul>
        <li><a href="#LINEBREAK">Tag: LINEBREAK</a>
-       <li><a href="#LINEBREAK_CHAR">Linebreak character control macro</a>
+       <li><a href="#LINEBREAK_CHAR">Linebreak character control macros</a>
 </ul>
 <p>
 By default, <strong>mom</strong> marks
@@ -1449,9 +1450,9 @@
 you can change her defaults so <strong>QUOTE</strong> serves other
 needs, e.g. entering verbatim snippets of programming code, command
 line instructions, and so on.  (See the
-<a href="#QUOTE_TIP">tip</a>
-below for suggestions about including programming code snippets in
-documents.)
+<a href="#CODE">CODE</a>
+for a convenience macro to assist in including programming code
+snippets in documents.)
 <p>
 <a name="QUOTE_SPACING"></a>
 Besides indenting quotes, <strong>mom</strong> further sets them
@@ -2265,21 +2266,8 @@
 </ul>
 
 <p>
-<strong>Mom</strong>'s line-numbering capabilities are not as flexible
-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 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>
-other than the
-<a href="definitions.html#TERMS_FIGURESPACE">figure space</a>.
 <p>
-That said, when you turn line-numbering on, <strong>mom</strong>,
-by default
+When you turn line-numbering on, <strong>mom</strong>, by default
 <br>
 <a name="NUMBER_LINES_DEFAULTS"></a>
 <ul>
@@ -4615,6 +4603,80 @@
 change what <strong>mom</strong> prints for END with
 the control macro <strong>FINIS_STRING</strong>.
 <p>
+
+<!---FINIS--->
+
+<hr width="66%" align="left">
+<p>
+<a name="FINIS">
+       Macro: <strong>FINIS</strong>
+</a>
+
+<p>
+The use of <strong>FINIS</strong> is optional, but if you use
+it, it should be the last macro you invoke in a document (before
+<a href="#ENDNOTES">ENDNOTES</a>
+or
+<a href="#TOC">TOC</a>).
+See
+<a href="#FINIS_INTRO">above</a>
+for a description of how <strong>FINIS</strong> behaves.
+<p>
+<strong>NOTE:</strong> If you don't use <strong>FINIS</strong>,
+and you don't want
+<a href="definitions.html#TERMS_FOOTER">footers</a>
+(if they're on) or a page number at the bottom of the last page of
+a document, you have to turn them off manually, as the last two
+lines of your document file, like this:
+<p>
+<pre>
+       .FOOTERS OFF
+       .PAGINATE OFF
+</pre>
+
+<a name="FINIS_STRING"><h3><u>Changing the FINIS string</u></h3></a>
+
+<p>
+By default, <strong>FINIS</strong> prints the word
+END between
+<a href="definitions.html#TERMS_EM">em-dashes</a>.
+If you'd like <strong>mom</strong> to print something else
+between the dashes, use the <strong>FINIS_STRING</strong> macro
+(anywhere in the document prior to <strong>FINIS</strong>).
+<p>
+For example, if your document's in French, you'd do
+<p>
+<pre>
+       .FINIS_STRING "FIN"
+</pre>
+
+Double-quotes must enclose the macro's argument.
+<p>
+<strong>NOTE:</strong> If you pass <strong>FINIS_STRING</strong>
+a blank string, i.e.
+<p>
+<pre>
+       .FINIS_STRING ""
+</pre>
+
+<strong>mom</strong> will still print the em-dashes if you
+invoke <strong>FINIS</strong>.  This, in effect, produces a
+short, centred horizontal rule that terminates the document.
+(In
+<a href="docprocessing.html.#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
+it's a short, dashed line composed of four hyphens.)
+
+<a name="FINIS_COLOR"><h3><u>Changing the FINIS colour</u></h3></a>
+<p>
+Invoking <strong>FINIS_COLOR</strong> with a pre-defined (or
+&quot;initalized&quot;) color changes the colour of both the FINIS
+string and the em-dashes that surround it.  If you use the
+<a href="definitions.html#TERMS_INLINE">inline escape</a>,
+<a href="color.html#COLOR_INLINE">\*[&lt;colorname&gt;]</a>,
+in the argument passed to <strong>FINIS</strong>, only the text
+will be in the new colour; the em-dashes will be in the default
+document colour (usually black).
+<p>
 <hr>
 
 <!====================================================================>
@@ -4622,6 +4684,9 @@
 <a name="TOC_INTRO"><h2><u>Table of contents</u></h2></a>
 <ul>
        <li><a href="#TOC_BEHAVIOUR">TOC behaviour</a>
+       <ul>
+            <li><a href="#PSSELECT">Using psselect to put the table of 
contents where you want</a>
+       </ul>
        <li><a href="#TOC">Macro: TOC</a> -- tell <strong>mom</strong> to 
output a table of contents
        <li><a href="#TOC_CONTROL">TOC control macros</a>
 </ul>
@@ -4701,6 +4766,60 @@
 can be changed, as can the amount of visual space reserved for toc
 entry page numbers.
 <p>
+<a name="PSSELECT"><h4>Using psselect to put the table of contents where you 
want</h4></a>
+<p>
+<strong>Mom</strong> always outputs tables of contents as the last
+pages of any document.  While this is desirable for some language
+conventions -- French, for example -- it is not desirable for
+others.
+<p>
+If you'd like your tables of contents to be placed somewhere else,
+you have two options: re-arrange the pages by hand (okay for one or
+two hard copies of your document), or use the <strong>psselect</strong>
+programme provided by the <strong>psutils</strong> suite of tools
+(which you may have to install as a package from your distribution
+if it is not already on your system).
+<p>
+The procedure for using <strong>psselect</strong> begins by you
+determining how many pages comprise the table of contents.  You
+can do this by previewing the document with a PostScript viewer,
+say, <strong>gv</strong>.  Once you know the number of pages in the
+table of contents, use <strong>psselect</strong> to re-arrange them
+appropriately.
+<p>
+Say, for example, the table of contents runs to just one page.  The
+command to place the one-page table of contents at the start of the
+document is:
+<p>
+<pre>
+        psselect -p _1,1-_2 &lt;PostScript file&gt; &gt; &lt;new PostScript 
file&gt;
+</pre>
+
+The <kbd>-p</kbd> option instructs <strong>psselect</strong> that
+what follows is a comma-separated list of the order in which
+to re-arrange pages.  The underscore character means "counting
+backwards from the end of the document".  Thus, the above says
+"put the last page first (i.e. the table of contents), followed by
+all pages from the original first page up to the second to last."
+<strong>psselect</strong> outputs to stdout, so you have to redirect
+the output to a new file.
+<p>
+If your table of contents runs to two pages, the command would look
+like this:
+<p>
+<pre>
+        psselect -p _1-_2,1-_3 &lt;PostScript file&gt; &gt; &lt;new PostScript 
file&gt;
+</pre>
+
+If your table of contents runs to two pages and you have a cover
+page that you would like to appear before the toc, the command would look
+like this:
+<p>
+<pre>
+        psselect -p 1,_1-_2,2-_3 &lt;PostScript file&gt; &gt; &lt;new 
PostScript file&gt;
+</pre>
+
+<p>
 
 <!---TOC--->
 
@@ -5177,80 +5296,66 @@
 <pre>
        .TOC_PADDING 2
 </pre>
+<hr>
 
-<!---FINIS--->
-
-<hr width="66%" align="left">
-<p>
-<a name="FINIS">
-       Macro: <strong>FINIS</strong>
-</a>
-
-<p>
-The use of <strong>FINIS</strong> is optional, but if you use
-it, it should be the last macro you invoke in a document (before
-<a href="#ENDNOTES">ENDNOTES</a>
-or
-<a href="#TOC">TOC</a>).
-See
-<a href="#FINIS_INTRO">above</a>
-for a description of how <strong>FINIS</strong> behaves.
-<p>
-<strong>NOTE:</strong> If you don't use <strong>FINIS</strong>,
-and you don't want
-<a href="definitions.html#TERMS_FOOTER">footers</a>
-(if they're on) or a page number at the bottom of the last page of
-a document, you have to turn them off manually, as the last two
-lines of your document file, like this:
-<p>
-<pre>
-       .FOOTERS OFF
-       .PAGINATE OFF
-</pre>
+<!---PSPIC--->
 
-<a name="FINIS_STRING"><h3><u>Changing the FINIS string</u></h3></a>
+<h2><u>Inserting images into a document -- the PSPIC macro</u></h2>
 
 <p>
-By default, <strong>FINIS</strong> prints the word
-END between
-<a href="definitions.html#TERMS_EM">em-dashes</a>.
-If you'd like <strong>mom</strong> to print something else
-between the dashes, use the <strong>FINIS_STRING</strong> macro
-(anywhere in the document prior to <strong>FINIS</strong>).
+<a name="PSPIC">
+       <nobr>Macro: <strong>PSPIC</strong> [ -L | -R | -I &lt;n&gt; ] 
&lt;file&gt; [ width [ height ] ]</nobr>
+</a>
 <p>
-For example, if your document's in French, you'd do
+You can insert images into a document by using the
+<strong>PSPIC</strong> macro. <strong>PSPIC</strong> isn't
+actually part of <strong>mom</strong>; it comes packaged with
+<strong>groff</strong> itself.  Use it whenever you want to insert
+images into a <strong>mom</strong> document.  The image must be
+in PostScript format, either straight .ps or .eps (Encapsulated
+PostScript).  There have been reports of trouble with PostScript
+level 2 images, so don't save your images in this format.
+<p>
+<kbd>man groff_tmac</kbd> contains the documentation for
+<strong>PSPIC</strong>, but I'll repeat it here with a few
+modifications.
 <p>
-<pre>
-       .FINIS_STRING "FIN"
-</pre>
-
-Double-quotes must enclose the macro's argument.
-<p>
-<strong>NOTE:</strong> If you pass <strong>FINIS_STRING</strong>
-a blank string, i.e.
+<em>---From man groff_tmac---</em>
+<br>
+<kbd>&lt;file&gt;</kbd> is the name of the file containing the
+illustration; width and height give the desired width and height
+of the graphic.  The width and height arguments may have
+<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a>
+attached; the default unit of measure is i. This macro will scale
+the graphic uniformly in the x and y directions so that it is no
+more than width wide and height high.  By default, the graphic will
+be horizontally centered.  The -L and -R options cause the graphic
+to be left-aligned and right-aligned, respectively.  The -I option
+causes the graphic to be indented by &lt;n&gt; (default unit of
+measure is &quot;m&quot;).
+<br>
+<em>-------------------------</em>
 <p>
-<pre>
-       .FINIS_STRING ""
-</pre>
-
-<strong>mom</strong> will still print the em-dashes if you
-invoke <strong>FINIS</strong>.  This, in effect, produces a
-short, centred horizontal rule that terminates the document.
-(In
-<a href="docprocessing.html.#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
-it's a short, dashed line composed of four hyphens.)
-
-<a name="FINIS_COLOR"><h3><u>Changing the FINIS colour</u></h3></a>
+Unless you're a PostScript whiz and have futzed around with
+bounding boxes and whatnot, it's unlikely that your image will
+occupy an easily predictable and precise amount of space on the
+page.  This is particularly significant when it comes to the amount
+of vertical space occupied by the image.  A certain amount of
+manual tweaking of the vertical placement of the image will
+probably be required, via the
+<a href="typesetting.html#ALD">ALD</a>
+and
+<a href="typesetting.html#RLD">RLD</a>
+macros.
 <p>
-Invoking <strong>FINIS_COLOR</strong> with a pre-defined (or
-&quot;initalized&quot;) color changes the colour of both the FINIS
-string and the em-dashes that surround it.  If you use the
-<a href="definitions.html#TERMS_INLINE">inline escape</a>,
-<a href="color.html#COLOR_INLINE">\*[&lt;colorname&gt;]</a>,
-in the argument passed to <strong>FINIS</strong>, only the text
-will be in the new colour; the em-dashes will be in the default
-document colour (usually black).
-
+Additionally, images inserted into
+<a href="definitions.html#TERMS_RUNNING">running text</a>
+will almost certainly disrupt the baseline placement of running
+text.  In order to get <strong>mom</strong> back on track after
+invoking <strong>PSPIC</strong>, I strongly recommend using the
+<a href="docprocessing.html#SHIM">SHIM</a>
+macro so that the bottom margin of running text falls where it
+should.
 <p>
 <hr>
 <a href="headfootpage.html#TOP">Next</a>&nbsp;&nbsp;

Index: momdoc/goodies.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/goodies.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- momdoc/goodies.html 19 May 2006 21:49:07 -0000      1.16
+++ momdoc/goodies.html 8 Jun 2006 21:11:03 -0000       1.17
@@ -394,6 +394,27 @@
        ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
 </pre>
 
+<p>
+<strong>CAPS</strong> can also be invoked as an
+<a href="definitions.html#TERMS_INLINES">inline escape</a>,
+like this: <kbd>\*[CAPS]...\*[CAPS OFF]</kbd>.  Thus,
+<p>
+<pre>
+       All work \*[CAPS]and\*[CAPS OFF] no play makes Jack a dull boy.
+</pre>
+
+produces, on output
+<p>
+<pre>
+       All work AND no play makes Jack a dull boy.
+</pre>
+
+The inline escape mechanism for <strong>CAPS</strong> is especially
+useful for capitalizing <strong>mom</strong>'s
+<a href="headfootpage.html#RESERVED_STRINGS">reserved strings</a>
+(document title, author(s), etc).
+<p>
+
 <!---STRING--->
 
 <hr width="66%" align="left">
@@ -498,7 +519,7 @@
 <p>
 <a name="NOTES_UNDERSCORE"></a>
 <strong>NOTES:</strong>
-<br>
+<p>
 <strong>UNDERSCORE</strong> does not work across line breaks in output
 copy, which is to say that you can't underscore a multi-line passage
 simply by putting the text of the whole thing in the string you pass
@@ -533,6 +554,26 @@
 to preview files anyway.  See the section on
 <a href="#PREVIEWING">previewing</a>.
 <p>
+<a name="UNDERSCORE_COLOR"><strong>Colorizing underscored text:</strong></a>
+If you want underscored text to be in a different colour from the
+text around it, use the
+<a href="color.html#COLOR">COLOR</a>
+macro, rather than the
+<a href="color.html#COLOR_INLINE">inline escape for change color</a>.
+In other words, assuming your prevailing text color is black and
+you want underscored text in red
+<p>
+<pre>
+       .COLOR <red>
+       .UNDERSCORE "text to underscore"
+       .COLOR <black>
+</pre>
+rather than
+<p>
+<pre>
+       .UNDERSCORE "\*[red]text to underscore\*[black]"
+</pre>
+<p>
 
 <!---UNDERSCORE2--->
 

Index: momdoc/headfootpage.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/headfootpage.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- momdoc/headfootpage.html    9 May 2006 21:41:37 -0000       1.11
+++ momdoc/headfootpage.html    8 Jun 2006 21:11:03 -0000       1.12
@@ -35,14 +35,19 @@
                <ul>
                        <li><a href="#USERDEF_HDRFTR_INTRO">Introduction</a>
                        <li><a href="#HDRFTR_RECTOVERSO">HEADER_RECTO, 
HEADER_VERSO</a>
+                       <li><a href="#RESERVED_STRINGS">Using mom's 
&quot;reserved&quot; strings in header/footer definitions</a>
+                           <br>(title, author, etc.)
                </ul>
+               <li><a href="#HEADERS_AND_FOOTERS">HEADERS_AND_FOOTERS</a> --
+                       putting both headers and footers on document pages
        </ul>
        <a name="HEADFOOT_TOC"></a>
        <li><a href="#HEADFOOT_CONTROL">Control macros for headers/footers</a>
        <ul>
                <li><a href="#HDRFTR_STRINGS">Header/footer strings</a>
                <ul>
-                       <li><a href="#RESERVED_STRINGS">Using mom's 
&quot;reserved&quot; strings in header/footer definitions</a>
+                       <li><a href="#RESERVED_STRINGS">Using mom's 
&quot;reserved&quot; strings in header/footer definitions<br>(title, author, 
etc.)
+</a>
                </ul>
                <li><a href="#HDRFTR_STYLE">Header/footer style</a>
                <ul>
@@ -140,9 +145,9 @@
 to the document type selected with
 <a href="docprocessing.html#DOCTYPE">DOCTYPE</a>.
 You can, however, supply whatever strings you like -- including page
-numbers -- to go in any part of headers.  What's more, you can set the
-family, font, size and capitalization style (caps or caps/lower-case)
-for each header part individually.
+numbers --to go in any part of headers.  What's more, you can set
+the family, font, size, colour and capitalization style (caps or
+caps/lower-case) for each header part individually.
 <p>
 By default, <strong>mom</strong> prints a horizontal rule beneath
 headers to separate them visually from running text.  In the case of
@@ -261,6 +266,23 @@
        <h2><u>Managing headers/footers</u></h2>
 </a>
 
+<h3>Macro list</h3>
+<ul>
+       <li><a href="#HEADERS">HEADERS</a> -- on or off
+       <li><a href="#FOOTERS">FOOTERS</a> -- on or off
+       <li><a href="#FOOTER_ON_FIRST_PAGE">FOOTER_ON_FIRST_PAGE</a>
+       <li><a href="#USERDEF_HDRFTR">User-defined, single string recto/verso 
headers/footers</a>
+       <ul>
+               <li><a href="#USERDEF_HDRFTR_INTRO">Introduction</a>
+               <li><a href="#HDRFTR_RECTOVERSO">HEADER_RECTO, HEADER_VERSO</a>
+               <li><a href="#RESERVED_STRINGS">Using mom's 
&quot;reserved&quot; strings in header/footer definitions</a>
+                   <br>(title, author, etc.)
+       </ul>
+       <li><a href="#HEADERS_AND_FOOTERS">HEADERS_AND_FOOTERS</a> --
+               putting both headers and footers on document pages
+       <li><a href="#HEADFOOT_CONTROL">Header and footer control macros</a>
+</ul>
+
 <p>
 The following are the basic macros for turning
 <a href="definitions.html#TERMS_HEADER">headers</a>
@@ -279,7 +301,11 @@
 prior to
 <a href="docprocessing.html#START">START</a>.
 <p>
-Please note that headers and footers are mutually exclusive.  If
+Please note that
+<a href="#HEADERS">HEADERS</a>
+and
+<a href="#FOOTERS">FOOTERS</a>
+are mutually exclusive.  If
 headers are on, footers (but NOT bottom-of-page numbering) are
 automatically turned off.  Equally, if footers are on, headers
 (but NOT top-of-page numbering) are automatically turned off.  Thus, if
@@ -287,6 +313,10 @@
 <a href="#FOOTERS">FOOTERS</a>;
 there's no need to turn headers off first.
 <p>
+If you need both headers and footers, there's a special macro,
+<a href="#HEADERS_AND_FOOTERS">HEADERS_AND_FOOTERS</a>,
+that allows you to set this up.
+<p>
 
 <!---HEADERS--->
 
@@ -491,7 +521,7 @@
 <strong>\*[PAGE#]</strong> inline.
 <br>
 
-<h3><u>*Padding the HEADER_RECTO/HEADER_VERSO string</u></h3>
+<a name="PADDING_HDRFTR"><h3><u>*Padding the HEADER_RECTO/HEADER_VERSO 
string</u></h3></a>
 You can &quot;pad&quot; the header-recto string, a convenience you'll
 appreciate in circumstances such as the following.
 <p>
@@ -529,8 +559,8 @@
 The situation depicted above is accomplished like this:
 <p>
 <pre>
-       .HEADER_RECTO LEFT "^\*[PAGE#]#Title^"
-       .HEADER_VERSO LEFT "^Author#\*[PAGE#]^"
+       .HEADER_RECTO LEFT "^\*[PAGE#]#\E*[$TITLE]^"
+       .HEADER_VERSO LEFT "^\E*[$AUTHOR]#\*[PAGE#]^"
 </pre>
 
 Note that <strong>mom</strong> does not interpret the <kbd>#</kbd>
@@ -557,6 +587,169 @@
 string, use the escape sequence for the pound sign
 (<kbd>\[sh]</kbd>) where you want the pound sign to go.
 <p>
+
+<!---HDRFTR_RECTOVERSO--->
+
+<hr width="66%" align="left">
+<p>
+<a name="HEADERS_AND_FOOTERS"></a>
+Macro: <strong>HEADERS_AND_FOOTERS </strong>
+<br>
+Invocation:
+<pre>
+       .HEADERS_AND_FOOTERS \
+       &lt;L | C | R&gt; "&lt;recto header string&gt;" \
+       &lt;L | C | R&gt; "&lt;recto footer string&gt;" \
+       &lt;L | C | R&gt; "&lt;verso header string&gt;" \
+       &lt;L | C | R&gt; "&lt;verso footer string&gt;"
+
+or
+
+       .HEADERS_AND_FOOTERS &lt;anything&gt;
+</pre>
+
+<p>
+<strong>HEADERS_AND_FOOTERS</strong> allows you to have both
+headers and footers on the same page.
+<p>
+Unlike the macros,
+<a href="#HEADERS">HEADERS</a>
+and
+<a href="#FOOTERS">FOOTERS</a>,
+<strong>HEADERS_AND_FOOTERS</strong> requires that you supply
+the information you want in the headers and footers yourself.
+<strong>Mom</strong> does no automatic generation of things like
+the title and the author in headers and footers when you're using
+<strong>HEADERS_AND_FOOTERS</strong>.  Furthermore, style
+changes--family, font, pointsize, colour, capitalization, etc--are
+entirely your responsibility and must be made with
+<a href="definitions.html#TERMS_INLINES">inline escapes</a>
+in the arguments passed to <kbd>&quot;&lt;recto
+header string&gt;&quot;</kbd>, <kbd>&quot;&lt;recto
+footer string&gt;&quot;</kbd>, etc.  By default,
+<strong>mom</strong> sets the headers and footers created with
+<strong>HEADERS_AND_FOOTERS</strong> in the same family, font,
+point size, capitalization style and colour as
+<a href="definitions.html#TERMS_RUNNING">running text</a>.
+<p>
+The manner of entering what you want is identical to the way you
+input
+<a href="#USERDEF_HDRFTR">single string headers and footers</a>.
+I suggest reading up on them, as well as looking at the entries,
+<a href="#HDRFTR_RECTOVERSO">HEADER_RECTO</a>
+and
+<a href="#RESERVED_STRINGS">Using mom's &quot;reserved&quot; strings in 
header/footer definitions</a>.
+<p>
+The same
+<a href="#PADDING_HDRFTR">padding mechanism</a>
+used in <strong>HEADER_RECTO</strong> and
+<strong>HEADER_VERSO</strong> is available in the
+<a href="definitions.html#TERMS_STRINGARGUMENT">string arguments</a>
+passed to
+<strong>HEADERS_AND_FOOTERS</strong>, allowing you to simulate
+two- and three-part headers and footers.
+<p>
+<strong>L | C | R</strong> in the arguments to
+<strong>HEADERS_AND_FOOTERS</strong> refers to whether you want
+the specific header or footer set flush left, centered, or flush
+right.  (You can also use the longer forms, <strong>LEFT</strong>,
+<strong>CENTER</strong> and <strong>RIGHT</strong>.)  The
+string you give afterwards is whatever text you want, including
+<strong>mom</strong>'s
+<a href="#RESERVED_STRINGS">&quot;reserved&quot; strings</a>,
+and whatever
+<a href="definitions.html#TERMS_INLINES">inline escapes</a>
+you need to change things like family and font, pointsize, colour,
+etc. as you go along.
+<p>
+Note the backslashes in the invocation, above.  Every set of
+arguments given this way to <strong>HEADERS_AND_FOOTERS</strong>
+<strong><em>except the last one</em></strong> requires a backslash
+after it.  The use of backslashes isn't required if you want to put
+the entire argument list on the same (very long!) line as the
+macro itself; I recommend sticking to the style shown above to keep
+things manageable.
+<p>
+If you want to disable having both headers and footers on
+the same page, invoke <strong>HEADERS_AND_FOOTERS</strong>
+with any argument you want (e.g. <strong>OFF, QUIT, END,
+X...</strong>). <strong>Mom</strong> will restore her default
+behaviour of setting automatically generated page headers,
+with the page number, centered, at the bottom of the page.  If
+you would prefer footers instead of headers after turning
+<strong>HEADERS_AND_FOOTERS</strong> off, just invoke
+<a href="#FOOTERS">FOOTERS</a>
+afterwards.
+<br>
+<h3>Some examples</h3>
+<h4>Example 1</h4>
+<br>
+If you want the same header and footer on every page,
+here's how you'd do it.
+<p>
+<pre>
+       .HEADERS_AND_FOOTERS \          +-----------------------+
+       C "\E*[$TITLE]" \               |         Title         |
+       L "^\E*[$AUTHOR]#\*[PAGE#]^"    |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       |                       |
+                                       | Author          Pg. # |
+                                       +-----------------------+
+</pre>
+
+<kbd>\E*[$TITLE]</kbd> and <kbd>\E*[$AUTHOR]</kbd> will print the
+strings you pass to
+<a href="docprocessing.html#TITLE">TITLE</a>
+and
+<a href="docprocessing.html#AUTHOR">AUTHOR</a>;
+<kbd>\*[PAGE#]</kbd> is how you include the page number in a header
+or footer string.  (For a list of special strings you can use in headers
+and footers, see
+<a href="#RESERVED_STRINGS">here</a>.)
+<p>
+You don't have to use these special strings.  You can type in
+anything you like.  I've only used them here to show that they're
+available.
+<br>
+<h4>Example 2</h4>
+<p>
+If you want different headers and footers on recto/verso pages,
+here's a recipe:
+<p>
+<pre>
+       .HEADERS_AND_FOOTERS \
+       C "BOOK TITLE" \
+       L "^\*[PAGE#]#\E*[$AUTHOR]^" \
+       C "Story Title" \
+       L "^\E*[$AUTHOR]#\*[PAGE#]^"
+
+       +-----------------------+     +------------------------+
+       |      BOOK TITLE       |     |       Story Title      |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       |                       |     |                        |
+       | Pg. #          Author |     | Author            Pg.# |
+       +-----------------------+     +------------------------+
+</pre>
+<br>
 <hr>
 
 <a name="HEADFOOT_CONTROL">
@@ -579,9 +772,12 @@
                <li><a href="#HDRFTR_LEFT">HEADER_LEFT</a>
                <li><a href="#HDRFTR_CENTER">HEADER_CENTER</a>
                <ul>
-                       <li><a href="#HDRFTR_CENTER_PAD">HEADER_CENTER_PAD</a> 
-- stick some space left of right of the centre string
+                       <li><a href="#HDRFTR_CENTER_PAD">HEADER_CENTER_PAD</a> 
-- stick some space left or right of the centre string
                </ul>
                <li><a href="#HDRFTR_RIGHT">HEADER_RIGHT</a>
+               <li><a href="RESERVED_STRINGS">Using mom's &quot;reserved&quot; 
strings in header/footer definitions</a>
+                   <br>(e.g. \E*[$TITLE] when you want the title, \E*[$AUTHOR]
+                   when you want the author, etc.)
                <li><a href="#PAGE_NUMBER_SYMBOL">Replacing header left, centre 
or right with the page number</a>
                <li><a href="#PAGE_NUMBER_INCL">Including the  page number in 
header left, centre or right</a>
        </ul>
@@ -722,16 +918,19 @@
 &quot;reserved&quot; strings that you can plug into the
 <strong>HEADER_LEFT, _CENTER</strong> and <strong>_RIGHT</strong>
 macros.  They are:
-<p>
 <pre>
-       \*[$TITLE]          -- the argument passed to .TITLE
-       \*[$DOCTITLE]       -- the argument passed to .DOCTITLE
-       \*[$AUTHOR_1]       -- the first argument passed to .AUTHOR
-       \*[$CHAPTER_STRING] -- the argument passed to .CHAPTER_STRING,
+       \E*[$TITLE]          -- the current argument passed to .TITLE
+       \E*[$DOCTITLE]       -- the current argument passed to .DOCTITLE
+       \E*[$AUTHOR]         -- the current first argument passed to .AUTHOR
+       \E*[$AUTHOR_1...9]   -- the current arguments passed to .AUTHOR
+       \E*[$AUTHORS]        -- a comma-separated concatenated string
+                               of all the current arguments passed to .AUTHOR
+                               (i.e. a list of authors)
+       \E*[$CHAPTER_STRING] -- the current argument passed to .CHAPTER_STRING,
                               if invoked, otherwise, "Chapter"
-       \*[$CHAPTER]        -- the argument (typically a number) passed
+       \E*[$CHAPTER]        -- the current argument (typically a number) passed
                               to .CHAPTER
-       \*[$CHAPTER_TITLE]  -- the argument passed to .CHAPTER_TITLE
+       \E*[$CHAPTER_TITLE]  -- the current argument passed to .CHAPTER_TITLE
 </pre>
 
 Returning to the scenario above, first, you'd define a centre
@@ -756,10 +955,10 @@
 </pre>
 
 Then, you'd redefine the header centre string using the reserved
-string \*[$TITLE], like this:
+string <kbd>\E*[$TITLE]</kbd>, like this:
 <p>
 <pre>
-       .HEADER_CENTER "\*[$TITLE]"
+       .HEADER_CENTER "\E*[$TITLE]"
 </pre>
 
 And last, you'd do:
@@ -778,7 +977,7 @@
        .COLLATE
        .TITLE         "New Doc Title"
        .AUTHOR        "Josephine Blough"
-       .HEADER_CENTER "\*[$TITLE]"
+       .HEADER_CENTER "\E*[$TITLE]"
        .START
 </pre>
 
@@ -786,7 +985,7 @@
 example.
 <p>
 <pre>
-       .HEADER_CENTER "\*[$CHAPTER_STRING] \*[$CHAPTER]"
+       .HEADER_CENTER "\E*[$CHAPTER_STRING] \E*[$CHAPTER]"
 </pre>
 
 which, assuming a <strong>.CHAPTER_STRING</strong> of

Index: momdoc/letters.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/letters.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- momdoc/letters.html 14 May 2005 07:07:13 -0000      1.7
+++ momdoc/letters.html 8 Jun 2006 21:11:03 -0000       1.8
@@ -244,7 +244,7 @@
 ---------             ------------------   --------------------
 
 Paper size            8.5 x 11 inches      8.5 x 11 inches
-Left/right margins    1.25 inches          1.25 inches
+Left/right margins    1.125 inches         1.125 inches
 Header margin         3.5 picas            3.5 picas
  (for page numbers)
 Header gap            3 picas              3 picas

Index: momdoc/macrolist.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/macrolist.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- momdoc/macrolist.html       9 May 2006 21:41:37 -0000       1.6
+++ momdoc/macrolist.html       8 Jun 2006 21:11:03 -0000       1.7
@@ -90,7 +90,7 @@
 </tr>
 <tr>
        <td><a href="#15">Manual columns</a></td>
-       <td><a href="#35">Quotes</a></td>
+       <td><a href="#35">Quotes</a> (including inserting code)</td>
 </tr>
 <tr>
        <td><a href="#16">Superscripts</a></td>
@@ -997,6 +997,11 @@
        <td>&nbsp;</td>
        <td><a 
href="docelement.html#RESET_HEAD_NUMBER">RESET_HEAD_NUMBER</a></td>
 </tr>
+<tr>
+       <td>&nbsp;</td>
+       <td>&nbsp;</td>
+       <td><a 
href="docelement.html#PREFIX_CHAPTER_NUMBER">PREFIX_CHAPTER_NUMBER</a></td>
+</tr>
 </table>
 
 <a name="32"><h3 align="center">Subheads</h3></a>
@@ -1024,8 +1029,8 @@
 </tr>
 <tr>
        <td>&nbsp;</td>
-       <td>&nbsp;</td>
        <td><a href="docelement.html#SUBHEAD_CONTROL">SUBHEAD_COLOR</a></td>
+       <td><a 
href="docelement.html#PREFIX_CHAPTER_NUMBER">PREFIX_CHAPTER_NUMBER</a></td>
 </tr>
 </table>
 
@@ -1055,7 +1060,7 @@
 <tr>
        <td>&nbsp;</td>
        <td><a href="docelement.html#PARAHEAD_GENERAL">PARAHEAD_COLOR</a></td>
-       <td>&nbsp;</td>
+       <td><a 
href="docelement.html#PREFIX_CHAPTER_NUMBER">PREFIX_CHAPTER_NUMBER</a></td>
 </tr>
 </table>
 
@@ -1108,7 +1113,7 @@
        <td><a href="docelement.html#QUOTE_GENERAL">QUOTE_INDENT</a>*</td>
 </tr>
 <tr>
-       <td>&nbsp;</td>
+       <td><a href="docelement.html#CODE">CODE</a></td>
        <td><a href="docelement.html#QUOTE_GENERAL">QUOTE_FONT</a></td>
        <td><a 
href="docelement.html#ALWAYS_FULLSPACE_QUOTES">ALWAYS_FULLSPACE_QUOTES</a></td>
 </tr>
@@ -1613,7 +1618,7 @@
        <td><a 
href="headfootpage.html#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a></td>
 </tr>
 <tr>
-       <td>&nbsp;</td>
+       <td><a 
href="headfootpage.html#HEADERS_AND_FOOTERS">HEADERS_AND_FOOTERS</a></td>
        <td><a href="headfootpage.html#HDRFTR_GAP">HEADER_GAP</a></td>
        <td><a href="headfootpage.html#HDRFTR_RECTOVERSO">HEADER_VERSO</a></td>
        <td><a href="headfootpage.html#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a></td>

Index: momdoc/rectoverso.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/rectoverso.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- momdoc/rectoverso.html      4 Jun 2004 06:43:08 -0000       1.5
+++ momdoc/rectoverso.html      8 Jun 2006 21:11:03 -0000       1.6
@@ -182,9 +182,7 @@
 needed for the new chapter, e.g.
 <a href="docprocessing.html#CHAPTER">CHAPTER</a>
 or
-<a href="docprocessing.html#CHAPTER_STRING">CHAPTER_STRING</a>
-(have a look at the
-<a href="#CHAPTER_NOTE">Special Note on CHAPTER</a>)
+<a href="docprocessing.html#CHAPTER_STRING">CHAPTER_STRING</a>,
 make any pertinent style changes to the document (unlikely, but
 possible), and re-invoke the
 <a href="docprocessing.html#START">START</a>

Index: momdoc/reserved.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/reserved.html,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- momdoc/reserved.html        19 May 2006 21:49:07 -0000      1.24
+++ momdoc/reserved.html        8 Jun 2006 21:11:03 -0000       1.25
@@ -722,6 +722,9 @@
 HDRFTR_VERSO             User-defined, single string verso
                          header/footer
 HEADERS                  Turns headers on or off
+HEADERS_AND_FOOTERS      Enables and permits the creation of
+                         headers and footers that appear on the
+                         same page
 SWITCH_HDRFTR            Switch HDRFTR_LEFT and HDRFTR_RIGHT
 
 ***Page numbering***
@@ -1259,6 +1262,7 @@
                            where the footnote is to be deferred to
                            the next page or column
 #GUTTER                    Width of gutter between columns
+#HDRFTR_BOTH               Are we setting both headers and footers?  (toggle)
 #HDRFTR_CENTER_CAPS        CENTER part of header/footer in caps?
                            (toggle; default=off)
 #HDRFTR_COLOR              Colored headers/footers? (toggle)
@@ -1290,6 +1294,7 @@
 #HEAD_NUM                  Head number
 #HEAD_SPACE                2 line spaces before heads?
                            (toggle; 1=yes, 0=no)
+#HF_OFF                    Has HEADERS_AND_FOOTERS been turned off? (toggle)
 #HORIZ_MARK                Horizontal 
 #HOW_MANY                  Number of blank pages to output
 #IGNORE                    Should we ignore this macro? Set to 1 in
@@ -1600,10 +1605,14 @@
                                  adjust bib leading
 $ATTRIBUTE_STRING               "by" line in doc header
 $AUTHOR_1...9                    Document author(s)
+$AUTHOR                          The author, or the first argument
+                                 passed to .AUTHOR ($AUTHOR_1)
 $AUTHOR_FAM                      Family to use for author in doc header
 $AUTHOR_FT                       Font to use for author in doc header
 $AUTHOR_SIZE_CHANGE              ps in/decrease of author in doc header*
 $AUTHOR_PT_SIZE                  Absolute ps of authors
+$AUTHORS                         Comma-separated concatenated
+                                 string of all args passed to .AUTHOR
 $BIB_FAM                         Bibliography page family
 $BIB_FT                          Bibliography page font
 $BIB_LEAD                        Base leading for bibliographies

Index: momdoc/toc.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/toc.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- momdoc/toc.html     19 May 2006 21:49:07 -0000      1.21
+++ momdoc/toc.html     8 Jun 2006 21:11:03 -0000       1.22
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
-<title>Mom, version 1.4 -- Table of Contents</title>
+<title>Mom, version 1.4-a -- Table of Contents</title>
 </head>
 <body bgcolor="#dfdfdf">
 
 <!====================================================================>
 
-<h1 align="center"><u>Table of Contents for mom, version 1.4</u></h1>
+<h1 align="center"><u>Table of Contents for mom, version 1.4-a</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
@@ -54,7 +54,8 @@
     <li><a href="#DOCPROC_INTRO">Introduction to document processing</a>
     <li><a href="#PRELIM">Preliminary document setup</a>
     <li><a href="#TAGS">The document element tags</a> -- heads, subheads, 
footnotes, etc.
-    <li><a href="#HDRFTR">Headers and footers</a>
+    <li><a href="#IMAGES">Inserting images into a document</a>
+    <li><a href="#HDRFTR">Page headers and footers</a>
     <li><a href="#PAGINATE">Pagination</a>
     <li><a href="#RV">Recto/verso printing and collating</a>
     <li><a href="#COVER">Cover pages</a>
@@ -263,53 +264,56 @@
                        <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
+                       <li><a href="docelement.html#FINIS_INTRO">5.4.17 
Document termination</a> -- FINIS
+                       <li><a href="docelement.html#TOC_INTRO">5.4.18 Table of 
contents</a>
                </ul>
+<a name="IMAGES"></a>
+               <li><a href="docelement.html#PSPIC"><strong>5.5 INSERTING 
IMAGES INTO A DOCUMENT</strong></a>
+               <br>
 <a name="HDRFTR"></a>
-               <li><a href="headfootpage.html#HEADFOOTPAGE"><strong>5.5 
DOCUMENT HEADERS AND FOOTERS</strong></a>
+               <li><a href="headfootpage.html#HEADFOOTPAGE"><strong>5.6 PAGE 
HEADERS AND FOOTERS</strong></a>
                <ul>
-                       <li><a 
href="headfootpage.html#HEADFOOTPAGE_INTRO">5.5.1 Introduction</a>
-                       <li><a 
href="headfootpage.html#DESCRIPTION_GENERAL">5.5.2 General description of 
headers/footers</a>
-                       <li><a href="headfootpage.html#HEADER_STYLE">5.5.3 
Default specs for headers/footers</a>
-                       <li><a href="headfootpage.html#VERTICAL_SPACING">5.5.4 
Vertical placement and spacing of headers/footers</a>
-                       <li><a 
href="headfootpage.html#HEADFOOT_MANAGEMENT">5.5.5 Managing headers/footers</a>
+                       <li><a 
href="headfootpage.html#HEADFOOTPAGE_INTRO">5.6.1 Introduction</a>
+                       <li><a 
href="headfootpage.html#DESCRIPTION_GENERAL">5.6.2 General description of 
headers/footers</a>
+                       <li><a href="headfootpage.html#HEADER_STYLE">5.6.3 
Default specs for headers/footers</a>
+                       <li><a href="headfootpage.html#VERTICAL_SPACING">5.6.4 
Vertical placement and spacing of headers/footers</a>
+                       <li><a 
href="headfootpage.html#HEADFOOT_MANAGEMENT">5.6.5 Managing headers/footers</a>
             <ul>
-                       <li><a href="headfootpage.html#USERDEF_HDRFTR">5.5.5.1 
User-defined, single string recto/verso headers/footers</a>
+                               <li><a 
href="headfootpage.html#USERDEF_HDRFTR">5.6.5.1 User-defined, single string 
recto/verso headers/footers</a>
             </ul>
-                       <li><a href="headfootpage.html#HEADFOOT_CONTROL">5.5.6 
Control macros for headers/footers</a>
+                       <li><a href="headfootpage.html#HEADFOOT_CONTROL">5.6.6 
Control macros for headers/footers</a>
                </ul>
 <a name="PAGINATE"></a>
-               <li><a href="headfootpage.html#PAGINATION"><strong>5.6 
PAGINATION</strong></a>
+               <li><a href="headfootpage.html#PAGINATION"><strong>5.7 
PAGINATION</strong></a>
                <ul>
                        <li><a 
href="headfootpage.html#PAGINATION">Introduction</a>
                        <li><a 
href="headfootpage.html#INDEX_PAGINATION">Pagination macros list</a>
                </ul>
 <a name="RV"></a>
-               <li><a href="rectoverso.html#RECTOVERSO"><strong>5.7 
RECTO/VERSO PRINTING AND COLLATING</strong></a>
+               <li><a href="rectoverso.html#RECTOVERSO"><strong>5.8 
RECTO/VERSO PRINTING AND COLLATING</strong></a>
                <ul>
-                       <li><a href="rectoverso.html#RECTOVERSO_INTRO">5.7.1 
Introduction to recto/verso</a>
+                       <li><a href="rectoverso.html#RECTOVERSO_INTRO">5.8.1 
Introduction to recto/verso</a>
                        <ul>
-                               <li><a 
href="rectoverso.html#RECTOVERSO_LIST">5.7.1.1 Macro list</a>
+                               <li><a 
href="rectoverso.html#RECTOVERSO_LIST">5.8.1.1 Macro list</a>
                        </ul>
-                       <li><a href="rectoverso.html#COLLATE_INTRO">5.7.2 
Introduction to collating</a>
+                       <li><a href="rectoverso.html#COLLATE_INTRO">5.8.2 
Introduction to collating</a>
                        <ul>
-                               <li><a href="rectoverso.html#COLLATE">5.7.2.1 
The COLLATE macro</a>
+                               <li><a href="rectoverso.html#COLLATE">5.8.2.1 
The COLLATE macro</a>
                        </ul>
                </ul>
 <a name="COVER"></a>
-               <li><a href="cover.html#COVER_TOP"><strong>5.8 CREATING COVER 
PAGES</strong></a>
+               <li><a href="cover.html#COVER_TOP"><strong>5.9 CREATING COVER 
PAGES</strong></a>
                <br>
-<a name="REF"></a>
-               <li><a href="refer.html#REF_TOP"><strong>5.9 BIBLIOGRAPHIES AND 
REFERENCES</strong></a>
+<a name="REF_INTRO"></a>
+               <li><a href="refer.html#REF_INTRO"><strong>5.10 BIBLIOGRAPHIES 
AND REFERENCES</strong></a>
                <br>
 <a name="LETTER"></a>
-               <li><a href="letters.html#LETTERS"><strong>5.10 WRITING 
LETTERS</strong></a>
+               <li><a href="letters.html#LETTERS"><strong>5.11 WRITING 
LETTERS</strong></a>
                <ul>
-                       <li><a href="letters.html#LETTERS_INTRO">5.10.1 
Introduction to writing letters</a>
-                       <li><a href="letters.html#TUTORIAL">5.10.2 Tutorial on 
writing letters</a>
-                       <li><a href="letters.html#LETTERS_DEFAULTS">5.10.3 
Default style for letters</a>
-                       <li><a href="letters.html#LETTERS_MACROS">5.10.4 The 
letter macros</a>
+                       <li><a href="letters.html#LETTERS_INTRO">5.11.1 
Introduction to writing letters</a>
+                       <li><a href="letters.html#TUTORIAL">5.11.2 Tutorial on 
writing letters</a>
+                       <li><a href="letters.html#LETTERS_DEFAULTS">5.11.3 
Default style for letters</a>
+                       <li><a href="letters.html#LETTERS_MACROS">5.11.4 The 
letter macros</a>
                </ul>
        </ul>
 <a name="QUICK"></a>




reply via email to

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