Debian Codegraph @

contrib/mom/momdoc/headfootpage.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 This file is part of groff, the GNU roff type-setting system.
4
5 Copyright (C) 2004-2020 Free Software Foundation, Inc.
6 Written by Peter Schaffter ([email protected]).
7
8 Permission is granted to copy, distribute and/or modify this document
9 under the terms of the GNU Free Documentation License, Version 1.3 or
10 any later version published by the Free Software Foundation; with no
11 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
12 Texts.
13
14 A copy of the Free Documentation License is included as a file called
15 FDL in the main directory of the groff source package.
16 -->
17
18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml">
20
21 <head>
22 <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
23 <title>Mom -- Document processing, page headers/footers and pagination</title>
24 <link rel="stylesheet" type="text/css" href="stylesheet.css" />
25 </head>
26
27 <body style="background-color: #f5faff;">
28
29 <!-- ==================================================================== -->
30
31 <div id="top" class="page">
32
33 <!-- Navigation links -->
34 <table style="width: 100%;">
35 <tr>
36 <td><a href="toc.html">Back to Table of Contents</a></td>
37 <td style="text-align: right;"><a href="rectoverso.html#top">Next: Recto/verso printing, collating</a></td>
38 </tr>
39 </table>
40
41 <h1 class="docs">Page headers/footers, pagination</h1>
42
43 <div style="text-align: center;">
44 <ul class="no-enumerator" style="margin-left: -2.5em;">
45 <li><a href="#headfootpage-intro">Introduction &ndash; VERY IMPORTANT; read me!</a></li>
46 <li> <a href="#pagination-note">An important note on pagination</a></li>
47 <li><a href="#description-general">General description of headers/footers</a></li>
48 <li><a href="#header-style">Default specs for headers/footers</a></li>
49 <li><a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a></li>
50 </ul>
51 </div>
52
53 <div class="rule-medium"><hr/></div>
54
55 <h2 id="toc-doc-head-foot-page" class="docs" style="text-align: center;">Table of contents</h2>
56
57 <h3 class="toc toc-docproc-header" style="margin-top: 1em;"><a class="header-link" href="#headfoot-management">Managing page headers and footers</a></h3>
58 <ul class="toc-docproc" style="margin-top: .5em;">
59 <li><a href="#headers">HEADERS</a> &ndash; on or off</li>
60 <li><a href="#footers">FOOTERS</a> &ndash; on or off</li>
61 <li><a href="#footer-on-first-page">FOOTER_ON_FIRST_PAGE</a></li>
62 </ul>
63 <h3 class="toc toc-docproc-header"><a class="header-link" href="#headfoot-control">Control macros for headers/footers</a></h3>
64 <ul class="toc-docproc" style="margin-top: .5em;">
65 <li><a href="#index-headfoot-control">Header/footer control macros and defaults</a>
66 <ul class="toc-docproc">
67 <li><a href="#hdrftr-strings">Header/footer strings</a>
68 <ul class="toc-docproc">
69 <li><a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a> (TITLE, AUTHOR, etc.)</li>
70 </ul></li>
71 <li><a href="#hdrftr-style">Header/footer style</a>
72 <ul class="toc-docproc">
73 <li><a href="#hdrftr-style-global">Global changes</a></li>
74 <li><a href="#hdrftr-style-part">Part-by-part changes</a></li>
75 </ul></li>
76 <li><a href="#hdrftr-vertical">Vertical placement and spacing of headers/footers</a>
77 <ul class="toc-docproc">
78 <li><a href="#hdrftr-margin">HEADER_MARGIN&nbsp;/&nbsp;FOOTER_MARGIN</a>
79 <ul class="toc-docproc no-enumerator" style="margin-left: -2em;">
80 <li>&ndash;&nbsp;<a href="#footer-margin">Important: FOOTER_MARGIN and bottom margins</a></li>
81 </ul></li>
82 </ul></li>
83 <li><a href="#hdrftr-separator">The header/footer separator rule</a>
84 <ul class="toc-docproc">
85 <li><a href="#hdrftr-rule">HEADER_RULE</a> &ndash; on or off</li>
86 <li><a href="#hdrftr-rule-weight">HEADER_RULE_WEIGHT</a> &ndash; weight of the rule</li>
87 <li><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a> &ndash; distance of rule from header/footer</li>
88 <li><a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a> &ndash; colour of the header/footer rule</li>
89 </ul></li>
90 </ul></li>
91 </ul>
92 <h3 class="toc toc-docproc-header"><a class="header-link" href="#userdef-hdrftr-rv">User-defined, single string recto/verso headers/footers</a></h3>
93 <ul class="toc-docproc" style="margin-top: .5em;">
94 <li><a href="#hdrftr-recto">HEADER_RECTO, HEADER_VERSO</a>
95 <ul style="margin-left: -.5em">
96 <li><a href="#userdef-hdrftr">User-defined, single string headers/footers (no recto/verso)</a></li>
97 <li><a href="#padding-hdrftr">Padding the header-recto/header-verso string</a></li>
98 </ul></li>
99 </ul>
100 <h3 class="toc toc-docproc-header"><a class="header-link" href="#headers-and-footers-intro">Headers and footers on the same page</a></h3>
101 <h3 class="toc toc-docproc-header" style="margin-top: .75em;"><a class="header-link" href="#pagination-intro">Pagination</a></h3>
102 <ul class="toc-docproc" style="margin-top: .5em;">
103 <li><a href="#index-pagination">Pagination macros</a></li>
104 <li><a href="#index-paginate-control">Pagination control macros and defaults</a></li>
105 <li><a href="#pdf-outline-numbering">PDF outline page numbering</a></li>
106 </ul>
107 <h3 class="toc toc-docproc-header"><a class="header-link" href="#blank-pages">Inserting blank pages into a document</a></h3>
108
109 <div class="rule-medium" style="margin-top: 1.5em;"><hr/></div>
110
111 <h2 id="headfootpage-intro" class="macro-group">Managing page headers and footers</h2>
112
113 <div id="headerfooter" class="box-tip">
114 <p class="tip-top">
115 <span class="note">Note:</span>
116 Because headers and footers are virtually identical, this
117 documentation addresses itself only to headers. In all cases,
118 unless otherwise noted, descriptions of headers describe footers as
119 well.
120 </p>
121
122 <p class="tip-bottom">
123 Furthermore, any
124 <a href="definitions.html#controlmacro">control macro</a>
125 that begins with HEADER_ may be used to control footers, simply by
126 replacing HEADER_ with FOOTER_.
127 </p>
128 </div>
129
130 <p style="margin-top: -.75em;">
131 <a href="definitions.html#header">Headers</a>
132 and
133 <a href="definitions.html#footer">footers</a>,
134 as defined in the section
135 <a href="definitions.html#mom">Mom&#8217;s Document Processing Terms</a>,
136 are those parts of a document that contain information about the document
137 itself which appear in the margins either above or below
138 <a href="definitions.html#running">running text</a>.
139 They are, in all respects but two, identical. The differences are:
140 </p>
141 <ol style="margin-top: -.5em; margin-bottom: -.5em;">
142 <li>headers appear in the margin <i>above</i> running text while
143 footers appear in the margin <i>beneath</i> running text;
144 </li>
145 <li>the (optional) rule that separates headers from running
146 text appears <i>below</i> the header while
147 the (optional) rule that separates footers from running
148 text appears <i>above</i> the footer.
149 </li>
150 </ol>
151
152 <div id="pagination-note" class="box-tip" style="margin-top: 1.5em;">
153 <p class="tip">
154 <span class="note">Note:</span>
155 While the single page number that mom generates in either the top
156 or bottom margin above or below running text is technically a kind
157 of header/footer, mom and this documentation treat it as a separate
158 page element.
159 </p>
160 </div>
161
162 <div id="author-note" class="box-tip">
163 <p class="tip">
164 <span class="note">Author&#8217;s note:</span>
165 Left to their own devices (i.e. if you&#8217;re happy with the way
166 mom does things by default), headers are something you never have to
167 worry about. You can skip reading this section entirely. But if
168 you want to change them, be advised that headers have more macros to
169 control their appearance than any other document element. The text
170 of this documentation becomes correspondingly dense at this point.
171 </p>
172 </div>
173
174 <h3 id="description-general" class="docs">General description of headers/footers</h3>
175
176 <p>
177 Headers comprise three distinct parts: a left part, a centre part,
178 and a right part. Each part contains text (a &#8220;string&#8221;)
179 that identifies some aspect of the document as a whole.
180 </p>
181
182 <p>
183 The left part (&#8220;header-left&#8221;) lines up with the
184 document&#8217;s left margin. The centre part (&#8220;header
185 centre&#8221;) is centred on the document&#8217;s line length.
186 The right part (&#8220;header-right&#8221;) lines up with the
187 document&#8217;s right margin. Not all parts need contain a string,
188 and if you don&#8217;t want headers at all, you can turn them off
189 completely.
190 </p>
191
192 <div class="box-tip">
193 <p class="tip">
194 <span class="note">Note to groff experts:</span>
195 Although mom&#8217;s headers resemble the three-part titles
196 generated by <kbd>.tl</kbd>, they&#8217;re in no way related to it,
197 nor based upon it. <kbd>.tl</kbd> is not used at all in mom.
198 </p>
199 </div>
200
201 <p>
202 Normally, mom fills headers with strings appropriate to the document
203 type selected by
204 <a href="docprocessing.html#doctype">DOCTYPE</a>,
205 with the author left, the document title right, and chapter or
206 document type information in the centre. You can, however, supply
207 whatever strings you like&mdash;including page numbers&mdash;to go
208 in any part of headers. What&#8217;s more, you can set the family,
209 font, size, colour and capitalization style (caps, caps/lower-case,
210 or smallcaps) for each header part individually.
211 </p>
212
213 <p>
214 By default, mom prints a horizontal rule beneath headers to separate
215 them visually from running text. In the case of footers, the rule
216 is above. You can increase or decrease the space between the header
217 and the rule if you like (with
218 <kbd><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a></kbd>),
219 or remove it completely.
220 </p>
221
222 <h3 id="header-style" class="docs">Default specs for headers/footers</h3>
223
224 <p>
225 Mom makes small type adjustments to each part of the header (left,
226 centre, right) to achieve an aesthetically pleasing result. The
227 defaults are listed below. (The strings mom puts by default in each
228 part are explained in
229 <a href="docprocessing.html#doctype">DOCTYPE</a>.)
230 </p>
231
232 <div class="defaults-container" style="padding-bottom: 8px;">
233 <p class="defaults" style="padding-top: 6px; padding-bottom: 6px; text-align: center;">
234 <i>Note:</i> Except for capitalization (all caps or caps/lower-case),
235 these defaults apply only to
236 <a href="docprocessing.html#printstyle">PRINTSTYLE&nbsp;<kbd>TYPESET</kbd></a>.
237 </p>
238 <span class="pre defaults">
239 TYPE SPEC HEADER LEFT HEADER CENTER HEADER RIGHT
240 --------- ----------- ------------- ------------
241 Family document default document default document default
242 Font roman italic roman
243 Colour (black) (black) (black)
244 All caps no no yes
245 Size* -.5 (points) -.5 (points) -2 (points)
246 (-2 if all caps) (-2 if all caps) (-.5 if not all caps)
247
248 *Relative to the point size of <a href="definitions.html#running">running text</a>
249 </span>
250 </div>
251
252 <p style="margin-top: -1.5em;">
253 You can, of course, change any of the defaults using the appropriate
254 control macros. And should you wish to design headers from the
255 ground up, mom has a special macro
256 <a href="#hdrftr-plain">HEADER_PLAIN</a>
257 that removes all type adjustments to headers. The
258 type specs for running text are used instead, providing a simple
259 reference point for any alterations you want to make to the family,
260 font, size, and capitalization style of any header part.
261 </p>
262
263 <h3 id="vertical-spacing" class="docs">Vertical placement and spacing of headers/footers</h3>
264
265 <p>
266 As explained in the section,
267 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>,
268 the top and bottom margins of a mom document are the vertical start
269 and end positions of
270 <a href="definitions.html#running">running text</a>,
271 not the vertical positions of headers or footers, which, by definition,
272 appear in the margins above (or below) running text.
273 </p>
274
275 <p>
276 The vertical placement of headers is controlled by the macro
277 <a href="#hdrftr-margin">HEADER_MARGIN</a>,
278 which establishes the
279 <a href="definitions.html">baseline</a>
280 position of headers relative to the top edge of the page. The
281 header rule, whose position is relative to the header itself, is
282 controlled by a separate macro.
283 </p>
284
285 <p>
286 FOOTER_MARGIN is the counterpart to HEADER_MARGIN, and establishes
287 the baseline position of footers relative to the bottom edge of the
288 page.
289 </p>
290
291 <p>
292 The distance between headers and the start
293 of running text can be controlled with the macro
294 <a href="#hdrftr-gap">HEADER_GAP</a>,
295 effectively making HEADER_MARGIN + HEADER_GAP the top margin of
296 running text unless you give mom a literal top margin (with
297 <a href="typesetting.html#t-margin">T_MARGIN</a>)
298 or
299 <a href="typesetting.html#page">PAGE</a>,
300 in which case she ignores HEADER_GAP and begins the running text at
301 whatever top margin you give.
302 </p>
303
304 <p>
305 FOOTER_GAP and
306 <a href="typesetting.html#b-margin">B_MARGIN</a>
307 work similarly, except they determine where running text <i>ends</i>
308 on the page. (See
309 <a href="#footer-margin">Important &ndash; footer margin and bottom margins</a>
310 for a warning about possible conflicts between the footer margin and
311 the bottom margin.)
312 </p>
313
314 <p>
315 Confused? Mom apologizes. It&#8217;s really quite simple. By
316 default, mom sets headers <span class="nobr">4-1/2</span>
317 <a href="definitions.html#picaspoints">picas</a>
318 down from the top of the page and begins the running text 3 picas
319 (the HEADER_GAP) beneath that, which means the effective top margin
320 of the running text is <span class="nobr">7-1/2</span> picas (visually approx. 1
321 inch). However, if you give mom a literal top margin (with
322 <a href="typesetting.html#t-margin">T_MARGIN</a>),
323 she ignores the HEADER_GAP and starts the running text at whatever
324 top margin you give.
325 </p>
326
327 <p>
328 Footers are treated similarly. Mom sets footers 3 picas up from the
329 bottom of the page, and interrupts the processing of running text 3
330 picas (the FOOTER_GAP) above that (again, visually approx. 1 inch).
331 However, if you give mom a literal bottom margin (with
332 <a href="typesetting.html#b-margin">B_MARGIN</a>),
333 she ignores the FOOTER_GAP and interrupts the processing of running
334 text at whatever bottom margin you give.
335 </p>
336
337 <p>
338 If mom is paginating your document (she does, by default, at the
339 bottom of each page), the vertical spacing and placement of page
340 numbers, whether at the top or the bottom of the page, is managed
341 exactly as if the page numbers were headers (or footers), and are
342 controlled by the same macros. See
343 <a href="#index-paginate-control">Pagination control</a>.
344 </p>
345
346 <div class="rule-short"><hr/></div>
347
348 <!-- ======================================================================== -->
349
350 <h2 id="headfoot-management" class="macro-group">Managing headers/footers</h2>
351
352 <p>
353 The following are the basic macros for turning
354 <a href="definitions.html#header">headers</a>
355 or
356 <a href="definitions.html#footer">footers</a>
357 on or off. They should be invoked prior to
358 <a href="docprocessing.html#start">START</a>.
359 </p>
360
361 <p>
362 By default, mom prints page headers. If you turn
363 them off, she will begin the
364 <a href="definitions.html#running">running text</a>
365 on each page with a default top margin of 6
366 <a href="definitions.html#picaspoints">picas</a>
367 unless you have requested a different top margin (with
368 <a href="typesetting.html#t-margin">T_MARGIN</a>)
369 prior to
370 <a href="docprocessing.html#start">START</a>.
371 </p>
372
373 <div class="box-tip">
374 <p class="tip">
375 <span class="note">Note:</span>
376 <a href="#headers">HEADERS</a>
377 and
378 <a href="#footers">FOOTERS</a>
379 are mutually exclusive. If headers are on, footers (but not
380 bottom-of-page numbering) are automatically turned off. Equally,
381 if footers are on, headers (but not top-of-page numbering) are
382 automatically turned off. Thus, if you&#8217;d prefer footers in a
383 document, you need only invoke
384 <kbd><a href="#footers">.FOOTERS</a></kbd>;
385 there&#8217;s no need to turn headers off first.
386 </p>
387 </div>
388
389 <p style="margin-top: -.5em">
390 If you need both headers and footers, there&#8217;s a special macro
391 <a href="#headers-and-footers">HEADERS_AND_FOOTERS</a>
392 that allows you to set it up.
393 </p>
394
395 <div class="macro-list-container">
396 <h3 id="index-hdrftr" class="macro-list">Header/footer macros</h3>
397 <ul class="macro-list">
398 <li><a href="#headers">HEADERS</a> &ndash; on or off</li>
399 <li><a href="#footers">FOOTERS</a> &ndash; on or off</li>
400 <li><a href="#footer-on-first-page">FOOTER_ON_FIRST_PAGE</a></li>
401 <li><a href="#userdef-hdrftr-rv">User-defined, single string recto/verso headers/footers</a>
402 <ul>
403 <li><a href="#hdrftr-rectoverso">HEADER_RECTO, HEADER_VERSO</a>
404 <ul style="margin-left: -.5em;">
405 <li><a href="#userdef-hdrftr">User-defined, single string headers/footers (no recto/verso)</a></li>
406 </ul></li>
407 <li><a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a>
408 (title, author, etc.)
409 </li>
410 </ul></li>
411 <li><a href="#headers-and-footers-intro">HEADERS_AND_FOOTERS</a> &ndash;
412 putting both headers and footers on document pages
413 </li>
414 <li><a href="#headfoot-control">Header and footer control macros</a></li>
415 </ul>
416 </div>
417
418 <!-- -HEADERS- -->
419
420 <div class="macro-id-overline">
421 <h3 class="macro-id">Headers</h3>
422 </div>
423
424 <div id="headers" class="box-macro-args">
425 Macro: <b>HEADERS</b> <kbd class="macro-args">toggle</kbd>
426 </div>
427
428 <p>
429 <a href="definitions.html#header">Page headers</a>
430 are on by default. If you don&#8217;t want them, turn them off by
431 invoking <kbd>.HEADERS</kbd> with any argument (<kbd>OFF</kbd>,
432 <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...), e.g.
433 <br/>
434 <span class="pre-in-pp">
435 .HEADERS OFF
436 </span>
437 </p>
438
439 <p>
440 <b>NOTE:</b> HEADERS automatically
441 disables
442 <a href="definitions.html#footer">footers</a>
443 but not the page numbers that normally appear at the bottom of the
444 page. If you want both headers and footers, you must use the macro
445 <a href="#headers-and-footers">HEADERS_AND_FOOTERS</a>.
446 </p>
447
448 <p>
449 <b>ADDITIONAL NOTE:</b> If HEADERS are OFF, mom&#8217;s normal top
450 margin for
451 <a href="definitions.html#running">running text</a>
452 (7.5
453 <a href="definitions.html#picaspoints">picas</a>)
454 changes to 6 picas (visually approx. 1 inch). This does NOT apply
455 to the situation where footers have been explicitly turned on
456 (with
457 <kbd><a href="#footers">FOOTERS</a></kbd>).
458 Explicitly invoking footers moves page numbering to the
459 top of the page, where its placement and spacing are the same as
460 for headers (i.e. the top margin of running text remains 7.5
461 picas.)
462 </p>
463
464 <!-- -FOOTERS- -->
465
466 <div class="macro-id-overline">
467 <h3 id="footers" class="macro-id">Footers</h3>
468 </div>
469
470 <div class="box-macro-args">
471 Macro: <b>FOOTERS</b> <kbd class="macro-args">toggle</kbd>
472 </div>
473
474 <p>
475 <a href="definitions.html#footer">Page footers</a>
476 are off by default. If you want them instead of
477 <a href="definitions.html#header">headers</a>,
478 turn them on by invoking
479 <kbd>.FOOTERS</kbd> without an argument, e.g.
480 <br/>
481 <span class="pre-in-pp">
482 .FOOTERS
483 </span>
484 FOOTERS automatically disables headers, and
485 mom shifts the placement of page numbers from their
486 normal position at page bottom to the top of the page.
487 </p>
488
489 <p>
490 <b>NOTE:</b> If you want both headers and footers, you must use the
491 macro
492 <a href="#headers-and-footers">HEADERS_AND_FOOTERS</a>.
493 </p>
494
495 <p>
496 <b>NOTE:</b> By default, when footers are on,
497 mom does not print a page number on the first
498 page of a document, nor on first pages after
499 <a href="rectoverso.html#collate">COLLATE</a>.
500 If you don&#8217;t want this behaviour, you can change it with
501 <kbd><a href="#pagenum-on-first-page">PAGENUM_ON_FIRST_PAGE</a></kbd>.
502 </p>
503
504 <!-- -FOOTER_ON_FIRST_PAGE- -->
505
506 <div class="macro-id-overline">
507 <h3 id="footer-on-first-page" class="macro-id">Footer on first page</h3>
508 </div>
509
510 <div class="box-macro-args">
511 Macro: <b>FOOTER_ON_FIRST_PAGE</b> <kbd class="macro-args">toggle</kbd>
512 </div>
513
514 <p>
515 If you invoke
516 <a href="#footers"><kbd>.FOOTERS</kbd></a>,
517 mom, by default, does not print a footer on the
518 first page of the document. (The
519 <a href="definitions.html">docheader</a>
520 on page 1 makes it redundant.) However, should you wish a footer on
521 page 1, invoke <kbd>.FOOTER_ON_FIRST_PAGE</kbd> without any argument.
522 </p>
523
524 <div class="rule-short"><hr/></div>
525
526 <h2 id="headfoot-control" class="macro-group">Control macros for headers/footers</h2>
527
528 <p>
529 Virtually every part of headers (and footers; see the note on how
530 <a href="#headerfooter">&#8220;headers&#8221; means &#8220;footers&#8221;</a>
531 in the
532 <a href="#headfootpage-intro">Introduction</a>
533 to headers/footers) can be designed to your own specifications.
534 </p>
535
536 <div class="macro-list-container">
537 <h3 id="index-headfoot-control" class="macro-list">Header/footer control macros and defaults</h3>
538
539 <ol style="margin-top: -1.5em; padding-bottom: 6px;">
540 <li><a href="#hdrftr-strings">Header/footer strings</a>
541 <ul style="margin-left: -.5em;">
542 <li><a href="#hdrftr-left">HEADER_LEFT</a></li>
543 <li><a href="#hdrftr-centre">HEADER_CENTER</a>
544 <ul style="margin-left: -.5em;">
545 <li><a href="#hdrftr-centre-pad">Padding the header-centre string</a></li>
546 </ul></li>
547 <li><a href="#hdrftr-right">HEADER_RIGHT</a></li>
548 <li><a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a>
549 (e.g. <kbd>\E*[$TITLE]</kbd> when you want
550 the title, <kbd>\E*[$AUTHOR]</kbd> when you want the author, etc.)
551 </li>
552 <li><a href="#page-number-symbol">Replacing header-left, centre or right with the page number</a></li>
553 <li><a href="#page-number-incl">Including the page number in header-left, centre or right</a></li>
554 </ul></li>
555 <li><a href="#hdrftr-style">Header/footer style</a>
556 <ul style="margin-left: -.5em;">
557 <li><a href="#hdrftr-style-global">Global changes</a>
558 <ul style="margin-left: -.5em;">
559 <li><a href="#hdrftr-plain">HEADER_PLAIN</a> &ndash; disable default adjustments to header parts</li>
560 <li><a href="#hdrftr-global-family">HEADER_FAMILY</a> &ndash; family for entire header</li>
561 <li><a href="#hdrftr-global-size">HEADER_SIZE</a> &ndash; size for entire header</li>
562 <li><a href="#hdrftr-color">HEADER_COLOR</a> &ndash; colourize the header</li>
563 </ul></li>
564 <li><a href="#hdrftr-style-part">Part-by-part changes</a>
565 <ul style="margin-left: -.5em;">
566 <li><a href="#_family">_FAMILY</a> &ndash; left, centre or right family</li>
567 <li><a href="#_font">_FONT</a> &ndash; left, centre or right font</li>
568 <li><a href="#_size">_SIZE</a> &ndash; left, centre or right size</li>
569 <li><a href="#_caps">_CAPS</a> &ndash; left, centre or right all caps</li>
570 <li><a href="#_smallcaps">_SMALLCAPS</a> &ndash; left, centre or right smallcaps</li>
571 <li><a href="#_color">_COLOR</a> &ndash; left, centre or right colour</li>
572 </ul></li>
573 </ul></li>
574 <li><a href="#hdrftr-vertical">Header/footer vertical placement and spacing</a>
575 <ul style="margin-left: -.5em;">
576 <li><a href="#hdrftr-margin">HEADER_MARGIN</a></li>
577 <li><a href="#hdrftr-gap">HEADER_GAP</a></li>
578 </ul></li>
579 <li><a href="#hdrftr-separator">Header/footer separator rule</a>
580 <ul style="margin-left: -.5em;">
581 <li><a href="#hdrftr-rule">HEADER_RULE</a></li>
582 <li><a href="#hdrftr-rule-weight">HEADER_RULE_WEIGHT</a></li>
583 <li><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a></li>
584 <li><a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a></li>
585 </ul></li>
586 </ol>
587 </div>
588
589 <!-- -HDRFTR_STRINGS- -->
590
591 <h4 id="hdrftr-strings" class="docs">1. Header/footer strings</h4>
592
593 <div id="hdrftr-left" class="box-macro-args" style="margin-top: 1em;">
594 &#8221;Macro: <b>HEADER_LEFT</b> <kbd class="macro-args">&#8220;&lt;text of header-left&gt; | #</kbd>
595 </div>
596
597 <div id="hdrftr-centre" class="box-macro-args" style="margin-top: 1em;">
598 &#8221;Macro: <b>HEADER_CENTER</b> <kbd class="macro-args">&#8220;&lt;text of header-centre&gt; | #</kbd>
599 </div>
600
601 <div id="hdrftr-right" class="box-macro-args" style="margin-top: 1em;">
602 &#8221;Macro: <b>HEADER_RIGHT</b> <kbd class="macro-args">&#8220;&lt;text of header-right&gt; | #</kbd>
603 </div>
604
605 <p>
606 To change the text (the &#8220;string&#8221;) of the left, centre,
607 or right part of headers, invoke the appropriate macro, above,
608 with the string you want. For example, mom, by default, prints
609 the document&#8217;s author in the header-left position. If your
610 document has, say, two authors, and you want both their names to
611 appear header-left, change HEADER_LEFT like this:
612 <br/>
613 <span class="pre-in-pp">
614 .HEADER_LEFT "R. Stallman, E. Raymond"
615 </span>
616 </p>
617
618 <p>
619 Because the arguments to HEADER_LEFT, _CENTER,
620 and _RIGHT are
621 <a href="definitions.html#stringargument">string arguments</a>,
622 they must be enclosed in double-quotes.
623 </p>
624
625 <div class="box-tip">
626 <p class="tip">
627 <span class="note">Note:</span>
628 Replace HEADER_, above, with FOOTER_ to change the strings in
629 footers.
630 </p>
631 </div>
632
633 <h3 id="hdrftr-centre-pad" class="docs">Padding the header/footer centre string</h3>
634
635 <div class="box-macro-args" style="margin-top: 1em;">
636 Macro: <b>HEADER_CENTER_PAD</b> <kbd class="macro-args">LEFT | RIGHT &lt;amount of space by which to pad centre string left or right&gt;</kbd>
637 </div>
638
639 <p class="requires">
640 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
641 </p>
642
643 <p>
644 By default, mom centres the header-centre string on the line length
645 in effect for page headers.
646 </p>
647
648 <p>
649 In some cases, notably when the header-left or header-right
650 strings are particularly long, the effect isn&#8217;t pretty. The
651 offendingly long header-left or right crowds, or even overprints,
652 the header-centre. That&#8217;s where HEADER_CENTER_PAD comes
653 in. With a bit of experimentation (yes, you have to preview the
654 document), you can use HEADER_CENTER_PAD to move the header-centre
655 string left or right until it looks acceptably centred between the
656 two other strings.
657 </p>
658
659 <p>
660 For example, say your document is an outline for a novel called
661 <i>By the Shores of Lake Attica</i>. You&#8217;ve told mom you want
662 <br/>
663 <span class="pre-in-pp">
664 .DOCTYPE NAMED "Outline"
665 </span>
666 but when you preview your work, you see that &#8220;Outline&#8221;,
667 in the centre of the page header, is uncomfortably close to the
668 title, which is to the right. By invoking
669 <br/>
670 <span class="pre-in-pp">
671 .HEADER_CENTER_PAD RIGHT 3P
672 </span>
673 you can scoot the word "Outline" over three
674 <a href="definitions.html#picaspoints">picas</a>
675 <i>to the left</i> (because the padding is added onto the right of the
676 string) so that your head looks nicely spaced out. Invoking
677 <kbd>.HEADER_CENTER_PAD</kbd> with the <kbd>LEFT</kbd> argument puts
678 the padding on the left side of the string so that it scoots
679 right.
680 </p>
681
682 <p>
683 Most reassuring of all is that if you use HEADER_CENTER_PAD
684 conjunction with
685 <a href="rectoverso.html#recto-verso">RECTO_VERSO</a>,
686 mom will pad the centre string appropriately left OR right,
687 depending on which page you&#8217;re on, without you having to tell
688 her to do so.
689 </p>
690
691 <h3 id="reserved-strings" class="docs">Using mom&#8217;s reserved strings in header/footer definitions</h3>
692
693 <p>
694 As pointed out in the
695 <a href="#author-note">Author&#8217;s note</a>
696 in the introduction to headers/footers, headers and footers are
697 something you don&#8217;t normally have to worry much about. Mom
698 usually knows what to do.
699 </p>
700
701 <p>
702 However, situations do arise where you need to manipulate what goes
703 in the header/footer strings, setting and resetting them as you go
704 along.
705 </p>
706
707 <p>
708 A case where you might want to do this would be if you want to
709 output endnotes at the end of each document in a series of
710 <a href="rectoverso.html#collate">collated</a>
711 documents, and you want the word "Endnotes" to go in the header
712 centre position of the endnotes, but want, say, the
713 <a href="docprocessing.html#title">TITLE</a>
714 to go back into the centre position for the next output document.
715 </p>
716
717 <p>
718 In scenarios like the above, mom has a number of reserved strings
719 you can plug into the HEADER_LEFT, _CENTER and _RIGHT macros. They
720 are:
721 <br/>
722 <span class="pre-in-pp">
723 \E*[$TITLE] &mdash;the current argument passed to .TITLE
724 \E*[$DOCTITLE] &mdash;the current argument passed to .DOCTITLE
725 \E*[$DOC_TYPE] &mdash;the NAMED argument passed to .DOCTYPE
726 \E*[$AUTHOR] &mdash;the current first argument passed to .AUTHOR
727 \E*[$AUTHOR_1...9] &mdash;the current arguments passed to .AUTHOR
728 \E*[$AUTHORS] &mdash;a comma-separated concatenated string
729 of all the current arguments passed to .AUTHOR
730 (i.e. a list of authors)
731 \E*[$CHAPTER_STRING] &mdash;the current argument passed to .CHAPTER_STRING,
732 if invoked, otherwise, "Chapter"
733 \E*[$CHAPTER] &mdash;the current argument (typically a number) passed
734 to .CHAPTER
735 \E*[$CHAPTER_TITLE] &mdash;the current argument passed to .CHAPTER_TITLE
736 </span>
737 Returning to the scenario above, first, you&#8217;d define a centre
738 string for the endnotes page:
739 <br/>
740 <span class="pre-in-pp">
741 .HEADER_CENTER "Endnotes"
742 </span>
743 Then, you&#8217;d output the endnotes:
744 <br/>
745 <span class="pre-in-pp">
746 .ENDNOTES
747 </span>
748 Then, you&#8217;d prepare mom for the next document:
749 <br/>
750 <span class="pre-in-pp">
751 .COLLATE
752 .TITLE "New Doc Title"
753 .AUTHOR "Josephine Blough"
754 </span>
755 Then, you&#8217;d redefine the header-centre string using the
756 reserved string <kbd><span class="nobr">\*[$TITLE]</span></kbd>, like this:
757 <br/>
758 <span class="pre-in-pp">
759 .HEADER_CENTER "\E*[$TITLE]"
760 </span>
761 And last, you&#8217;d do:
762 <br/>
763 <span class="pre-in-pp">
764 .START
765 </span>
766 Voilà! Any argument you pass to
767 <a href="docprocessing.html#title">TITLE</a>
768 from here on in (say, for subsequent documents) is back in the
769 header-centre position. Here&#8217;s the whole routine again:
770 <br/>
771 <span class="pre-in-pp">
772 .HEADER_CENTER "Endnotes"
773 .ENDNOTES
774 .COLLATE
775 .TITLE "New Doc Title"
776 .AUTHOR "Josephine Blough"
777 .HEADER_CENTER "\E*[$TITLE]"
778 .START
779 </span>
780 </p>
781
782 <p>
783 If need be, you can concatenate the strings, as in the following
784 example.
785 <br/>
786 <span class="pre-in-pp">
787 .HEADER_CENTER "\E*[$CHAPTER_STRING] \E*[$CHAPTER]"
788 </span>
789 which, assuming a <kbd>.CHAPTER_STRING</kbd> of
790 <kbd>"Chapter"</kbd> and a <kbd>.CHAPTER</kbd> of
791 <kbd>"2"</kbd>, would put &#8220;Chapter 2&#8221; in the
792 header-centre position.
793 </p>
794
795 <h3 id="page-number-symbol" class="docs">Replacing header-left, -centre or -right with the page number</h3>
796
797 <p>
798 If you would like to have the current page number appear in the
799 header-left, -centre, or -right position instead of a text string,
800 invoke the appropriate macro, above, with the single argument
801 <kbd>#</kbd> (the &#8220;number&#8221; or &#8220;pound&#8221; sign).
802 Do not surround the pound size with double-quotes, as you would
803 normally do if the argument to <kbd>.HEADER_CENTER</kbd> were a
804 string. For example,
805 <br/>
806 <span class="pre-in-pp">
807 .HEADER_CENTER #
808 </span>
809 (notice, no double-quotes) will print the current page number in the
810 centre part of headers.
811 </p>
812
813 <h3 id="page-number-incl" class="docs">Including the page number in header-left, -CENTER or -right</h3>
814
815 <p>
816 If you would like to <i>include</i> the current page number in the
817 string you pass to HEADER_LEFT, _CENTER, or _RIGHT, (as
818 opposed to replacing the string with the page number), use the
819 special
820 <a href="definitions.html#inlines">inline escape</a>
821 <kbd><span class="nobr">\*[PAGE#]</span></kbd> in the string argument.
822 </p>
823
824 <p>
825 For example, say you have a document that&#8217;s ten pages long,
826 and you want header-right to say &#8220;page &lt;whichever&gt; of
827 10&#8221;, invoke <kbd>.HEADER_RIGHT</kbd> as follows:
828 <br/>
829 <span class="pre-in-pp">
830 .HEADER_RIGHT "page \*[PAGE#] of 10"
831 </span>
832 The header-right of page two will read &#8220;page 2 of 10&#8221;,
833 the header-right of page three will read &#8220;page 3 of 10&#8221;,
834 and so on.
835 </p>
836
837 <!-- -HDRFTR_STYLE- -->
838
839 <h4 id="hdrftr-style" class="docs">2. Header/footer style</h4>
840
841 <h5 id="hdrftr-style-global" class="docs" style="margin-top: 1em;">Global changes</h5>
842
843 <p style="margin-top: .5em;">
844 The following macros allow you to make changes that affect all parts
845 of the header at once.
846 </p>
847
848 <div class="macro-list-container">
849 <ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
850 <li><a href="#hdrftr-plain">HEADER_PLAIN</a></li>
851 <li><a href="#hdrftr-global-family">HEADER_FAMILY</a></li>
852 <li><a href="#hdrftr-global-size">HEADER_SIZE</a></li>
853 <li><a href="#hdrftr-color">HEADER_COLOR</a></li>
854 </ul>
855 </div>
856
857 <div id="hdrftr-plain" class="box-macro-args">
858 Macro: <b>HEADER_PLAIN</b>
859 </div>
860
861 <p>
862 By default, mom makes adjustments to the font, size, and
863 capitalization style of each part of headers to achieve an
864 aesthetically pleasing look. Should you wish to design your own
865 headers from the ground up without worrying how changes to the
866 various elements of header style interact with mom&#8217;s defaults,
867 invoke <kbd>.HEADER_PLAIN</kbd> by itself, with no argument. Mom
868 will disable her default behaviour for headers, and reset all
869 elements of header style to the same family, font, point size and
870 colour as she uses in paragraphs.
871 </p>
872
873 <p>
874 Replace HEADER_, above, with FOOTER_ to disable mom&#8217;s default
875 behaviour for the various elements of footer style.
876 </p>
877
878 <div id="hdrftr-global-family" class="box-macro-args">
879 Macro: <b>HEADER_FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
880 </div>
881
882 <p>
883 By default, mom uses the default document family for headers. If
884 you would like her to use another
885 <a href="definitions.html#family">family</a>
886 in headers, invoke <kbd>.HEADER_FAMILY</kbd> with the identifier
887 for the family you want. The argument is the same as for the
888 typesetting macro
889 <a href="typesetting.html#family">FAMILY</a>.
890 </p>
891
892 <p>
893 Replace HEADER_, above, with FOOTER_ to change the footer family.
894 </p>
895
896 <div id="hdrftr-global-size" class="box-macro-args">
897 Macro: <b>HEADER_SIZE</b> <kbd class="macro-args">&lt;+|-number of points&gt;</kbd>
898 </div>
899 <p class="requires">
900 &bull;&nbsp;Argument is relative to the point size of type in paragraphs.
901 See
902 <span style="font-style: normal;"><a href="docelement.html#control-macro-args">Arguments to the control macros</a></span>
903 for an explanation of how control macros ending in
904 _SIZE work.
905 </p>
906
907 <p>
908 By default, mom makes small adjustments to the size of each part
909 of a header to achieve an aesthetically pleasing result. If
910 you&#8217;d like her to continue to do so, but would like the
911 overall appearance of headers to be a little smaller or a little
912 larger, invoke <kbd>.HEADER_SIZE</kbd> with + or - the number of <a
913 href="definitions.html#picaspoints">points</a> (fractions allowed)
914 by which you want her to in/decrease the size of headers. For
915 example,
916 <br/>
917 <span class="pre-in-pp">
918 .HEADER_SIZE +.75
919 </span>
920 increases the size of every part of a header by 3/4 of a point while
921 respecting mom&#8217;s own little size changes.
922 </p>
923
924 <p>
925 Replace HEADER_, above, with FOOTER_ to change the footer size.
926 </p>
927
928 <div class="box-tip">
929 <p class="tip">
930 <span class="note">Note:</span>
931 Normally, macros that control headers have no effect on
932 <a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>.
933 HEADER_SIZE is an exception. While all parts of a header in
934 PRINTSTYLE&nbsp;<kbd>TYPEWRITE</kbd> are always the same size, you
935 can use HEADER_SIZE with PRINTSTYLE&nbsp;<kbd>TYPEWRITE</kbd> to
936 reduce the header&#8217;s overall point size. You&#8217;ll most
937 likely require this when the
938 <a href="docprocessing.html#copystyle">COPYSTYLE</a>
939 is <kbd>DRAFT</kbd>, since portions of the header may overprint if,
940 say, the title of your document is very long.
941 </p>
942 </div>
943
944 <div id="hdrftr-color" class="box-macro-args">
945 Macro: <b>HEADER_COLOR</b> <kbd class="macro-args">&lt;colorname&gt;</kbd>
946 </div>
947
948 <p>
949 If you want your headers in a colour different from the document
950 default (usually black), invoke <kbd>.HEADER_COLOR</kbd> with the
951 name of a colour pre-defined (or &#8220;initialized&#8221;) with
952 <a href="color.html#newcolor">NEWCOLOR</a>
953 or
954 <a href="color.html#xcolor">XCOLOR</a>.
955 </p>
956
957 <p>
958 HEADER_COLOR will set all the parts of the header
959 plus the header rule in the colour you give it as an argument. If
960 you wish finer control over colour in headers, you can use
961 <a href="#_color">HEADER_&lt;POSITION&gt;_COLOR</a>
962 to colourize each part of the header separately, as well as
963 <a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a>
964 to change the colour of the header rule.
965 </p>
966
967 <p>
968 Replace HEADER_, above, with FOOTER_ to colourize footers.
969 </p>
970
971 <h4 id="hdrftr-style-part" class="docs">3. Part by part changes</h4>
972
973 <p>
974 When using the following control &#8221;macros, replace
975 &#8220;&lt;POSITION&gt; by <b>LEFT, CENTER,</b> or RIGHT as
976 appropriate.
977 </p>
978
979 <div class="macro-list-container">
980 <ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
981 <li><a href="#_family">HEADER_&lt;POSITION&gt;_FAMILY</a></li>
982 <li><a href="#_font">HEADER_&lt;POSITION&gt;_FONT</a></li>
983 <li><a href="#_size">HEADER_&lt;POSITION&gt;_SIZE</a></li>
984 <li><a href="#_caps">HEADER_&lt;POSITION&gt;_CAPS</a></li>
985 <li><a href="#_smallcaps">HEADER_&lt;POSITION&gt;_SMALLCAPS</a></li>
986 <li><a href="#_color">HEADER_&lt;POSITION&gt;_COLOR</a></li>
987 <li><a href="#grouping">Grouping style parameters for the individual header/footer parts</a></li>
988 </ul>
989 </div>
990
991 <div id="_family" class="box-macro-args">
992 Macro: <b>HEADER_&lt;POSITION&gt;_FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
993 </div>
994
995 <p>
996 Use HEADER_&lt;POSITION&gt;_FAMILY to change the
997 <a href="definitions.html#family">family</a>
998 of any part of headers. See
999 <a href="docelement.html#control-macro-args">Arguments to the control macros</a>
1000 for an explanation of how control macros ending in _FAMILY work.
1001 </p>
1002
1003 <p>
1004 Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s family.
1005 </p>
1006
1007 <div id="_font" class="box-macro-args">
1008 Macro: <b>HEADER_&lt;POSITION&gt;_FONT</b> <kbd class="macro-args">&lt;font&gt;</kbd>
1009 </div>
1010
1011 <p>
1012 Use HEADER_&lt;POSITION&gt;_FONT to change the
1013 <a href="definitions.html#font">font</a>
1014 of any part of headers. See
1015 <a href="docelement.html#control-macro-args">Arguments to the control macros</a>
1016 for an explanation of how control macros ending in _FONT work.
1017 </p>
1018
1019 <p>
1020 Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s font.
1021 </p>
1022
1023 <div id="_size" class="box-macro-args">
1024 Macro: <b>HEADER_&lt;POSITION&gt;_SIZE</b> <kbd class="macro-args">&lt;+|-number of points&gt;</kbd>
1025 </div>
1026
1027 <p>
1028 Use HEADER_&lt;POSITION&gt;_SIZE to change the size of any part of
1029 headers (relative to the point size of type in paragraphs). See
1030 <a href="docelement.html#control-macro-args">Arguments to the control macros</a>
1031 for an explanation of how control macros ending in _SIZE work.
1032 </p>
1033
1034 <p>
1035 Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s size.
1036 </p>
1037
1038 <div id="_caps" class="box-macro-args">
1039 Macro: <b>HEADER_&lt;POSITION&gt;_CAPS</b> <kbd class="macro-args">toggle</kbd>
1040 </div>
1041
1042 <p>
1043 HEADER_&lt;POSITION&gt;_CAPS is a
1044 <a href="definitions.html#toggle">toggle macro</a>.
1045 If you want any part of headers to be set in all caps, regardless of
1046 the capitalization of that part&#8217;s string as given to the
1047 <a href="docprocessing.html#reference-macros">reference macros</a>
1048 or as defined by you with the
1049 <a href="#hdrftr-strings">header string control macros</a>,
1050 simply invoke this macro (using the appropriate position) with no
1051 argument. If you wish to turn capitalization off (say, for the
1052 header-right string that mom capitalizes by default), invoke the
1053 macro with any argument (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
1054 <kbd>END</kbd>, <kbd>X</kbd>...).
1055 </p>
1056
1057 <p>
1058 Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s
1059 capitalization style.
1060 </p>
1061
1062 <div id="_smallcaps" class="box-macro-args">
1063 Macro: <b>HEADER_&lt;POSITION&gt;_SMALLCAPS</b> <kbd class="macro-args">toggle</kbd>
1064 </div>
1065
1066 <p>
1067 HEADER_&lt;POSITION&gt;_SMALLCAPS is a
1068 <a href="definitions.html#toggle">toggle macro</a>.
1069 If you want any part of headers to be set in smallcaps, simply
1070 invoke this macro (using the appropriate position) with no argument.
1071 If you wish to turn the smallcaps off, invoke the macro with any
1072 argument (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
1073 <kbd>X</kbd>...).
1074 </p>
1075
1076 <p>
1077 Replace HEADER,_ above, with FOOTER_ to invoke smallcaps for footer
1078 parts.
1079 </p>
1080
1081 <div id="_color" class="box-macro-args">
1082 Macro: <b>HEADER_&lt;POSITION&gt;_COLOR</b> <kbd class="macro-args">&lt;colorname&gt;</kbd>
1083 </div>
1084
1085 <p>
1086 HEADER_&lt;POSITION&gt;_COLOR allows you to set a colour for each of
1087 the three possible parts of a page header separately. For example,
1088 say you want the right part of the header (by default, the document
1089 title) in red, this is how you&#8217;d get it:
1090 <br/>
1091 <span class="pre-in-pp">
1092 .HEADER_RIGHT_COLOR red
1093 </span>
1094 The other parts of the header will be in the default header colour
1095 (usually black, but that can be changed with
1096 <a href="#hdrftr-color">HEADER_COLOR</a>).
1097 </p>
1098
1099 <p>
1100 Remember that you have to define (or &#8220;initialize&#8221;) a
1101 colour with
1102 <a href="color.html#newcolor">NEWCOLOR</a>
1103 or
1104 <a href="color.html#xcolor">XCOLOR</a>
1105 before you can use the colour.
1106 </p>
1107
1108 <p>
1109 If you create a
1110 <a href="#userdef-hdrftr-rv">user-defined header</a>
1111 with
1112 <a href="#hdrftr-rectoverso">HEADER_RECTO</a>
1113 or
1114 <a href="#hdrftr-rectoverso">HEADER_VERSO</a>,
1115 and you want various elements within the header to be colourized,
1116 embed the colours in the string passed to HEADER_RECTO or
1117 HEADER_VERSO with the
1118 <a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colorname&gt;]</span></kbd></a>
1119 <a href="definitions.html#inlines">inline escape</a>.
1120 </p>
1121
1122 <p>
1123 Replace HEADER_, above, with FOOTER_ to set the colours for the
1124 various elements of footers.
1125 </p>
1126
1127 <h5 id="grouping" class="docs">Grouping style parameters for the individual header parts</h5>
1128
1129 <p>
1130 Instead of using control macros for the style parameters
1131 of an individual header part, the parameters may be
1132 <a href="docelement.html#grouping">grouped</a>
1133 by invoking <kbd>HEADER_&lt;POSITION&gt;_STYLE</kbd> with a list of
1134 keyword/value pairs. Acceptable keywords are
1135 <kbd>FAMILY FONT SIZE COLOR CAPS</kbd> and <kbd>SMALLCAPS</kbd>.
1136 Keyword/value pairs may appear on the same line as the macro, or
1137 separated into several lines using the backslash character
1138 (<kbd>\</kbd>). If you use the latter style, all but the final
1139 parameter must be terminated with the backslash.
1140 </p>
1141
1142 <p>
1143 Thus, to set the header-left part in Helvetica bold, red, 1 point larger
1144 than
1145 <a href="definitions.html#running">running text</a>
1146 and all caps, you could do either
1147 <br/>
1148 <span class="pre-in-pp">
1149 .HEADER_LEFT_STYLE FAMILY H FONT B SIZE +1 COLOR red CAPS
1150 </span>
1151 or
1152 <br/>
1153 <span class="pre-in-pp">
1154 .HEADER_LEFT_STYLE \
1155 FAMILY H \
1156 FONT B \
1157 SIZE +1 \
1158 COLOR red \
1159 CAPS
1160 </span>
1161 If you need to reverse the sense of <kbd>CAPS</kbd>
1162 or <kbd>SMALLCAPS</kbd>, use <kbd>NO_CAPS</kbd> or
1163 <kbd>NO_SMALLCAPS</kbd>.
1164 </p>
1165
1166 <!-- -HDRFTR_VERTICAL- -->
1167
1168 <h4 id="hdrftr-vertical" class="docs">3. Header/footer vertical placement and spacing</h4>
1169
1170 <p>
1171 See
1172 <a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a>
1173 for an explanation of how mom deals with
1174 headers, footers, and top/bottom page margins.
1175 </p>
1176
1177 <div class="macro-list-container">
1178 <ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
1179 <li><a href="#hdftr_margin">HEADER_MARGIN</a></li>
1180 <li><a href="#hdftr_gap">HEADER_GAP</a></li>
1181 </ul>
1182 </div>
1183
1184 <!-- -HDRFTR_MARGIN- -->
1185
1186 <div id="hdrftr-margin" class="box-macro-args">
1187 Macro: <b>HEADER_MARGIN</b> <kbd class="macro-args">&lt;distance to baseline of header&gt;</kbd>
1188 </div>
1189
1190 <p class="requires">
1191 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
1192 </p>
1193
1194 <p>
1195 Use HEADER_MARGIN to set the distance from the top edge of the page to the
1196 <a href="definitions.html#baseline">baseline</a>
1197 of type in headers. A unit of measure is required, and decimal
1198 fractions are allowed.
1199 </p>
1200
1201 <p>
1202 Mom&#8217;s default header margin is 4-1/2
1203 <a href="definitions.html#picaspoints">picas</a>,
1204 but if you want a different margin, say, 1/2-inch, do
1205 <br/>
1206 <span class="pre-in-pp">
1207 .HEADER_MARGIN .5i
1208 </span>
1209 If your document uses
1210 <a href="definitions.html#footer">footers</a>,
1211 replace HEADER_, above, with FOOTER_. The argument to FOOTER_MARGIN
1212 is the distance from the bottom edge of the page to the baseline of
1213 type in footers. Mom&#8217;s default footer margin is 3
1214 <a href="definitions.html#picaspoints">picas</a>.
1215 </p>
1216
1217 <h3 class="docs">Header/footer margins and page numbering</h3>
1218
1219 <p>
1220 Mom uses HEADER_MARGIN and FOOTER_MARGIN to establish the baseline
1221 position of page numbers in addition to the baseline position of
1222 headers and footers proper.
1223 </p>
1224
1225 <p>
1226 By default, page numbers appear at the bottom of the page, therefore
1227 if you want the default position (bottom), but want to change the
1228 baseline placement, use FOOTER_MARGIN. Conversely, if page numbers
1229 are at the top of the page, either because you turned
1230 <a href="#footers">FOOTERS</a>
1231 on or because you instructed mom to put them there with
1232 <a href="#pagenum-pos">PAGENUM_POS</a>,
1233 you&#8217;d use HEADER_MARGIN to change their baseline placement.
1234 </p>
1235
1236 <div id="footer-margin" class="box-important" style="padding-bottom: 15px;">
1237 <p class="tip-top">
1238 <span class="important" style="display: block; margin-bottom: -1em;">Important &ndash; FOOTER_MARGIN and bottom margins</span>
1239 <br/>
1240 Mom requires a footer margin (i.e. the distance from the bottom of
1241 the page at which to place footers) for proper operation, hence she
1242 sets one, even if you don&#8217;t. As stated above, her default
1243 footer margin is 3-picas.
1244 </p>
1245
1246 <p>
1247 If you use
1248 <a href="typesetting.html#b-margin">B_MARGIN</a>
1249 or
1250 <a href="typesetting.html#page">PAGE</a>
1251 to set a bottom margin for your document (prior to
1252 <a href="docprocessing.html#start">START</a>),
1253 and the margin&#8217;s too close to mom&#8217;s default
1254 footer margin (or a footer margin you set yourself with
1255 FOOTER_MARGIN), mom will not print your footers; additionally,
1256 she&#8217;ll give you a warning and some advice on standard error.
1257 When this happens, you must reset either B_MARGIN or FOOTER_MARGIN
1258 so there&#8217;s an adequate amount of space for mom to print the
1259 bottom line of running text and the footer.
1260 </p>
1261
1262 <p>
1263 If you see the warning even when footers and/or bottom-of-page page
1264 numbering are disabled, set a nominal footer margin of 0 prior to
1265 <a href="docprocessing.html#start">START</a>,
1266 as in these examples.
1267 </p>
1268
1269 <div id="examples-footnotes-1" class="examples-container" style="padding-bottom: 1em;">
1270 <div class="examples" style="margin-top: 0; margin-bottom: -.25em;">Example 1</div>
1271 <span class="pre">
1272 &lt;reference macros, etc&gt;
1273 .PAGINATION OFF
1274 .B_MARGIN .25i
1275 .FOOTER_MARGIN O
1276 .START
1277 </span>
1278 </div>
1279
1280 <div id="examples-footnotes-2" class="examples-container" style="margin-top: 1em; padding-bottom: 1em;">
1281 <div class="examples" style="margin-top: 0;">Example 2</div>
1282 <span class="pre">
1283 &lt;reference macros, etc&gt;
1284 .HEADERS OFF
1285 .PAGENUM_POS TOP RIGHT
1286 .B_MARGIN .25i
1287 .FOOTER_MARGIN O
1288 .START
1289 </span>
1290 </div>
1291 </div>
1292
1293 <!-- -HDRFTR_GAP- -->
1294
1295 <div id="hdrftr-gap" class="box-macro-args">
1296 Macro: <b>HEADER_GAP</b> <kbd class="macro-args">&lt;distance from header to start of running text&gt;</kbd>
1297 </div>
1298
1299 <p class="requires">
1300 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
1301 </p>
1302
1303 <p>
1304 Use HEADER_GAP to set the distance from the
1305 <a href="definitions.html#baseline">baseline</a>
1306 of type in headers to the start of
1307 <a href="definitions.html#running">running text</a>.
1308 A unit of measure is required, and decimal fractions are allowed.
1309 </p>
1310
1311 <p>
1312 As explained in
1313 <a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a>,
1314 HEADER_MARGIN + HEADER_GAP determine the default vertical starting
1315 position of running text on the page unless you have given mom your
1316 own top margin (with
1317 <a href="typesetting.html#t-margin">T_MARGIN</a>).
1318 If you give a top margin, mom ignores HEADER_GAP; running text
1319 starts at your stated top margin.
1320 </p>
1321
1322 <p>
1323 Mom&#8217;s default header gap is 3
1324 <a href="definitions.html#picaspoints">picas</a>,
1325 but if you want a different gap, say, 2 centimetres, do
1326 <br/>
1327 <span class="pre-in-pp">
1328 .HEADER_GAP 2c
1329 </span>
1330 If your document uses
1331 <a href="definitions.html#footer">footers</a>,
1332 replace HEADER_, above, with FOOTER_. The argument to FOOTER_GAP
1333 is the distance from the baseline of type in footers to the last
1334 baseline of running text on the page.
1335 </p>
1336
1337 <p>
1338 As explained in
1339 <a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a>,
1340 FOOTER_MARGIN + FOOTER_GAP determine the default vertical end
1341 position of running text on the page unless you have given mom a
1342 bottom margin (with
1343 <a href="typesetting.html#b-margin">B_MARGIN</a>).
1344 If you give a bottom margin, mom ignores FOOTER_GAP; running text
1345 ends at your stated bottom margin, subject to the restriction outlined
1346 <a href="#footer-margin">here</a>.
1347 </p>
1348
1349 <p>
1350 Mom&#8217;s default footer gap is 3
1351 <a href="definitions.html#picaspoints">picas</a>.
1352 </p>
1353
1354 <div class="box-tip">
1355 <p class="tip">
1356 <span class="note">Note:</span>
1357 Mom uses HEADER_GAP and FOOTER_GAP to establish the start and end
1358 baseline positions of running text with respect to both headers and
1359 footers AND page numbers. If you wish to change the gap between the
1360 last line of running text and a bottom page number, use FOOTER_GAP.
1361 If page numbers are at the top of the page, change the gap between
1362 the number and the first line of running text with HEADER_GAP.
1363 </p>
1364 </div>
1365
1366 <div id="gap-note" class="box-tip">
1367 <p class="tip-top">
1368 <span class="note">Additional note:</span>
1369 HEADER_GAP and FOOTER_GAP may only be used once, at the start of a
1370 document. In
1371 <a href="rectoverso.html#collate">collated documents</a>,
1372 this means that HEADER_GAP or FOOTER_GAP cannot be used to change
1373 the gaps once they have been set. The same applies to the Table of
1374 Contents, Endnotes, Bibliographies, and Lists of...&nbsp;.
1375 </p>
1376
1377 <p class="tip-bottom">
1378 In the event that you need to change the header or footer gap after
1379 the start of a document, you must do so with
1380 <a href="typesetting.html#t-margin">T_MARGIN</a>
1381 or
1382 <a href="typesetting.html#b-margin">B_MARGIN</a>,
1383 which raise or lower the top and bottom margins of
1384 <a href="definitions.html#running">running text</a>
1385 but do not affect the placement headers and footers.
1386 (See
1387 <a href="tables-of-contents.html#toc-page-settings-example">here</a>
1388 for a demonstration.)
1389 </p>
1390 </div>
1391
1392 <!-- -HDRFTR_SEPARATOR- -->
1393
1394 <h4 id="hdrftr-separator" class="docs">4. Header/footer separator rule</h4>
1395
1396 <p>
1397 The header/footer separator rule is a modest horizontal rule,
1398 set slightly below the header (or above the footer), that runs
1399 the length of the
1400 <a href="definitions.html#header">header</a>
1401 and helps separate it visually from
1402 <a href="definitions.html#running">running text</a>. If
1403 you don&#8217;t want the rule, you can turn it off. If you want it,
1404 but at a different vertical position relative to the header (or
1405 footer), you can alter its placement.
1406 </p>
1407
1408 <div class="macro-list-container">
1409 <ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
1410 <li><a href="#hdrftr-rule">HEADER_RULE</a> &ndash; on or off</li>
1411 <li><a href="#hdrftr-rule-weight">HEADER_RULE_WEIGHT</a> &ndash; weight of the rule</li>
1412 <li><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a> &ndash; distance of rule from header</li>
1413 <li><a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a> &ndash; color of rule header</li>
1414 </ul>
1415 </div>
1416
1417 <!-- -HDRFTR_RULE- -->
1418
1419 <div id="hdrftr-rule" class="box-macro-args">
1420 Macro: <b>HEADER_RULE</b> <kbd class="macro-args">toggle</kbd>
1421 </div>
1422
1423 <p>
1424 By default, mom prints a header separator rule underneath headers
1425 (or above footers). If you don&#8217;t want the rule, turn it off by
1426 invoking <kbd>.HEADER_RULE</kbd> with any argument (<kbd>OFF</kbd>,
1427 <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...), e.g.
1428 <br/>
1429 <span class="pre-in-pp">
1430 .HEADER_RULE OFF
1431 </span>
1432 To turn the rule (back) on, invoke <kbd>.HEADER_RULE</kbd>
1433 without any argument.
1434 </p>
1435
1436 <div class="box-tip">
1437 <p class="tip">
1438 <span class="note">Note:</span>
1439 Replace HEADER_, above, with FOOTER_ to enable/disable the printing
1440 of the footer separator rule. (Most likely, if you&#8217;re using
1441 <kbd><a href="#footers">FOOTERS</a></kbd>,
1442 you&#8217;ll want it off.)
1443 </p>
1444 </div>
1445
1446 <!-- -HDRFTR_RULE_WEIGHT- -->
1447
1448 <div id="hdrftr-rule-weight" class="box-macro-args">
1449 Macro: <b>HEADER_RULE_WEIGHT</b> <kbd class="macro-args">&lt;weight in points&gt;</kbd>
1450 </div>
1451
1452 <p class="requires">
1453 &bull;&nbsp;Argument must <span class="normal">NOT</span> have a <a href="definitions.html#unitofmeasure">unit of measure</a> appended
1454 </p>
1455
1456 <p>
1457 HEADER_RULE_WEIGHT controls the weight (&#8220;thickness&#8221;) of
1458 the header rule. Like
1459 <a href="inlines.html#rule-weight">RULE_WEIGHT</a>,
1460 it takes a single argument: the weight of the header rule expressed
1461 in
1462 <a href="definitions.html#picaspoints">points</a>
1463 but without the unit of measure, <kbd>p</kbd>, appended. The
1464 argument to HEADER_RULE_WEIGHT must be greater than 0 and less than
1465 100; decimal fractions are allowed.
1466 </p>
1467
1468 <p>
1469 Say, for example, you want a really strong header separator rule.
1470 <br/>
1471 <span class="pre-in-pp">
1472 .HEADER_RULE_WEIGHT 4
1473 </span>
1474 which sets the separator rule weight to 4 points, is how you&#8217;d do
1475 it.
1476 </p>
1477
1478 <p>
1479 Mom&#8217;s default header rule weight is 1/2 point.
1480 </p>
1481
1482 <div class="box-tip">
1483 <p class="tip">
1484 <span class="note">Note:</span>
1485 Replace HEADER_, above, with FOOTER_ to set the weight of the footer
1486 separator rule.
1487 </p>
1488 </div>
1489
1490 <!-- -HDRFTR_RULE_GAP- -->
1491
1492 <div id="hdrftr-rule-gap" class="box-macro-args">
1493 Macro: <b>HEADER_RULE_GAP</b> <kbd class="macro-args">&lt;distance of rule beneath header&gt;</kbd>
1494 </div>
1495
1496 <p class="requires">
1497 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
1498 </p>
1499
1500 <p>
1501 HEADER_RULE_GAP is the distance from the
1502 <a href="definitions.html#baseline">baseline</a>
1503 of type in headers to the top edge of the rule underneath. (If
1504 FOOTER_RULE_GAP, the gap is the distance from the top of the highest
1505 <a href="definitions.html#ascender">ascender</a>
1506 to the bottom edge of the rule.) A unit of measure is required, and
1507 decimal fractions are allowed. Please note that HEADER_RULE_GAP has
1508 no effect on
1509 <a href="#hdrftr-gap">HEADER_GAP</a>
1510 (i.e., HEADER_RULE_GAP is NOT added to HEADER_GAP when mom calculates
1511 the space between headers and the start of
1512 <a href="definitions.html#running">running text</a>).
1513 </p>
1514
1515 <p>
1516 By default, the header rule gap is 4
1517 <a href="definitions.html#picaspoints">points</a>.
1518 If you&#8217;d like to change it to, say, 1/4
1519 <a href="definitions.html#em">em</a>, do
1520 <br/>
1521 <span class="pre-in-pp">
1522 .HEADER_RULE_GAP .25m
1523 </span>
1524 </p>
1525
1526 <div class="box-tip">
1527 <p class="tip">
1528 <span class="note">Note:</span>
1529 Replace HEADER_, above, with FOOTER_ if you&#8217;re using
1530 <a href="definitions.html#footer">footers</a>
1531 and want to change the separator rule gap. In footers, the gap is
1532 measured from the top of the tallest
1533 <a href="definitions.html#ascender">ascender</a>
1534 in the footer.
1535 </p>
1536
1537 <p class="tip-bottom">
1538 <span class="additional-note">Additional note:</span>
1539 When using
1540 <a href="#hdrftr-recto">FOOTER_RECTO</a>
1541 and
1542 <a href="#hdrftr-verso">FOOTER_VERSO</a>,
1543 make sure that the default size for footers
1544 (<a href="#footer-global-size">FOOTER_SIZE</a>)
1545 is set to the largest size of type that will be used in the footer
1546 or mom may not get the rule gap right. Inline changes to the size
1547 of type in FOOTER_RECTO and FOOTER_VERSO should always be negative
1548 (smaller) than the default.
1549 </p>
1550 </div>
1551
1552 <!-- -HDRFTR_RULE_COLOR- -->
1553
1554 <div id="hdrftr-rule-color" class="box-macro-args">
1555 Macro: <b>HEADER_RULE_COLOR</b> <kbd class="macro-args">&lt;colorname&gt;</kbd>
1556 </div>
1557
1558 <p>
1559 If you wish to change the colour of the header rule, invoke
1560 <kbd>.HEADER_RULE_COLOR</kbd> with the name of a colour pre-defined
1561 (or &#8220;initialized&#8221;) with
1562 <a href="color.html#newcolor">NEWCOLOR</a>
1563 or
1564 <a href="color.html#xcolor">XCOLOR</a>.
1565 </p>
1566
1567 <p>
1568 HEADER_RULE_COLOR overrides the colour set with
1569 <a href="#hdrftr-color">HDRFTR_COLOR</a>,
1570 so it&#8217;s possible to have the heads entirely in, say, blue (set
1571 with HEADER_COLOR), and the header rule in, say, red.
1572 </p>
1573
1574 <div class="box-tip">
1575 <p class="tip">
1576 <span class="note">Note:</span>
1577 Replace HEADER_, above, with FOOTER_ to change the colour of the
1578 footer rule.
1579 </p>
1580 </div>
1581
1582 <div class="rule-short"><hr/></div>
1583
1584 <!-- -USERDEF_HDRFTR- -->
1585
1586 <h2 id="userdef-hdrftr-rv" class="macro-group">User-defined, single string recto/verso headers/footers</h2>
1587
1588 <p>
1589 Sometimes, you&#8217;ll find you can&#8217;t get mom&#8217;s
1590 handling of 3-part headers or footers to do exactly what you want in
1591 the order you want. This is most likely happen when you want the
1592 information contained in the headers/footers split over two pages,
1593 as is often the case with recto/verso documents.
1594 </p>
1595
1596 <p>
1597 Say, for example, you want recto page headers to contain a
1598 document&#8217;s author, centred, and verso page headers to contain
1599 the document&#8217;s title, also centred, like this:
1600 <br/>
1601 <span class="pre-in-pp">
1602 +------------------------+ +------------------------+
1603 | Author | | Title |
1604 | | | |
1605 | | | |
1606 | | | |
1607 | | | |
1608 | | | |
1609 | | | |
1610 | | | |
1611 | | | |
1612 | | | |
1613 | | | |
1614 | | | |
1615 | | | |
1616 | | | |
1617 +------------------------+ +------------------------+
1618 </span>
1619 With mom&#8217;s standard 3-part headers, this isn&#8217;t possible,
1620 even when
1621 <a href="rectoverso.html#recto-verso">RECTO_VERSO</a>
1622 is enabled. RECTO_VERSO switches the left and right parts of
1623 headers on alternate pages, but the centre part remains unchanged.
1624 </p>
1625
1626 <p>
1627 Any time you need distinctly different headers on alternate pages,
1628 mom has macros that let you manually design and determine what goes
1629 into headers on recto pages, and what goes into headers on verso
1630 pages. The macros are
1631 <a href="#hdrftr-recto">HEADER_RECTO</a>
1632 and
1633 <a href="#hdrftr-verso">HEADER_VERSO</a>.
1634 Both allow you to state whether the header is flush left, centred,
1635 or flush right, and both take a single
1636 <a href="definitions.html#stringargument">string argument</a>
1637 with which, by combining text and
1638 <a href="definitions.html#inlines">inline escapes</a>,
1639 you can make the headers come out just about any way you want. Use
1640 of the <kbd><span class="nobr">\*[PAGE#]</span></kbd> escape is permitted in the
1641 string argument (see
1642 <a href="#page-number-incl">Including the page number in header-left, -centre or -right</a>),
1643 and, as an added bonus, mom provides a special mechanism whereby
1644 it&#8217;s possible to
1645 <a href="#padding-hdrftr">pad</a>
1646 the string as well. The padding mechanism lets you create headers
1647 that contain left, centre and right parts like mom&#8217;s defaults
1648 but entirely of your own design.
1649 </p>
1650
1651 <div class="macro-list-container">
1652 <ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
1653 <li><a href="#hdrftr-recto">HEADER_RECTO</a></li>
1654 <li><a href="#hdrftr-verso">HEADER_VERSO</a>
1655 <ul style="margin-left: -.5em;">
1656 <li><a href="#userdef-hdrftr">User-defined single string headers/footers (no recto/verso)</a></li>
1657 <li><a href="#padding-hdrftr">Padding the header-recto/header-verso string</a></li>
1658 </ul></li>
1659 </ul>
1660 </div>
1661
1662 <!-- -HDRFTR_RECTOVERSO- -->
1663
1664 <div id="hdrftr-recto" class="box-macro-args">
1665 Macro: <b>HEADER_RECTO</b> <kbd class="macro-args">LEFT | CENTER | RIGHT [ CAPS ] "&lt;header recto string&gt;"</kbd>
1666 </div>
1667
1668 <div id="hdrftr-verso" class="box-macro-args" style="margin-top: 1em;">
1669 Macro: <b>HEADER_VERSO</b> <kbd class="macro-args">LEFT | CENTER | RIGHT [ CAPS ] "&lt;header verso string&gt;"</kbd>
1670 </div>
1671
1672 <div id="userdef-hdrftr" class="box-important">
1673
1674 <p class="tip">
1675 <span class="tip" style="display: block; margin-bottom: -1.25em; color: #000056; font-size: 100%;">User-defined single string headers/footers (no recto/verso)</span>
1676 <br/>
1677 HEADER_RECTO may be used to create user-defined, single string
1678 headers (or footers, with FOOTER_RECTO), even when recto/verso is
1679 not enabled (with
1680 <a href="rectoverso.html#recto-verso">RECTO_VERSO</a>).
1681 In such cases, the header/footer you create is the one used on
1682 every page, making HEADER_RECTO your &#8220;I need to design my own
1683 headers from scratch&#8221; solution.
1684 </p>
1685 </div>
1686
1687 <p>
1688 HEADER_RECTO and HEADER_VERSO behave identically, hence all
1689 references to HEADER_RECTO in this section also refer to
1690 HEADER_VERSO. Furthermore, FOOTER_ can be used instead of HEADER_
1691 to set up recto/verso footers.
1692 </p>
1693
1694 <p>
1695 The first argument to HEADER_RECTO is the direction in which you
1696 want the header
1697 <a href="definitions.html#quad">quadded</a>.
1698 <kbd>L</kbd>, <kbd>C</kbd>, and <kbd>R</kbd> may be used in place of
1699 <kbd>LEFT</kbd>, <kbd>CENTER</kbd>, and <kbd>RIGHT</kbd>.
1700 </p>
1701
1702 <p>
1703 The second argument (optional) tells mom to capitalize the text of
1704 the header. <b>Please note:</b> Do not use
1705 <a href="inlines.html#uc-lc"><kbd><span class="nobr">\*[UC]...\*[LC]</span></kbd></a>
1706 inside the string passed to HEADER_RECTO.
1707 </p>
1708
1709 <p>
1710 The final argument is a string, surrounded by double-quotes,
1711 containing what you want in the header. HEADER_RECTO disables
1712 mom&#8217;s normal 3-part headers, therefore anything you want in
1713 the headers must be entered by hand in the string, including colours
1714 (via the
1715 <a href="definitions.html#inlines">inline escape</a>
1716 <a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colorname&gt;]</span></kbd></a>).
1717 </p>
1718
1719 <p>
1720 By default, HEADER_RECTO is set at the same size, and in the same
1721 family and font, as paragraph text. The control macros
1722 <a href="#hdrftr-global-family">HEADER_FAMILY</a>
1723 and
1724 <a href="#hdrftr-global-size">HEADER_SIZE</a>
1725 may be used to change the default family and size. Changes to the
1726 font(s) within the string must be accomplished with the
1727 <a href="definitions.html#inlines">inline escapes</a>
1728 <kbd><span class="nobr">\*[ROM]</span></kbd>,
1729 <kbd><span class="nobr">\*[IT]</span></kbd>,
1730 <kbd><span class="nobr">\*[BD]</span></kbd>,
1731 <kbd><span class="nobr">\*[BDI]</span></kbd>,
1732 and <kbd><span class="nobr">\*[PREV]</span></kbd> (see
1733 <a href="inlines.html#inline-fonts-mom">Changing fonts</a>).
1734 Additional refinements to the style of the header-recto string,
1735 including horizontal spacing and/or positioning, can also be made
1736 with inline escapes.
1737 </p>
1738
1739 <p>
1740 To include the current page number in the string, use the
1741 <kbd><span class="nobr">\*[PAGE#]</span></kbd>
1742 <a href="definitions.html#inlines">inline escape</a>.
1743 </p>
1744
1745 <h3 id="padding-hdrftr" class="docs">Padding the header-recto/header-verso string</h3>
1746
1747 <p>
1748 You can &#8220;pad&#8221; the header-recto string, a convenience
1749 you&#8217;ll appreciate in circumstances such as the following.
1750 <br/>
1751 <span class="pre-in-pp">
1752 VERSO RECTO
1753 +------------------------+ +------------------------+
1754 | Author Page# | | Page# Title |
1755 | | | |
1756 | | | |
1757 | | | |
1758 | | | |
1759 | | | |
1760 | | | |
1761 | | | |
1762 | | | |
1763 | | | |
1764 | | | |
1765 | | | |
1766 | | | |
1767 | | | |
1768 +------------------------+ +------------------------+
1769 </span>
1770 </p>
1771
1772 <p>
1773 There are two steps to padding the string argument passed to HEADER_RECTO
1774 (if you&#8217;re unsure what padding is, see
1775 <a href="goodies.html#pad">Insert space into lines</a>).
1776 </p>
1777 <ol style="margin-top: -.5em; margin-left: -.5em; margin-bottom: -.5em;">
1778 <li>Begin and end the string (inside the double-quotes) with the caret character (<kbd>^</kbd>).</li>
1779 <li>Enter the pound sign (<kbd>#</kbd>) at any point in the string where you want an equalized amount of whitespace inserted.</li>
1780 </ol>
1781
1782 <p>
1783 The situation depicted above is accomplished like this:
1784 <br/>
1785 <span class="pre-in-pp">
1786 .HEADER_RECTO LEFT "^\*[PAGE#]#\E*[$TITLE]^"
1787 .HEADER_VERSO LEFT "^\E*[$AUTHOR]#\*[PAGE#]^"
1788 </span>
1789 Notice that the quad argument, <kbd>LEFT</kbd>, is used in both
1790 cases. When padding a header, it doesn&#8217;t matter which
1791 quad argument you use, although you must be sure to supply
1792 one. Also note that mom does not interpret the <kbd>#</kbd> in
1793 <kbd><span class="nobr">\*[PAGE#]</span></kbd> as a padding marker (i.e. as a
1794 place to insert whitespace).
1795 </p>
1796
1797 <div class="box-important">
1798 <p class="tip">
1799 <span class="important">Important:</span>
1800 The
1801 <a href="goodies.html#pad-marker">PAD_MARKER</a>
1802 macro, which changes the default pad marker (<kbd>#</kbd>) used by
1803 <a href="goodies.html#pad">PAD</a>,
1804 has no effect on the pad marker used in the HEADER_RECTO string. If
1805 you absolutely must have a literal pound sign in your HEADER_RECTO
1806 string, use the escape sequence for the pound sign
1807 (&nbsp;<kbd>\[sh]</kbd>&nbsp;) where you want the pound sign to go.
1808 </p>
1809 </div>
1810
1811 <!-- -HDRFTR_RECTOVERSO- -->
1812
1813 <h2 id="headers-and-footers-intro" class="macro-group">Headers and footers on the same page</h2>
1814
1815 <p>
1816 Normally, mom prints either a header or a footer, but not both, depending on whether
1817 <a href="#headers">HEADERS</a>
1818 or
1819 <a href="#footers">FOOTERS</a>
1820 is enabled. (Page numbering, whether in the top margin
1821 or the bottom, is not considered a header or a footer.)
1822 Should you need both headers and footers on the same page, the
1823 single macro HEADERS_AND_FOOTERS is the way to set it up.
1824 </p>
1825
1826 <div id="headers-and-footers" class="box-macro-args">
1827 Macro: <b>HEADERS_AND_FOOTERS</b> <kbd class="macro-args">(see Invocation)</kbd>
1828 </div>
1829
1830 <p>
1831 Invocation:
1832 <br/>
1833 <span class="pre-in-pp" style="margin-bottom: -1em;">
1834 .HEADERS_AND_FOOTERS \
1835 &lt;L | C | R&gt; "&lt;header-recto string&gt;" \
1836 &lt;L | C | R&gt; "&lt;footer-recto string&gt;" \
1837 &lt;L | C | R&gt; "&lt;header-verso string&gt;" \
1838 &lt;L | C | R&gt; "&lt;footer-verso string&gt;"
1839 </span>
1840 or
1841 <span class="pre-in-pp" style="margin-top: -.5em;">
1842 .HEADERS_AND_FOOTERS &lt;anything&gt;
1843 </span>
1844 </p>
1845
1846 <p>
1847 Unlike the macros,
1848 <a href="#headers">HEADERS</a>
1849 and
1850 <a href="#footers">FOOTERS</a>,
1851 which are
1852 <a href="definitions.html#toggle">toggle</a>
1853 macros, HEADERS_AND_FOOTERS requires that you supply the information
1854 you want in the headers and footers yourself. Mom does no automatic
1855 generation of things like the title and the author in headers and
1856 footers when you&#8217;re using HEADERS_AND_FOOTERS. Furthermore,
1857 style changes&mdash;family, font, pointsize, colour, capitalization,
1858 etc &mdash;are entirely your responsibility and must be made with
1859 <a href="definitions.html#inlines">inline escapes</a>
1860 in the arguments passed to <kbd>&#8220;&lt;recto
1861 &#8221;header string&gt;&#8220;</kbd>, <kbd>&lt;recto footer
1862 string&gt;&#8220;</kbd>, etc. By default, mom sets the headers and
1863 footers created with HEADERS_AND_FOOTERS in the same family, font,
1864 point size, capitalization style and colour as
1865 <a href="definitions.html#running">running text</a>.
1866 </p>
1867
1868 <p>
1869 The manner of entering what you want is identical to the way you
1870 input
1871 <a href="#userdef-hdrftr-rv">single string headers and footers</a>.
1872 I suggest reading up on them, as well as looking at the entries,
1873 <a href="#hdrftr-rectoverso">HEADER_RECTO</a>
1874 and
1875 <a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a>.
1876 </p>
1877
1878 <p>
1879 The same
1880 <a href="#padding-hdrftr">padding mechanism</a>
1881 used in HEADER_RECTO and HEADER_VERSO is available in the
1882 <a href="definitions.html#stringargument">string arguments</a>
1883 passed to HEADERS_AND_FOOTERS, allowing you to simulate two- and
1884 three-part headers and footers.
1885 </p>
1886
1887 <p>
1888 <kbd>L | C | R</kbd> in the arguments to HEADERS_AND_FOOTERS refers
1889 to whether you want the specific header or footer part on the left,
1890 in the middle, or on the right. (You can also use the longer forms,
1891 <kbd>LEFT</kbd>, <kbd>CENTER</kbd> and <kbd>RIGHT</kbd>.) The
1892 string you give afterwards is whatever text you want, including
1893 mom&#8217;s
1894 <a href="#reserved-strings">reserved strings</a>,
1895 and whatever
1896 <a href="definitions.html#inlines">inline escapes</a>
1897 you need to change things like family and font, pointsize, colour,
1898 etc. as you go along.
1899 </p>
1900
1901 <p>
1902 Note the backslashes in the invocation, above. Every set of
1903 arguments given this way to HEADERS_AND_FOOTERS <i>except the
1904 last</i> requires a backslash after it. The use of backslashes
1905 isn&#8217;t required if you want to put the entire argument list on
1906 the same (very long!) line as the macro itself; I recommend sticking
1907 to the style shown above to keep things manageable.
1908 </p>
1909
1910 <p>
1911 If you want to disable having both headers and footers on the same
1912 page, invoke <kbd>.HEADERS_AND_FOOTERS</kbd> with any argument
1913 you want (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
1914 <kbd>X</kbd>...). Mom will restore her default behaviour of setting
1915 automatically generated page headers, with the page number,
1916 centered, at the bottom of the page. If you would prefer footers
1917 instead of headers after turning HEADERS_AND_FOOTERS off, invoke
1918 <a href="#footers"><kbd>.FOOTERS</kbd></a>
1919 afterwards.
1920 </p>
1921
1922 <h4 class="docs" style="margin-bottom: 1em;">Examples of HEADERS_AND_FOOTERS usage</h4>
1923
1924 <div id="examples-userdef-hdrftr-1" class="examples-container" style="padding-bottom: 0;">
1925 <div class="examples" style="margin-top: 12px; margin-bottom: 0;">Example 1: Header and footer the same on every page</div>
1926 <span class="pre">
1927 .HEADERS_AND_FOOTERS \ +-----------------------+
1928 C "\E*[$TITLE]" \ | Title |
1929 L "^\E*[$AUTHOR]#\*[PAGE#]^" | |
1930 | |
1931 | |
1932 | |
1933 | |
1934 | |
1935 | |
1936 | |
1937 | |
1938 | |
1939 | |
1940 | |
1941 | Author Pg. # |
1942 +-----------------------+
1943 </span>
1944
1945 <p>
1946 <kbd><span class="nobr">\E*[$TITLE]</span></kbd> and
1947 <kbd><span class="nobr">\E*[$AUTHOR]</span></kbd> will print the strings you pass
1948 to
1949 <a href="docprocessing.html#title">TITLE</a>
1950 and
1951 <a href="docprocessing.html#author">AUTHOR</a>;
1952 <kbd><span class="nobr">\*[PAGE#]</span></kbd> is how you include the page number
1953 in a header or footer string. (For a list of special strings you
1954 can use in headers and footers, see
1955 <a href="#reserved-strings">here</a>.)
1956 </p>
1957
1958 <p>
1959 You don&#8217;t have to use these special strings. You can type
1960 in anything you like. I&#8217;ve only used them here to show that
1961 they&#8217;re available.
1962 </p>
1963 </div>
1964
1965 <div id="examples-userdef-hdrftr-2" class="examples-container" style="margin-top: 1em; padding-bottom: 18px;">
1966 <div class="examples" style="margin-top: 12px; margin-bottom: 0;">Example 2: Different headers and footers on recto/verso pages</div>
1967 <span class="pre">
1968 .HEADERS_AND_FOOTERS \
1969 C "BOOK TITLE" \
1970 L "^\*[PAGE#]#\E*[$AUTHOR]^" \
1971 C "Story Title" \
1972 L "^\E*[$AUTHOR]#\*[PAGE#]^"
1973
1974 +-----------------------+ +------------------------+
1975 | BOOK TITLE | | Story Title |
1976 | | | |
1977 | | | |
1978 | | | |
1979 | | | |
1980 | | | |
1981 | | | |
1982 | | | |
1983 | | | |
1984 | | | |
1985 | | | |
1986 | | | |
1987 | | | |
1988 | Pg. # Author | | Author Pg.# |
1989 +-----------------------+ +------------------------+
1990 </span>
1991 </div>
1992
1993 <div class="rule-short" style="margin-top: 1.25em;"><hr/></div>
1994
1995 <!-- ==================================================================== -->
1996
1997 <h2 id="pagination-intro" class="macro-group">Pagination</h2>
1998
1999 <p>
2000 By default, mom paginates documents. Page numbers appear in the
2001 bottom margin of the page, centred between two hyphens. As with
2002 all elements of mom&#8217;s document processing, most aspects of
2003 pagination style can be altered to suit your taste with control
2004 macros.
2005 </p>
2006
2007
2008 <div class="macro-list-container">
2009 <h3 id="index-pagination" class="macro-list">Pagination macros</h3>
2010 <ul class="macro-list">
2011 <li><a href="#paginate">PAGINATE</a> &ndash; pagination on or off</li>
2012 <li><a href="#pagenumber">PAGENUMBER</a> &ndash; user-defined (starting) page number</li>
2013 <li><a href="#pagenum-style">PAGENUM_STYLE</a> &ndash; digits, roman numerals, etc</li>
2014 <li><a href="#pagenum-on-first-page">PAGENUM_ON_FIRST_PAGE</a> &ndash; put page number on first page when numbering is at the top of the page</li>
2015 <li><a href="#draft-with-pagenumber">DRAFT_WITH_PAGENUMBER</a> &ndash; attach draft/revision information to page numbers</li>
2016 <li><a href="#pagenumber-string">PAGENUMBER_STRING</a> &ndash; user-defined page number string</li>
2017 <li><a href="#index-paginate-control">Pagination control macros and defaults</a></li>
2018 <li><a href="#pdf-outline-pagenumber">PDF outline page numbering</a></li>
2019 </ul>
2020 </div>
2021
2022 <!-- -PAGINATE- -->
2023
2024 <div id="paginate" class="box-macro-args">
2025 Macro: <b>PAGINATE</b> <kbd class="macro-args">toggle</kbd>
2026 </div>
2027
2028 <p class="alias" style="margin-bottom: 0;">
2029 <i>Alias:</i> <b>PAGINATION</b>
2030 </p>
2031
2032 <p>
2033 By default, mom paginates documents (in the bottom margin). If
2034 you&#8217;d prefer she not paginate, turn pagination off by
2035 invoking <kbd>.PAGINATE</kbd> with any argument (<kbd>OFF</kbd>,
2036 <kbd>NO</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...),
2037 e.g.
2038 <br/>
2039 <span class="pre-in-pp">
2040 .PAGINATE NO
2041 </span>
2042 To (re)start pagination, invoke <kbd>.PAGINATE</kbd> without any
2043 argument.
2044 </p>
2045
2046 <!-- -PAGENUMBER- -->
2047
2048 <div id="pagenumber" class="box-macro-args">
2049 Macro: <b>PAGENUMBER</b> <kbd class="macro-args">&lt;number&gt;</kbd>
2050 </div>
2051
2052 <p>
2053 As is to be expected, pagination of documents begins at page 1. If
2054 you&#8217;d prefer that mom begin with a different number on the
2055 first page of a document, invoke <kbd>.PAGENUMBER</kbd> with the
2056 number you want.
2057 </p>
2058
2059 <p>
2060 PAGENUMBER need not be used only to give mom a "first page" number.
2061 It can be used at any time to tell mom what number you want a page
2062 to have. Subsequent page numbers will, of course, be incremented by
2063 1 from that number.
2064 </p>
2065
2066 <!-- -PAGENUM_STYLE- -->
2067
2068 <div id="pagenum-style" class="box-macro-args">
2069 Macro: <b>PAGENUM_STYLE</b> <kbd class="macro-args">DIGIT | ROMAN | roman | ALPHA | alpha</kbd>
2070 </div>
2071
2072 <p>
2073 PAGENUM_STYLE lets you tell mom what kind of page numbering you
2074 want.
2075 <br/>
2076 <span class="pre-in-pp">
2077 DIGIT Arabic digits (1, 2, 3...)
2078 ROMAN upper case roman numerals (I, II, III...)
2079 roman lower case roman numerals (i, ii, iii...)
2080 ALPHA upper case letters (A, B, C...)
2081 alpha lower case letters (a, b, c...)
2082 </span>
2083 </p>
2084
2085 <!-- -PAGENUM_ON_FIRST_PAGE- -->
2086
2087 <div id="pagenum-on-first-page" class="box-macro-args">
2088 Macro: <b>PAGENUM_ON_FIRST_PAGE</b> <kbd class="macro-args">toggle</kbd>
2089 </div>
2090
2091 <p>
2092 This macro applies only if you&#8217;ve enabled
2093 <a href="#footers">FOOTERS</a>.
2094 If FOOTERS are on, mom automatically places page numbers at the tops
2095 of pages except on the first page of a document (or on first pages
2096 after
2097 <a href="rectoverso.html#collate">COLLATE</a>).
2098 If you&#8217;d like the page number to appear on &#8220;first&#8221; pages
2099 when footers are on, invoke
2100 <br/>
2101 <span class="pre-in-pp">
2102 .PAGENUM_ON_FIRST_PAGE
2103 </span>
2104 with no argument. Any other argument turns the feature off
2105 (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>,
2106 etc).
2107 </p>
2108
2109 <p>
2110 As with most of the
2111 <a href="definitions.html#controlmacro">control macros</a>,
2112 PAGENUM_ON_FIRST_PAGE can be invoked at any time, meaning that if
2113 you don&#8217;t want a page number on the very first page of a
2114 document, but do want one on pages that appear after COLLATE, omit
2115 it before the first
2116 <a href="docprocessing.html#start">START</a>
2117 of the document, then invoke it either just before or after your
2118 first COLLATE.
2119 </p>
2120
2121 <!-- -DRAFT_WITH_PAGENUMBER- -->
2122
2123 <div id="draft-with-pagenumber" class="box-macro-args">
2124 Macro: <b>DRAFT_WITH_PAGENUMBER</b>
2125 </div>
2126
2127 <p>
2128 Sometimes, in
2129 <a href="docprocessing.html#copystyle">COPYSTYLE <kbd>DRAFT</kbd></a>,
2130 the CENTER part of page headers gets overcrowded because of
2131 the draft and revision information that go there by default.
2132 DRAFT_WITH_PAGENUMBER is one way to fix the problem.
2133 </p>
2134
2135 <p>
2136 Invoked without an argument, <kbd>.DRAFT_WITH_PAGENUMBER</kbd>
2137 removes draft/revision information from the page headers and
2138 attaches it instead to the document&#8217;s page numbering, in the
2139 form
2140 <br/>
2141 <span class="pre-in-pp">
2142 Draft #, Rev. # / &lt;pagenumber&gt;
2143 </span>
2144 If you have not supplied mom with a draft number (with
2145 <a href="docprocessing.html#draft">DRAFT</a>)
2146 DRAFT_WITH_PAGENUMBER will assume &#8220;Draft 1&#8220;, and will
2147 print it before the page number.
2148 </p>
2149
2150 <p>
2151 See the note in
2152 <a href="docprocessing.html#copystyle-note">COPYSTYLE <kbd>DRAFT</kbd>
2153 </a>
2154 for other ways of dealing with crowded page headers when formatting
2155 draft-style copy.
2156 </p>
2157
2158 <!-- -PAGENUMBER_STRING- -->
2159
2160 <div id="pagenumber-string" class="box-macro-args">
2161 Macro: <b>PAGENUMBER_STRING</b> "&lt;text of page number string&gt;"
2162 </div>
2163
2164 <p>
2165 If you want page numbering to contain text in addition to the page
2166 number itself, use PAGENUMBER_STRING.
2167 </p>
2168
2169 <p>
2170 The most common use for PAGENUMBER_STRING is to include the total
2171 number of pages along with the page number, for example
2172 &#8220;Page 1 of 10, Page 2 of 10...&#8221; To accomplish this,
2173 you&#8217;d enter
2174 <br/>
2175 <span class="pre-in-pp">
2176 .PAGENUMBER_STRING "Page \*[PAGE#] of 10"
2177 </span>
2178 Notice that the page number is entered symbolically with the
2179 <a href="definitions.html#inlines">inline escape</a>
2180 <span style="white-space:nowrap"><kbd><span class="nobr">\*[PAGE#]</span></kbd>,</span>
2181 while the total number of pages must be entered explicitly after the
2182 document is complete and the total number of pages known.
2183 </p>
2184
2185 <!-- -PAGINATE_CONTROL- -->
2186
2187 <div class="macro-list-container">
2188 <h3 id="index-paginate-control" class="macro-list">Pagination control macros and defaults</h3>
2189
2190 <ol style="margin-top: -1.5em; padding-bottom: 6px;">
2191 <li><a href="#paginate-general">Family/font/size/colour</a></li>
2192 <li><a href="#pagenum-pos">Page number position (vertical and horizontal)</a></li>
2193 <li><a href="#pagenum-hyphens">Enclose page numbers with hyphens (on or off)</a></li>
2194 </ol>
2195 </div>
2196
2197 <h4 id="paginate-general" class="docs">1. Page number family/font/size/colour</h4>
2198
2199 <div class="defaults-container" style="margin-top: 1em; padding-bottom: 8px;">
2200 <p class="defaults" style="padding-top: 6px;">
2201 See
2202 <a href="docelement.html#control-macro-args">Arguments to the control macros</a>.
2203 <br/>
2204 The following control macros may also be
2205 <a href="docelement.html#grouping">grouped</a>
2206 using PAGENUMBER_STYLE.*
2207 </p>
2208 <span class="pre defaults">
2209 .PAGENUM_FAMILY default = prevailing document family
2210 .PAGENUM_FONT default = roman
2211 .PAGENUM_SIZE default = +0 (i.e. same size as paragraph text)
2212 .PAGENUM_COLOR default = black
2213 </span>
2214 </div>
2215
2216 <p style="margin-top: -2em">
2217 *Note: Do not confuse PAGENUMBER_STYLE with
2218 <a href="#pagenum-style">PAGENUM_STYLE</a>.
2219 </p>
2220
2221 <h4 id="pagenum-pos" class="docs" style="margin-top: 0em;">2. Page number position</h4>
2222
2223 <div class="box-macro-args" style="margin-top: 1em;">
2224 Macro: <b>PAGENUM_POS</b> <kbd class="macro-args">[ TOP | BOTTOM ]&nbsp;&nbsp;[ LEFT | CENTER | RIGHT ]</kbd>
2225 </div>
2226
2227 <p>
2228 Use PAGENUM_POS to change the default position of automatic page
2229 numbering. PAGENUM_POS requires <i>two</i> arguments: a vertical
2230 position (<kbd>TOP</kbd> or <kbd>BOTTOM</kbd>) and a horizontal
2231 position (<kbd>LEFT</kbd> or <kbd>CENTER</kbd> or <kbd>RIGHT</kbd>).
2232 </p>
2233
2234 <p>
2235 For example, if you turn both
2236 <a href="definitions.html#header">headers</a>
2237 and
2238 <a href="definitions.html#footer">footers</a>
2239 off (with <kbd>.HEADERS&nbsp;OFF</kbd> and
2240 <kbd>.FOOTERS&nbsp;OFF</kbd>) and you want mom to number your pages
2241 at the top right position, enter
2242 <br/>
2243 <span class="pre-in-pp">
2244 .PAGENUM_POS TOP RIGHT
2245 </span>
2246 </p>
2247
2248 <div id="pagenum-pos-note" class="box-tip" style="margin-top: 1em;">
2249 <p class="tip">
2250 <span class="note">Note:</span>
2251 HEADERS must be OFF for PAGENUM_POS TOP to work.
2252 </p>
2253 </div>
2254
2255 <h4 id="pagenum-hyphens" class="docs" style="margin-top: -1em;">3. Enclose page numbers with hyphens (on or off)</h4>
2256
2257 <div class="box-macro-args" style="margin-top: 1em;">
2258 Macro: <b>PAGENUM_HYPHENS</b> <kbd class="macro-args">toggle</kbd>
2259 </div>
2260
2261 <p>
2262 By default, mom encloses page numbers between hyphens. If you
2263 don&#8217;t want this behaviour, invoke the macro PAGENUM_HYPHENS
2264 with any argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
2265 <kbd>X</kbd>, etc), like this:
2266 <br/>
2267 <span class="pre-in-pp">
2268 .PAGENUM_HYPHENS OFF
2269 </span>
2270 If, for some reason, you want to turn page number hyphens back
2271 on, invoke the macro without an argument.
2272 </p>
2273
2274 <h2 id="pdf-outline-numbering" class="macro-group">PDF outline page numbering</h2>
2275
2276 <p>
2277 Prior to mom 2.6_b, the document outline panel of PDF viewers
2278 displayed the physical page numbers of mom documents, not the
2279 printed page number. As of 2.6_b, entries in the outline panel show
2280 the printed page number. Furthermore, null pages (e.g. cover and
2281 title pages) are no longer given a page number in the outline.
2282 </p>
2283
2284 <p>
2285 Though rare, you may at times want to control the PDF outline page
2286 numbering, which is accomplished with the
2287 <a href="#pdf-outline-pn">PDF_OUTLINE_PN</a>
2288 macro.
2289 </p>
2290
2291 <div id="pdf-outline-pn-note" class="box-tip">
2292 <p class="tip-top" style="padding-bottom: .5em">
2293 <span class="note">Note:</span>
2294 You must be running a version of groff &gt; 1.23 or have recently
2295 built groff from sources in order for the outline page numbers
2296 to reflect the printed page numbers, as described above, and for
2297 PDF_OUTLINE_PN to work.
2298 </p>
2299 </div>
2300
2301 <div class="macro-id-overline">
2302 <h3 id="pdf-outline-pagenumber" class="macro-id">PDF_OUTLINE_PN</h3>
2303 </div>
2304
2305 <div class="box-macro-args">
2306 Macro: <b>PDF_OUTLINE_PN</b> <kbd class="macro-args">SUSPEND | RESUME</kbd>
2307 <br/>
2308 Macro: <b>PDF_OUTLINE_PN</b> <kbd class="macro-args">[FORMAT &lt;format&gt;]&nbsp;[PREFIX &lt;prefix&gt;]&nbsp;[PAGE &lt;pagenumber&gt;]</kbd>
2309 </div>
2310
2311 <p>
2312 PDF outline page numbering may be suspended or resumed by calling
2313 PDF_OUTLINE_PN with the appropriate argument.
2314 </p>
2315
2316 <p>
2317 If you wish to change the numbering format, add a prefix to the page
2318 number, or hard set an outline page number, supply one or more of
2319 the additional keywords with arguments.
2320 </p>
2321
2322 <h3 class="docs">FORMAT</h3>
2323
2324 <p>
2325 <kbd>FORMAT</kbd> may be one of
2326 </p>
2327
2328 <ul style="list-style-type:none; margin-top: -1em">
2329 <li><kbd>D</kbd> (digit)</li>
2330 <li><kbd>R</kbd> (roman numeral, caps)</li>
2331 <li><kbd>r</kbd> (roman numeral, lower case)</li>
2332 <li><kbd>A</kbd> (alphabetic, caps)</li>
2333 <li><kbd>a</kbd> (alphabetic, lower case)</li>
2334 </ul>
2335
2336 <h3 class="docs">PREFIX</h3>
2337
2338 <p>
2339 <kbd>PREFIX</kbd> may be anything you like, for example
2340 &#8220;<kbd>A-</kbd>&#8221; to add a prefix to the outline page
2341 numbering of an Appendix. <kbd>PREFIX</kbd> must not contain
2342 spaces.
2343 </p>
2344
2345 <h3 class="docs">PAGE</h3>
2346
2347 <p>
2348 <kbd>PAGE</kbd> is the page number you want to appear in the
2349 outline.
2350 </p>
2351
2352 <!-- -BLANK_PAGE- -->
2353
2354 <h2 id="blank-pages" class="macro-group">Inserting blank pages into a document</h2>
2355
2356 <div class="box-macro-args">
2357 Macro: <b>BLANKPAGE</b> <kbd class="macro-args">&lt;# of blank pages to insert&gt; [DIVIDER [NULL]]</kbd>
2358 </div>
2359
2360 <p>
2361 This one does exactly what you&#8217;d expect&mdash;inserts a blank
2362 page (or pages) into a document. Unless you give the optional argument,
2363 <kbd>NULL</kbd>, mom silently increments the page number of every
2364 blank page and keeps track of
2365 <a href="rectoverso.html#recto-verso">recto/verso</a>
2366 stuff, but otherwise does nothing. This is useful for forcing new
2367 sections of a document onto recto pages, but may have other
2368 applications as well.
2369 </p>
2370
2371 <p>
2372 The required argument to BLANK_PAGE is the number of blank pages to
2373 insert. The argument is not optional, hence even if you only want
2374 one blank page, you have to tell mom:
2375 <br/>
2376 <span class="pre-in-pp">
2377 .BLANKPAGE 1
2378 </span>
2379 The optional argument <kbd>DIVIDER</kbd> must be given if
2380 you&#8217;re inserting a blank page before the start of major
2381 document sections (chapters, endnotes, bibliographies,
2382 or tables of contents&#8211;provided the table of contents is not being
2383 <a href="tables-of-contents.html#auto-relocate-toc">autorelocated</a>).
2384 Without the <kbd>DIVIDER</kbd> argument, mom simply
2385 inserts the blank pages and prepares the next page to receive
2386 <a href="definitions.html#running">running text</a>.
2387 </p>
2388
2389 <p>
2390 <kbd>NULL</kbd>, which is also optional, allows you to output the
2391 specified number of pages without mom incrementing the page number
2392 for each blank page. She will, however, continue to keep track
2393 of which pages are recto/verso if recto/verso printing has been
2394 enabled.
2395 </p>
2396
2397 <div id="blankpage-note" class="box-tip" style="margin-top: 1.5em;">
2398 <p class="tip">
2399 <span class="note">Note:</span>
2400 Do not use BLANKPAGE before TOC if the table of contents is being
2401 <a href="tables-of-contents.html#auto-relocate-toc">autorelocated</a>.
2402 </p>
2403 </div>
2404
2405 <div class="rule-long"><hr/></div>
2406
2407 <!-- Navigation links -->
2408 <table style="width: 100%; margin-top: 12px;">
2409 <tr>
2410 <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
2411 <td style="width: 24%; text-align: center;"><a href="#top">Top</a></td>
2412 <td style="width: 42%; text-align: right;"><a href="rectoverso.html">Next: Recto/verso printing, collating</a></td>
2413 </tr>
2414 </table>
2415
2416 </div>
2417
2418 <div class="bottom-spacer"><br/></div>
2419
2420 </body>
2421 </html>