1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 2<html> 3<head> 4<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> 5<title>Mom -- Document processing: headers, footers and pagination</title> 6</head> 7<body bgcolor="#dfdfdf"> 8 9<!====================================================================> 10 11<a href="rectoverso.html#TOP">Next</a> 12<a href="docelement.html#TOP">Prev</a> 13<a href="toc.html">Back to Table of Contents</a> 14<p> 15 16<a name="TOP"></a> 17<a name="HEADFOOTPAGE"> 18 <h1 align="center"><u>PAGE HEADERS, FOOTERS, AND PAGINATION</u></h1> 19</a> 20 21<ul> 22 <li><a href="#HEADFOOTPAGE_INTRO">Introduction -- VERY IMPORTANT; read me!</a> 23 <ul> 24 <li><a href="#PAGINATION_NOTE">An important note on pagination</a> 25 </ul> 26 <li><a href="#DESCRIPTION_GENERAL">General description of headers/footers</a> 27 <li><a href="#HEADER_STYLE">Default specs for headers/footers</a> 28 <li><a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a> 29 <li><a href="#HEADFOOT_MANAGEMENT">Managing headers/footers</a> -- see also <a href="#HEADFOOT_TOC">Control macros for headers/footers</a> 30 <ul> 31 <li><a href="#HEADERS">HEADERS</a> -- on or off 32 <li><a href="#FOOTERS">FOOTERS</a> -- on or off 33 <li><a href="#FOOTER_ON_FIRST_PAGE">FOOTER_ON_FIRST_PAGE</a> 34 <li><a href="#USERDEF_HDRFTR">User-defined, single string recto/verso headers/footers</a> 35 <ul> 36 <li><a href="#USERDEF_HDRFTR_INTRO">Introduction</a> 37 <li><a href="#HDRFTR_RECTOVERSO">HEADER_RECTO, HEADER_VERSO</a> 38 </ul> 39 </ul> 40 <a name="HEADFOOT_TOC"></a> 41 <li><a href="#HEADFOOT_CONTROL">Control macros for headers/footers</a> 42 <ul> 43 <li><a href="#HDRFTR_STRINGS">Header/footer strings</a> 44 <ul> 45 <li><a href="#RESERVED_STRINGS">Using mom's "reserved" strings in header/footer definitions</a> 46 </ul> 47 <li><a href="#HDRFTR_STYLE">Header/footer style</a> 48 <ul> 49 <li><a href="#HDRFTR_STYLE_GLOBAL">Global style control</a> 50 <li><a href="#HDRFTR_STYLE_PART">Part-by-part style control</a> 51 </ul> 52 <li><a href="#HDRFTR_VERTICAL">Vertical placement and spacing of headers/footers</a> 53 <ul> 54 <li><a href="#HDRFTR_MARGIN">HEADER_MARGIN</a> 55 <li><a href="#HDRFTR_GAP">HEADER_GAP</a> 56 </ul> 57 <li><a href="#HDRFTR_SEPARATOR">The header/footer separator rule</a> 58 <ul> 59 <li><a href="#HDRFTR_RULE">HEADER_RULE</a> -- on or off 60 <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> -- distance of rule from header/footer 61 <li><a href="#HDRFTR_RULE_COLOR">HEADER_RULE_COLOR</a> -- colour of the header/footer rule 62 </ul> 63 </ul> 64 <li><a href="#PAGINATION">Pagination</a> 65 <ul> 66 <li><a href="#INDEX_PAGINATION">Pagination control macros</a> 67 </ul> 68</ul> 69 70<a name="HEADFOOTPAGE_INTRO"> 71 <h2><u>Introduction</u></h2> 72</a> 73 74<a href="definitions.html#TERMS_HEADER">Headers</a> 75and 76<a href="definitions.html#TERMS_FOOTER">footers</a>, 77as defined in the section 78<a href="definitions.html#TERMS_MOM">Mom's Document Processing Terms</a>, 79are those parts of a document that contain information about the document 80itself which appear in the margins either above or below 81<a href="definitions.html#TERMS_RUNNING">running text</a>. 82They are, in all respects but two, identical. The differences are: 83<p> 84<ol> 85 <li>headers appear in the margin <em>above</em> running text while 86 footers appear in the margin <em>beneath</em> running text; 87 <li>the (optional) rule that separates headers from running 88 text appears <em>below</em> the header while 89 the (optional) rule that separates footers from running 90 text appears <em>above</em> the footer. 91</ol> 92<a name="HEADERFOOTER"></a> 93<p> 94Because headers and footers are virtually identical, this 95documentation addresses itself only to headers. In all cases, 96unless otherwise noted, descriptions of headers 97describe footers as well. 98<p> 99Furthermore, any 100<a href="definitions.html#TERMS_CONTROLMACRO">control macro</a> 101that begins with <strong>HEADER_</strong> may be used to control 102footers, simply by replacing <strong>HEADER_</strong> with 103<strong>FOOTER_</strong>. 104<p> 105<strong>Author's note:</strong> Left to their own devices (i.e. if 106you're happy with the way <strong>mom</strong> does things by default), 107headers are something you never have to worry about. You can skip 108reading this section entirely. But if you want to change them, be 109advised that headers have more macros to control their appearance than 110any other document element. The text of this documentation becomes 111correspondingly dense at this point. 112<a name="PAGINATION_NOTE"></a> 113<p> 114<strong>NOTE:</strong> While the single page number that 115<strong>mom</strong> generates in either the top or bottom margin 116above or below running text is technically a kind of header/footer, 117<strong>mom</strong> and this documentation treat it as a 118separate page element. 119<p> 120 121<a name="DESCRIPTION_GENERAL"><h3><u>General description of headers/footers</u></h3></a> 122<p> 123Headers comprise three distinct parts: a left part, a centre part, 124and a right part. Each part contains text (a "string") 125that identifies some aspect of the document as a whole. 126<p> 127The left part ("header left") lines up with the document's 128left margin. The centre part ("header centre") is 129centred on the document's line length. The right part ("header 130right") lines up with the document's right margin. Not all parts 131need contain a string, and if you don't want headers at all, you can 132turn them off completely. 133<p> 134<strong>A note to groff experts:</strong> Although 135<strong>mom</strong>'s headers resemble the three-part titles generated 136by <code>.tl</code>, they're in no way related to it, nor based 137upon it. <code>.tl</code> is not used at all in <strong>mom</strong>. 138<p> 139Normally, <strong>mom</strong> fills headers with strings appropriate 140to the document type selected with 141<a href="docprocessing.html#DOCTYPE">DOCTYPE</a>. 142You can, however, supply whatever strings you like -- including page 143numbers -- to go in any part of headers. What's more, you can set the 144family, font, size and capitalization style (caps or caps/lower-case) 145for each header part individually. 146<p> 147By default, <strong>mom</strong> prints a horizontal rule beneath 148headers to separate them visually from running text. In the case of 149footers, the rule is <em>above</em> running text. You can increase 150or decrease the space between the header and the rule if you like (with 151<a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a>), 152or remove it completely. 153<p> 154 155<a name="HEADER_STYLE"><h3><u>Default specs for headers/footers</u></h3></a> 156<p> 157<strong>Mom</strong> makes small type adjustments to each part of 158the header (left, centre, right) to achieve an aesthetically 159pleasing result. The defaults are listed below. (The strings 160<strong>mom</strong> puts by default in each part are explained in 161<a href="docprocessing.html#DOCTYPE">DOCTYPE</a>.) 162<p> 163<strong>NOTE:</strong> Except for capitalization (all caps or 164caps/lower-case), these defaults apply only to 165<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>. 166<p> 167<pre> 168TYPE SPEC HEADER LEFT HEADER CENTER HEADER RIGHT 169--------- ----------- ------------- ------------ 170Family document default document default document default 171Font roman italic roman 172Colour (black) (black) (black) 173All caps no no yes 174Size* -.5 (points) -.5 (points) -2 (points) 175 (-2 if all caps) (-2 if all caps) (-.5 if not all caps) 176 177*Relative to the point size of type in paragraphs 178</pre> 179 180You can, of course, change any of the defaults using the appropriate 181control macros. And should you wish to design headers from the ground 182up, <strong>mom</strong> has a special macro, 183<a href="#HDRFTR_PLAIN">HEADER_PLAIN</a>, 184that removes all type adjustments to headers. The straightforward 185type specs for paragraphs are used instead, providing a simple 186reference point for any alterations you want to make to the family, 187font, size and capitalization style of any header part. 188<p> 189 190<a name="VERTICAL_SPACING"><h3><u>Vertical placement and spacing of headers/footers</u></h3></a> 191<p> 192As explained in the section on 193<a href="typedocmac.html">typesetting macros in document processing</a>, 194the top and bottom margins of a <strong>mom</strong> document 195are the vertical start and end positions of 196<a href="definitions.html#TERMS_RUNNING">running text</a>, 197not the vertical positions of headers or footers, which, by definition, 198appear in the margins <em>above</em> (or below) running text. 199<p> 200The vertical placement of headers 201is controlled by the macro 202<a href="#HDRFTR_MARGIN">HEADER_MARGIN</a>, 203which establishes the 204<a href="definitions.html">baseline</a> 205position of headers relative to the <em>top</em> edge of the page. 206The header rule, whose position is relative to the header itself, 207is controlled by a separate macro. 208<strong>FOOTER_MARGIN</strong> establishes the baseline position of 209footers relative to the <em>bottom</em> edge of the page. 210<p> 211<a href="#HDRFTR_GAP">HEADER_GAP</a> establishes 212the distance between headers and the <em>start</em> of running text (effectively 213making <strong>HEADER_MARGIN + HEADER_GAP</strong> the top margin of 214running text unless you give <strong>mom</strong> a literal top margin 215(with 216<a href="typesetting.html#T_MARGIN">T_MARGIN</a>), 217in which case she ignores <strong>HEADER_GAP</strong> and starts 218running text at whatever top margin you gave. 219<strong>FOOTER_GAP</strong> and 220<a href="typesetting.html#B_MARGIN">B_MARGIN</a> 221work similarly, except they determine where running text 222<em>ends</em> on the page. (See 223<a href="#FOOTER_MARGIN">FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT!</a> 224for a warning about possible conflicts between the footer margin 225and the bottom margin.) 226<p> 227Confused? <strong>Mom</strong> apologizes. It's really quite 228simple. By default, <strong>mom</strong> sets headers 4-1/2 229<a href="definitions.html#TERMS_PICASPOINTS">picas</a> 230down from the top of the page and starts running text 3 picas (the 231<strong>HEADER_GAP</strong>) beneath that, which means the 232effective top margin of running text is 7-1/2 picas (visually approx. 1 233inch). If you give <strong>mom</strong> a literal top margin (with 234<a href="typesetting.html#T_MARGIN">T_MARGIN</a>), 235she ignores the <strong>HEADER_GAP</strong> and starts running 236text at whatever top margin you gave. 237<p> 238Footers are treated the same way, the only difference being the 239default distances. <strong>Mom</strong> sets footers 3 picas up from 240the bottom of the page, and interrupts the processing of running text 3 241picas (the <strong>FOOTER_GAP</strong>) above that (again, visually 242approx. 1 inch). If you give <strong>mom</strong> a literal bottom 243margin (with <a 244href="typesetting.html#B_MARGIN">B_MARGIN</a>), she ignores the 245<strong>FOOTER_GAP</strong> and interrupts the processing of running 246text at whatever bottom margin you gave. 247<p> 248If <strong>mom</strong> is paginating your document (she 249does, by default, at the bottom of each page), the vertical 250spacing and placement of page numbers, whether at the top 251or the bottom of the page, is managed exactly as if the 252page numbers were headers (or footers), and are controlled 253by the same macros. See 254<a href="#PAGINATION">Pagination control</a>. 255<p> 256<hr> 257 258<!========================================================================> 259 260<a name="HEADFOOT_MANAGEMENT"> 261 <h2><u>Managing headers/footers</u></h2> 262</a> 263 264<p> 265The following are the basic macros for turning 266<a href="definitions.html#TERMS_HEADER">headers</a> 267or 268<a href="definitions.html#TERMS_FOOTER">footers</a> 269on or off. They should be invoked prior to 270<a href="docprocessing.html#START">START</a>. 271<p> 272By default, <strong>mom</strong> prints page headers. If you turn 273them off, she will begin 274<a href="definitions.html#TERMS_RUNNING">running text</a> 275on each page with a default top margin of 6 276<a href="definitions.html#TERMS_PICASPOINTS">picas</a> 277unless you have requested a different top margin (with 278<a href="typesetting.html#T_MARGIN">T_MARGIN</a>) 279prior to 280<a href="docprocessing.html#START">START</a>. 281<p> 282Please note that headers and footers are mutually exclusive. If 283headers are on, footers (but NOT bottom-of-page numbering) are 284automatically turned off. Equally, if footers are on, headers 285(but NOT top-of-page numbering) are automatically turned off. Thus, if 286you'd prefer footers in a document, you need only invoke 287<a href="#FOOTERS">FOOTERS</a>; 288there's no need to turn headers off first. 289<p> 290 291<!---HEADERS---> 292 293<hr width="66%" align="left"> 294<p> 295<a name="HEADERS"></a> 296<nobr>Macro: <strong>HEADERS</strong> toggle</nobr> 297 298<p> 299<a href="definitions.html#TERMS_HEADER">Page headers</a> 300are on by default. If you don't want them, turn them off by 301invoking <strong>HEADERS</strong> with any argument 302(<strong>OFF, QUIT, END, X...</strong>), e.g. 303<p> 304<pre> 305 .HEADERS OFF 306</pre> 307<p> 308<strong>NOTE:</strong> <strong>HEADERS</strong> automatically 309disables 310<a href="definitions.html#TERMS_FOOTER">footers</a> 311(you can't have both), but not the page numbers that normally 312appear at the bottom of the page. 313<p> 314<strong>ADDITIONAL NOTE:</strong> If <strong>HEADERS</strong> 315are <strong>OFF</strong>, <strong>mom</strong>'s normal top 316margin for 317<a href="definitions.html#TERMS_RUNNING">running text</a> 318(7.5 319<a href="definitions.html#TERMS_PICASPOINTS">picas</a>) 320changes to 6 picas (visually approx. 1 inch). This does NOT apply 321to the situation where footers have been explicitly turned on 322(with 323<a href="#FOOTERS">FOOTERS</a>). 324Explicitly invoking footers moves page numbering to the 325top of the page, where its placement and spacing are the same as 326for headers. (I.e. the top margin of running text remains 7.5 327picas.) 328<p> 329 330<!---FOOTERS---> 331 332<hr width="66%" align="left"> 333<p> 334<a name="FOOTERS"></a> 335<nobr>Macro: <strong>FOOTERS</strong> toggle</nobr> 336 337<p> 338<a href="definitions.html#TERMS_FOOTER">Page footers</a> 339are off by default. If you want them instead of 340<a href="definitions.html#TERMS_HEADER">headers</a> 341(you can't have both), turn them on by invoking 342<strong>FOOTERS</strong> without an argument, e.g. 343<p> 344<pre> 345 .FOOTERS 346</pre> 347 348<p> 349<strong>FOOTERS</strong> automatically disables headers, and 350<strong>mom</strong> shifts the placement of page numbers from their 351normal position at page bottom to the top of the page. 352<p> 353<strong>NOTE:</strong> By default, when footers are on, 354<strong>mom</strong> does not print a page number on the first 355page of a document, nor on first pages after 356<a href="rectoverso.html#COLLATE">COLLATE</a>. 357If you don't want this behaviour, you can change it with 358<a href="#PAGENUM_ON_FIRST_PAGE">PAGENUM_ON_FIRST_PAGE</a>. 359<p> 360 361<!---FOOTER_ON_FIRST_PAGE---> 362 363<hr width="66%" align="left"> 364<p> 365<a name="FOOTER_ON_FIRST_PAGE"></a> 366<nobr>Macro: <strong>FOOTER_ON_FIRST_PAGE</strong> toggle</nobr> 367 368<p> 369If you invoke 370<a href="#FOOTERS">FOOTERS</a>, 371<strong>mom</strong>, by default, does not print a footer on the 372first page of the document. (The 373<a href="definitions.html">docheader</a> 374on page 1 makes it redundant.) However, should you wish a footer on 375page 1, invoke <strong>FOOTER_ON_FIRST_PAGE</strong> without any argument. 376<p> 377<hr> 378 379<!---USERDEF_HDRFTR---> 380 381<a name="USERDEF_HDRFTR"> 382 <h2><u>User-defined, single string recto/verso headers/footers</u></h2> 383</a> 384 385<a name="USERDEF_HDRFTR_INTRO"><h3><u>Introduction</u></h3></a> 386 387Sometimes, you'll find you can't get <strong>mom</strong>'s handling 388of 3-part headers or footers to do exactly what you want in the 389order you want. This is most likely happen when you want the 390information contained in the headers/footers split over two pages, 391as is often the case with recto/verso documents. 392<p> 393Say, for example, you want recto page headers to contain a document's 394author, centred, and verso page headers to contain the document's 395title, also centred, like this: 396<p> 397<pre> 398 +------------------------+ +------------------------+ 399 | Author | | Title | 400 | | | | 401 | | | | 402 | | | | 403 | | | | 404 | | | | 405 | | | | 406 | | | | 407 | | | | 408 | | | | 409 | | | | 410 | | | | 411 | | | | 412 | | | | 413 +------------------------+ +------------------------+ 414</pre> 415 416With <strong>mom</strong>'s standard 3-part headers, this isn't 417possible, even when 418<a href="rectoverso.html#RECTO_VERSO">RECTO_VERSO</a> 419is enabled. <strong>RECTO_VERSO</strong> switches the left and 420right parts of headers on alternate pages, but the centre 421part remains unchanged. 422<p> 423Any time you need distinctly different headers on alternate 424pages, <strong>mom</strong> has macros that let you manually 425design and determine what goes into headers on recto pages, and 426what goes into headers on verso pages. The macros are 427<a href="#HDRFTR_RECTO">HEADER_RECTO</a> 428and 429<a href="#HDRFTR_VERSO">HEADER_VERSO</a>. 430Both allow you to state whether the header is flush left, centred, 431or flush right, and both take a single 432<a href="definitions.html#TERMS_STRINGARGUMENT">string argument</a> 433with which, by combining text and 434<a href="definitions.html#TERMS_INLINES">inline escapes</a>, 435you can make the headers come out just about any way you want. 436Use of the <strong>\*[PAGE#]</strong> escape is permitted in the 437string argument (see 438<a href="#PAGE_NUMBER_INCL">Including the page number in header-left, -centre or -right</a>), 439and as an added bonus, <strong>mom</strong> provides a special 440mechanism whereby it's possible to "pad" the string as well. 441<p> 442 443<!---HDRFTR_RECTOVERSO---> 444 445<hr width="66%" align="left"> 446<p> 447<a name="HDRFTR_RECTOVERSO"></a> 448<nobr>Macro: <strong>HEADER_RECTO</strong> LEFT | CENTER | RIGHT "<header recto string>"</nobr> 449<br> 450<nobr>Macro: <strong>HEADER_VERSO</strong> LEFT | CENTER | RIGHT "<header verso string>"</nobr> 451<br> 452 453<p> 454<strong>HEADER_RECTO</strong> and <strong>HEADER_VERSO</strong> behave 455identically, hence all references to <strong>HEADER_RECTO</strong> 456in this section also refer to <strong>HEADER_VERSO</strong>. 457Furthermore, <strong>FOOTER_</strong> can be used instead of 458<strong>HEADER_</strong> to set up recto/verso footers. 459<p> 460The first argument to <strong>HEADER_RECTO</strong> is the 461direction in which you want the header 462<a href="definitions.html#TERMS_QUAD">quadded</a>. 463<strong>L, C</strong> and <strong>R</strong> may be used in 464place of <strong>LEFT, CENTER</strong> and 465<strong>RIGHT</strong>. The second argument is a string, 466surrounded by double-quotes, containing what you want in the 467header. <strong>HEADER_RECTO</strong> disables <strong>mom</strong>'s 468normal 3-part headers, therefore anything you want in the 469headers must be entered by hand in the string, including colours 470(via the 471<a href="definitions.html#TERMS_INLINES">inline escape</a> 472<a href="color.html#COLOR_INLINE">\*[<colorname>]</a>). 473<p> 474By default, <strong>HEADER_RECTO</strong> is set at the same 475size, and in the same family and font, as paragraph text. The 476control macros 477<a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a> 478and 479<a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> 480may be used to change the default family and size. Changes to 481the font(s) within the string must be accomplished with the 482<a href="definitions.html#TERMS_INLINES">inline escapes</a> 483<strong>\*[ROM], \*[IT], \*[BD], \*[BDI]</strong> and 484<strong>\*[PREV]</strong> (see 485<a href="inlines.html#INLINE_FONTS_MOM">Changing fonts</a>). 486Additional refinements to the style of the header-recto string, 487including horizontal spacing and/or positioning, can also be made with 488inline escapes. 489<p> 490To include the current page number in the string, use the 491<strong>\*[PAGE#]</strong> inline. 492<br> 493 494<h3><u>*Padding the HEADER_RECTO/HEADER_VERSO string</u></h3> 495You can "pad" the header-recto string, a convenience you'll 496appreciate in circumstances such as the following. 497<p> 498<pre> 499 VERSO RECTO 500 +------------------------+ +------------------------+ 501 | Author Page# | | Page# Title | 502 | | | | 503 | | | | 504 | | | | 505 | | | | 506 | | | | 507 | | | | 508 | | | | 509 | | | | 510 | | | | 511 | | | | 512 | | | | 513 | | | | 514 | | | | 515 +------------------------+ +------------------------+ 516</pre> 517 518To pad the string argument passed to <strong>HEADER_RECTO</strong>, 519begin and end the string (inside the double-quotes) with the caret 520character (<kbd>^</kbd>). Enter the pound sign (<kbd>#</kbd>) at any 521point in the string where you want an equalized amount of whitespace 522inserted. (If you're unsure what padding is, see 523<a href="goodies.html#PAD">Insert space into lines</a>.) 524Note that if you're padding the string, it doesn't matter what 525quad direction you give <strong>HEADER_RECTO</strong> since 526padding, by its nature, justifies text to the left and right 527margins. 528<p> 529The situation depicted above is accomplished like this: 530<p> 531<pre> 532 .HEADER_RECTO LEFT "^\*[PAGE#]#Title^" 533 .HEADER_VERSO LEFT "^Author#\*[PAGE#]^" 534</pre> 535 536Note that <strong>mom</strong> does not interpret the <kbd>#</kbd> 537in <strong>\*[PAGE#]</strong> as a padding marker (i.e. as a place 538to insert whitespace). 539<p> 540Also, notice that the argument <strong>LEFT</strong> is used in both 541cases. When padding a header, it doesn't matter whether you use 542LEFT, CENTER or RIGHT as the argument. 543<p> 544Furthermore, should you need a user-defined header of 545the sort provided by <strong>HEADER_RECTO</strong> and 546<strong>HEADER_VERSO</strong> but aren't actually printing 547recto/verso, you can use <strong>HEADER_RECTO</strong> to design the 548header that appears at the top of every page. 549<p> 550<strong>IMPORTANT:</strong> The 551<a href="goodies.html#PAD_MARKER">PAD_MARKER</a> 552macro, which changes the default pad marker (<kbd>#</kbd>) used by 553<a href="goodies.html#PAD">PAD</a>, 554has no effect on the pad marker used in the 555<strong>HEADER_RECTO</strong> string. If you absolutely must 556have a literal pound sign in your <strong>HEADER_RECTO</strong> 557string, use the escape sequence for the pound sign 558(<kbd>\[sh]</kbd>) where you want the pound sign to go. 559<p> 560<hr> 561 562<a name="HEADFOOT_CONTROL"> 563 <h2><u>Control macros for headers/footers</u></h2> 564</a> 565Virtually every part of headers (see the paragraph on how 566<a href="#HEADERFOOTER">"headers" means "footers"</a> 567in the 568<a href="#HEADFOOTPAGE_INTRO">introduction to headers/footers</a>) 569can be designed to your own specifications. 570<p> 571 572<a name="INDEX_REFERENCE"> 573 <h3><u>Header/footer control macros</u></h3> 574</a> 575 576<ul> 577 <li><a href="#HDRFTR_STRINGS"><strong>STRINGS</strong></a> 578 <ul> 579 <li><a href="#HDRFTR_LEFT">HEADER_LEFT</a> 580 <li><a href="#HDRFTR_CENTER">HEADER_CENTER</a> 581 <ul> 582 <li><a href="#HDRFTR_CENTER_PAD">HEADER_CENTER_PAD</a> -- stick some space left of right of the centre string 583 </ul> 584 <li><a href="#HDRFTR_RIGHT">HEADER_RIGHT</a> 585 <li><a href="#PAGE_NUMBER_SYMBOL">Replacing header left, centre or right with the page number</a> 586 <li><a href="#PAGE_NUMBER_INCL">Including the page number in header left, centre or right</a> 587 </ul> 588 <li><a href="#HDRFTR_STYLE"><strong>STYLE</strong></a> 589 <ul> 590 <li><a href="#HDRFTR_STYLE_GLOBAL"><strong>Global changes</strong></a> 591 <li><a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a> -- family for entire header 592 <li><a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> -- size for entire header 593 <li><a href="#HDRFTR_PLAIN">HEADER_PLAIN</a> -- disable default adjustments to header parts 594 <li><a href="#HDRFTR_COLOR">HEADER_COLOR</a> -- colourize the header 595 </ul> 596 <ul> 597 <li><a href="#HDRFTR_STYLE_PART"><strong>Part-by-part changes</strong></a> 598 <li><a href="#_FAMILY">_FAMILY</a> -- left, centre or right family 599 <li><a href="#_FONT">_FONT</a> -- left, centre or right font 600 <li><a href="#_SIZE">_SIZE</a> -- left, centre or right size 601 <li><a href="#_CAPS">_CAPS</a> -- left, centre or right all caps 602 <li><a href="#_COLOR">_COLOR</a> -- left, centre or right colour 603 </ul> 604 <li><a href="#HDRFTR_VERTICAL"><strong>VERTICAL PLACEMENT AND SPACING</strong></a> 605 <ul> 606 <li><a href="#HDRFTR_MARGIN">HEADER_MARGIN</a> 607 <li><a href="#HDRFTR_GAP">HEADER_GAP</a> 608 </ul> 609 <li><a href="#HDRFTR_SEPARATOR"><strong>SEPARATOR RULE</strong></a> 610 <ul> 611 <li><a href="#HDRFTR_RULE">HEADER_RULE</a> 612 <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> 613 <li><a href="#HDRFTR_RULE_COLOR">HEADER_RULE_COLOR</a> 614 </ul> 615</ul> 616 617<!---HDRFTR_STRINGS---> 618 619<hr width="66%" align="left"> 620<a name="HDRFTR_STRINGS"><h3><u>Header/footer strings</u></h3></a> 621<p> 622<a name="HDRFTR_LEFT"> 623 <nobr>Macro: <strong>HEADER_LEFT</strong> "<text of header left>" | #</nobr> 624</a> 625<br> 626<a name="HDRFTR_CENTER"> 627 <nobr>Macro: <strong>HEADER_CENTER</strong> "<text of header centre>" | #</nobr> 628</a> 629<br> 630<a name="HDRFTR_RIGHT"> 631 <nobr>Macro: <strong>HEADER_RIGHT</strong> "<text of header right>" | #</nobr> 632</a> 633 634<p> 635To change the text (the "string") of the left, centre, 636or right part of headers, invoke the appropriate macro above with 637the string you want. For example, <strong>mom</strong>, by default, 638prints the document's author in the header-left position. If your 639document has, say, two authors, and you want both their names to 640appear header-left, change <strong>HEADER_LEFT</strong> like this: 641<p> 642<pre> 643 .HEADER_LEFT "R. Stallman, E. Raymond" 644</pre> 645 646Because the arguments to <strong>HEADER_LEFT, _CENTER,</strong> 647and <strong>_RIGHT</strong> are 648<a href="definitions.html#TERMS_STRINGARGUMENT">string arguments</a>, 649they must be enclosed in double-quotes. 650<p> 651<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 652with <strong>FOOTER_</strong> to change the strings in footers. 653 654<a name="HDRFTR_CENTER_PAD"><h3><u>*Padding the header/footer centre string</u></h3></a> 655<p> 656<nobr>Macro: <strong>HEADER_CENTER_PAD</strong> LEFT | RIGHT <amount of space by which to pad centre string left or right></nobr> 657<br> 658<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 659<p> 660By default, <strong>mom</strong> centres the header centre string 661literally on the line length in effect for page headers. In some 662cases, notably when the header left or header right strings are 663particularly long, the effect isn't pretty. The offendingly long 664header left or right crowds, or even overprints, the header centre. 665That's where <strong>HEADER_CENTER_PAD</strong> comes in. With a 666bit of experimentation (yes, you have to preview the document), you 667can use <strong>HEADER_CENTER_PAD</strong> to move the header 668centre string left or right until it looks acceptably centred 669between the two other strings. 670<p> 671For example, say your document is an outline for a novel called "By 672the Shores of Lake Attica." You've told <strong>mom</strong> 673you want 674<p> 675 <a href="docprocessing.html#DOCTYPE">DOCTYPE</a> 676<halign="center"> 677<strong>NAMED</strong> "Outline" 678<p> 679but when you preview your work, you see that "Outline", in the 680centre of the page header, is uncomfortably close to the title, 681which is to the right of it. By invoking 682<p> 683<pre> 684 .HEADER_CENTER_PAD RIGHT 3P 685</pre> 686 687you can scoot the word "Outline" over three 688<a href="definitions.html#TERMS_PICASPOINTS">picas</a> 689to the left (the padding's added to the right of the string) 690so that your head looks nicely spaced out. Invoking 691<strong>HEADER_CENTER_PAD</strong> with the <strong>LEFT</strong> 692argument obviously puts the padding on the left side of the string. 693<p> 694Most reassuring of all is that if you use 695<strong>HEADER_CENTER_PAD</strong> conjunction with 696<a href="rectoverso.html#RECTO_VERSO">RECTO_VERSO</a>, 697<strong>mom</strong> will pad the centre string appropriately left 698OR right, depending on which page you're on, without you having to 699tell her to do so. 700<p> 701 702<hr width="66%" align="left"> 703<p> 704<a name="RESERVED_STRINGS"><h3><u>Using mom's "reserved" strings in header/footer definitions</u></h3></a> 705<p> 706As pointed out in the author's note in the introduction to 707headers/footers, headers and footers are something you don't 708normally have to worry much about. <strong>Mom</strong> usually 709knows what to do. 710<p> 711However, situations do arise where you need to manipulate what goes 712in the header/footer strings, setting and resetting them as you go 713along. A case where you might want to do this would be if you want 714to output endnotes at the end of each document in a series of 715<a href="rectoverso.html#COLLATE">collated</a> 716documents, and you want the word "Endnotes" to go in the header 717centre position of the endnotes, but want, say, the 718<a href="docprocessing.html#TITLE">TITLE</a> 719to go back into the centre position for the next output document. 720<p> 721In scenarios like the above, <strong>mom</strong> has a number of 722"reserved" strings that you can plug into the 723<strong>HEADER_LEFT, _CENTER</strong> and <strong>_RIGHT</strong> 724macros. They are: 725<p> 726<pre> 727 \*[$TITLE] -- the argument passed to .TITLE 728 \*[$DOCTITLE] -- the argument passed to .DOCTITLE 729 \*[$AUTHOR_1] -- the first argument passed to .AUTHOR 730 \*[$CHAPTER_STRING] -- the argument passed to .CHAPTER_STRING, 731 if invoked, otherwise, "Chapter" 732 \*[$CHAPTER] -- the argument (typically a number) passed 733 to .CHAPTER 734 \*[$CHAPTER_TITLE] -- the argument passed to .CHAPTER_TITLE 735</pre> 736 737Returning to the scenario above, first, you'd define a centre 738string for the endnotes page: 739<p> 740<pre> 741 .HEADER_CENTER "Endnotes" 742</pre> 743 744Then, you'd output the endnotes: 745<p> 746<pre> 747 .ENDNOTES 748</pre> 749 750Then, you'd prepare <strong>mom</strong> for the next document: 751<p> 752<pre> 753 .COLLATE 754 .TITLE "New Doc Title" 755 .AUTHOR "Josephine Blough" 756</pre> 757 758Then, you'd redefine the header centre string using the reserved 759string \*[$TITLE], like this: 760<p> 761<pre> 762 .HEADER_CENTER "\*[$TITLE]" 763</pre> 764 765And last, you'd do: 766<p> 767<pre> 768 .START 769</pre> 770 771Voil�! Any argument you pass to <strong>TITLE</strong> from here 772on in (say, for subsequent documents) is back in the header centre 773position. Here's the whole routine again: 774<p> 775<pre> 776 .HEADER_CENTER "Endnotes" 777 .ENDNOTES 778 .COLLATE 779 .TITLE "New Doc Title" 780 .AUTHOR "Josephine Blough" 781 .HEADER_CENTER "\*[$TITLE]" 782 .START 783</pre> 784 785If need be, you can concatenate the strings, as in the following 786example. 787<p> 788<pre> 789 .HEADER_CENTER "\*[$CHAPTER_STRING] \*[$CHAPTER]" 790</pre> 791 792which, assuming a <strong>.CHAPTER_STRING</strong> of 793"Chapter" and a <strong>.CHAPTER</strong> of 794"2", would put "Chapter 2" in the header centre 795position. 796<p> 797 798<a name="PAGE_NUMBER_SYMBOL"> 799 <h3><u>*Replacing header-left, -CENTER or -right with the page number</u></h3> 800</a> 801<p> 802If you would like to have the current page number to appear 803header-left, -center, or -right <em>instead</em> of a text 804string, invoke the appropriate macro, above, with the single 805argument <code>#</code> (the "number" or 806"pound" sign). Do <strong>NOT</strong> use 807double-quotes. For example, 808<p> 809<pre> 810 .HEADER_CENTER # 811</pre> 812 813will print the current page number in the CENTER part of 814headers. 815<p> 816 817<a name="PAGE_NUMBER_INCL"> 818 <h3><u>*Including the page number in header-left, -CENTER or -right</u></h3> 819</a> 820<p> 821If you would like to <em>include</em> the current page number in 822the string you pass to <strong>HEADER_LEFT, _CENTER,</strong> or 823<strong>_RIGHT</strong>, use the special 824<a href="definitions.html#TERMS_INLINES">inline escape</a> 825<code>\*[PAGE#]</code> in the string argument. 826<p> 827For example, say you have a document that's ten pages long, and 828you want header-right to say "page <whichever> of 10", 829invoke <strong>HEADER_RIGHT</strong> as follows: 830<p> 831<pre> 832 .HEADER_RIGHT "page \*[PAGE#] of 10" 833</pre> 834 835Header-right of page two will read "page 2 of 10", 836header-right of page three will read "page 3 of 10", 837and so on. 838<p> 839<hr> 840 841<!---HDRFTR_STYLE---> 842 843<a name="HDRFTR_STYLE"><h3><u>Header/footer style</u></h3></a> 844 845<p> 846<a name="HDRFTR_STYLE_GLOBAL"><strong>Global changes</strong></a> 847<p> 848The following macros allow you to make changes that affect all 849parts of the header at once. 850<p> 851Please note that <strong>HEADER_FAMILY</strong> and 852<strong>HEADER_FONT</strong> have no effect on 853<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>. 854<p> 855<ul> 856 <li><a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a> 857 <li><a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> 858 <li><a href="#HDRFTR_PLAIN">HEADER_PLAIN</a> 859 <li><a href="#HDRFTR_COLOR">HEADER_COLOR</a> 860</ul> 861 862<hr width="33%" align="left"> 863<p> 864<a name="HDRFTR_GLOBAL_FAMILY"> 865 <nobr>Macro: <strong>HEADER_FAMILY</strong> <family></nobr> 866</a> 867 868<p> 869By default, <strong>mom</strong> uses the default document family 870for headers. If you would like her to use another 871<a href="definitions.html#TERMS_FAMILY">family</a> 872in headers, invoke <strong>HEADER_FAMILY</strong> with the identifier 873for the family you want. The argument is the same as for the 874typesetting macro 875<a href="typesetting.html#FAMILY">FAMILY</a>. 876<p> 877<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 878with <strong>FOOTER_</strong> to change the footer family. 879<p> 880 881<hr width="33%" align="left"> 882<p> 883<a name="HDRFTR_GLOBAL_SIZE"> 884 <nobr>Macro: <strong>HEADER_SIZE</strong> <+|-number of points></nobr> 885 <br> 886 <em>*Argument is relative to the point size of type in paragraphs</em> 887</a> 888 889<p> 890By default, <strong>mom</strong> makes small adjustments to the size 891of each part of a header to achieve an aesthetically pleasing result. 892If you'd like her to continue to do so, but would like the overall 893appearance of headers to be a little smaller or a little larger, 894invoke <strong>HEADER_SIZE</strong> with + or - the number of 895<a href="definitions.html#TERMS_PICASPOINTS">points</a> 896(fractions allowed) by which you want her to in/decrease the size 897of headers. For example, 898<p> 899<pre> 900 .HEADER_SIZE +.75 901</pre> 902 903increases the size of every part of a header by 3/4 of a point while 904respecting <strong>mom</strong>'s own little size changes. 905<p> 906See 907<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> 908for an explanation of how control macros ending in 909<strong>_SIZE</strong> work. 910<p> 911<a name="FOOTER_GLOBAL_SIZE"></a> 912<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 913with <strong>FOOTER_</strong> to change the footer size. 914<p> 915<strong>ADDITIONAL NOTE:</strong> Normally, macros that control headers have no 916effect on 917<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>. 918<strong>HEADER_SIZE</strong> is an exception. While all parts of a 919header in <strong>PRINTSTYLE TYPEWRITE</strong> are always the same 920size, you can use <strong>HEADER_SIZE</strong> with <strong>PRINTSTYLE 921TYPEWRITE</strong> to reduce the header's overall point size. 922You'll most likely require this when the 923<a href="docprocessing.html#COPYSTYLE">COPYSTYLE</a> 924is <strong>DRAFT</strong>, since portions of the header may overprint 925if, say, the title of your document is very long. 926<p> 927 928<hr width="33%" align="left"> 929<p> 930<a name="HDRFTR_PLAIN"> 931 Macro: <strong>HEADER_PLAIN</strong> 932</a> 933 934<p> 935By default, <strong>mom</strong> makes adjustments to the font, 936size, and capitalization style of each part of headers to achieve 937an aesthetically pleasing look. Should you wish to design your own 938headers from the ground up without worrying how changes to the various 939elements of header style interact with <strong>mom</strong>'s defaults, 940invoke <strong>HEADER_PLAIN</strong> by itself, with no argument. 941<strong>Mom</strong> will disable her default behaviour for headers, 942and reset all elements of header style to the same family, font, 943and point size as she uses in paragraphs. 944<p> 945<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 946with <strong>FOOTER_</strong> to disable <strong>mom</strong>'s 947default behaviour for the various elements of footer style. 948<p> 949 950<hr width="33%" align="left"> 951<p> 952<a name="HDRFTR_COLOR"> 953 <nobr>Macro: <strong>HEADER_COLOR</strong> <colorname></nobr> 954</a> 955 956<p> 957If you want your headers in a colour different from the document 958default (usually black), invoke <strong>HEADER_COLOR</strong> with 959the name of a colour pre-defined (or "initialized") with 960<a href="color.html#NEWCOLOR">NEWCOLOR</a> 961or 962<a href="color.html#XCOLOR">XCOLOR</a>. 963<p> 964<strong>HEADER_COLOR</strong> will set all the parts of the header 965AND the header rule in the colour you give it as an argument. If 966you wish finer control over colour in headers, you can use 967<a href="#_COLOR">HEADER_<POSITION>_COLOR</a> 968to colourize each part of the header separately, as well as 969<a href="#HDRFTR_RULE_COLOR">HEADER_RULE_COLOR</a> 970to change the colour of the header rule. 971<p> 972<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 973with <strong>FOOTER_</strong> to colourize footers. 974<p> 975 976<hr width="66%" align="left"> 977<p> 978<a name="HDRFTR_STYLE_PART"><strong>Part by part changes</strong></a> 979<p> 980<strong>NOTE:</strong> When using the following control macros, 981replace "<POSITION>" by <strong>LEFT, CENTER,</strong> 982or <strong>RIGHT</strong> as appropriate. 983<p> 984<ul> 985 <li><a href="#_FAMILY">HEADER_<POSITION>_FAMILY</a> 986 <li><a href="#_FONT">HEADER_<POSITION>_FONT</a> 987 <li><a href="#_SIZE">HEADER_<POSITION>_SIZE</a> 988 <li><a href="#_CAPS">HEADER_<POSITION>_CAPS</a> 989 <li><a href="#_COLOR">HEADER_<POSITION>_COLOR</a> 990</ul> 991 992<hr width="33%" align="left"> 993<p> 994<a name="_FAMILY"> 995 <nobr>Macro: <strong>HEADER_<POSITION>_FAMILY</strong> <family></nobr> 996</a> 997<p> 998Use <strong>HEADER_<POSITION>_FAMILY</strong> to change the 999<a href="definitions.html#TERMS_FAMILY">family</a> 1000of any part of headers. See 1001<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> 1002for an explanation of how control macros ending in 1003<strong>_FAMILY</strong> work. 1004<p> 1005<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1006with <strong>FOOTER_</strong> to change a footer part's family. 1007<p> 1008 1009<hr width="33%" align="left"> 1010<p> 1011<a name="_FONT"> 1012 <nobr>Macro: <strong>HEADER_<POSITION>_FONT</strong> <font></nobr> 1013</a> 1014<p> 1015Use <strong>HEADER_<POSITION>_FONT</strong> to change the 1016<a href="definitions.html#TERMS_FONT">font</a> 1017of any part of headers. See 1018<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> 1019for an explanation of how control macros ending in 1020<strong>_FONT</strong> work. 1021<p> 1022<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1023with <strong>FOOTER_</strong> to change a footer part's font. 1024<p> 1025 1026<hr width="33%" align="left"> 1027<p> 1028<a name="_SIZE"> 1029 <nobr>Macro: <strong>HEADER_<POSITION>_SIZE</strong> <+|-number of points></nobr> 1030</a> 1031<p> 1032Use <strong>HEADER_<POSITION>_SIZE</strong> to change the size of any 1033part of headers (relative to the point size of type in 1034paragraphs). See 1035<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> 1036for an explanation of how control macros ending in 1037<strong>_SIZE</strong> work. 1038<p> 1039<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1040with <strong>FOOTER_</strong> to change a footer part's size. 1041<p> 1042 1043<hr width="33%" align="left"> 1044<p> 1045<a name="_CAPS"> 1046 <nobr>Macro: <strong>HEADER_<POSITION>_CAPS</strong> toggle</nobr> 1047</a> 1048<p> 1049<strong>HEADER_<POSITION>_CAPS</strong> is a 1050<a href="definitions.html#TERMS_TOGGLE">toggle macro</a>. 1051If you want any part of headers to be set in all caps, 1052regardless of the capitalization of that part's string as given 1053to the 1054<a href="docprocessing.html#REFERENCE_MACROS">reference macros</a> 1055or as defined by you with the 1056<a href="#HDRFTR_STRINGS">header string control macros</a>, 1057simply invoke this macro (using the appropriate position) with no 1058argument. If you wish to turn capitalization off (say, for the 1059header-right string that <strong>mom</strong> capitalizes by 1060default), invoke the argument with any argument (e.g. <strong>OFF, 1061QUIT, END, X...</strong>). 1062<p> 1063<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1064with <strong>FOOTER_</strong> to change a footer part's 1065capitalization style. 1066 1067<p> 1068<hr width="33%" align="left"> 1069<p> 1070<a name="_COLOR"> 1071 <nobr>Macro: <strong>HEADER_<POSITION>_COLOR</strong> <colorname></nobr> 1072</a> 1073<p> 1074<strong>HEADER_<POSITION>_COLOR</strong> allows you to set a 1075colour for each of the three possible parts of a page header 1076separately. For example, say you want the right part of the header 1077(by default, the document title) in red, this is how you'd get it: 1078<p> 1079<pre> 1080 .HEADER_RIGHT_COLOR red 1081</pre> 1082 1083The other parts of the header will be in the default header colour 1084(usually black, but that can be changed with 1085<a href="#HDRFTR_COLOR">HEADER_COLOR</a>). 1086<p> 1087Remember that you have to define (or "initialize") a 1088colour with 1089<a href="color.html#NEWCOLOR">NEWCOLOR</a> 1090or 1091<a href="color.html#XCOLOR">XCOLOR</a> 1092before you can use the colour. 1093<p> 1094If you create a 1095<a href="#USERDEF_HDRFTR">user-defined header</a> 1096with 1097<a href="#HDRFTR_RECTO">HEADER_RECTO</a> 1098or 1099<a href="#HDRFTR_VERSO">HEADER_VERSO</a>, 1100and you want various elements within the header to be colourized, 1101embed the colours in the string passed to <strong>HEADER_RECTO</strong> 1102or <strong>HEADER_VERSO</strong> with the 1103<a href="color.html#COLOR_INLINE">\*[<colorname>]</a> 1104<a href="definitions.html#TERMS_INLINES">inline escape</a>. 1105<p> 1106<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1107with <strong>FOOTER_</strong> to set the colours for the various 1108elements of footers. 1109<p> 1110<hr> 1111 1112<!---HDRFTR_VERTICAL---> 1113 1114<a name="HDRFTR_VERTICAL"> 1115 <h2><u>Header/footer vertical placement and spacing</u></h2> 1116</a> 1117 1118<p> 1119See 1120<a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a> 1121for an explanation of how <strong>mom</strong> deals with 1122headers, footers, and top/bottom page margins. 1123<p> 1124 1125<!---HDRFTR_MARGIN---> 1126 1127<hr width="66%" align="left"> 1128<p> 1129<a name="HDRFTR_MARGIN"></a> 1130<nobr>Macro: <strong>HEADER_MARGIN</strong> <distance to baseline of header></nobr> 1131<br> 1132<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 1133 1134<p> 1135Use <strong>HEADER_MARGIN</strong> to set the distance from the 1136top edge of the page to the 1137<a href="definitions.html#TERMS_BASELINE">baseline</a> 1138of type in headers. A unit of measure is required, and decimal 1139fractions are allowed. 1140<p> 1141<strong>Mom</strong>'s default header margin is 4-1/2 1142<a href="definitions.html#TERMS_PICASPOINTS">picas</a>, 1143but if you want a different margin, say, 1/2-inch, do 1144<p> 1145<pre> 1146 .HEADER_MARGIN .5i 1147</pre> 1148 1149If your document uses 1150<a href="definitions.html#TERMS_FOOTER">footers</a>, 1151replace <strong>HEADER_</strong>, above, with 1152<strong>FOOTER_</strong>. The argument to 1153<strong>FOOTER_MARGIN</strong> is the distance from the bottom 1154edge of the page to the baseline of type in footers. 1155<p> 1156<strong>Mom</strong>'s default footer margin is 3 1157<a href="definitions.html#TERMS_PICASPOINTS">picas</a>. 1158 1159<a name="FOOTER_MARGIN"></a> 1160<p> 1161<strong>FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT!</strong> 1162<p> 1163<strong>Mom</strong> requires a footer margin for proper operation, 1164hence she sets one, even if you don't. (As stated above, her default 1165footer margin is 3-picas). 1166<p> 1167If you set a bottom margin for your document (with 1168<a href="typesetting.html#B_MARGIN">B_MARGIN</a>, 1169prior to 1170<a href="docprocessing.html#START">START</a>) 1171and the margin's too close to <strong>mom</strong>'s default 1172footer margin (or a footer margin you set yourself 1173with <strong>FOOTER_MARGIN</strong>), <strong>mom</strong> will 1174not print your footers; additionally, she'll give you a warning 1175and some advice on standard error. When this happens, you must 1176reset either <strong>B_MARGIN</strong> or 1177<strong>FOOTER_MARGIN</strong> so there's an adequate amount of 1178space for <strong>mom</strong> to print the bottom line of running 1179text and the footer. 1180<p> 1181If you see the warning even when footers and/or bottom-of-page page 1182numbering are disabled, set a nominal footer margin of 0 prior to 1183<a href="docprocessing.html#START">START</a>, 1184as in these examples. 1185<p> 1186<strong>Example 1</strong> 1187<p> 1188<pre> 1189 <reference macros, etc> 1190 .PAGINATION OFF 1191 .B_MARGIN .25i 1192 .FOOTER_MARGIN O 1193 .START 1194</pre> 1195 1196<strong>Example 2</strong> 1197<p> 1198<pre> 1199 <reference macros, etc> 1200 .HEADERS OFF 1201 .PAGENUM_POS TOP RIGHT 1202 .B_MARGIN .25i 1203 .FOOTER_MARGIN O 1204 .START 1205</pre> 1206 1207<h3>A note on header/footer margins and page numbering</h3> 1208<strong>Mom</strong> uses HEADER_MARGIN</strong> and 1209<strong>FOOTER_MARGIN</strong> to establish the baseline 1210position of page numbers in addition to the baseline position of 1211headers and footers. 1212<p> 1213By default, page numbers appear at the bottom of the page, therefore 1214if you want the default position (bottom), but want to change the 1215baseline placement, use <strong>FOOTER_MARGIN</strong>. Conversely, 1216if page numbers are at the top of the page, either because you turned 1217<a href="#FOOTERS">FOOTERS</a> 1218on or because you instructed <strong>mom</strong> to put them 1219there with 1220<a href="#PAGENUM_POS">PAGENUM_POS</a>, 1221you'd use <strong>HEADER_MARGIN</strong> to change their 1222baseline placement. 1223<p> 1224 1225<!---HDRFTR_GAP---> 1226 1227<hr width="66%" align="left"> 1228<p> 1229<a name="HDRFTR_GAP"></a> 1230<nobr>Macro: <strong>HEADER_GAP</strong> <distance from header to start of running text></nobr> 1231<br> 1232<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 1233 1234<p> 1235Use <strong>HEADER_GAP</strong> to set the distance from the 1236<a href="definitions.html#TERMS_BASELINE">baseline</a> 1237of type in headers to the start of 1238<a href="definitions.html#TERMS_RUNNING">running text</a>. 1239A unit of measure is required, and decimal fractions are allowed. 1240<p> 1241As explained in 1242<a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>, 1243<strong>HEADER_MARGIN + HEADER_GAP</strong> determine the 1244default vertical starting position of running text on the page 1245UNLESS you have given <strong>mom</strong> your own top margin 1246(with 1247<a href="typesetting.html#T_MARGIN">T_MARGIN</a>). If you give 1248a top margin, <strong>mom</strong> ignores 1249<strong>HEADER_GAP</strong>; running text starts at your stated 1250top margin. 1251 1252<p> 1253<strong>Mom</strong>'s default header gap is 3 1254<a href="definitions.html#TERMS_PICASPOINTS">picas</a>, 1255but if you want a different gap, say, 2 centimetres, do 1256<p> 1257<pre> 1258 .HEADER_GAP 2c 1259</pre> 1260 1261If your document uses 1262<a href="definitions.html#TERMS_FOOTER">footers</a>, 1263replace <strong>HEADER_</strong>, above, with 1264<strong>FOOTER_</strong>. The argument to 1265<strong>FOOTER_GAP</strong> is the distance from the 1266baseline of type in footers to the last baseline of running text 1267on the page. 1268<p> 1269As explained in 1270<a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>, 1271<strong>FOOTER_MARGIN + FOOTER_GAP</strong> determine the 1272default vertical end position of running text on the page 1273UNLESS you have given <strong>mom</strong> a bottom margin 1274(with 1275<a href="typesetting.html#B_MARGIN">B_MARGIN</a>). If you give 1276a bottom margin, <strong>mom</strong> ignores 1277<strong>FOOTER_GAP</strong>; running text ends at your stated 1278bottom margin. 1279<p> 1280<strong>Mom</strong>'s default footer gap is 3 1281<a href="definitions.html#TERMS_PICASPOINTS">picas</a>. 1282<p> 1283<strong>NOTE:</strong> <strong>Mom</strong> uses 1284<strong>HEADER_GAP</strong> and 1285<strong>FOOTER_GAP</strong> to establish the start and end baseline 1286positions of running text with respect to both headers and footers 1287AND page numbers. If you wish to change the gap between 1288the last line of running text and a bottom page number, use 1289<strong>FOOTER_GAP</strong>. If page numbers are at the top of the 1290page, change the gap between the number and the first line of running 1291text with <strong>HEADER_GAP</strong>. 1292<p> 1293<hr> 1294 1295<!---HDRFTR_SEPARATOR---> 1296 1297<a name="HDRFTR_SEPARATOR"> 1298 <h2><u>Header/footer separator rule</u></h2> 1299</a> 1300 1301<p> 1302The header/footer separator rule is a modest horizontal rule, 1303set slightly below the header (or above the footer), that runs 1304the length of the 1305<a href="definitions.html#TERMS_HEADER">header</a> 1306and helps separate it visually from 1307<a href="definitions.html#TERMS_RUNNING">running text</a>. If 1308you don't want the rule, you can turn it off. If you want it, 1309but at a different vertical position relative to the header (or 1310footer), you can alter its placement. 1311<p> 1312<ul> 1313 <li><a href="#HDRFTR_RULE">HEADER_RULE</a> -- on or off 1314 <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> -- distance of rule from header 1315</ul> 1316 1317<!---HDRFTR_RULE---> 1318 1319<hr width="66%" align="left"> 1320<p> 1321<a name="HDRFTR_RULE"></a> 1322<nobr>Macro: <strong>HEADER_RULE</strong> toggle</nobr> 1323 1324<p> 1325By default, <strong>mom</strong> prints a header separator rule 1326underneath headers (or above footers). If you don't want the 1327rule, turn it off by invoking <strong>HEADER_RULE</strong> with any 1328argument (<strong>OFF, QUIT, END, X...</strong>), e.g. 1329<p> 1330<pre> 1331 .HEADER_RULE OFF 1332</pre> 1333 1334To turn the rule (back) on, invoke <strong>HEADER_RULE</strong> 1335without any argument. 1336<p> 1337<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1338with <strong>FOOTER_</strong> to enable/disable the printing of 1339the footer separator rule. (Most likely, if you're using 1340<a href="#FOOTERS">FOOTERS</a>, you'll want it off.) 1341<p> 1342 1343<!---HDRFTR_RULE_GAP---> 1344 1345<hr width="66%" align="left"> 1346<p> 1347<a name="HDRFTR_RULE_GAP"></a> 1348<nobr>Macro: <strong>HEADER_RULE_GAP</strong> distance of rule beneath header</nobr> 1349<br> 1350<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 1351 1352<p> 1353<strong>HEADER_RULE_GAP</strong> is the distance from the 1354<a href="definitions.html#TERMS_BASELINE">baseline</a> 1355of type in headers to the rule underneath. A unit of measure is 1356required, and decimal fractions are allowed. Please note that 1357<strong>HEADER_RULE_GAP</strong> has no effect on 1358<a href="#HEADER_GAP">HEADER_GAP</a> 1359(i.e. <strong>HEADER_RULE_GAP</strong> is NOT added to 1360<strong>HEADER_GAP</strong> when <strong>mom</strong> calculates 1361the space between headers and the start of 1362<a href="definitions.html#TERMS_RUNNING">running text</a>). 1363<p> 1364By default, the header rule gap is 4 1365<a href="definitions.html#TERMS_PICASPOINTS">points</a>. 1366If you'd like to change it to, say, 1/4 1367<a href="definitions.html#TERMS_EM">em</a>, do 1368<p> 1369<pre> 1370 .HEADER_RULE_GAP .25m 1371</pre> 1372 1373<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1374with <strong>FOOTER_</strong> if you're using 1375<a href="definitions.html#TERMS_FOOTER">footers</a> 1376and want to change the separator rule gap. In footers, the gap 1377is measured from the top of the tallest 1378<a href="definitions.html#TERMS_ASCENDER">ascender</a> 1379in the footer. 1380<p> 1381<strong>ADDITIONAL NOTE:</strong> When using 1382<a href="#HDRFTR_RECTOVERSO">FOOTER_RECTO</a> 1383and 1384<a href="#HDRFTR_RECTOVERSO">FOOTER_VERSO</a>, 1385make sure that the default size for footers 1386(<a href="#FOOTER_GLOBAL_SIZE">FOOTER_SIZE</a>) 1387is set to the largest size of type that will be used in the 1388footer or <strong>mom</strong> may not get the rule gap right. 1389Inline changes to the size of type in 1390<strong>FOOTER_RECTO</strong> and <strong>FOOTER_VERSO</strong> 1391should always be negative (smaller) than the default. 1392<p> 1393 1394<!---HDRFTR_RULE_COLOR---> 1395 1396<hr width="66%" align="left"> 1397<p> 1398<a name="HDRFTR_RULE_COLOR"></a> 1399<nobr>Macro: <strong>HEADER_RULE_COLOR</strong> <colorname></nobr> 1400 1401<p> 1402If you wish to change the colour of the header rule, invoke 1403<strong>HEADER_RULE_COLOR</strong> with the name of a colour 1404pre-defined (or "initialized") with 1405<a href="color.html#NEWCOLOR">NEWCOLOR</a> 1406or 1407<a href="color.html#XCOLOR">XCOLOR</a>. 1408<p> 1409Please note that <strong>HEADER_RULE_COLOR</strong> overrides the 1410colour set with 1411<a href="#HDRFTR_COLOR">HDRFTR_COLOR</a>, 1412so that it's possible to have the heads entirely in, say, blue (set 1413with <strong>HEADER_COLOR</strong>), and the header rule in, say, 1414red. 1415<p> 1416<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, 1417with <strong>FOOTER_</strong> to change the colour of the footer 1418rule. 1419<p> 1420<hr> 1421 1422<a name="PAGINATION"> 1423 <h2><u>Pagination</u></h2> 1424</a> 1425 1426<p> 1427By default, <strong>mom</strong> paginates documents. Page numbers 1428appear in the bottom margin of the page, centred between two hyphens. 1429As with all elements of <strong>mom</strong>'s document processing, 1430most aspects of pagination style can be altered to suit your taste 1431with control macros. 1432<p> 1433 1434<a name="INDEX_PAGINATION"> 1435 <h3><u>Pagination macros list</u></h3> 1436</a> 1437 1438<ul> 1439 <li><a href="#PAGINATE">PAGINATE</a> -- pagination on or off 1440 <li><a href="#PAGENUMBER">PAGENUMBER</a> -- user-defined (starting) page number 1441 <li><a href="#PAGENUM_STYLE">PAGENUM_STYLE</a> -- digits, roman numerals, etc 1442 <li><a href="#PAGENUM_ON_FIRST_PAGE">PAGENUM_ON_FIRST_PAGE</a> -- applies only when footers are enabled 1443 <li><a href="#DRAFT_WITH_PAGENUMBER">DRAFT_WITH_PAGENUMBER</a> -- attach draft/revision information to page numbers 1444 <li><a href="#PAGINATE_CONTROL">Control macros</a> 1445</ul> 1446<p> 1447 1448<!---PAGINATE---> 1449 1450<hr width="66%" align="left"> 1451<p> 1452<a name="PAGINATE"></a> 1453<nobr>Macro: <strong>PAGINATE</strong> toggle</nobr> 1454<br> 1455Alias: <strong>PAGINATION</strong> 1456 1457<p> 1458By default, <strong>mom</strong> paginates documents (in the bottom 1459margin). If you'd prefer she not paginate, turn pagination off 1460by invoking <strong>PAGINATE</strong> with any argument (<strong>OFF, 1461NO, QUIT, END, X...</strong>), e.g. 1462<p> 1463<pre> 1464 .PAGINATE NO 1465</pre> 1466 1467To (re)start pagination, invoke <strong>PAGINATE</strong> 1468without any argument. 1469<p> 1470 1471<!---PAGENUMBER---> 1472 1473<hr width="66%" align="left"> 1474<p> 1475<a name="PAGENUMBER"></a> 1476<nobr>Macro: <strong>PAGENUMBER</strong> <number></nobr> 1477 1478<p> 1479As is to be expected, pagination of documents begins at page 1. 1480If you'd prefer that <strong>mom</strong> begin with a different 1481number on the first page of a document, invoke 1482<strong>PAGENUMBER</strong> with the number you want. 1483<p> 1484<strong>PAGENUMBER</strong> need not be used only to give 1485<strong>mom</strong> a "first page" number. It can be used at 1486any time to tell <strong>mom</strong> what number you want a 1487page to have. Subsequent page numbers will, of course, be 1488incremented by 1 from that number. 1489<p> 1490 1491<!---PAGENUM_STYLE---> 1492 1493<hr width="66%" align="left"> 1494<p> 1495<a name="PAGENUM_STYLE"></a> 1496<nobr>Macro: <strong>PAGENUM_STYLE</strong> DIGIT | ROMAN | roman | ALPHA | alpha</nobr> 1497 1498<p> 1499<strong>PAGENUM_STYLE</strong> lets you tell 1500<strong>mom</strong> what kind of page numbering you want. 1501<p> 1502<table valign="baseline" summary="pagenumstyle"> 1503<tr><td>DIGIT<td align="center" width="15">=<td>Arabic digits (1, 2, 3...) 1504<tr><td>ROMAN<td align="center" width="15">=<td>upper case roman numerals (I, II, III...) 1505<tr><td>roman<td align="center" width="15">=<td>lower case roman numerals (i, ii, iii...) 1506<tr><td>ALPHA<td align="center" width="15">=<td>upper case letters (A, B, C...) 1507<tr><td>alpha<td align="center" width="15">=<td>lower case letters (a, b, c...)</td></tr> 1508</table> 1509<p> 1510 1511<!---PAGENUM_ON_FIRST_PAGE---> 1512 1513<hr width="66%" align="left"> 1514<p> 1515<a name="PAGENUM_ON_FIRST_PAGE"></a> 1516<nobr>Macro: <strong>PAGENUM_ON_FIRST_PAGE</strong> toggle</nobr> 1517 1518<p> 1519This macro applies only if you've enabled 1520<a href="#FOOTERS">FOOTERS</a>. 1521If <strong>FOOTERS</strong> are on, <strong>mom</strong> automatically 1522places page numbers at the tops of pages except on 1523the first page of a document (or on first pages after 1524<a href="rectoverso.html#COLLATE">COLLATE</a>). If you'd 1525like the page number to appear on "first" pages when 1526footers are on, invoke <strong>PAGENUM_ON_FIRST_PAGE</strong> with 1527no argument. Any other argument turns the feature off (<strong>OFF, 1528QUIT, END, X...</strong>). 1529<p> 1530As with most of the <a 1531href="definitions.html#TERMS_CONTROLMACRO">control macros</a>, 1532<strong>PAGENUM_ON_FIRST_PAGE</strong> can be invoked at any time, 1533meaning that if you don't want a page number on the very first 1534page of a document, but do want one on pages that appear after 1535<strong>COLLATE</strong>, omit it before the first 1536<a href="docprocessing.html#START">START</a> 1537of the document, then invoke it either just before or after your 1538first <strong>COLLATE</strong>. 1539<p> 1540 1541<!---DRAFT_WITH_PAGENUMBER---> 1542 1543<hr width="66%" align="left"> 1544<p> 1545<a name="DRAFT_WITH_PAGENUMBER"></a> 1546Macro: <strong>DRAFT_WITH_PAGENUMBER</strong> 1547 1548<p> 1549Sometimes, in 1550<a href="docprocessing.html#COPYSTYLE">COPYSTYLE DRAFT</a>, 1551the CENTER part of page headers gets overcrowded because of the draft 1552and revision information that go there by default. 1553<strong>DRAFT_WITH_PAGENUMBER</strong> is one way to 1554fix the problem. 1555<p> 1556Invoked without an argument, <strong>DRAFT_WITH_PAGENUMBER</strong> 1557removes draft/revision information from the page headers and attaches 1558it instead to the document's page numbering, in the form 1559<p> 1560<pre> 1561 Draft #, Rev. # / <pagenumber> 1562</pre> 1563 1564See the note in 1565<a href="docprocessing.html#COPYSTYLE">COPYSTYLE DRAFT</a> 1566for other ways of dealing with crowded page headers when formatting 1567draft-style copy. 1568<p> 1569<hr> 1570 1571<!---PAGINATE_CONTROL---> 1572 1573<a name="PAGINATE_CONTROL"><h3><u>Pagination control macros</u></h3></a> 1574 1575<ol> 1576 <li><a href="#PAGINATE_GENERAL">Family/font/size/colour</a> 1577 <li><a href="#PAGENUM_POS">Page number position (vertical and horizontal)</a> 1578 <li><a href="#PAGENUM_HYPHENS">Enclose page numbers with hyphens (on or off)</a> 1579</ol> 1580<br> 1581<a name="PAGINATE_GENERAL"><h3><u>1. Page number family/font/size/colour</u></h3></a> 1582<p> 1583See 1584<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. 1585<p> 1586<pre> 1587.PAGENUM_FAMILY default = prevailing document family; default is Times Roman 1588.PAGENUM_FONT default = roman 1589.PAGENUM_SIZE default = 0 (i.e. same size as paragraph text) 1590.PAGENUM_COLOR default= black 1591</pre> 1592 1593<a name="PAGENUM_POS"><h3><u>2. Page number position</u></h3></a> 1594<p> 1595<nobr>Macro: <strong>PAGENUM_POS</strong> TOP | BOTTOM LEFT | CENTER | RIGHT</nobr> 1596 1597<p> 1598Use <strong>PAGENUM_POS</strong> to change the default position of 1599automatic page numbering. <strong>PAGENUM_POS</strong> requires 1600<em>two</em> arguments: a vertical position (TOP or BOTTOM) and a 1601horizontal position (LEFT or CENTER or RIGHT). 1602<p> 1603For example, if you turn both 1604<a href="definitions.html#TERMS_HEADER">headers</a> 1605and 1606<a href="definitions.html#TERMS_FOOTER">footers</a> 1607off (with <code>.HEADERS OFF</code> and <code>.FOOTERS 1608OFF</code>) and you want <strong>mom</strong> to number your 1609pages at the top right position, enter 1610<p> 1611<pre> 1612 .PAGENUM_POS TOP RIGHT 1613</pre> 1614 1615<a name="PAGENUM_HYPHENS"><h3><u>3. Enclose page numbers with hyphens (on or off)</u></h3></a> 1616<p> 1617By default, <strong>mom</strong> encloses page numbers between hyphens. 1618If you don't want this behaviour, invoke the macro 1619<strong>PAGENUM_HYPHENS</strong> with any argument (<strong>OFF, QUIT, END, X...</strong>), 1620like this: 1621<p> 1622<pre> 1623 .PAGENUM_HYPHENS OFF 1624</pre> 1625 1626If, for some reason, you want to turn page number hyphens back 1627on, invoke the macro without an argument. 1628<p> 1629 1630<hr> 1631<a href="rectoverso.html#TOP">Next</a> 1632<a href="docelement.html#TOP">Prev</a> 1633<a href="#TOP">Top</a> 1634<a href="toc.html">Back to Table of Contents</a> 1635</body> 1636</html> 1637