PAGE HEADERS, FOOTERS, AND PAGINATION
Because headers and footers are virtually identical, this documentation addresses itself only to headers. In all cases, unless otherwise noted, descriptions of headers describe footers as well.
Furthermore, any control macro that begins with HEADER_ may be used to control footers, simply by replacing HEADER_ with FOOTER_.
Author's note: Left to their own devices (i.e. if you're happy with the way mom does things by default), headers are something you never have to worry about. You can skip reading this section entirely. But if you want to change them, be advised that headers have more macros to control their appearance than any other document element. The text of this documentation becomes correspondingly dense at this point.
NOTE: While the single page number that mom generates in either the top or bottom margin above or below running text is technically a kind of header/footer, mom and this documentation treat it as a separate page element.
General description of headers/footers
Headers comprise three distinct parts: a left part, a centre part, and a right part. Each part contains text (a "string") that identifies some aspect of the document as a whole.
The left part ("header left") lines up with the document's left margin. The centre part ("header centre") is centred on the document's line length. The right part ("header right") lines up with the document's right margin. Not all parts need contain a string, and if you don't want headers at all, you can turn them off completely.
A note to groff experts: Although
mom's headers resemble the three-part titles generated
by .tl
, they're in no way related to it, nor based
upon it. .tl
is not used at all in mom.
Normally, mom fills headers with strings appropriate to the document type selected with DOCTYPE. 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.
By default, mom prints a horizontal rule beneath headers to separate them visually from running text. In the case of footers, the rule is above running text. You can increase or decrease the space between the header and the rule if you like (with HEADER_RULE_GAP), or remove it completely.
Default specs for headers/footers
Mom makes small type adjustments to each part of the header (left, centre, right) to achieve an aesthetically pleasing result. The defaults are listed below. (The strings mom puts by default in each part are explained in DOCTYPE.)
NOTE: Except for capitalization (all caps or caps/lower-case), these defaults apply only to PRINTSTYLE TYPESET.
TYPE SPEC HEADER LEFT HEADER CENTER HEADER RIGHT --------- ----------- ------------- ------------ Family document default document default document default Font roman italic roman Colour (black) (black) (black) All caps no no yes Size* -.5 (points) -.5 (points) -2 (points) (-2 if all caps) (-2 if all caps) (-.5 if not all caps) *Relative to the point size of type in paragraphsYou can, of course, change any of the defaults using the appropriate control macros. And should you wish to design headers from the ground up, mom has a special macro, HEADER_PLAIN, that removes all type adjustments to headers. The straightforward type specs for paragraphs are used instead, providing a simple reference point for any alterations you want to make to the family, font, size and capitalization style of any header part.
Vertical placement and spacing of headers/footers
As explained in the section on typesetting macros in document processing, the top and bottom margins of a mom document are the vertical start and end positions of running text, not the vertical positions of headers or footers, which, by definition, appear in the margins above (or below) running text.
The vertical placement of headers is controlled by the macro HEADER_MARGIN, which establishes the baseline position of headers relative to the top edge of the page. The header rule, whose position is relative to the header itself, is controlled by a separate macro. FOOTER_MARGIN establishes the baseline position of footers relative to the bottom edge of the page.
HEADER_GAP establishes the distance between headers and the start of running text (effectively making HEADER_MARGIN + HEADER_GAP the top margin of running text unless you give mom a literal top margin (with T_MARGIN), in which case she ignores HEADER_GAP and starts running text at whatever top margin you gave. FOOTER_GAP and B_MARGIN work similarly, except they determine where running text ends on the page. (See FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT! for a warning about possible conflicts between the footer margin and the bottom margin.)
Confused? Mom apologizes. It's really quite simple. By default, mom sets headers 4-1/2 picas down from the top of the page and starts running text 3 picas (the HEADER_GAP) beneath that, which means the effective top margin of running text is 7-1/2 picas (visually approx. 1 inch). If you give mom a literal top margin (with T_MARGIN), she ignores the HEADER_GAP and starts running text at whatever top margin you gave.
Footers are treated the same way, the only difference being the default distances. Mom sets footers 3 picas up from the bottom of the page, and interrupts the processing of running text 3 picas (the FOOTER_GAP) above that (again, visually approx. 1 inch). If you give mom a literal bottom margin (with B_MARGIN), she ignores the FOOTER_GAP and interrupts the processing of running text at whatever bottom margin you gave.
If mom is paginating your document (she does, by default, at the bottom of each page), the vertical spacing and placement of page numbers, whether at the top or the bottom of the page, is managed exactly as if the page numbers were headers (or footers), and are controlled by the same macros. See Pagination control.
The following are the basic macros for turning headers or footers on or off. They should be invoked prior to START.
By default, mom prints page headers. If you turn them off, she will begin running text on each page with a default top margin of 6 picas unless you have requested a different top margin (with T_MARGIN) prior to START.
Please note that headers and footers 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 you'd prefer footers in a document, you need only invoke FOOTERS; there's no need to turn headers off first.
Page headers are on by default. If you don't want them, turn them off by invoking HEADERS with any argument (OFF, QUIT, END, X...), e.g.
.HEADERS OFF
NOTE: HEADERS automatically disables footers (you can't have both), but not the page numbers that normally appear at the bottom of the page.
ADDITIONAL NOTE: If HEADERS are OFF, mom's normal top margin for running text (7.5 picas) changes to 6 picas (visually approx. 1 inch). This does NOT apply to the situation where footers have been explicitly turned on (with FOOTERS). Explicitly invoking footers moves page numbering to the top of the page, where its placement and spacing are the same as for headers. (I.e. the top margin of running text remains 7.5 picas.)
Page footers are off by default. If you want them instead of headers (you can't have both), turn them on by invoking FOOTERS without an argument, e.g.
.FOOTERS
FOOTERS automatically disables headers, and mom shifts the placement of page numbers from their normal position at page bottom to the top of the page.
NOTE: By default, when footers are on, mom does not print a page number on the first page of a document, nor on first pages after COLLATE. If you don't want this behaviour, you can change it with PAGENUM_ON_FIRST_PAGE.
If you invoke FOOTERS, mom, by default, does not print a footer on the first page of the document. (The docheader on page 1 makes it redundant.) However, should you wish a footer on page 1, invoke FOOTER_ON_FIRST_PAGE without any argument.
Say, for example, you want recto page headers to contain a document's author, centred, and verso page headers to contain the document's title, also centred, like this:
+------------------------+ +------------------------+ | Author | | Title | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +------------------------+ +------------------------+With mom's standard 3-part headers, this isn't possible, even when RECTO_VERSO is enabled. RECTO_VERSO switches the left and right parts of headers on alternate pages, but the centre part remains unchanged.
Any time you need distinctly different headers on alternate pages, mom has macros that let you manually design and determine what goes into headers on recto pages, and what goes into headers on verso pages. The macros are HEADER_RECTO and HEADER_VERSO. Both allow you to state whether the header is flush left, centred, or flush right, and both take a single string argument with which, by combining text and inline escapes, you can make the headers come out just about any way you want. Use of the \*[PAGE#] escape is permitted in the string argument (see Including the page number in header-left, -centre or -right), and as an added bonus, mom provides a special mechanism whereby it's possible to "pad" the string as well.
HEADER_RECTO and HEADER_VERSO behave identically, hence all references to HEADER_RECTO in this section also refer to HEADER_VERSO. Furthermore, FOOTER_ can be used instead of HEADER_ to set up recto/verso footers.
The first argument to HEADER_RECTO is the direction in which you want the header quadded. L, C and R may be used in place of LEFT, CENTER and RIGHT. The second argument is a string, surrounded by double-quotes, containing what you want in the header. HEADER_RECTO disables mom's normal 3-part headers, therefore anything you want in the headers must be entered by hand in the string, including colours (via the inline escape \*[<colorname>]).
By default, HEADER_RECTO is set at the same size, and in the same family and font, as paragraph text. The control macros HEADER_FAMILY and HEADER_SIZE may be used to change the default family and size. Changes to the font(s) within the string must be accomplished with the inline escapes \*[ROM], \*[IT], \*[BD], \*[BDI] and \*[PREV] (see Changing fonts). Additional refinements to the style of the header-recto string, including horizontal spacing and/or positioning, can also be made with inline escapes.
To include the current page number in the string, use the
\*[PAGE#] inline.
VERSO RECTO +------------------------+ +------------------------+ | Author Page# | | Page# Title | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +------------------------+ +------------------------+To pad the string argument passed to HEADER_RECTO, begin and end the string (inside the double-quotes) with the caret character (^). Enter the pound sign (#) at any point in the string where you want an equalized amount of whitespace inserted. (If you're unsure what padding is, see Insert space into lines.) Note that if you're padding the string, it doesn't matter what quad direction you give HEADER_RECTO since padding, by its nature, justifies text to the left and right margins.
The situation depicted above is accomplished like this:
.HEADER_RECTO LEFT "^\*[PAGE#]#Title^" .HEADER_VERSO LEFT "^Author#\*[PAGE#]^"Note that mom does not interpret the # in \*[PAGE#] as a padding marker (i.e. as a place to insert whitespace).
Also, notice that the argument LEFT is used in both cases. When padding a header, it doesn't matter whether you use LEFT, CENTER or RIGHT as the argument.
Furthermore, should you need a user-defined header of the sort provided by HEADER_RECTO and HEADER_VERSO but aren't actually printing recto/verso, you can use HEADER_RECTO to design the header that appears at the top of every page.
IMPORTANT: The PAD_MARKER macro, which changes the default pad marker (#) used by PAD, has no effect on the pad marker used in the HEADER_RECTO string. If you absolutely must have a literal pound sign in your HEADER_RECTO string, use the escape sequence for the pound sign (\[sh]) where you want the pound sign to go.
To change the text (the "string") of the left, centre, or right part of headers, invoke the appropriate macro above with the string you want. For example, mom, by default, prints the document's author in the header-left position. If your document has, say, two authors, and you want both their names to appear header-left, change HEADER_LEFT like this:
.HEADER_LEFT "R. Stallman, E. Raymond"Because the arguments to HEADER_LEFT, _CENTER, and _RIGHT are string arguments, they must be enclosed in double-quotes.
NOTE: Replace HEADER_, above,
with FOOTER_ to change the strings in footers.
*Padding the header/footer centre string
*Requires a unit of measure
By default, mom centres the header centre string literally on the line length in effect for page headers. In some cases, notably when the header left or header right strings are particularly long, the effect isn't pretty. The offendingly long header left or right crowds, or even overprints, the header centre. That's where HEADER_CENTER_PAD comes in. With a bit of experimentation (yes, you have to preview the document), you can use HEADER_CENTER_PAD to move the header centre string left or right until it looks acceptably centred between the two other strings.
For example, say your document is an outline for a novel called "By the Shores of Lake Attica." You've told mom you want
DOCTYPE
but when you preview your work, you see that "Outline", in the
centre of the page header, is uncomfortably close to the title,
which is to the right of it. By invoking
Most reassuring of all is that if you use
HEADER_CENTER_PAD conjunction with
RECTO_VERSO,
mom will pad the centre string appropriately left
OR right, depending on which page you're on, without you having to
tell her to do so.
As pointed out in the author's note in the introduction to
headers/footers, headers and footers are something you don't
normally have to worry much about. Mom usually
knows what to do.
However, situations do arise where you need to manipulate what goes
in the header/footer strings, setting and resetting them as you go
along. A case where you might want to do this would be if you want
to output endnotes at the end of each document in a series of
collated
documents, and you want the word "Endnotes" to go in the header
centre position of the endnotes, but want, say, the
TITLE
to go back into the centre position for the next output document.
In scenarios like the above, mom has a number of
"reserved" strings that you can plug into the
HEADER_LEFT, _CENTER and _RIGHT
macros. They are:
If you would like to have the current page number to appear
header-left, -center, or -right instead of a text
string, invoke the appropriate macro, above, with the single
argument
If you would like to include the current page number in
the string you pass to HEADER_LEFT, _CENTER, or
_RIGHT, use the special
inline escape
For example, say you have a document that's ten pages long, and
you want header-right to say "page <whichever> of 10",
invoke HEADER_RIGHT as follows:
The following macros allow you to make changes that affect all
parts of the header at once.
Please note that HEADER_FAMILY and
HEADER_FONT have no effect on
PRINTSTYLE TYPEWRITE.
By default, mom uses the default document family
for headers. If you would like her to use another
family
in headers, invoke HEADER_FAMILY with the identifier
for the family you want. The argument is the same as for the
typesetting macro
FAMILY.
NOTE: Replace HEADER_, above,
with FOOTER_ to change the footer family.
By default, mom makes small adjustments to the size
of each part of a header to achieve an aesthetically pleasing result.
If you'd like her to continue to do so, but would like the overall
appearance of headers to be a little smaller or a little larger,
invoke HEADER_SIZE with + or - the number of
points
(fractions allowed) by which you want her to in/decrease the size
of headers. For example,
See
Arguments to the control macros
for an explanation of how control macros ending in
_SIZE work.
NOTE: Replace HEADER_, above,
with FOOTER_ to change the footer size.
ADDITIONAL NOTE: Normally, macros that control headers have no
effect on
PRINTSTYLE TYPEWRITE.
HEADER_SIZE is an exception. While all parts of a
header in PRINTSTYLE TYPEWRITE are always the same
size, you can use HEADER_SIZE with PRINTSTYLE
TYPEWRITE to reduce the header's overall point size.
You'll most likely require this when the
COPYSTYLE
is DRAFT, since portions of the header may overprint
if, say, the title of your document is very long.
By default, mom makes adjustments to the font,
size, and capitalization style of each part of headers to achieve
an aesthetically pleasing look. Should you wish to design your own
headers from the ground up without worrying how changes to the various
elements of header style interact with mom's defaults,
invoke HEADER_PLAIN by itself, with no argument.
Mom will disable her default behaviour for headers,
and reset all elements of header style to the same family, font,
and point size as she uses in paragraphs.
NOTE: Replace HEADER_, above,
with FOOTER_ to disable mom's
default behaviour for the various elements of footer style.
If you want your headers in a colour different from the document
default (usually black), invoke HEADER_COLOR with
the name of a colour pre-defined (or "initialized") with
NEWCOLOR
or
XCOLOR.
HEADER_COLOR will set all the parts of the header
AND the header rule in the colour you give it as an argument. If
you wish finer control over colour in headers, you can use
HEADER_<POSITION>_COLOR
to colourize each part of the header separately, as well as
HEADER_RULE_COLOR
to change the colour of the header rule.
NOTE: Replace HEADER_, above,
with FOOTER_ to colourize footers.
NOTE: When using the following control macros,
replace "<POSITION>" by LEFT, CENTER,
or RIGHT as appropriate.
Use HEADER_<POSITION>_FAMILY to change the
family
of any part of headers. See
Arguments to the control macros
for an explanation of how control macros ending in
_FAMILY work.
NOTE: Replace HEADER_, above,
with FOOTER_ to change a footer part's family.
Use HEADER_<POSITION>_FONT to change the
font
of any part of headers. See
Arguments to the control macros
for an explanation of how control macros ending in
_FONT work.
NOTE: Replace HEADER_, above,
with FOOTER_ to change a footer part's font.
Use HEADER_<POSITION>_SIZE to change the size of any
part of headers (relative to the point size of type in
paragraphs). See
Arguments to the control macros
for an explanation of how control macros ending in
_SIZE work.
NOTE: Replace HEADER_, above,
with FOOTER_ to change a footer part's size.
HEADER_<POSITION>_CAPS is a
toggle macro.
If you want any part of headers to be set in all caps,
regardless of the capitalization of that part's string as given
to the
reference macros
or as defined by you with the
header string control macros,
simply invoke this macro (using the appropriate position) with no
argument. If you wish to turn capitalization off (say, for the
header-right string that mom capitalizes by
default), invoke the argument with any argument (e.g. OFF,
QUIT, END, X...).
NOTE: Replace HEADER_, above,
with FOOTER_ to change a footer part's
capitalization style.
HEADER_<POSITION>_COLOR allows you to set a
colour for each of the three possible parts of a page header
separately. For example, say you want the right part of the header
(by default, the document title) in red, this is how you'd get it:
Remember that you have to define (or "initialize") a
colour with
NEWCOLOR
or
XCOLOR
before you can use the colour.
If you create a
user-defined header
with
HEADER_RECTO
or
HEADER_VERSO,
and you want various elements within the header to be colourized,
embed the colours in the string passed to HEADER_RECTO
or HEADER_VERSO with the
\*[<colorname>]
inline escape.
NOTE: Replace HEADER_, above,
with FOOTER_ to set the colours for the various
elements of footers.
See
Vertical placement and spacing of headers/footers
for an explanation of how mom deals with
headers, footers, and top/bottom page margins.
Use HEADER_MARGIN to set the distance from the
top edge of the page to the
baseline
of type in headers. A unit of measure is required, and decimal
fractions are allowed.
Mom's default header margin is 4-1/2
picas,
but if you want a different margin, say, 1/2-inch, do
Mom's default footer margin is 3
picas.
FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT!
Mom requires a footer margin for proper operation,
hence she sets one, even if you don't. (As stated above, her default
footer margin is 3-picas).
If you set a bottom margin for your document (with
B_MARGIN,
prior to
START)
and the margin's too close to mom's default
footer margin (or a footer margin you set yourself
with FOOTER_MARGIN), mom will
not print your footers; additionally, she'll give you a warning
and some advice on standard error. When this happens, you must
reset either B_MARGIN or
FOOTER_MARGIN so there's an adequate amount of
space for mom to print the bottom line of running
text and the footer.
If you see the warning even when footers and/or bottom-of-page page
numbering are disabled, set a nominal footer margin of 0 prior to
START,
as in these examples.
Example 1
By default, page numbers appear at the bottom of the page, therefore
if you want the default position (bottom), but want to change the
baseline placement, use FOOTER_MARGIN. Conversely,
if page numbers are at the top of the page, either because you turned
FOOTERS
on or because you instructed mom to put them
there with
PAGENUM_POS,
you'd use HEADER_MARGIN to change their
baseline placement.
Use HEADER_GAP to set the distance from the
baseline
of type in headers to the start of
running text.
A unit of measure is required, and decimal fractions are allowed.
As explained in
Vertical placement and spacing of headers/footers,
HEADER_MARGIN + HEADER_GAP determine the
default vertical starting position of running text on the page
UNLESS you have given mom your own top margin
(with
T_MARGIN). If you give
a top margin, mom ignores
HEADER_GAP; running text starts at your stated
top margin.
Mom's default header gap is 3
picas,
but if you want a different gap, say, 2 centimetres, do
As explained in
Vertical placement and spacing of headers/footers,
FOOTER_MARGIN + FOOTER_GAP determine the
default vertical end position of running text on the page
UNLESS you have given mom a bottom margin
(with
B_MARGIN). If you give
a bottom margin, mom ignores
FOOTER_GAP; running text ends at your stated
bottom margin.
Mom's default footer gap is 3
picas.
NOTE: Mom uses
HEADER_GAP and
FOOTER_GAP to establish the start and end baseline
positions of running text with respect to both headers and footers
AND page numbers. If you wish to change the gap between
the last line of running text and a bottom page number, use
FOOTER_GAP. If page numbers are at the top of the
page, change the gap between the number and the first line of running
text with HEADER_GAP.
The header/footer separator rule is a modest horizontal rule,
set slightly below the header (or above the footer), that runs
the length of the
header
and helps separate it visually from
running text. If
you don't want the rule, you can turn it off. If you want it,
but at a different vertical position relative to the header (or
footer), you can alter its placement.
By default, mom prints a header separator rule
underneath headers (or above footers). If you don't want the
rule, turn it off by invoking HEADER_RULE with any
argument (OFF, QUIT, END, X...), e.g.
NOTE: Replace HEADER_, above,
with FOOTER_ to enable/disable the printing of
the footer separator rule. (Most likely, if you're using
FOOTERS, you'll want it off.)
HEADER_RULE_GAP is the distance from the
baseline
of type in headers to the rule underneath. A unit of measure is
required, and decimal fractions are allowed. Please note that
HEADER_RULE_GAP has no effect on
HEADER_GAP
(i.e. HEADER_RULE_GAP is NOT added to
HEADER_GAP when mom calculates
the space between headers and the start of
running text).
By default, the header rule gap is 4
points.
If you'd like to change it to, say, 1/4
em, do
ADDITIONAL NOTE: When using
FOOTER_RECTO
and
FOOTER_VERSO,
make sure that the default size for footers
(FOOTER_SIZE)
is set to the largest size of type that will be used in the
footer or mom may not get the rule gap right.
Inline changes to the size of type in
FOOTER_RECTO and FOOTER_VERSO
should always be negative (smaller) than the default.
If you wish to change the colour of the header rule, invoke
HEADER_RULE_COLOR with the name of a colour
pre-defined (or "initialized") with
NEWCOLOR
or
XCOLOR.
Please note that HEADER_RULE_COLOR overrides the
colour set with
HDRFTR_COLOR,
so that it's possible to have the heads entirely in, say, blue (set
with HEADER_COLOR), and the header rule in, say,
red.
NOTE: Replace HEADER_, above,
with FOOTER_ to change the colour of the footer
rule.
By default, mom paginates documents. Page numbers
appear in the bottom margin of the page, centred between two hyphens.
As with all elements of mom's document processing,
most aspects of pagination style can be altered to suit your taste
with control macros.
By default, mom paginates documents (in the bottom
margin). If you'd prefer she not paginate, turn pagination off
by invoking PAGINATE with any argument (OFF,
NO, QUIT, END, X...), e.g.
As is to be expected, pagination of documents begins at page 1.
If you'd prefer that mom begin with a different
number on the first page of a document, invoke
PAGENUMBER with the number you want.
PAGENUMBER need not be used only to give
mom a "first page" number. It can be used at
any time to tell mom what number you want a
page to have. Subsequent page numbers will, of course, be
incremented by 1 from that number.
PAGENUM_STYLE lets you tell
mom what kind of page numbering you want.
This macro applies only if you've enabled
FOOTERS.
If FOOTERS are on, mom automatically
places page numbers at the tops of pages except on
the first page of a document (or on first pages after
COLLATE). If you'd
like the page number to appear on "first" pages when
footers are on, invoke PAGENUM_ON_FIRST_PAGE with
no argument. Any other argument turns the feature off (OFF,
QUIT, END, X...).
As with most of the control macros,
PAGENUM_ON_FIRST_PAGE can be invoked at any time,
meaning that if you don't want a page number on the very first
page of a document, but do want one on pages that appear after
COLLATE, omit it before the first
START
of the document, then invoke it either just before or after your
first COLLATE.
Sometimes, in
COPYSTYLE DRAFT,
the CENTER part of page headers gets overcrowded because of the draft
and revision information that go there by default.
DRAFT_WITH_PAGENUMBER is one way to
fix the problem.
Invoked without an argument, DRAFT_WITH_PAGENUMBER
removes draft/revision information from the page headers and attaches
it instead to the document's page numbering, in the form
See
Arguments to the control macros.
Use PAGENUM_POS to change the default position of
automatic page numbering. PAGENUM_POS requires
two arguments: a vertical position (TOP or BOTTOM) and a
horizontal position (LEFT or CENTER or RIGHT).
For example, if you turn both
headers
and
footers
off (with
By default, mom encloses page numbers between hyphens.
If you don't want this behaviour, invoke the macro
PAGENUM_HYPHENS with any argument (OFF, QUIT, END, X...),
like this:
.HEADER_CENTER_PAD RIGHT 3P
you can scoot the word "Outline" over three
picas
to the left (the padding's added to the right of the string)
so that your head looks nicely spaced out. Invoking
HEADER_CENTER_PAD with the LEFT
argument obviously puts the padding on the left side of the string.
Using mom's "reserved" strings in header/footer definitions
\*[$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,
if invoked, otherwise, "Chapter"
\*[$CHAPTER] -- the argument (typically a number) passed
to .CHAPTER
\*[$CHAPTER_TITLE] -- the argument passed to .CHAPTER_TITLE
Returning to the scenario above, first, you'd define a centre
string for the endnotes page:
.HEADER_CENTER "Endnotes"
Then, you'd output the endnotes:
.ENDNOTES
Then, you'd prepare mom for the next document:
.COLLATE
.TITLE "New Doc Title"
.AUTHOR "Josephine Blough"
Then, you'd redefine the header centre string using the reserved
string \*[$TITLE], like this:
.HEADER_CENTER "\*[$TITLE]"
And last, you'd do:
.START
Voilą! Any argument you pass to TITLE from here
on in (say, for subsequent documents) is back in the header centre
position. Here's the whole routine again:
.HEADER_CENTER "Endnotes"
.ENDNOTES
.COLLATE
.TITLE "New Doc Title"
.AUTHOR "Josephine Blough"
.HEADER_CENTER "\*[$TITLE]"
.START
If need be, you can concatenate the strings, as in the following
example.
.HEADER_CENTER "\*[$CHAPTER_STRING] \*[$CHAPTER]"
which, assuming a .CHAPTER_STRING of
"Chapter" and a .CHAPTER of
"2", would put "Chapter 2" in the header centre
position.
*Replacing header-left, -CENTER or -right with the page number
#
(the "number" or
"pound" sign). Do NOT use
double-quotes. For example,
.HEADER_CENTER #
will print the current page number in the CENTER part of
headers.
*Including the page number in header-left, -CENTER or -right
\*[PAGE#]
in the string argument.
.HEADER_RIGHT "page \*[PAGE#] of 10"
Header-right of page two will read "page 2 of 10",
header-right of page three will read "page 3 of 10",
and so on.
Header/footer style
.HEADER_SIZE +.75
increases the size of every part of a header by 3/4 of a point while
respecting mom's own little size changes.
.HEADER_RIGHT_COLOR red
The other parts of the header will be in the default header colour
(usually black, but that can be changed with
HEADER_COLOR).
Header/footer vertical placement and spacing
*Requires a unit of measure
.HEADER_MARGIN .5i
If your document uses
footers,
replace HEADER_, above, with
FOOTER_. The argument to
FOOTER_MARGIN is the distance from the bottom
edge of the page to the baseline of type in footers.
<reference macros, etc>
.PAGINATION OFF
.B_MARGIN .25i
.FOOTER_MARGIN O
.START
Example 2
<reference macros, etc>
.HEADERS OFF
.PAGENUM_POS TOP RIGHT
.B_MARGIN .25i
.FOOTER_MARGIN O
.START
A note on header/footer margins and page numbering
Mom uses HEADER_MARGIN and
FOOTER_MARGIN to establish the baseline
position of page numbers in addition to the baseline position of
headers and footers.
*Requires a unit of measure
.HEADER_GAP 2c
If your document uses
footers,
replace HEADER_, above, with
FOOTER_. The argument to
FOOTER_GAP is the distance from the
baseline of type in footers to the last baseline of running text
on the page.
Header/footer separator rule
.HEADER_RULE OFF
To turn the rule (back) on, invoke HEADER_RULE
without any argument.
*Requires a unit of measure
.HEADER_RULE_GAP .25m
NOTE: Replace HEADER_, above,
with FOOTER_ if you're using
footers
and want to change the separator rule gap. In footers, the gap
is measured from the top of the tallest
ascender
in the footer.
Pagination
Alias: PAGINATION
.PAGINATE NO
To (re)start pagination, invoke PAGINATE
without any argument.
DIGIT = Arabic digits (1, 2, 3...)
ROMAN = upper case roman numerals (I, II, III...)
roman = lower case roman numerals (i, ii, iii...)
ALPHA = upper case letters (A, B, C...)
alpha = lower case letters (a, b, c...)
Draft #, Rev. # / <pagenumber>
See the note in
COPYSTYLE DRAFT
for other ways of dealing with crowded page headers when formatting
draft-style copy.
Pagination control macros
1. Page number family/font/size/colour
.PAGENUM_FAMILY default = prevailing document family; default is Times Roman
.PAGENUM_FONT default = roman
.PAGENUM_SIZE default = 0 (i.e. same size as paragraph text)
.PAGENUM_COLOR default= black
2. Page number position
.HEADERS OFF
and .FOOTERS
OFF
) and you want mom to number your
pages at the top right position, enter
.PAGENUM_POS TOP RIGHT
3. Enclose page numbers with hyphens (on or off)
.PAGENUM_HYPHENS OFF
If, for some reason, you want to turn page number hyphens back
on, invoke the macro without an argument.
Next
Prev
Top
Back to Table of Contents