rectoverso.html#TOP
Next
docelement.html#TOP
Prev
toc.html
Back to Table of Contents
DOCUMENT HEADERS, FOOTERS, AND PAGINATION
#HEADFOOTPAGE_INTRO
Introduction -- VERY IMPORTANT; read me!
#PAGINATION_NOTE
An important note on pagination
#DESCRIPTION_GENERAL
General description of headers/footers
#HEADER_STYLE
Default specs for headers/footers
#VERTICAL_SPACING
Vertical placement and spacing of headers/footers
#HEADFOOT_MANAGEMENT
Managing headers/footers
#HEADERS
HEADERS
-- on or off
#FOOTERS
FOOTERS
-- on or off
#FOOTER_ON_FIRST_PAGE
FOOTER_ON_FIRST_PAGE
#USERDEF_HDRFTR
User-defined, single string recto/verso headers/footers
#USERDEF_HDRFTR_INTRO
Introduction
#HDRFTR_RECTOVERSO
HEADER_RECTO, HEADER_VERSO
#HEADFOOT_CONTROL
Control macros for headers/footers
#HDRFTR_STRINGS
Header/footer strings
#HDRFTR_STYLE
Header/footer style
#HDRFTR_STYLE_GLOBAL
Global style control
#HDRFTR_STYLE_PART
Part-by-part style control
#HDRFTR_VERTICAL
Vertical placement and spacing of headers/footers
#HDRFTR_MARGIN
HEADER_MARGIN
#HDRFTR_GAP
HEADER_GAP
#HDRFTR_SEPARATOR
The header/footer separator rule
#HDRFTR_RULE
HEADER_RULE
-- on or off
#HDRFTR_RULE_GAP
HEADER_RULE_GAP
-- distance of rule from header/footer
#PAGINATION
Pagination
#INDEX_PAGINATION
Pagination control macros
Introduction
definitions.html#TERMS_HEADER
Headers
and
definitions.html#TERMS_FOOTER
footers
,
as defined in the section
definitions.html#TERMS_MOM
Mom's Document Processing Terms
,
are those parts of a document that contain information about the document
itself which appear in the margins either above or below
definitions.html#TERMS_RUNNING
running text
.
They are, in all respects but two, identical.  The differences are:
headers appear in the margin
above
running text while
footers appear in the margin
beneath
running text;
the (optional) rule that separates headers from running
text appears
below
the header while
the (optional) rule that separates footers from running
text appears
above
the footer.
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
definitions.html#TERMS_CONTROLMACRO
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 center 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 center part ("header center") is
centered 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
docprocessing.html#DOCTYPE
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 capitalisation 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
#HDRFTR_RULE_GAP
HEADER_RULE_GAP
),
or remove it completely.
Default specs for headers/footers
Mom
makes small type adjustments to each part of
the header (left, center, right) to achieve an aesthetically
pleasing result.  The defaults are listed below.  (The strings
mom
puts by default in each part are explained in
docprocessing.html#DOCTYPE
DOCTYPE
.)
NOTE:
Except for capitalization (all caps or
caps/lower-case), these defaults apply only to
docprocessing.html#PRINTSTYLE
PRINTSTYLE TYPESET
.
TYPE SPEC    HEADER LEFT         HEADER CENTER       HEADER RIGHT
---------    -----------         -------------       ------------
Family       document default    document default    document default
Font         roman               italic              roman
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 paragraphs
You 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,
#HDRFTR_PLAIN
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 capitalisation style of any header part.
Vertical placement and spacing of headers/footers
As explained in the section on
typedocmac.html
typesetting macros in document processing
,
the top and bottom margins of a
mom
document
are the vertical start and end positions of
definitions.html#TERMS_RUNNING
running text
,
not the vertical positions of headers or footers, which, by definition,
appear in the margin
above
(or below) running text.
The vertical placement of headers
is controlled by the macro
#HDRFTR_MARGIN
HEADER_MARGIN
,
which establishes the
definitions.html
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.
#HDRFTR_GAP
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
typesetting.html#T_MARGIN
T_MARGIN
),
in which case she ignores
HEADER_GAP
and starts
running text at whatever top margin you gave.
FOOTER_GAP
and
typesetting.html#B_MARGIN
B_MARGIN
work similarly, except they determine where running text
ends
on the page.
Confused?
Mom
apologizes.  It's really quite
simple.  By default,
mom
sets headers 4-1/2
definitions.html#TERMS_PICASPOINTS
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
typesetting.html#T_MARGIN
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
typesetting.html#B_MARGIN
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
Pagination control
.
Managing headers/footers
The following are the basic macros for turning
definitions.html#TERMS_HEADER
headers
or
definitions.html#TERMS_FOOTER
footers
on or off.  They should be invoked prior to
docprocessing.html#START
START
.
By default,
mom
prints page headers.  If you turn
them off, she will begin
definitions.html#TERMS_RUNNING
running text
on each page with a default top margin of 6
definitions.html#TERMS_PICASPOINTS
picas
unless you have requested a different top margin (with
typesetting.html#T_MARGIN
T_MARGIN
)
prior to
docprocessing.html#START
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
FOOTERS
;
there's no need to turn headers off first.
Macro:
HEADERS
toggle
definitions.html#TERMS_HEADER
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
definitions.html#TERMS_FOOTER
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
definitions.html#TERMS_RUNNING
running text
(7.5
definitions.html#TERMS_PICASPOINTS
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
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.)
Macro:
FOOTERS
toggle
definitions.html#TERMS_FOOTER
Page footers
are off by default.  If you want them instead of
definitions.html#TERMS_HEADER
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
rectoverso.html#COLLATE
COLLATE
.
If you don't want this behaviour, you can change it with
#PAGENUM_ON_FIRST_PAGE
PAGENUM_ON_FIRST_PAGE
.
Macro:
FOOTER_ON_FIRST_PAGE
toggle
If you invoke
#FOOTERS
FOOTERS
,
mom
, by default, does not print a footer on the
first page of the document.  (The
definitions.html
docheader
on page makes it redundant.)  However, should you wish a footer on
page 1, invoke
FOOTER_ON_FIRST_PAGE
without any argument.
User-defined, single string recto/verso headers/footers
Introduction
Sometimes, you'll find you can't get
mom
's handling
of 3-part headers or footers to do exactly what you want in the
order you want.  This is most likely happen when you want the
information contained in the headers/footers split over two pages,
as is often the case with recto/verso documents.
Say, for example, you want recto page headers to contain a document's
author, centered, and verso page headers to contain the document's
title, also centered, like this:
+------------------------+   +------------------------+
|         Author         |   |         Title          |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
|                        |   |                        |
+------------------------+   +------------------------+
With
mom
's standard 3-part headers, this isn't
possible, even when
rectoverso.html#RECTO_VERSO
RECTO_VERSO
is enabled.
RECTO_VERSO
switches the left and
right parts of headers on alternate pages, but the center
part remains unchanged.
Anytime 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
#HDRFTR_RECTO
HEADER_RECTO
and
#HDRFTR_VERSO
HEADER_VERSO
.
Both allow you to state whether the header is flush left, centered,
or flush right, and both take a single
definitions.html#TERMS_STRINGARGUMENT
string argument
with which, by combining text and
definitions.html#TERMS_INLINES
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
#PAGE_NUMBER_INCL
Including the page number in header-left, -center or -right
),
and
mom
provides a special mechanism whereby
it's possible to "pad" it as well.
Macro:
HEADER_RECTO
LEFT | CENTER | RIGHT "<header recto string>"
Macro:
HEADER_VERSO
LEFT | CENTER | RIGHT "<header verso string>"
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
definitions.html#TERMS_QUAD
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.
By default,
HEADER_RECTO
is set at the same
size, and in the same family and font, as paragraph text.  The
control macros
#HDRFTR_GLOBAL_FAMILY
HEADER_FAMILY
and
#HDRFTR_GLOBAL_SIZE
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
definitions.html#TERMS_INLINES
inline escapes
\*[ROM], \*[IT], \*[BD], \*[BDI]
and
\*[PREV]
(see
inlines.html#INLINE_FONTS_MOM
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.
Padding the HEADER_RECTO/HEADER_VERSO string
You can "pad" the header-recto string, a convenience you'll
appreciate in circumstances such as the following.
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
goodies.html#PAD
Insert space into lines
.)
Note that if you're padding the string, it doesn't matter what
quad direction you give
HEADER_RECTO
.
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).
IMPORTANT:
The
goodies.html#PAD_MARKER
PAD_MARKER
macro, which changes the default pad marker (
#
) used by
goodies.html#PAD
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
\N'35'
where you want
the pound sign to go.
Control macros for headers/footers
Virtually every part of headers (see the paragraph on how
#HEADERFOOTER
"headers" means "footers"
in the
#HEADFOOTPAGE_INTRO
introduction to headers/footers
)
can be designed to your own specifications.
Header/footer control macros
#HDRFTR_STRINGS
STRINGS
#HDRFTR_LEFT
HEADER_LEFT
#HDRFTR_CENTER
HEADER_CENTER
#HDRFTR_RIGHT
HEADER_RIGHT
#PAGE_NUMBER_SYMBOL
Replacing header left, center or right with the page number
#PAGE_NUMBER_INCL
Including the  page number in header left, center or right
#HDRFTR_STYLE
STYLE
#HDRFTR_STYLE_GLOBAL
Global changes
#HDRFTR_GLOBAL_FAMILY
HEADER_FAMILY
-- family for entire header
#HDRFTR_GLOBAL_SIZE
HEADER_SIZE
-- size for entire header
HDRFTR_PLAIN
HDRFTR_PLAIN
-- disable default adjustments to header parts
#HDRFTR_STYLE_PART
Part-by-part changes
#_FAMILY
_FAMILY
-- left, center or right family
#_FONT
_FONT
-- left, center or right font
#_SIZE
_SIZE
-- left, center or right size
#_CAPS
_CAPS
-- left, center or right all caps
#HDRFTR_VERTICAL
VERTICAL PLACEMENT AND SPACING
#HDRFTR_MARGIN
HEADER_MARGIN
#HDRFTR_GAP
HEADER_GAP
#HDRFTR_SEPARATOR
SEPARATOR RULE
#HDRFTR_RULE
HEADER_RULE
#HDRFTR_RULE_GAP
HEADER_RULE_GAP
Header/footer strings
Macro:
HEADER_LEFT
"<text of header left>" | #
Macro:
HEADER_CENTER
"<text of header center>" | #
Macro:
HEADER_RIGHT
"<text of header right>" | #
To change the text (the "string") of the left, center,
or right part of headers, invoke the appopriate 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
definitions.html#TERMS_STRINGARGUMENT
string arguments
,
they must be enclosed in double-quotes.
NOTE:
Replace
HEADER_
, above,
with
FOOTER_
to change the strings in footers.
Replacing header-left, -center or -right with the page number
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
#
(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
If you would like to
include
the current page number in
the string you pass to
HEADER_LEFT, _CENTER,
or
_RIGHT
, use the special
definitions.html#TERMS_INLINES
inline escape
\*[PAGE#]
in the string argument.
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:
.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
Global changes
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
docprocessing.html#PRINTSTYLE
PRINTSTYLE TYPEWRITE
.
#HDRFTR_GLOBAL_FAMILY
HEADER_FAMILY
#HDRFTR_GLOBAL_SIZE
HEADER_SIZE
#HDRFTR_PLAIN
HEADER_PLAIN
Macro:
HEADER_FAMILY
<family>
By default,
mom
uses the default document family
for headers.  If you would like her to use another
definitions.html#TERMS_FAMILY
family
in headers, invoke
HEADER_FAMILY
with the identifier
for the family you want.  The argument is the same as for the
typesetting macro
typesetting.html#FAMILY
FAMILY
.
NOTE:
Replace
HEADER_
, above,
with
FOOTER_
to change the footer family.
Macro:
HEADER_SIZE
<+|-number of points>
*Argument is relative to the point size of type in paragraphs
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
definitions.html#TERMS_PICASPOINTS
points
(fractions allowed) by which you want her to in/decrease the size
of headers.  For example,
.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.
See
docelement.html#CONTROL_MACRO_ARGS
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
docprocessing.html#PRINTSTYLE
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
docprocessing.html#COPYSTYLE
COPYSTYLE
is
DRAFT
, since portions of the header may overprint
if, say, the title of your document is very long.
Macro:
HEADER_PLAIN
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.
Part by part changes
NOTE:
When using the following control macros,
replace "<POSITION>" by
LEFT, CENTER,
or
RIGHT
as appropriate.
#_FAMILY
HEADER_<POSITION>_FAMILY
#_FONT
HEADER_<POSITION>_FONT
#_SIZE
HEADER_<POSITION>_SIZE
#_CAPS
HEADER_<POSITION>_CAPS
Macro:
HEADER_<POSITION>_FAMILY
<family>
Use
HEADER_<POSITION>_FAMILY
to change the
definitions.html#TERMS_FAMILY
family
of any part of headers.  See
docelement.html#CONTROL_MACRO_ARGS
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.
Macro:
HEADER_<POSITION>_FONT
<font>
Use
HEADER_<POSITION>_FONT
to change the
definitions.html#TERMS_FONT
font
of any part of headers.  See
docelement.html#CONTROL_MACRO_ARGS
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.
Macro:
HEADER_<POSITION>_SIZE
<+|-number of points>
Use
HEADER_<POSITION>_SIZE
to change the size of any
part of headers (relative to the point size of type in
paragraphs).  See
docelement.html#CONTROL_MACRO_ARGS
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.
Macro:
HEADER_<POSITION>_CAPS
toggle
HEADER_<POSITION>_CAPS
is a
definitions.html#TERMS_TOGGLE
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
docprocessing.html#REFERENCE_MACROS
reference macros
or as defined by you with the
#HDRFTR_STRINGS
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/footer vertical placement and spacing
See
#VERTICAL_SPACING
Vertical placement and spacing of headers/footers
for an explanation of how
mom
deals with
headers, footers, and top/bottom page margins.
Macro:
HEADER_MARGIN
<distance to baseline of header>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
Use
HEADER_MARGIN
to set the distance from the
top edge of the page to the
definitions.html#TERMS_BASELINE
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
definitions.html#TERMS_PICASPOINTS
picas
,
but if you want a different margin, say, 1/2-inch, do
.HEADER_MARGIN .5i
If your document uses
definitions.html#TERMS_FOOTER
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.
Mom
's default footer margin is 3
definitions.html#TERMS_PICASPOINTS
picas
.
NOTE:
Mom
uses
HEADER_MARGIN
and
FOOTER_MARGIN
to establish the baseline
position of page numbers in addition to headers and footers.
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
FOOTERS
on or because you instructed
mom
to put them
there with
#PAGENUM_POS
PAGENUM_POS
,
you'd use
HEADER_MARGIN
to change their
baseline placement.
Macro:
HEADER_GAP
<distance from header to start of running text>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
Use
HEADER_GAP
to set the distance from the
definitions.html#TERMS_BASELINE
baseline
of type in headers to the start of
definitions.html#TERMS_RUNNING
running text
.
A unit of measure is required, and decimal fractions are allowed.
As explained in
#VERTICAL_SPACING
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
typesetting.html#T_MARGIN
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
definitions.html#TERMS_PICASPOINTS
picas
,
but if you want a different gap, say, 2 centimeters, do
.HEADER_GAP 2c
If your document uses
definitions.html#TERMS_FOOTER
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.
As explained in
#VERTICAL_SPACING
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
typesetting.html#B_MARGIN
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
definitions.html#TERMS_PICASPOINTS
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
.
Header/footer separator rule
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
definitions.html#TERMS_HEADER
header
and helps separate it visually from
definitions.html#TERMS_RUNNING
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.
#HDRFTR_RULE
HEADER_RULE
-- on or off
#HDRFTR_RULE_GAP
HEADER_RULE_GAP
-- distance of rule from header
Macro:
HEADER_RULE
toggle
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.
.HEADER_RULE OFF
To turn the rule (back) on, invoke
HEADER_RULE
without any argument.
NOTE:
Replace
HEADER_
, above,
with
FOOTER_
to enable/disable the printing of
the footer separator rule.  (Most likely, if you're using
#FOOTERS
FOOTERS
, you'll want it off.)
Macro:
HEADER_RULE_GAP
distance of rule beneath header
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
HEADER_RULE_GAP
is the distance from the
definitions.html#TERMS_BASELINE
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
HEADER_GAP
(i.e.
HEADER_RULE_GAP
is NOT added to
HEADER_GAP
when
mom
calculates
the space between headers and the start of
definitions.html#TERMS_RUNNING
running text
.
By default, the header rule gap is 4
definitions.html#TERMS_PICASPOINTS
points
.
If you'd like to change it to, say, 1/4
definitions.html#TERMS_EM
em
, do
.HEADER_RULE_GAP .25m
NOTE:
Replace
HEADER_
, above,
with
FOOTER_
if you're using
definitions.html#TERMS_FOOTER
footers
and want to change the separator rule gap.  In footers, the gap
is measured from the top of the tallest
definitions.html#TERMS_ASCENDER
ascender
in the footer.
ADDITIONAL NOTE:
When using
#HDRFTR_RECTOVERSO
FOOTER_RECTO
and
#HDRFTR_RECTOVERSO
FOOTER_VERSO
,
make sure that the default size for footers
(
#FOOTER_GLOBAL_SIZE
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.
Pagination
By default,
mom
paginates documents.  Page numbers
appear in the bottom margin of the page, centered 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.
Pagination macros list
#PAGINATE
PAGINATE
-- pagination on or off
#PAGENUMBER
PAGENUMBER
-- user-defined (starting) page number
#PAGENUM_STYLE
PAGENUM_STYLE
-- digits, roman numerals, etc
#PAGENUM_ON_FIRST_PAGE
PAGENUM_ON_FIRST_PAGE
-- applies only when footers are enabled
#DRAFT_WITH_PAGENUMBER
DRAFT_WITH_PAGENUMBER
-- attach draft/revision information to page numbers
#PAGINATE_CONTROL
Control macros
Macro:
PAGINATE
toggle
Alias:
PAGINATION
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.
.PAGINATE NO
To (re)start pagination, invoke
PAGINATE
without any argument.
Macro:
PAGENUMBER
<number>
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.
Macro:
PAGENUM_STYLE
DIGIT | ROMAN | roman | ALPHA | alpha
PAGENUM_STYLE
lets you tell
mom
what kind of page numbering you want.
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...)
Macro:
PAGENUM_ON_FIRST_PAGE
toggle
This macro applies only if you've enabled
#FOOTERS
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
rectoverso.html#COLLATE
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
definitions.html#TERMS_CONTROLMACRO
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
docprocessing.html#START
START
of the document, then invoke it either just before or after your
first
COLLATE
.
Macro:
DRAFT_WITH_PAGENUMBER
Sometimes, in
docprocessing.html#COPYSTYLE
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
Draft #, Rev. # / <pagenumber>
See the note in
docprocessing.html#COPYSTYLE
COPYSTYLE DRAFT
for other ways of dealing with crowded page headers when formatting
draft-style copy.
Pagination control macros
#PAGINATE_GENERAL
Family/font/size
#PAGENUM_POS
Page number position (vertical and horizontal)
#PAGENUM_HYPHENS
Enclose page numbers with hyphens (on or off)
1. Page number family/font/size
See
#CONTROL_MACRO_ARGS
Arguments to the control macros
.
.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)
2. Page number position
Macro:
PAGENUM_POS
TOP | BOTTOM  LEFT | CENTER | RIGHT
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
definitions.html#TERMS_HEADER
headers
and
definitions.html#TERMS_FOOTER
footers
off (with
.HEADERS OFF
and
.FOOTERS
OFF
mom
to number your
pages at the top right position, enter
.PAGENUM_POS TOP RIGHT
3. Enclose page numbers with hyphens (on or off)
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:
.PAGENUM_HYPHENS OFF
If, for some reason, you want to turn page number hyphens back
on, invoke the macro without an argument.
rectoverso.html#TOP
Next
docelement.html#TOP
Prev
#TOP
Top
toc.html
Back to Table of Contents
