/contrib/groff/contrib/mom/momdoc/headfootpage.html
HTML | 1636 lines | 1482 code | 134 blank | 20 comment | 0 complexity | a07f4627a094412bb58d979b541d9bc4 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, LGPL-2.0, LGPL-2.1, BSD-2-Clause, 0BSD, JSON, AGPL-1.0, GPL-2.0
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <title>Mom -- Document processing: headers, footers and pagination</title>
- </head>
- <body bgcolor="#dfdfdf">
- <!====================================================================>
- <a href="rectoverso.html#TOP">Next</a>
- <a href="docelement.html#TOP">Prev</a>
- <a href="toc.html">Back to Table of Contents</a>
- <p>
- <a name="TOP"></a>
- <a name="HEADFOOTPAGE">
- <h1 align="center"><u>PAGE HEADERS, FOOTERS, AND PAGINATION</u></h1>
- </a>
- <ul>
- <li><a href="#HEADFOOTPAGE_INTRO">Introduction -- VERY IMPORTANT; read me!</a>
- <ul>
- <li><a href="#PAGINATION_NOTE">An important note on pagination</a>
- </ul>
- <li><a href="#DESCRIPTION_GENERAL">General description of headers/footers</a>
- <li><a href="#HEADER_STYLE">Default specs for headers/footers</a>
- <li><a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>
- <li><a href="#HEADFOOT_MANAGEMENT">Managing headers/footers</a> -- see also <a href="#HEADFOOT_TOC">Control macros for headers/footers</a>
- <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>
- </ul>
- </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 "reserved" strings in header/footer definitions</a>
- </ul>
- <li><a href="#HDRFTR_STYLE">Header/footer style</a>
- <ul>
- <li><a href="#HDRFTR_STYLE_GLOBAL">Global style control</a>
- <li><a href="#HDRFTR_STYLE_PART">Part-by-part style control</a>
- </ul>
- <li><a href="#HDRFTR_VERTICAL">Vertical placement and spacing of headers/footers</a>
- <ul>
- <li><a href="#HDRFTR_MARGIN">HEADER_MARGIN</a>
- <li><a href="#HDRFTR_GAP">HEADER_GAP</a>
- </ul>
- <li><a href="#HDRFTR_SEPARATOR">The header/footer separator rule</a>
- <ul>
- <li><a href="#HDRFTR_RULE">HEADER_RULE</a> -- on or off
- <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> -- distance of rule from header/footer
- <li><a href="#HDRFTR_RULE_COLOR">HEADER_RULE_COLOR</a> -- colour of the header/footer rule
- </ul>
- </ul>
- <li><a href="#PAGINATION">Pagination</a>
- <ul>
- <li><a href="#INDEX_PAGINATION">Pagination control macros</a>
- </ul>
- </ul>
- <a name="HEADFOOTPAGE_INTRO">
- <h2><u>Introduction</u></h2>
- </a>
- <a href="definitions.html#TERMS_HEADER">Headers</a>
- and
- <a href="definitions.html#TERMS_FOOTER">footers</a>,
- as defined in the section
- <a href="definitions.html#TERMS_MOM">Mom's Document Processing Terms</a>,
- are those parts of a document that contain information about the document
- itself which appear in the margins either above or below
- <a href="definitions.html#TERMS_RUNNING">running text</a>.
- They are, in all respects but two, identical. The differences are:
- <p>
- <ol>
- <li>headers appear in the margin <em>above</em> running text while
- footers appear in the margin <em>beneath</em> running text;
- <li>the (optional) rule that separates headers from running
- text appears <em>below</em> the header while
- the (optional) rule that separates footers from running
- text appears <em>above</em> the footer.
- </ol>
- <a name="HEADERFOOTER"></a>
- <p>
- 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.
- <p>
- Furthermore, any
- <a href="definitions.html#TERMS_CONTROLMACRO">control macro</a>
- that begins with <strong>HEADER_</strong> may be used to control
- footers, simply by replacing <strong>HEADER_</strong> with
- <strong>FOOTER_</strong>.
- <p>
- <strong>Author's note:</strong> Left to their own devices (i.e. if
- you're happy with the way <strong>mom</strong> 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.
- <a name="PAGINATION_NOTE"></a>
- <p>
- <strong>NOTE:</strong> While the single page number that
- <strong>mom</strong> generates in either the top or bottom margin
- above or below running text is technically a kind of header/footer,
- <strong>mom</strong> and this documentation treat it as a
- separate page element.
- <p>
- <a name="DESCRIPTION_GENERAL"><h3><u>General description of headers/footers</u></h3></a>
- <p>
- 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.
- <p>
- 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.
- <p>
- <strong>A note to groff experts:</strong> Although
- <strong>mom</strong>'s headers resemble the three-part titles generated
- by <code>.tl</code>, they're in no way related to it, nor based
- upon it. <code>.tl</code> is not used at all in <strong>mom</strong>.
- <p>
- Normally, <strong>mom</strong> fills headers with strings appropriate
- 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.
- <p>
- By default, <strong>mom</strong> prints a horizontal rule beneath
- headers to separate them visually from running text. In the case of
- footers, the rule is <em>above</em> running text. You can increase
- or decrease the space between the header and the rule if you like (with
- <a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a>),
- or remove it completely.
- <p>
- <a name="HEADER_STYLE"><h3><u>Default specs for headers/footers</u></h3></a>
- <p>
- <strong>Mom</strong> 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
- <strong>mom</strong> puts by default in each part are explained in
- <a href="docprocessing.html#DOCTYPE">DOCTYPE</a>.)
- <p>
- <strong>NOTE:</strong> Except for capitalization (all caps or
- caps/lower-case), these defaults apply only to
- <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>.
- <p>
- <pre>
- 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 paragraphs
- </pre>
- 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, <strong>mom</strong> has a special macro,
- <a href="#HDRFTR_PLAIN">HEADER_PLAIN</a>,
- 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.
- <p>
- <a name="VERTICAL_SPACING"><h3><u>Vertical placement and spacing of headers/footers</u></h3></a>
- <p>
- As explained in the section on
- <a href="typedocmac.html">typesetting macros in document processing</a>,
- the top and bottom margins of a <strong>mom</strong> document
- are the vertical start and end positions of
- <a href="definitions.html#TERMS_RUNNING">running text</a>,
- not the vertical positions of headers or footers, which, by definition,
- appear in the margins <em>above</em> (or below) running text.
- <p>
- The vertical placement of headers
- is controlled by the macro
- <a href="#HDRFTR_MARGIN">HEADER_MARGIN</a>,
- which establishes the
- <a href="definitions.html">baseline</a>
- position of headers relative to the <em>top</em> edge of the page.
- The header rule, whose position is relative to the header itself,
- is controlled by a separate macro.
- <strong>FOOTER_MARGIN</strong> establishes the baseline position of
- footers relative to the <em>bottom</em> edge of the page.
- <p>
- <a href="#HDRFTR_GAP">HEADER_GAP</a> establishes
- the distance between headers and the <em>start</em> of running text (effectively
- making <strong>HEADER_MARGIN + HEADER_GAP</strong> the top margin of
- running text unless you give <strong>mom</strong> a literal top margin
- (with
- <a href="typesetting.html#T_MARGIN">T_MARGIN</a>),
- in which case she ignores <strong>HEADER_GAP</strong> and starts
- running text at whatever top margin you gave.
- <strong>FOOTER_GAP</strong> and
- <a href="typesetting.html#B_MARGIN">B_MARGIN</a>
- work similarly, except they determine where running text
- <em>ends</em> on the page. (See
- <a href="#FOOTER_MARGIN">FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT!</a>
- for a warning about possible conflicts between the footer margin
- and the bottom margin.)
- <p>
- Confused? <strong>Mom</strong> apologizes. It's really quite
- simple. By default, <strong>mom</strong> sets headers 4-1/2
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>
- down from the top of the page and starts running text 3 picas (the
- <strong>HEADER_GAP</strong>) beneath that, which means the
- effective top margin of running text is 7-1/2 picas (visually approx. 1
- inch). If you give <strong>mom</strong> a literal top margin (with
- <a href="typesetting.html#T_MARGIN">T_MARGIN</a>),
- she ignores the <strong>HEADER_GAP</strong> and starts running
- text at whatever top margin you gave.
- <p>
- Footers are treated the same way, the only difference being the
- default distances. <strong>Mom</strong> sets footers 3 picas up from
- the bottom of the page, and interrupts the processing of running text 3
- picas (the <strong>FOOTER_GAP</strong>) above that (again, visually
- approx. 1 inch). If you give <strong>mom</strong> a literal bottom
- margin (with <a
- href="typesetting.html#B_MARGIN">B_MARGIN</a>), she ignores the
- <strong>FOOTER_GAP</strong> and interrupts the processing of running
- text at whatever bottom margin you gave.
- <p>
- If <strong>mom</strong> 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
- <a href="#PAGINATION">Pagination control</a>.
- <p>
- <hr>
- <!========================================================================>
- <a name="HEADFOOT_MANAGEMENT">
- <h2><u>Managing headers/footers</u></h2>
- </a>
- <p>
- The following are the basic macros for turning
- <a href="definitions.html#TERMS_HEADER">headers</a>
- or
- <a href="definitions.html#TERMS_FOOTER">footers</a>
- on or off. They should be invoked prior to
- <a href="docprocessing.html#START">START</a>.
- <p>
- By default, <strong>mom</strong> prints page headers. If you turn
- them off, she will begin
- <a href="definitions.html#TERMS_RUNNING">running text</a>
- on each page with a default top margin of 6
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>
- unless you have requested a different top margin (with
- <a href="typesetting.html#T_MARGIN">T_MARGIN</a>)
- prior to
- <a href="docprocessing.html#START">START</a>.
- <p>
- 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
- <a href="#FOOTERS">FOOTERS</a>;
- there's no need to turn headers off first.
- <p>
- <!---HEADERS--->
- <hr width="66%" align="left">
- <p>
- <a name="HEADERS"></a>
- <nobr>Macro: <strong>HEADERS</strong> toggle</nobr>
- <p>
- <a href="definitions.html#TERMS_HEADER">Page headers</a>
- are on by default. If you don't want them, turn them off by
- invoking <strong>HEADERS</strong> with any argument
- (<strong>OFF, QUIT, END, X...</strong>), e.g.
- <p>
- <pre>
- .HEADERS OFF
- </pre>
- <p>
- <strong>NOTE:</strong> <strong>HEADERS</strong> automatically
- disables
- <a href="definitions.html#TERMS_FOOTER">footers</a>
- (you can't have both), but not the page numbers that normally
- appear at the bottom of the page.
- <p>
- <strong>ADDITIONAL NOTE:</strong> If <strong>HEADERS</strong>
- are <strong>OFF</strong>, <strong>mom</strong>'s normal top
- margin for
- <a href="definitions.html#TERMS_RUNNING">running text</a>
- (7.5
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>)
- changes to 6 picas (visually approx. 1 inch). This does NOT apply
- to the situation where footers have been explicitly turned on
- (with
- <a href="#FOOTERS">FOOTERS</a>).
- 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.)
- <p>
- <!---FOOTERS--->
- <hr width="66%" align="left">
- <p>
- <a name="FOOTERS"></a>
- <nobr>Macro: <strong>FOOTERS</strong> toggle</nobr>
- <p>
- <a href="definitions.html#TERMS_FOOTER">Page footers</a>
- are off by default. If you want them instead of
- <a href="definitions.html#TERMS_HEADER">headers</a>
- (you can't have both), turn them on by invoking
- <strong>FOOTERS</strong> without an argument, e.g.
- <p>
- <pre>
- .FOOTERS
- </pre>
- <p>
- <strong>FOOTERS</strong> automatically disables headers, and
- <strong>mom</strong> shifts the placement of page numbers from their
- normal position at page bottom to the top of the page.
- <p>
- <strong>NOTE:</strong> By default, when footers are on,
- <strong>mom</strong> does not print a page number on the first
- page of a document, nor on first pages after
- <a href="rectoverso.html#COLLATE">COLLATE</a>.
- If you don't want this behaviour, you can change it with
- <a href="#PAGENUM_ON_FIRST_PAGE">PAGENUM_ON_FIRST_PAGE</a>.
- <p>
- <!---FOOTER_ON_FIRST_PAGE--->
- <hr width="66%" align="left">
- <p>
- <a name="FOOTER_ON_FIRST_PAGE"></a>
- <nobr>Macro: <strong>FOOTER_ON_FIRST_PAGE</strong> toggle</nobr>
- <p>
- If you invoke
- <a href="#FOOTERS">FOOTERS</a>,
- <strong>mom</strong>, by default, does not print a footer on the
- first page of the document. (The
- <a href="definitions.html">docheader</a>
- on page 1 makes it redundant.) However, should you wish a footer on
- page 1, invoke <strong>FOOTER_ON_FIRST_PAGE</strong> without any argument.
- <p>
- <hr>
- <!---USERDEF_HDRFTR--->
- <a name="USERDEF_HDRFTR">
- <h2><u>User-defined, single string recto/verso headers/footers</u></h2>
- </a>
- <a name="USERDEF_HDRFTR_INTRO"><h3><u>Introduction</u></h3></a>
- Sometimes, you'll find you can't get <strong>mom</strong>'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.
- <p>
- 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:
- <p>
- <pre>
- +------------------------+ +------------------------+
- | Author | | Title |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- +------------------------+ +------------------------+
- </pre>
- With <strong>mom</strong>'s standard 3-part headers, this isn't
- possible, even when
- <a href="rectoverso.html#RECTO_VERSO">RECTO_VERSO</a>
- is enabled. <strong>RECTO_VERSO</strong> switches the left and
- right parts of headers on alternate pages, but the centre
- part remains unchanged.
- <p>
- Any time you need distinctly different headers on alternate
- pages, <strong>mom</strong> 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
- <a href="#HDRFTR_RECTO">HEADER_RECTO</a>
- and
- <a href="#HDRFTR_VERSO">HEADER_VERSO</a>.
- Both allow you to state whether the header is flush left, centred,
- or flush right, and both take a single
- <a href="definitions.html#TERMS_STRINGARGUMENT">string argument</a>
- with which, by combining text and
- <a href="definitions.html#TERMS_INLINES">inline escapes</a>,
- you can make the headers come out just about any way you want.
- Use of the <strong>\*[PAGE#]</strong> escape is permitted in the
- string argument (see
- <a href="#PAGE_NUMBER_INCL">Including the page number in header-left, -centre or -right</a>),
- and as an added bonus, <strong>mom</strong> provides a special
- mechanism whereby it's possible to "pad" the string as well.
- <p>
- <!---HDRFTR_RECTOVERSO--->
- <hr width="66%" align="left">
- <p>
- <a name="HDRFTR_RECTOVERSO"></a>
- <nobr>Macro: <strong>HEADER_RECTO</strong> LEFT | CENTER | RIGHT "<header recto string>"</nobr>
- <br>
- <nobr>Macro: <strong>HEADER_VERSO</strong> LEFT | CENTER | RIGHT "<header verso string>"</nobr>
- <br>
- <p>
- <strong>HEADER_RECTO</strong> and <strong>HEADER_VERSO</strong> behave
- identically, hence all references to <strong>HEADER_RECTO</strong>
- in this section also refer to <strong>HEADER_VERSO</strong>.
- Furthermore, <strong>FOOTER_</strong> can be used instead of
- <strong>HEADER_</strong> to set up recto/verso footers.
- <p>
- The first argument to <strong>HEADER_RECTO</strong> is the
- direction in which you want the header
- <a href="definitions.html#TERMS_QUAD">quadded</a>.
- <strong>L, C</strong> and <strong>R</strong> may be used in
- place of <strong>LEFT, CENTER</strong> and
- <strong>RIGHT</strong>. The second argument is a string,
- surrounded by double-quotes, containing what you want in the
- header. <strong>HEADER_RECTO</strong> disables <strong>mom</strong>'s
- normal 3-part headers, therefore anything you want in the
- headers must be entered by hand in the string, including colours
- (via the
- <a href="definitions.html#TERMS_INLINES">inline escape</a>
- <a href="color.html#COLOR_INLINE">\*[<colorname>]</a>).
- <p>
- By default, <strong>HEADER_RECTO</strong> is set at the same
- size, and in the same family and font, as paragraph text. The
- control macros
- <a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a>
- and
- <a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a>
- may be used to change the default family and size. Changes to
- the font(s) within the string must be accomplished with the
- <a href="definitions.html#TERMS_INLINES">inline escapes</a>
- <strong>\*[ROM], \*[IT], \*[BD], \*[BDI]</strong> and
- <strong>\*[PREV]</strong> (see
- <a href="inlines.html#INLINE_FONTS_MOM">Changing fonts</a>).
- Additional refinements to the style of the header-recto string,
- including horizontal spacing and/or positioning, can also be made with
- inline escapes.
- <p>
- To include the current page number in the string, use the
- <strong>\*[PAGE#]</strong> inline.
- <br>
- <h3><u>*Padding the HEADER_RECTO/HEADER_VERSO string</u></h3>
- You can "pad" the header-recto string, a convenience you'll
- appreciate in circumstances such as the following.
- <p>
- <pre>
- VERSO RECTO
- +------------------------+ +------------------------+
- | Author Page# | | Page# Title |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- +------------------------+ +------------------------+
- </pre>
- To pad the string argument passed to <strong>HEADER_RECTO</strong>,
- begin and end the string (inside the double-quotes) with the caret
- character (<kbd>^</kbd>). Enter the pound sign (<kbd>#</kbd>) at any
- point in the string where you want an equalized amount of whitespace
- inserted. (If you're unsure what padding is, see
- <a href="goodies.html#PAD">Insert space into lines</a>.)
- Note that if you're padding the string, it doesn't matter what
- quad direction you give <strong>HEADER_RECTO</strong> since
- padding, by its nature, justifies text to the left and right
- margins.
- <p>
- The situation depicted above is accomplished like this:
- <p>
- <pre>
- .HEADER_RECTO LEFT "^\*[PAGE#]#Title^"
- .HEADER_VERSO LEFT "^Author#\*[PAGE#]^"
- </pre>
- Note that <strong>mom</strong> does not interpret the <kbd>#</kbd>
- in <strong>\*[PAGE#]</strong> as a padding marker (i.e. as a place
- to insert whitespace).
- <p>
- Also, notice that the argument <strong>LEFT</strong> is used in both
- cases. When padding a header, it doesn't matter whether you use
- LEFT, CENTER or RIGHT as the argument.
- <p>
- Furthermore, should you need a user-defined header of
- the sort provided by <strong>HEADER_RECTO</strong> and
- <strong>HEADER_VERSO</strong> but aren't actually printing
- recto/verso, you can use <strong>HEADER_RECTO</strong> to design the
- header that appears at the top of every page.
- <p>
- <strong>IMPORTANT:</strong> The
- <a href="goodies.html#PAD_MARKER">PAD_MARKER</a>
- macro, which changes the default pad marker (<kbd>#</kbd>) used by
- <a href="goodies.html#PAD">PAD</a>,
- has no effect on the pad marker used in the
- <strong>HEADER_RECTO</strong> string. If you absolutely must
- have a literal pound sign in your <strong>HEADER_RECTO</strong>
- string, use the escape sequence for the pound sign
- (<kbd>\[sh]</kbd>) where you want the pound sign to go.
- <p>
- <hr>
- <a name="HEADFOOT_CONTROL">
- <h2><u>Control macros for headers/footers</u></h2>
- </a>
- Virtually every part of headers (see the paragraph on how
- <a href="#HEADERFOOTER">"headers" means "footers"</a>
- in the
- <a href="#HEADFOOTPAGE_INTRO">introduction to headers/footers</a>)
- can be designed to your own specifications.
- <p>
- <a name="INDEX_REFERENCE">
- <h3><u>Header/footer control macros</u></h3>
- </a>
- <ul>
- <li><a href="#HDRFTR_STRINGS"><strong>STRINGS</strong></a>
- <ul>
- <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
- </ul>
- <li><a href="#HDRFTR_RIGHT">HEADER_RIGHT</a>
- <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>
- <li><a href="#HDRFTR_STYLE"><strong>STYLE</strong></a>
- <ul>
- <li><a href="#HDRFTR_STYLE_GLOBAL"><strong>Global changes</strong></a>
- <li><a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a> -- family for entire header
- <li><a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> -- size for entire header
- <li><a href="#HDRFTR_PLAIN">HEADER_PLAIN</a> -- disable default adjustments to header parts
- <li><a href="#HDRFTR_COLOR">HEADER_COLOR</a> -- colourize the header
- </ul>
- <ul>
- <li><a href="#HDRFTR_STYLE_PART"><strong>Part-by-part changes</strong></a>
- <li><a href="#_FAMILY">_FAMILY</a> -- left, centre or right family
- <li><a href="#_FONT">_FONT</a> -- left, centre or right font
- <li><a href="#_SIZE">_SIZE</a> -- left, centre or right size
- <li><a href="#_CAPS">_CAPS</a> -- left, centre or right all caps
- <li><a href="#_COLOR">_COLOR</a> -- left, centre or right colour
- </ul>
- <li><a href="#HDRFTR_VERTICAL"><strong>VERTICAL PLACEMENT AND SPACING</strong></a>
- <ul>
- <li><a href="#HDRFTR_MARGIN">HEADER_MARGIN</a>
- <li><a href="#HDRFTR_GAP">HEADER_GAP</a>
- </ul>
- <li><a href="#HDRFTR_SEPARATOR"><strong>SEPARATOR RULE</strong></a>
- <ul>
- <li><a href="#HDRFTR_RULE">HEADER_RULE</a>
- <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a>
- <li><a href="#HDRFTR_RULE_COLOR">HEADER_RULE_COLOR</a>
- </ul>
- </ul>
- <!---HDRFTR_STRINGS--->
- <hr width="66%" align="left">
- <a name="HDRFTR_STRINGS"><h3><u>Header/footer strings</u></h3></a>
- <p>
- <a name="HDRFTR_LEFT">
- <nobr>Macro: <strong>HEADER_LEFT</strong> "<text of header left>" | #</nobr>
- </a>
- <br>
- <a name="HDRFTR_CENTER">
- <nobr>Macro: <strong>HEADER_CENTER</strong> "<text of header centre>" | #</nobr>
- </a>
- <br>
- <a name="HDRFTR_RIGHT">
- <nobr>Macro: <strong>HEADER_RIGHT</strong> "<text of header right>" | #</nobr>
- </a>
- <p>
- 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, <strong>mom</strong>, 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 <strong>HEADER_LEFT</strong> like this:
- <p>
- <pre>
- .HEADER_LEFT "R. Stallman, E. Raymond"
- </pre>
- Because the arguments to <strong>HEADER_LEFT, _CENTER,</strong>
- and <strong>_RIGHT</strong> are
- <a href="definitions.html#TERMS_STRINGARGUMENT">string arguments</a>,
- they must be enclosed in double-quotes.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change the strings in footers.
- <a name="HDRFTR_CENTER_PAD"><h3><u>*Padding the header/footer centre string</u></h3></a>
- <p>
- <nobr>Macro: <strong>HEADER_CENTER_PAD</strong> LEFT | RIGHT <amount of space by which to pad centre string left or right></nobr>
- <br>
- <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
- <p>
- By default, <strong>mom</strong> 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 <strong>HEADER_CENTER_PAD</strong> comes in. With a
- bit of experimentation (yes, you have to preview the document), you
- can use <strong>HEADER_CENTER_PAD</strong> to move the header
- centre string left or right until it looks acceptably centred
- between the two other strings.
- <p>
- For example, say your document is an outline for a novel called "By
- the Shores of Lake Attica." You've told <strong>mom</strong>
- you want
- <p>
- <a href="docprocessing.html#DOCTYPE">DOCTYPE</a>
- <halign="center">
- <strong>NAMED</strong> "Outline"
- <p>
- 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
- <p>
- <pre>
- .HEADER_CENTER_PAD RIGHT 3P
- </pre>
- you can scoot the word "Outline" over three
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>
- to the left (the padding's added to the right of the string)
- so that your head looks nicely spaced out. Invoking
- <strong>HEADER_CENTER_PAD</strong> with the <strong>LEFT</strong>
- argument obviously puts the padding on the left side of the string.
- <p>
- Most reassuring of all is that if you use
- <strong>HEADER_CENTER_PAD</strong> conjunction with
- <a href="rectoverso.html#RECTO_VERSO">RECTO_VERSO</a>,
- <strong>mom</strong> 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.
- <p>
- <hr width="66%" align="left">
- <p>
- <a name="RESERVED_STRINGS"><h3><u>Using mom's "reserved" strings in header/footer definitions</u></h3></a>
- <p>
- 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. <strong>Mom</strong> usually
- knows what to do.
- <p>
- 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
- <a href="rectoverso.html#COLLATE">collated</a>
- documents, and you want the word "Endnotes" to go in the header
- centre position of the endnotes, but want, say, the
- <a href="docprocessing.html#TITLE">TITLE</a>
- to go back into the centre position for the next output document.
- <p>
- In scenarios like the above, <strong>mom</strong> has a number of
- "reserved" 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,
- if invoked, otherwise, "Chapter"
- \*[$CHAPTER] -- the argument (typically a number) passed
- to .CHAPTER
- \*[$CHAPTER_TITLE] -- the argument passed to .CHAPTER_TITLE
- </pre>
- Returning to the scenario above, first, you'd define a centre
- string for the endnotes page:
- <p>
- <pre>
- .HEADER_CENTER "Endnotes"
- </pre>
- Then, you'd output the endnotes:
- <p>
- <pre>
- .ENDNOTES
- </pre>
- Then, you'd prepare <strong>mom</strong> for the next document:
- <p>
- <pre>
- .COLLATE
- .TITLE "New Doc Title"
- .AUTHOR "Josephine Blough"
- </pre>
- Then, you'd redefine the header centre string using the reserved
- string \*[$TITLE], like this:
- <p>
- <pre>
- .HEADER_CENTER "\*[$TITLE]"
- </pre>
- And last, you'd do:
- <p>
- <pre>
- .START
- </pre>
- Voilà ! Any argument you pass to <strong>TITLE</strong> from here
- on in (say, for subsequent documents) is back in the header centre
- position. Here's the whole routine again:
- <p>
- <pre>
- .HEADER_CENTER "Endnotes"
- .ENDNOTES
- .COLLATE
- .TITLE "New Doc Title"
- .AUTHOR "Josephine Blough"
- .HEADER_CENTER "\*[$TITLE]"
- .START
- </pre>
- If need be, you can concatenate the strings, as in the following
- example.
- <p>
- <pre>
- .HEADER_CENTER "\*[$CHAPTER_STRING] \*[$CHAPTER]"
- </pre>
- which, assuming a <strong>.CHAPTER_STRING</strong> of
- "Chapter" and a <strong>.CHAPTER</strong> of
- "2", would put "Chapter 2" in the header centre
- position.
- <p>
- <a name="PAGE_NUMBER_SYMBOL">
- <h3><u>*Replacing header-left, -CENTER or -right with the page number</u></h3>
- </a>
- <p>
- If you would like to have the current page number to appear
- header-left, -center, or -right <em>instead</em> of a text
- string, invoke the appropriate macro, above, with the single
- argument <code>#</code> (the "number" or
- "pound" sign). Do <strong>NOT</strong> use
- double-quotes. For example,
- <p>
- <pre>
- .HEADER_CENTER #
- </pre>
- will print the current page number in the CENTER part of
- headers.
- <p>
- <a name="PAGE_NUMBER_INCL">
- <h3><u>*Including the page number in header-left, -CENTER or -right</u></h3>
- </a>
- <p>
- If you would like to <em>include</em> the current page number in
- the string you pass to <strong>HEADER_LEFT, _CENTER,</strong> or
- <strong>_RIGHT</strong>, use the special
- <a href="definitions.html#TERMS_INLINES">inline escape</a>
- <code>\*[PAGE#]</code> in the string argument.
- <p>
- For example, say you have a document that's ten pages long, and
- you want header-right to say "page <whichever> of 10",
- invoke <strong>HEADER_RIGHT</strong> as follows:
- <p>
- <pre>
- .HEADER_RIGHT "page \*[PAGE#] of 10"
- </pre>
- 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.
- <p>
- <hr>
- <!---HDRFTR_STYLE--->
- <a name="HDRFTR_STYLE"><h3><u>Header/footer style</u></h3></a>
- <p>
- <a name="HDRFTR_STYLE_GLOBAL"><strong>Global changes</strong></a>
- <p>
- The following macros allow you to make changes that affect all
- parts of the header at once.
- <p>
- Please note that <strong>HEADER_FAMILY</strong> and
- <strong>HEADER_FONT</strong> have no effect on
- <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>.
- <p>
- <ul>
- <li><a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a>
- <li><a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a>
- <li><a href="#HDRFTR_PLAIN">HEADER_PLAIN</a>
- <li><a href="#HDRFTR_COLOR">HEADER_COLOR</a>
- </ul>
- <hr width="33%" align="left">
- <p>
- <a name="HDRFTR_GLOBAL_FAMILY">
- <nobr>Macro: <strong>HEADER_FAMILY</strong> <family></nobr>
- </a>
- <p>
- By default, <strong>mom</strong> uses the default document family
- for headers. If you would like her to use another
- <a href="definitions.html#TERMS_FAMILY">family</a>
- in headers, invoke <strong>HEADER_FAMILY</strong> with the identifier
- for the family you want. The argument is the same as for the
- typesetting macro
- <a href="typesetting.html#FAMILY">FAMILY</a>.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change the footer family.
- <p>
- <hr width="33%" align="left">
- <p>
- <a name="HDRFTR_GLOBAL_SIZE">
- <nobr>Macro: <strong>HEADER_SIZE</strong> <+|-number of points></nobr>
- <br>
- <em>*Argument is relative to the point size of type in paragraphs</em>
- </a>
- <p>
- By default, <strong>mom</strong> 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 <strong>HEADER_SIZE</strong> with + or - the number of
- <a href="definitions.html#TERMS_PICASPOINTS">points</a>
- (fractions allowed) by which you want her to in/decrease the size
- of headers. For example,
- <p>
- <pre>
- .HEADER_SIZE +.75
- </pre>
- increases the size of every part of a header by 3/4 of a point while
- respecting <strong>mom</strong>'s own little size changes.
- <p>
- See
- <a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a>
- for an explanation of how control macros ending in
- <strong>_SIZE</strong> work.
- <p>
- <a name="FOOTER_GLOBAL_SIZE"></a>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change the footer size.
- <p>
- <strong>ADDITIONAL NOTE:</strong> Normally, macros that control headers have no
- effect on
- <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>.
- <strong>HEADER_SIZE</strong> is an exception. While all parts of a
- header in <strong>PRINTSTYLE TYPEWRITE</strong> are always the same
- size, you can use <strong>HEADER_SIZE</strong> with <strong>PRINTSTYLE
- TYPEWRITE</strong> to reduce the header's overall point size.
- You'll most likely require this when the
- <a href="docprocessing.html#COPYSTYLE">COPYSTYLE</a>
- is <strong>DRAFT</strong>, since portions of the header may overprint
- if, say, the title of your document is very long.
- <p>
- <hr width="33%" align="left">
- <p>
- <a name="HDRFTR_PLAIN">
- Macro: <strong>HEADER_PLAIN</strong>
- </a>
- <p>
- By default, <strong>mom</strong> 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 <strong>mom</strong>'s defaults,
- invoke <strong>HEADER_PLAIN</strong> by itself, with no argument.
- <strong>Mom</strong> 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.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to disable <strong>mom</strong>'s
- default behaviour for the various elements of footer style.
- <p>
- <hr width="33%" align="left">
- <p>
- <a name="HDRFTR_COLOR">
- <nobr>Macro: <strong>HEADER_COLOR</strong> <colorname></nobr>
- </a>
- <p>
- If you want your headers in a colour different from the document
- default (usually black), invoke <strong>HEADER_COLOR</strong> with
- the name of a colour pre-defined (or "initialized") with
- <a href="color.html#NEWCOLOR">NEWCOLOR</a>
- or
- <a href="color.html#XCOLOR">XCOLOR</a>.
- <p>
- <strong>HEADER_COLOR</strong> 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
- <a href="#_COLOR">HEADER_<POSITION>_COLOR</a>
- to colourize each part of the header separately, as well as
- <a href="#HDRFTR_RULE_COLOR">HEADER_RULE_COLOR</a>
- to change the colour of the header rule.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to colourize footers.
- <p>
- <hr width="66%" align="left">
- <p>
- <a name="HDRFTR_STYLE_PART"><strong>Part by part changes</strong></a>
- <p>
- <strong>NOTE:</strong> When using the following control macros,
- replace "<POSITION>" by <strong>LEFT, CENTER,</strong>
- or <strong>RIGHT</strong> as appropriate.
- <p>
- <ul>
- <li><a href="#_FAMILY">HEADER_<POSITION>_FAMILY</a>
- <li><a href="#_FONT">HEADER_<POSITION>_FONT</a>
- <li><a href="#_SIZE">HEADER_<POSITION>_SIZE</a>
- <li><a href="#_CAPS">HEADER_<POSITION>_CAPS</a>
- <li><a href="#_COLOR">HEADER_<POSITION>_COLOR</a>
- </ul>
- <hr width="33%" align="left">
- <p>
- <a name="_FAMILY">
- <nobr>Macro: <strong>HEADER_<POSITION>_FAMILY</strong> <family></nobr>
- </a>
- <p>
- Use <strong>HEADER_<POSITION>_FAMILY</strong> to change the
- <a href="definitions.html#TERMS_FAMILY">family</a>
- of any part of headers. See
- <a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a>
- for an explanation of how control macros ending in
- <strong>_FAMILY</strong> work.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change a footer part's family.
- <p>
- <hr width="33%" align="left">
- <p>
- <a name="_FONT">
- <nobr>Macro: <strong>HEADER_<POSITION>_FONT</strong> <font></nobr>
- </a>
- <p>
- Use <strong>HEADER_<POSITION>_FONT</strong> to change the
- <a href="definitions.html#TERMS_FONT">font</a>
- of any part of headers. See
- <a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a>
- for an explanation of how control macros ending in
- <strong>_FONT</strong> work.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change a footer part's font.
- <p>
- <hr width="33%" align="left">
- <p>
- <a name="_SIZE">
- <nobr>Macro: <strong>HEADER_<POSITION>_SIZE</strong> <+|-number of points></nobr>
- </a>
- <p>
- Use <strong>HEADER_<POSITION>_SIZE</strong> to change the size of any
- part of headers (relative to the point size of type in
- paragraphs). See
- <a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a>
- for an explanation of how control macros ending in
- <strong>_SIZE</strong> work.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change a footer part's size.
- <p>
- <hr width="33%" align="left">
- <p>
- <a name="_CAPS">
- <nobr>Macro: <strong>HEADER_<POSITION>_CAPS</strong> toggle</nobr>
- </a>
- <p>
- <strong>HEADER_<POSITION>_CAPS</strong> is a
- <a href="definitions.html#TERMS_TOGGLE">toggle macro</a>.
- 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
- <a href="docprocessing.html#REFERENCE_MACROS">reference macros</a>
- or as defined by you with the
- <a href="#HDRFTR_STRINGS">header string control macros</a>,
- 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 <strong>mom</strong> capitalizes by
- default), invoke the argument with any argument (e.g. <strong>OFF,
- QUIT, END, X...</strong>).
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change a footer part's
- capitalization style.
- <p>
- <hr width="33%" align="left">
- <p>
- <a name="_COLOR">
- <nobr>Macro: <strong>HEADER_<POSITION>_COLOR</strong> <colorname></nobr>
- </a>
- <p>
- <strong>HEADER_<POSITION>_COLOR</strong> 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:
- <p>
- <pre>
- .HEADER_RIGHT_COLOR red
- </pre>
- The other parts of the header will be in the default header colour
- (usually black, but that can be changed with
- <a href="#HDRFTR_COLOR">HEADER_COLOR</a>).
- <p>
- Remember that you have to define (or "initialize") a
- colour with
- <a href="color.html#NEWCOLOR">NEWCOLOR</a>
- or
- <a href="color.html#XCOLOR">XCOLOR</a>
- before you can use the colour.
- <p>
- If you create a
- <a href="#USERDEF_HDRFTR">user-defined header</a>
- with
- <a href="#HDRFTR_RECTO">HEADER_RECTO</a>
- or
- <a href="#HDRFTR_VERSO">HEADER_VERSO</a>,
- and you want various elements within the header to be colourized,
- embed the colours in the string passed to <strong>HEADER_RECTO</strong>
- or <strong>HEADER_VERSO</strong> with the
- <a href="color.html#COLOR_INLINE">\*[<colorname>]</a>
- <a href="definitions.html#TERMS_INLINES">inline escape</a>.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to set the colours for the various
- elements of footers.
- <p>
- <hr>
- <!---HDRFTR_VERTICAL--->
- <a name="HDRFTR_VERTICAL">
- <h2><u>Header/footer vertical placement and spacing</u></h2>
- </a>
- <p>
- See
- <a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>
- for an explanation of how <strong>mom</strong> deals with
- headers, footers, and top/bottom page margins.
- <p>
- <!---HDRFTR_MARGIN--->
- <hr width="66%" align="left">
- <p>
- <a name="HDRFTR_MARGIN"></a>
- <nobr>Macro: <strong>HEADER_MARGIN</strong> <distance to baseline of header></nobr>
- <br>
- <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
- <p>
- Use <strong>HEADER_MARGIN</strong> to set the distance from the
- top edge of the page to the
- <a href="definitions.html#TERMS_BASELINE">baseline</a>
- of type in headers. A unit of measure is required, and decimal
- fractions are allowed.
- <p>
- <strong>Mom</strong>'s default header margin is 4-1/2
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>,
- but if you want a different margin, say, 1/2-inch, do
- <p>
- <pre>
- .HEADER_MARGIN .5i
- </pre>
- If your document uses
- <a href="definitions.html#TERMS_FOOTER">footers</a>,
- replace <strong>HEADER_</strong>, above, with
- <strong>FOOTER_</strong>. The argument to
- <strong>FOOTER_MARGIN</strong> is the distance from the bottom
- edge of the page to the baseline of type in footers.
- <p>
- <strong>Mom</strong>'s default footer margin is 3
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>.
- <a name="FOOTER_MARGIN"></a>
- <p>
- <strong>FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT!</strong>
- <p>
- <strong>Mom</strong> 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).
- <p>
- If you set a bottom margin for your document (with
- <a href="typesetting.html#B_MARGIN">B_MARGIN</a>,
- prior to
- <a href="docprocessing.html#START">START</a>)
- and the margin's too close to <strong>mom</strong>'s default
- footer margin (or a footer margin you set yourself
- with <strong>FOOTER_MARGIN</strong>), <strong>mom</strong> 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 <strong>B_MARGIN</strong> or
- <strong>FOOTER_MARGIN</strong> so there's an adequate amount of
- space for <strong>mom</strong> to print the bottom line of running
- text and the footer.
- <p>
- 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
- <a href="docprocessing.html#START">START</a>,
- as in these examples.
- <p>
- <strong>Example 1</strong>
- <p>
- <pre>
- <reference macros, etc>
- .PAGINATION OFF
- .B_MARGIN .25i
- .FOOTER_MARGIN O
- .START
- </pre>
- <strong>Example 2</strong>
- <p>
- <pre>
- <reference macros, etc>
- .HEADERS OFF
- .PAGENUM_POS TOP RIGHT
- .B_MARGIN .25i
- .FOOTER_MARGIN O
- .START
- </pre>
- <h3>A note on header/footer margins and page numbering</h3>
- <strong>Mom</strong> uses HEADER_MARGIN</strong> and
- <strong>FOOTER_MARGIN</strong> to establish the baseline
- position of page numbers in addition to the baseline position of
- headers and footers.
- <p>
- 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 <strong>FOOTER_MARGIN</strong>. Conversely,
- if page numbers are at the top of the page, either because you turned
- <a href="#FOOTERS">FOOTERS</a>
- on or because you instructed <strong>mom</strong> to put them
- there with
- <a href="#PAGENUM_POS">PAGENUM_POS</a>,
- you'd use <strong>HEADER_MARGIN</strong> to change their
- baseline placement.
- <p>
- <!---HDRFTR_GAP--->
- <hr width="66%" align="left">
- <p>
- <a name="HDRFTR_GAP"></a>
- <nobr>Macro: <strong>HEADER_GAP</strong> <distance from header to start of running text></nobr>
- <br>
- <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
- <p>
- Use <strong>HEADER_GAP</strong> to set the distance from the
- <a href="definitions.html#TERMS_BASELINE">baseline</a>
- of type in headers to the start of
- <a href="definitions.html#TERMS_RUNNING">running text</a>.
- A unit of measure is required, and decimal fractions are allowed.
- <p>
- As explained in
- <a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>,
- <strong>HEADER_MARGIN + HEADER_GAP</strong> determine the
- default vertical starting position of running text on the page
- UNLESS you have given <strong>mom</strong> your own top margin
- (with
- <a href="typesetting.html#T_MARGIN">T_MARGIN</a>). If you give
- a top margin, <strong>mom</strong> ignores
- <strong>HEADER_GAP</strong>; running text starts at your stated
- top margin.
- <p>
- <strong>Mom</strong>'s default header gap is 3
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>,
- but if you want a different gap, say, 2 centimetres, do
- <p>
- <pre>
- .HEADER_GAP 2c
- </pre>
- If your document uses
- <a href="definitions.html#TERMS_FOOTER">footers</a>,
- replace <strong>HEADER_</strong>, above, with
- <strong>FOOTER_</strong>. The argument to
- <strong>FOOTER_GAP</strong> is the distance from the
- baseline of type in footers to the last baseline of running text
- on the page.
- <p>
- As explained in
- <a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>,
- <strong>FOOTER_MARGIN + FOOTER_GAP</strong> determine the
- default vertical end position of running text on the page
- UNLESS you have given <strong>mom</strong> a bottom margin
- (with
- <a href="typesetting.html#B_MARGIN">B_MARGIN</a>). If you give
- a bottom margin, <strong>mom</strong> ignores
- <strong>FOOTER_GAP</strong>; running text ends at your stated
- bottom margin.
- <p>
- <strong>Mom</strong>'s default footer gap is 3
- <a href="definitions.html#TERMS_PICASPOINTS">picas</a>.
- <p>
- <strong>NOTE:</strong> <strong>Mom</strong> uses
- <strong>HEADER_GAP</strong> and
- <strong>FOOTER_GAP</strong> 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
- <strong>FOOTER_GAP</strong>. If page numbers are at the top of the
- page, change the gap between the number and the first line of running
- text with <strong>HEADER_GAP</strong>.
- <p>
- <hr>
- <!---HDRFTR_SEPARATOR--->
- <a name="HDRFTR_SEPARATOR">
- <h2><u>Header/footer separator rule</u></h2>
- </a>
- <p>
- 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
- <a href="definitions.html#TERMS_HEADER">header</a>
- and helps separate it visually from
- <a href="definitions.html#TERMS_RUNNING">running text</a>. 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.
- <p>
- <ul>
- <li><a href="#HDRFTR_RULE">HEADER_RULE</a> -- on or off
- <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> -- distance of rule from header
- </ul>
- <!---HDRFTR_RULE--->
- <hr width="66%" align="left">
- <p>
- <a name="HDRFTR_RULE"></a>
- <nobr>Macro: <strong>HEADER_RULE</strong> toggle</nobr>
- <p>
- By default, <strong>mom</strong> prints a header separator rule
- underneath headers (or above footers). If you don't want the
- rule, turn it off by invoking <strong>HEADER_RULE</strong> with any
- argument (<strong>OFF, QUIT, END, X...</strong>), e.g.
- <p>
- <pre>
- .HEADER_RULE OFF
- </pre>
- To turn the rule (back) on, invoke <strong>HEADER_RULE</strong>
- without any argument.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to enable/disable the printing of
- the footer separator rule. (Most likely, if you're using
- <a href="#FOOTERS">FOOTERS</a>, you'll want it off.)
- <p>
- <!---HDRFTR_RULE_GAP--->
- <hr width="66%" align="left">
- <p>
- <a name="HDRFTR_RULE_GAP"></a>
- <nobr>Macro: <strong>HEADER_RULE_GAP</strong> distance of rule beneath header</nobr>
- <br>
- <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
- <p>
- <strong>HEADER_RULE_GAP</strong> is the distance from the
- <a href="definitions.html#TERMS_BASELINE">baseline</a>
- of type in headers to the rule underneath. A unit of measure is
- required, and decimal fractions are allowed. Please note that
- <strong>HEADER_RULE_GAP</strong> has no effect on
- <a href="#HEADER_GAP">HEADER_GAP</a>
- (i.e. <strong>HEADER_RULE_GAP</strong> is NOT added to
- <strong>HEADER_GAP</strong> when <strong>mom</strong> calculates
- the space between headers and the start of
- <a href="definitions.html#TERMS_RUNNING">running text</a>).
- <p>
- By default, the header rule gap is 4
- <a href="definitions.html#TERMS_PICASPOINTS">points</a>.
- If you'd like to change it to, say, 1/4
- <a href="definitions.html#TERMS_EM">em</a>, do
- <p>
- <pre>
- .HEADER_RULE_GAP .25m
- </pre>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> if you're using
- <a href="definitions.html#TERMS_FOOTER">footers</a>
- and want to change the separator rule gap. In footers, the gap
- is measured from the top of the tallest
- <a href="definitions.html#TERMS_ASCENDER">ascender</a>
- in the footer.
- <p>
- <strong>ADDITIONAL NOTE:</strong> When using
- <a href="#HDRFTR_RECTOVERSO">FOOTER_RECTO</a>
- and
- <a href="#HDRFTR_RECTOVERSO">FOOTER_VERSO</a>,
- make sure that the default size for footers
- (<a href="#FOOTER_GLOBAL_SIZE">FOOTER_SIZE</a>)
- is set to the largest size of type that will be used in the
- footer or <strong>mom</strong> may not get the rule gap right.
- Inline changes to the size of type in
- <strong>FOOTER_RECTO</strong> and <strong>FOOTER_VERSO</strong>
- should always be negative (smaller) than the default.
- <p>
- <!---HDRFTR_RULE_COLOR--->
- <hr width="66%" align="left">
- <p>
- <a name="HDRFTR_RULE_COLOR"></a>
- <nobr>Macro: <strong>HEADER_RULE_COLOR</strong> <colorname></nobr>
- <p>
- If you wish to change the colour of the header rule, invoke
- <strong>HEADER_RULE_COLOR</strong> with the name of a colour
- pre-defined (or "initialized") with
- <a href="color.html#NEWCOLOR">NEWCOLOR</a>
- or
- <a href="color.html#XCOLOR">XCOLOR</a>.
- <p>
- Please note that <strong>HEADER_RULE_COLOR</strong> overrides the
- colour set with
- <a href="#HDRFTR_COLOR">HDRFTR_COLOR</a>,
- so that it's possible to have the heads entirely in, say, blue (set
- with <strong>HEADER_COLOR</strong>), and the header rule in, say,
- red.
- <p>
- <strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above,
- with <strong>FOOTER_</strong> to change the colour of the footer
- rule.
- <p>
- <hr>
- <a name="PAGINATION">
- <h2><u>Pagination</u></h2>
- </a>
- <p>
- By default, <strong>mom</strong> paginates documents. Page numbers
- appear in the bottom margin of the page, centred between two hyphens.
- As with all elements of <strong>mom</strong>'s document processing,
- most aspects of pagination style can be altered to suit your taste
- with control macros.
- <p>
- <a name="INDEX_PAGINATION">
- <h3><u>Pagination macros list</u></h3>
- </a>
- <ul>
- <li><a href="#PAGINATE">PAGINATE</a> -- pagination on or off
- <li><a href="#PAGENUMBER">PAGENUMBER</a> -- user-defined (starting) page number
- <li><a href="#PAGENUM_STYLE">PAGENUM_STYLE</a> -- digits, roman numerals, etc
- <li><a href="#PAGENUM_ON_FIRST_PAGE">PAGENUM_ON_FIRST_PAGE</a> -- applies only when footers are enabled
- <li><a href="#DRAFT_WITH_PAGENUMBER">DRAFT_WITH_PAGENUMBER</a> -- attach draft/revision information to page numbers
- <li><a href="#PAGINATE_CONTROL">Control macros</a>
- </ul>
- <p>
- <!---PAGINATE--->
- <hr width="66%" align="left">
- <p>
- <a name="PAGINATE"></a>
- <nobr>Macro: <strong>PAGINATE</strong> toggle</nobr>
- <br>
- Alias: <strong>PAGINATION</strong>
- <p>
- By default, <strong>mom</strong> paginates documents (in the bottom
- margin). If you'd prefer she not paginate, turn pagination off
- by invoking <strong>PAGINATE</strong> with any argument (<strong>OFF,
- NO, QUIT, END, X...</strong>), e.g.
- <p>
- <pre>
- .PAGINATE NO
- </pre>
- To (re)start pagination, invoke <strong>PAGINATE</strong>
- without any argument.
- <p>
- <!---PAGENUMBER--->
- <hr width="66%" align="left">
- <p>
- <a name="PAGENUMBER"></a>
- <nobr>Macro: <strong>PAGENUMBER</strong> <number></nobr>
- <p>
- As is to be expected, pagination of documents begins at page 1.
- If you'd prefer that <strong>mom</strong> begin with a different
- number on the first page of a document, invoke
- <strong>PAGENUMBER</strong> with the number you want.
- <p>
- <strong>PAGENUMBER</strong> need not be used only to give
- <strong>mom</strong> a "first page" number. It can be used at
- any time to tell <strong>mom</strong> what number you want a
- page to have. Subsequent page numbers will, of course, be
- incremented by 1 from that number.
- <p>
- <!---PAGENUM_STYLE--->
- <hr width="66%" align="left">
- <p>
- <a name="PAGENUM_STYLE"></a>
- <nobr>Macro: <strong>PAGENUM_STYLE</strong> DIGIT | ROMAN | roman | ALPHA | alpha</nobr>
- <p>
- <strong>PAGENUM_STYLE</strong> lets you tell
- <strong>mom</strong> what kind of page numbering you want.
- <p>
- <table valign="baseline" summary="pagenumstyle">
- <tr><td>DIGIT<td align="center" width="15">=<td>Arabic digits (1, 2, 3...)
- <tr><td>ROMAN<td align="center" width="15">=<td>upper case roman numerals (I, II, III...)
- <tr><td>roman<td align="center" width="15">=<td>lower case roman numerals (i, ii, iii...)
- <tr><td>ALPHA<td align="center" width="15">=<td>upper case letters (A, B, C...)
- <tr><td>alpha<td align="center" width="15">=<td>lower case letters (a, b, c...)</td></tr>
- </table>
- <p>
- <!---PAGENUM_ON_FIRST_PAGE--->
- <hr width="66%" align="left">
- <p>
- <a name="PAGENUM_ON_FIRST_PAGE"></a>
- <nobr>Macro: <strong>PAGENUM_ON_FIRST_PAGE</strong> toggle</nobr>
- <p>
- This macro applies only if you've enabled
- <a href="#FOOTERS">FOOTERS</a>.
- If <strong>FOOTERS</strong> are on, <strong>mom</strong> automatically
- places page numbers at the tops of pages except on
- the first page of a document (or on first pages after
- <a href="rectoverso.html#COLLATE">COLLATE</a>). If you'd
- like the page number to appear on "first" pages when
- footers are on, invoke <strong>PAGENUM_ON_FIRST_PAGE</strong> with
- no argument. Any other argument turns the feature off (<strong>OFF,
- QUIT, END, X...</strong>).
- <p>
- As with most of the <a
- href="definitions.html#TERMS_CONTROLMACRO">control macros</a>,
- <strong>PAGENUM_ON_FIRST_PAGE</strong> 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
- <strong>COLLATE</strong>, omit it before the first
- <a href="docprocessing.html#START">START</a>
- of the document, then invoke it either just before or after your
- first <strong>COLLATE</strong>.
- <p>
- <!---DRAFT_WITH_PAGENUMBER--->
- <hr width="66%" align="left">
- <p>
- <a name="DRAFT_WITH_PAGENUMBER"></a>
- Macro: <strong>DRAFT_WITH_PAGENUMBER</strong>
- <p>
- Sometimes, in
- <a href="docprocessing.html#COPYSTYLE">COPYSTYLE DRAFT</a>,
- the CENTER part of page headers gets overcrowded because of the draft
- and revision information that go there by default.
- <strong>DRAFT_WITH_PAGENUMBER</strong> is one way to
- fix the problem.
- <p>
- Invoked without an argument, <strong>DRAFT_WITH_PAGENUMBER</strong>
- removes draft/revision information from the page headers and attaches
- it instead to the document's page numbering, in the form
- <p>
- <pre>
- Draft #, Rev. # / <pagenumber>
- </pre>
- See the note in
- <a href="docprocessing.html#COPYSTYLE">COPYSTYLE DRAFT</a>
- for other ways of dealing with crowded page headers when formatting
- draft-style copy.
- <p>
- <hr>
- <!---PAGINATE_CONTROL--->
- <a name="PAGINATE_CONTROL"><h3><u>Pagination control macros</u></h3></a>
- <ol>
- <li><a href="#PAGINATE_GENERAL">Family/font/size/colour</a>
- <li><a href="#PAGENUM_POS">Page number position (vertical and horizontal)</a>
- <li><a href="#PAGENUM_HYPHENS">Enclose page numbers with hyphens (on or off)</a>
- </ol>
- <br>
- <a name="PAGINATE_GENERAL"><h3><u>1. Page number family/font/size/colour</u></h3></a>
- <p>
- See
- <a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>.
- <p>
- <pre>
- .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
- </pre>
- <a name="PAGENUM_POS"><h3><u>2. Page number position</u></h3></a>
- <p>
- <nobr>Macro: <strong>PAGENUM_POS</strong> TOP | BOTTOM LEFT | CENTER | RIGHT</nobr>
- <p>
- Use <strong>PAGENUM_POS</strong> to change the default position of
- automatic page numbering. <strong>PAGENUM_POS</strong> requires
- <em>two</em> arguments: a vertical position (TOP or BOTTOM) and a
- horizontal position (LEFT or CENTER or RIGHT).
- <p>
- For example, if you turn both
- <a href="definitions.html#TERMS_HEADER">headers</a>
- and
- <a href="definitions.html#TERMS_FOOTER">footers</a>
- off (with <code>.HEADERS OFF</code> and <code>.FOOTERS
- OFF</code>) and you want <strong>mom</strong> to number your
- pages at the top right position, enter
- <p>
- <pre>
- .PAGENUM_POS TOP RIGHT
- </pre>
- <a name="PAGENUM_HYPHENS"><h3><u>3. Enclose page numbers with hyphens (on or off)</u></h3></a>
- <p>
- By default, <strong>mom</strong> encloses page numbers between hyphens.
- If you don't want this behaviour, invoke the macro
- <strong>PAGENUM_HYPHENS</strong> with any argument (<strong>OFF, QUIT, END, X...</strong>),
- like this:
- <p>
- <pre>
- .PAGENUM_HYPHENS OFF
- </pre>
- If, for some reason, you want to turn page number hyphens back
- on, invoke the macro without an argument.
- <p>
- <hr>
- <a href="rectoverso.html#TOP">Next</a>
- <a href="docelement.html#TOP">Prev</a>
- <a href="#TOP">Top</a>
- <a href="toc.html">Back to Table of Contents</a>
- </body>
- </html>