1 <?xml version="1.0" encoding="utf-8"?>
3 This file is part of groff, the GNU roff type-setting system.
5 Copyright (C) 2004-2018 Free Software Foundation, Inc.
6 Written by Peter Schaffter (peter@schaffter.ca).
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
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.
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">
22 <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
23 <title>Mom -- Document Processing, Introduction and Setup</title>
24 <link rel="stylesheet" type="text/css" href="stylesheet.css" />
27 <body style="background-color: #f5faff;">
29 <!-- ==================================================================== -->
31 <div id="top" class="page">
33 <!-- Navigation links -->
34 <table style="width: 100%;">
36 <td><a href="toc.html">Back to Table of Contents</a></td>
37 <td style="text-align: right;"><a href="docelement.html#top">Next: The document element tags</a></td>
41 <h1 class="docs">Document processing with mom</h1>
43 <h2 id="toc-doc-processing" class="docs" style="text-align: center;">Table of contents</h2>
45 <div id="docprocessing-mini-toc" style="font-size: 90%; line-height: 150%; margin-top: .5em;">
46 <div class="mini-toc-col-1" style="margin-left: 0;">
47 <h3 class="toc toc-docproc-header" style="margin-top: 1em;"><a class="header-link" href="#docprocessing-intro">Introduction to document processing</a></h3>
48 <h3 class="toc toc-docproc-header" style="margin-top: .5em;"><a class="header-link" href="#defaults">Document defaults</a></h3>
49 <h3 class="toc toc-docproc-header" style="margin-top: .5em;"><a class="header-link" href="#vertical-whitespace-management">Vertical whitespace management</a></h3>
50 <h3 class="toc toc-docproc-header" style="margin-top: .5em;"><a class="header-link" href="#setup">Preliminary document setup</a></h3>
51 <ul class="toc-docproc" style="margin-top: .5em;">
52 <li><a href="#docprocessing-tut"><b>Tutorial – Setting up a mom document</b></a></li>
53 <li><a href="#reference-macros"><b>The reference macros (metadata)</b></a>
54 <ul class="toc-docproc">
55 <li><a href="#title">TITLE</a></li>
56 <li><a href="#doc-title">DOCTITLE</a></li>
57 <li><a href="#subtitle">SUBTITLE</a></li>
58 <li><a href="#author">AUTHOR</a></li>
59 <li><a href="#chapter">CHAPTER</a></li>
60 <li><a href="#chapter-title">CHAPTER_TITLE</a></li>
61 <li><a href="#draft">DRAFT</a></li>
62 <li><a href="#revision">REVISION</a></li>
63 <li><a href="#copyright">COPYRIGHT</a></li>
64 <li><a href="#misc">MISC</a></li>
65 <li><a href="#covertitle">COVERTITLE</a></li>
66 <li><a href="#doc-covertitle">DOC_COVERTITLE</a></li>
67 <li><a href="#pdftitle">PDF_TITLE</a></li>
69 <li><a href="#docstyle-macros"><b>The docstyle macros (templates)</b></a>
70 <ul class="toc-docproc">
71 <li><a href="#doctype">DOCTYPE (default, chapter, letter, named, slides)</a></li>
72 <li><a href="#slides">DOCTYPE SLIDES</a></li>
73 <ul class="toc-docproc">
74 <li><a href="#newslide">NEWSLIDE</a></li>
75 <li><a href="#pause">PAUSE</a></li>
76 <li><a href="#transition">TRANSITION</a></li>
78 <li><a href="#printstyle">PRINTSTYLE</a></li>
79 <li><a href="#copystyle">COPYSTYLE</a></li>
81 <li><a href="cover.html"><b>Cover pages</b></a>
82 <li><a href="#docheader"><b>Managing the document header</b></a>
83 <ul class="toc-docproc">
84 <li><a href="#docheader">DOCHEADER</a></li>
85 <li><a href="#docheader-control">Docheader control</a>
86 <ul class="toc-docproc">
87 <li><a href="#docheader-desc">Docheader description</a></li>
88 <li><a href="#index-docheader-control">Macro list</a></li>
92 <h3 class="toc toc-docproc-header"><a class="header-link" href="#start-macro">Initiate document processing</a></h3>
93 <ul class="toc-docproc" style="margin-top: .5em;">
94 <li><a href="#start"><b>The START macro</b></a></li>
97 <div class="mini-toc-col-2">
99 <h3 class="toc toc-docproc-header"><a class="header-link" href="#style-before-start">Establishing type and formatting<br/><span style="display: block; margin-top: -.3em;">parameters before START</span></a></h3>
100 <ul class="toc-docproc" style="margin-top: .5em;">
101 <li><a href="#type-before-start"><b>Behaviour of the typesetting macros before START</b></a>
102 <ul class="toc-docproc">
103 <li><a href="docprocessing.html#include">Including (sourcing) style sheets and files</a></li>
104 <li><a href="#color">Initializing colours</a></li>
107 <ul class="toc-docproc" style="margin-top: -1em">
108 <li><a href="#doc-lead-adjust"><b>Adjust linespacing to fill pages</b></a>
109 <ul class="toc-docproc">
110 <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></li>
111 <li><a href="#shim">SHIM</a> – get document leading back on track
112 <ul class="toc-docproc">
113 <li><a href="#automatic-shimming">Automatic shimming (headings, etc)</a></li>
116 <li><a href="#columns-intro"><b>Setting documents in columns</b></a>
117 <ul class="toc-docproc">
118 <li><a href="#columns">COLUMNS</a></li>
119 <li><a href="#marking-col-start">Marking the first page column start position</a>
120 <ul class="toc-docproc">
121 <li><a href="#col-mark">COL_MARK</a></li>
123 <li><a href="#breaking-columns">Breaking columns manually</a>
124 <ul class="toc-docproc">
125 <li><a href="#col-next">COL_NEXT</a> and <a href="#col-break">COL_BREAK</a></li>
129 <h3 class="toc toc-docproc-header"><a class="header-link" href="#style-after-start">Changing basic type and formatting<br/><span style="display: block; margin-top: -.3em;">parameters after START</span></a></h3>
130 <ul class="toc-docproc" style="margin-top: .5em;">
131 <li><a href="#behaviour"><b>Behaviour of the typesetting macros during document processing</b></a></li>
132 <li><a href="docprocessing.html#intro-doc-param"><b>Changing document-wide style parameters after START</b></a>
133 <ul class="toc-docproc">
134 <li><a href="docprocessing.html#index-doc-param">Post-START global style change macros</a>
135 <ul class="toc-docproc">
136 <li><a href="#doc-left-margin">DOC_LEFT_MARGIN</a></li>
137 <li><a href="#doc-right-margin">DOC_RIGHT_MARGIN</a></li>
138 <li><a href="#doc-line-length">DOC_LINE_LENGTH</a></li>
139 <li><a href="#doc-family">DOC_FAMILY</a></li>
140 <li><a href="#doc-pt-size">DOC_PT_SIZE</a></li>
141 <li><a href="#doc-lead">DOC_LEAD</a></li>
142 <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></li>
143 <li><a href="#doc-quad">DOC_QUAD</a></li>
147 <h3 class="toc toc-docproc-header"><a class="header-link" href="#terminating">Terminating a document</a></h3>
151 <div class="rule-short" style="margin-top: -1.75em"><br/><hr/></div>
153 <!-- ==================================================================== -->
155 <h2 id="docprocessing-intro" class="docs" style="margin-top: 1em">Introduction to document processing</h2>
158 Document processing with mom uses markup tags to identify document elements
159 such as headings, paragraphs, blockquotes, and so on. The tags are, of course,
160 macros, but with sensible, readable names that make them easy
161 to grasp and easy to remember. (And don’t forget: if you
162 don’t like the “official” name of a tag —
163 too long, cumbersome to type in, not “intuitive” enough
164 — you can change it with the
165 <a href="goodies.html#alias">ALIAS</a>
170 In addition to the tags themselves, mom has an extensive array of
171 macros that control how they look and behave.
175 Setting up a mom doc is a simple, four-part procedure. You
176 begin by entering metadata about the document itself (title,
177 subtitle, author, etc.). Next, you tell mom what kind of document
178 you’re creating (e.g., chapter, letter, abstract, etc...) and
179 what kind of output you want (typeset, typewritten, draft-style,
180 etc) — essentially, templates. Thirdly, you make as many
181 or as few changes to the templates as you wish; in other words,
182 create a style sheet. Lastly, you invoke the
183 <kbd><a href="#start">START</a></kbd>
184 macro. Voilà ! You’re ready to write.
187 <!-- ==================================================================== -->
189 <h2 id="defaults" class="docs">Document defaults</h2>
192 As is to be expected, mom has defaults for everything. If you want
193 to know a particular default, read about it in the description of
198 I fear the following may not be adequately covered in the
199 documentation, so just in case:
201 <ul style="margin-top: -.5em; margin-bottom: .5em;">
202 <li>the paper size is 8.5x11 inches</li>
203 <li>the left and right margins are 1-inch</li>
204 <li>the top and bottom margins for document text are plus/minus
207 <li>pages are numbered; the number appears centred, at the
208 bottom, surrounded by hyphens ( e.g., -6- )
210 <li>the first page of a document begins with a
211 <a href="definitions.html#docheader">document header</a>
213 <li>subsequent pages have
214 <a href="definitions.html#header">page headers</a>
215 with a rule underneath
219 <!-- ==================================================================== -->
221 <h2 id="vertical-whitespace-management" class="macro-group">Vertical whitespace management</h2>
223 <ul style="margin-left: -.5em;">
224 <li><a href="#shim">Macro: SHIM</a></li>
225 <li><a href="#no-shim">Macro: NO_SHIM</a></li>
226 <li><a href="#flex">Macro: FLEX</a></li>
227 <li><a href="#no-flex">Macro: NO_FLEX</a></li>
232 Mom takes evenly-aligned bottom margins in
233 <a href="definitions.html#running">running text</a>
234 very seriously. Only under a very few, exceptional circumstances
235 will she allow a bottom margin to “hang” (ie to fall
240 Mom offers two modes of operation for ensuring flush bottom margins:
241 shimming and flex-spacing. Shimming means that mom nudges the
242 next line after a significant break in running text back onto the
243 <a href="definitions.html#baseline-grid">baseline grid</a>
244 (e.g., after the insertion of a graphic). Flex-spacing means that any
245 vertical whitespace remaining between the end of running text and
246 the bottom margin is distributed equally at logical points on the
252 <a href="definitions.html#leading">leading</a>
253 of running text (the “document leading”) that’s in effect
254 <i>at the start of running text on each page</i>
255 to establish the grid and space document elements such as heads or
256 blockquotes so that they adhere to it. (Prior to invoking
257 <a href="#start">START</a>,
258 the document leading is set with the
259 <a href="typesetting.html#macros-typesetting">typesetting macro</a>
260 <a href="typesetting.html#leading">LS</a>,
261 afterwards with the document
262 <a href="definitions.html#controlmacro">control macro</a>
263 <a href="#doc-lead">DOC_LEAD</a>.)
267 What this means is that documents whose paragraphs are not separated
268 by whitepace and which do not contain graphics or
269 <a href="definitions.html#pre-processor">pre-processor material</a>
270 will fill the page completely to the bottom margin.
271 However, if your paragraphs are spaced, or if there are any leading
272 changes on a page, or if graphics or pre-processor material are
273 inserted, it’s very likely the bottom margins will hang
274 unless shimming or flex-spacing is enabled.
277 <h3 id="shim-vs-flex" class="docs">Shimming <span style="text-transform: none">vs.</span> flex-spacing</h3>
280 <b>Shimming</b> is mom's default mode of operation. She applies it
281 automatically before headings, around quotes and blockquotes, and
283 <a href="definitions.html#float">floats</a>
285 <a href="definitions.html#preprocessor">pre-processor material</a>.
287 <a href="#shim">SHIM</a>
288 macro can be inserted into a document to make sure that the
289 text following falls on the baseline grid.
293 This mode of operation works well in documents whose paragraphs are
294 not spaced. Deviations from the baseline grid, usually
295 caused by floats or pre-processor material, are corrected
296 immediately. If the shimming results in slightly unbalanced
297 whitespace around them, it can easily be remedied by passing the
298 <kbd>ADJUST</kbd> argument to the appropriate macro.
302 If you do not want mom shimming automatically,
303 <a href="#no-shim">NO_SHIM</a>
304 turns shimming off globally and suppresses the SHIM macro. If you
305 want to disable shimming only for a particular float or
306 pre-processor, the <kbd>NO_SHIM</kbd> argument may be given to the
311 <b>Flex-spacing</b> kicks in automatically whenever you turn shimming
312 off. In other words, if you want a document flex-spaced,
313 <kbd>.NO_SHIM</kbd> is how you achieve it. If, in addition to not
314 shimming, you don’t want mom flex-spacing either,
315 <a href="#no-flex">NO_FLEX</a>
316 lets you disable it, too.
320 Flex-spacing differs from shimming in that mom doesn’t
321 correct deviations from the baseline grid. Rather, she distributes
322 whitespace left at the bottom of the page equally in appropriate
323 places. Like shimming, flex-spacing is automatically applied
324 before heads, after floats and pre-processor material, and around
325 quotes and blockquotes. Like shimming, flex-spacing can be
326 disabled for individual floats or pre-processor material with the
327 <kbd>NO_FLEX</kbd> flag.
331 In addition, you can use the
332 <a href="#flex">FLEX</a>
333 macro to insert flex-spacing yourself into the document, which you
334 will almost certainly want to do if your paragraphs are spaced.
335 This is because paragraphs are not flex-spaced. Typographically,
336 the ideal for spaced paragraphs is that the space between them
337 remain constant. Paradoxically, the only way to achieve flush
338 bottom margins, or to correct excessive flex-spacing before a
339 heading, is by adding flex-space between paragraphs. This requires
340 human judgment, and mom does not presume to decide for you.
344 Shimming and flex-spacing are mutually exclusive. If the one is
345 active, the other isn’t unless you have disabled both. This means
346 that you cannot use the FLEX macro when shimming is enabled, or the
347 SHIM macro when flex-spacing is enabled. Mom will issue a warning
352 The choice of whether to use shimming or flex-spacing depends on
353 whether or not your paragraphs are spaced. In a document with
354 indented, non-spaced paragraphs, shimming and flex-spacing produce
355 nearly the same result, with shimming winning by an aesthetic hair.
356 In documents with spaced paragraphs, flex-spacing is the only way to
357 achieve flush bottom margins.
362 <div class="macro-id-overline">
363 <h3 id="shim" class="macro-id">SHIM</h3>
366 <div class="box-macro-args">
371 When shimming is enabled, which it is by default, the SHIM macro
372 allows you to nudge the line following it back onto the baseline
373 grid. In documents with non-spaced paragraphs, this prevents
374 the bottom margins from hanging.
377 <p style="margin-bottom: -1em">
378 Mom herself automatically applies shimming
381 <li><i>before</i> headings</li>
382 <li><i>around</i> quotes and blockquotes</li>
383 <li><i>after</i> PDF images, tables, pic diagrams, equations, and floats</li>
387 You may sometimes find the amount of space generated by
388 <kbd>SHIM</kbd> looks too big, whether inserted manually into a
389 document or as a result of automatic shimming.
390 The situation occurs when the amount of shimming applied
391 comes close to the leading currently in effect, making it seem as if
392 there’s one linespace too much whitespace.
396 The solution is simply to add <kbd>.SPACE -1v</kbd> or
397 <kbd>.RLD 1v</kbd> to the document immediately after
398 <kbd>.SHIM</kbd>. (Both <kbd>.SPACE -1v</kbd> and
399 <kbd>.RLD 1v</kbd> back up by one linespace.)
402 <div class="macro-id-overline">
403 <h3 id="no-shim" class="macro-id">NO_SHIM</h3>
406 <div class="box-macro-args">
407 Macro: <b>NO_SHIM</b> <kbd class="macro-args"><none> | <anything>
411 NO_SHIM, without an argument, disables automatic shimming,
412 suppresses the SHIM macro, and enables flex-spacing.
416 NO_SHIM with any argument (e.g., <b>OFF, QUIT, END, X</b>, etc)
417 re-enables shimming if it has been disabled and disables
423 <div class="macro-id-overline">
424 <h3 id="flex" class="macro-id">FLEX</h3>
427 <div class="box-macro-args">
428 Macro: <b>FLEX</b> <kbd class="macro-args">[ FORCE ]</kbd>
432 When flex-spacing is enabled, the FLEX macro inserts flexible
433 vertical whitespace into a document. The amount of flex-space is
434 determined from any extra whitespace at the bottom of a page divided
435 by the number of flex points on the same page.
438 <p style="margin-bottom: -1em">
439 If flex-spacing is enabled, mom herself automatically applies
442 <ul style="margin-bottom: -.5em">
443 <li><i>before</i> headings</li>
444 <li><i>around</i> quotes and blockquotes</li>
445 <li><i>after</i> PDF images, tables, pic diagrams, equations, and floats</li>
449 Near the bottom of some pages, you may find that
450 <a href="definitions.html#float">floated</a>
452 <a href="definitions.html#preprocessor">pre-proccesor material</a>,
453 including images, or a single line of text afterward, is not flush
454 with the bottom margin. This is a result of mom flex-spacing
455 <i>after</i> such material but not before. The solution to is
456 insert <kbd>.FLEX</kbd> immediately beforehand.
460 There are some instances where mom inhibits flex-spacing, notably
461 after outputting deferred floats and pre-processor material.
462 Introducing FLEX by itself in these instances—say, before a head
463 or paragraph—will not have any effect; you must pass FLEX the
464 <kbd>FORCE</kbd> argument.
467 <div class="box-tip">
469 <span class="important">Important note on flex-spacing policy:</span><br/>
470 Mom disables flex-spacing on
472 <ul style="margin-top: -1em; margin-bottom: -.5em">
473 <li>the last page or column of a document, before the Table of Contents,
474 Endnotes, Bibliography, and/or any “Lists of...”
476 <li>the page preceding a
477 <a href="rectoverso.html#collate">COLLATE</a>
479 <li>the page preceding a
480 <a href="typesetting.html#NEWPAGE">NEWPAGE</a>
482 <a href="headfootpage.html#blankpage">BLANKPAGE</a>
484 <li>the column preceding a
485 <a href="#col-next">COL_NEXT</a>
487 <a href="#col-break">COL_BREAK</a>
492 If this is not what you want, insert
493 <a href="#no-flex"><kbd>.NO_FLEX OFF</kbd></a>
494 before the first flex-space point on the affected page or in the
499 Flex-spacing is also disabled for any page or column where
500 insufficient room at or near the bottom causes a
501 <a href="docelement.html#heading">HEADING</a>
503 <a href="images.html#tbl">table</a>
504 to be moved to the top of the next page. These situations cannot
505 be harmonized with flex-spacing except by adjusting your layout
506 to prevent them. You may try re-enabling flex-spacing for the
507 page (<kbd>.NO_FLEX OFF</kbd>) and manually inserting
508 flex-spaces at appropriate points, but the original whitespace is
509 usually large enough that re-distributing it merely changes
510 one layout gaffe into another.
514 Very occasionally you may notice that a document element (spaced
515 paragraph, floated material, pre-processor material, or a PDF image)
516 near the bottom of page has also caused mom to disable flex-spacing
517 for that page. This occurs when the document element following it
519 <a href="docelement.html#pp-space">spaced paragraph</a>.
523 It is typographically acceptable for there to be space between
524 insertions in running text (e.g., an image) and the bottom margin when
525 the next page begins with a paragraph. If you’d like to
526 nudge the insertion a little closer to the bottom margin—not
527 all the way; that isn’t possible without pushing it to the
528 next page and disrupting subsequent flex-spacing—insert a
529 small amount of space beforehand with
530 <a href="typesetting.html#sp">SP</a>.
531 Do not, in these cases, use the <kbd>ADJUST</kbd>
532 argument (for example to
533 <a href="images.html#pdf-image">PDF_IMAGE</a>.)
536 <p class="tip-bottom">
537 In the case of a spaced paragraph itself near the bottom of the page
538 causing a break, re-enabling flex-spacing
539 (<kbd>.NO_FLEX OFF</kbd>) at an appropriate place in your input
540 file will resolve the issue, provided there is at least one
541 flex-point on the page. If not, add one or more.
545 <div class="macro-id-overline">
546 <h3 id="no-flex" class="macro-id">NO_FLEX</h3>
549 <div class="box-macro-args">
550 Macro: <b>NO_FLEX</b> <kbd class="macro-args"><none> | <anything></kbd>
554 NO_FLEX, without an argument, disables automatic flex-spacing
555 and suppresses the FLEX macro. If, in addition to NO_FLEX, NO_SHIM
556 has also been given, your document will be neither flex-spaced nor
561 NO_FLEX with any argument (e.g., <b>OFF, QUIT, END, X</b>, etc)
562 re-enables flex-spacing if it has been disabled.
565 <div class="rule-short"><hr/></div>
567 <!-- ==================================================================== -->
569 <h2 id="setup" class="docs" style="margin-bottom: .5em;">Preliminary document setup</h2>
571 <div class="examples-container" style="margin-bottom: 1.5em;">
572 <h3 id="docprocessing-tut" class="docs">Tutorial – Setting up a mom document</h3>
574 <p style="margin-top: 1em;">
575 There are four parts to setting up a mom doc (three, actually,
576 with one optional). Before we proceed, though, be reassured that
577 something as simple as
579 <span class="pre-in-pp">
580 .TITLE "By the Shores of Lake Attica"
581 .AUTHOR "Rosemary Winspeare"
585 produces a beautifully typeset 8.5x11 document, with a
586 <a href="definitions.html#docheader">docheader</a>
587 at the top of page 1,
588 <a href="definitions.html#header">page headers</a>
589 with the title and author on subsequent pages, and page numbers at
590 the bottom of each page. In the course of the document, headings,
591 citations, quotes, epigraphs, and so on, all come out looking neat,
592 trim, and professional.
596 For the purposes of this tutorial, we’re going to set up
597 a short story—<i>My Pulitzer Winner</i>—by Joe Blow.
598 Thankfully, we don’t have to look at story itself, just the
599 setup. Joe wants the document
601 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
602 <li>to be draft 7, revision 39;</li>
603 <li>to use the DEFAULT template;</li>
604 <li>to print as draft-style output (instead of final-copy output);</li>
605 <li>to be typeset, in Helvetica, 12 on 14,
606 <a href="definitions.html#rag">rag-right</a>;
608 <li>to have <a href="definitions.html#footer">footers</a>
610 <a href="definitions.html#header">headers</a>;
612 <li>to use a single asterisk for
613 <a href="definitions.html#linebreak">author linebreaks</a>.
618 Joe Blow has no taste in typography. His draft won’t look
619 pretty, but this is, after all, a tutorial; we’re after
620 examples, not beauty.
623 <h4 class="docs" style="margin-top: -.5em;">Step 1</h4>
625 <p style="margin-bottom: -.5em;">
626 The first step in setting up any document is giving mom some
627 reference information (metadata). The reference macros are:
629 <div style="width: 50%; float: left;">
634 <li>CHAPTER – chapter number</li>
635 <li>CHAPTER_TITLE – chapter name</li>
636 <li>DRAFT – the draft number</li>
637 <li>REVISION – the revision number</li>
642 <li>COPYRIGHT – only used on cover pages</li>
643 <li>MISC – only used on cover pages</li>
646 <li>DOC_COVERTITLE</li>
651 <p style="margin-top: -.5em; clear: both;">
652 You can use as many or as few as you wish, although at a minimum,
653 you’ll probably fill in TITLE (unless the document’s a
654 letter) and AUTHOR. Order doesn’t matter. You can separate
656 <a href="definitions.html#arguments">arguments</a>
657 from the macros by any number of spaces. The following are what
658 you’d need to start Joe Blow’s story.
660 <span class="pre-in-pp">
661 .TITLE "My Pulitzer Winner"
668 <h4 class="docs" style="margin-top: -1.5em;">Step 2</h4>
671 Once you’ve given mom the reference information she needs, you
672 tell her how you want your document formatted. What kind of
673 document is it? Should it be typeset or typewritten? Is this a
674 final copy (for the world to see) or just a draft? Mom calls
675 the macros that answer these questions “the docstyle
676 macros”, and they're essentially templates.
678 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
679 <li>PRINTSTYLE—typeset or typewritten</li>
680 <li>DOCTYPE—the type of document (default, chapter, user-defined, letter)</li>
681 <li>COPYSTYLE —draft or final copy</li>
685 Mom has defaults for DOCTYPE and COPYSTYLE; if they’re what
686 you want, you don’t need to include them. However,
687 PRINTSTYLE has no default and must be present in every formatted
688 document. If you omit it, mom won’t process the document
689 AND she’ll complain (both to stderr and as a single printed
690 sheet with a warning). Moms—they can be so annoying
691 sometimes. <sigh>
695 Adding to what we already have, the next bit of setup for Joe
696 Blow’s story looks like this:
698 <span class="pre-in-pp">
699 .TITLE "My Pulitzer Winner"
704 .DOCTYPE DEFAULT \"Superfluous; mom uses DOCTYPE DEFAULT by default
708 Notice the use of the
709 <a href="definitions.html#commentlines">comment line</a>
710 ( <kbd>\#</kbd> ), a handy way to keep groups of macros visually
711 separated for easy reading in a text editor.
714 <h4 class="docs" style="margin-top: -.5em; margin-bottom: -.5em;">Step 3</h4>
717 This step—completely optional—is where you, the user,
718 take charge. Mom has reasonable defaults for every document element
719 and tag, but who’s ever satisfied with defaults? Use any of
721 <a href="typesetting.html#macros-typesetting">typesetting macros</a>
722 here to change mom’s document defaults (paper size, margins,
723 family, point size, line space, rag, etc), or any of the document
725 <a href="definitions.html#controlmacro">control macros</a>.
726 This is the style-sheet section of a document, and
728 <a href="#printstyle">PRINTSTYLE</a>
729 directive. Failure to observe this condition will result in
730 PRINTSTYLE overriding your changes.
734 Joe Blow wants his story printed in Helvetica, 12 on 14, rag right,
736 <a href="definitions.html#footer">page footers</a>
738 <a href="definitions.html#header">page headers</a>
739 and a single asterisk for the
740 <a href="definitions.html#linebreak">linebreak</a>
741 character. None of these requirements conforms to mom’s
742 defaults for the chosen PRINTSTYLE (TYPESET), so we change them
743 here. The setup for Joe Blow’s story now looks like this:
745 <span class="pre-in-pp">
746 .TITLE "My Pulitzer Winner"
758 .QUAD LEFT \"ie rag right
764 <h4 class="docs" style="margin-top: -1.5em; margin-bottom: -.5em;">Step 4</h4>
767 The final step in setting up a document is telling mom to start
768 document processing. It’s a no-brainer, just the single
769 macro START. Other than PRINTSTYLE, it’s the only macro
770 required for document processing.
774 Here’s the complete setup for <i>My Pulitzer Winner</i>:
776 <span class="pre-in-pp">
777 .TITLE "My Pulitzer Winner"
789 .QUAD LEFT \"ie rag right
795 As pointed out earlier, Joe Blow is no typographer. Given that all he
796 needs is a printed draft of his work, a simpler setup would have been:
798 <span class="pre-in-pp">
799 .TITLE "My Pulitzer Winner"
804 .PRINTSTYLE TYPEWRITE
809 <kbd>.PRINTSTYLE TYPEWRITE</kbd>, above, means that Joe’s
810 work will come out “typewritten, double-spaced”,
811 making the blue-pencilling he (or someone else) is sure to do much
812 easier (which is why many publishers and agents still insist on
813 typewritten, double-spaced copy).
817 When J. Blow stops re-writing and decides to print off a final,
818 typeset copy of his work for the world to see, he need only make two
819 changes to the (simplified) setup:
821 <span class="pre-in-pp">
822 .TITLE "My Pulitzer Winner"
827 .PRINTSTYLE TYPESET \"first change
828 .COPYSTYLE FINAL \"second change
832 In the above, <kbd>.DRAFT 7, .REVISION 39,</kbd> and
833 <kbd>.COPYSTYLE FINAL</kbd> are actually superfluous. The draft
834 and revision numbers aren’t used when COPYSTYLE is FINAL,
835 and <b>COPYSTYLE FINAL</b> is mom’s default unless you tell
840 But... to judge from the number of drafts already,
841 J. Blow may very well decide his “final” version still
842 isn’t up to snuff. Hence, he might as well leave in the
843 superfluous macros. That way, when draft 7, rev. 62 becomes draft
844 8, rev. 1, he’ll be ready to tackle his Pulitzer winner again.
848 <div class="rule-short"><hr/></div>
850 <!-- ======================================================================== -->
852 <h2 id="reference-macros" class="macro-group">The reference macros (metadata)</h2>
855 The reference macros give mom the metadata she needs to generate
856 <a href="definitions.html#docheader">docheaders</a>,
857 <a href="definitions.html#header">page headers</a>,
859 <a href="cover.html#cover-top">covers</a>.
860 They must go at the top of any file that uses mom’s document
864 <div class="macro-list-container">
865 <h3 id="index-reference" class="macro-list">Reference macros</h3>
867 <ul class="macro-list">
868 <li><a href="#title">TITLE</a> – title of a story, article, etc</li>
869 <li><a href="#doc-title">DOCTITLE</a> – title of a book, or any collated document</li>
870 <li><a href="#subtitle">SUBTITLE</a></li>
871 <li><a href="#author">AUTHOR</a></li>
872 <li><a href="#chapter">CHAPTER</a> – the chapter number
874 <li class="sublist"><a href="#chapter-string">CHAPTER_STRING</a> – “Chapter”, “CHAPTER”, “Chapître”, etc</li>
876 <li><a href="#chapter-title">CHAPTER_TITLE</a></li>
877 <li><a href="#draft">DRAFT</a>
879 <li class="sublist"><a href="#draft-string">DRAFT_STRING</a> – “Draft”, “DRAFT”, “Jet”, etc</li>
881 <li><a href="#revision">REVISION</a>
883 <li class="sublist"><a href="#revision-string">REVISION_STRING</a> – “Revision”, “Rev.”, “Révision”, etc</li>
885 <li><a href="#copyright">COPYRIGHT</a></li>
886 <li><a href="#misc">MISC</a></li>
887 <li><a href="#covertitle">COVERTITLE</a> – frontispiece, title page, etc</li>
888 <li><a href="#doc-covertitle">DOC_COVERTITLE</a> – book cover, collated document cover, etc</li>
889 <li><a href="#pdftitle">PDF_TITLE</a> – window title for PDF viewers</li>
895 <div class="macro-id-overline">
896 <h3 id="title" class="macro-id">TITLE</h3>
899 <div class="box-macro-args">
900 Macro: <b>TITLE</b> <kbd>"<title string>" ["<2nd line>" ["<3rd line>" ... ] ]</kbd>
903 • Arguments must be enclosed in double-quotes
907 The title string can be caps or caps/lower-case; it’s up to you. In
908 <a href="#printstyle">PRINTSTYLE TYPESET</a>,
909 the title will appear in the
910 <a href="definitions.html#docheader">docheader</a>
911 exactly as you typed it. However, mom converts the title to all
913 <a href="definitions.html#header">page headers</a>
914 unless you turn that feature off (see
915 <a href="headfootpage.html#_caps">HEADER_<POSITION>_CAPS</a>).
917 <a href="#printstyle">PRINTSTYLE TYPEWRITE</a>,
918 the title always gets converted to caps.
922 TITLE accepts multiple arguments, each surrounded by double-quotes.
923 Each argument is printed on a separate line, permitting you to
924 create multi-line titles in your docheaders.
927 <div class="box-tip">
929 <span class="note">Note:</span>
930 If your <kbd><a href="#doctype">DOCTYPE</a></kbd> is CHAPTER, TITLE
931 should be the title of the opus, not “CHAPTER whatever”.
937 <div class="macro-id-overline">
938 <h3 id="doc-title" class="macro-id">DOCUMENT TITLE</h3>
941 <div class="box-macro-args">
942 Macro: <b>DOCTITLE</b> <kbd class="macro-args">"<overall document title>" ["<2nd line>" ["<3rd line>" ... ] ]</kbd>
945 • Arguments must be enclosed in double-quotes
948 <div class="box-tip">
950 <span class="note">Note:</span>
951 This macro should be used only if your <a
952 href="#doctype">DOCTYPE</a> is <kbd>DEFAULT</kbd> (which is
953 mom’s default). If your DOCTYPE is CHAPTER, use
954 <a href="#title">TITLE</a>
955 to set the overall document title for cover pages, document cover
956 pages, and page headers or footers.
960 <p style="margin-top: -.5em;">
961 When you’re creating a single document, say, an essay or a
962 short story, you have no need of this macro.
963 <a href="#title">TITLE</a>
964 takes care of all your title needs.
968 However if you’re
969 <a href="rectoverso.html#collate">collating</a>
970 a bunch of documents together, say, to print out a report containing
971 many articles with different titles, or a book of short stories with
972 different authors, you need DOCTITLE.
976 DOCTITLE tells mom the title of the complete document (as opposed to
977 the title of each article or entitled section), and appears
980 <ol style="list-style-type: lower-alpha">
981 <li>as the window title in PDF viewers (e.g., Okular or Evince)</li>
982 <li>in the initial rightmost position of page headers in the document</li>
986 Moreover, DOCTITLE does not appear in the
987 <a href="definitions.html#pdfoutline">PDF outline</a>,
988 as its presence in window title would make it redundant.
992 The doctitle string can be caps or caps/lower-case; it’s up to
994 <a href="#printstyle">PRINTSTYLE TYPESET</a>,
995 by default, the doctitle in
996 <a href="definitions.html#header">page headers</a>
997 is all in caps, unless you turn that feature off (see
998 <a href="headfootpage.html#_caps">HEADER_<POSITION>_CAPS</a>).
1000 <a href="#printstyle">PRINTSTYLE TYPEWRITE</a>,
1001 the doctitle always gets converted to caps.
1005 DOCTITLE accepts multiple arguments, each surrounded
1006 by double-quotes. Each argument is printed on a separate line,
1007 permitting you to create multi-line document titles for use on
1008 <a href="cover.html#cover">Covers</a>
1010 <a href="cover.html#doc-cover">Doc covers</a>.
1013 <div class="box-tip">
1015 <span class="note">Note:</span>
1017 <a href="#doctype">DOCTYPE</a>
1018 is CHAPTER, you don’t need DOCTITLE. TITLE takes care of
1025 <div class="macro-id-overline">
1026 <h3 id="subtitle" class="macro-id">SUBTITLE</h3>
1029 <div class="box-macro-args">
1030 Macro: <b>SUBTITLE</b> <kbd class="macro-args">[COVER | DOC_COVER] "<subtitle>" ["<2nd line>" ["<3rd line>" ... ] ]</kbd>
1032 <p class="requires">
1033 • String arguments must be enclosed in double-quotes
1037 The subtitle string can be caps or caps/lower-case. I recommend
1042 SUBTITLE accepts multiple arguments, each surrounded
1043 by double-quotes. Each argument is printed on a separate line,
1044 permitting you to create multi-line subtitles.
1048 If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
1049 is given to SUBTITLE, the remaining string
1050 arguments represent the subtitle that will appear on cover or
1051 document cover pages (see the
1052 <a href="cover.html#cover-intro">Introduction to cover pages</a>
1053 for a description of the difference between “document
1054 covers” and “covers”). Thus, it is possible to have
1055 differing subtitles appear on the document cover, the cover
1056 (“title”) page, and in the document header. An extreme
1059 <span class="pre-in-pp">
1060 .SUBTITLE "The Docheader Subtitle"
1061 .SUBTITLE DOC_COVER "The Document Cover Subtitle"
1062 .SUBTITLE COVER "The Cover Subtitle"
1064 The first invocation of <kbd>.SUBTITLE</kbd> establishes the
1065 subtitle that appears in the docheader at the top of the first page
1066 of a document. The second invocation establishes the subtitle that
1067 appears on the document cover; the third establishes the subtitle
1068 that appears on the cover (“title”) page.
1072 If you don’t require differing subtitles for doc cover and cover
1073 pages, <kbd>.SUBTITLE</kbd>, without the optional first argument, is
1074 sufficient, provided you give the word, <kbd>SUBTITLE</kbd>, as an
1075 argument to the macro
1076 <a href="cover.html#doc-cover">DOC_COVER</a>
1078 <a href="cover.html#cover">COVER</a>
1083 <div class="macro-id-overline">
1084 <h3 id="author" class="macro-id">AUTHOR</h3>
1087 <div class="box-macro-args">
1088 Macro: <b>AUTHOR</b> <kbd class="macro-args">[COVER | DOC_COVER] "<author>" [ "<author2>" ["<author3>" ... ] ]</kbd>
1091 <p class="alias" style="margin-bottom: 0;">
1092 <i>Alias:</i> <b>EDITOR</b>
1094 <p class="requires">
1095 • String arguments must be enclosed in double-quotes
1099 Each author string can hold as many names as you like, e.g.,
1101 <span class="pre-in-pp" style="margin-bottom: -1em;">
1106 <span class="pre-in-pp" style="margin-top: -.5em;">
1107 .AUTHOR "Joe Blow, Jane Doe" "John Hancock"
1109 Mom prints each string that’s enclosed in double-quotes on a
1110 separate line in the
1111 <a href="definitions.html#docheader">docheader</a>,
1112 however only the first string appears in
1113 <a href="definitions.html#header">page headers</a>.
1114 If you want mom to put something else in the author part of page
1115 headers (say, just the last names of a document’s two
1116 authors), redefine the appropriate part of the header (see
1117 <a href="headfootpage.html#header-control">header/footer control</a>).
1121 The strings can be caps or caps/lower-case. I recommend caps/lower
1126 If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
1127 is given to AUTHOR, the remaining string arguments represent the
1128 author(s) that will appear on cover or document cover pages (see the
1129 <a href="cover.html#cover-intro">Introduction to cover pages</a>
1130 for a description of the difference between “document
1131 covers” and “covers”). Thus, it is possible
1132 to have differing authors on the document cover, the cover
1133 (“title”) page, in the document first-page header and
1134 subsequent page headers/footers. An example might be:
1136 <span class="pre-in-pp">
1138 .EDITOR DOC_COVER "John Smith" "and" "Jane Doe" \" EDITOR is an alias for AUTHOR
1139 .AUTHOR COVER "Joe Blow" "(assisted by Jane Doe)"
1141 The first invocation of <kbd>.AUTHOR</kbd> establishes the author
1142 that appears in the docheader at the top of the first page of
1143 a document and in subsequent page headers/footers. The second
1144 invocation establishes the authors (editors, in this instance) that
1145 appear on the document cover; the third establishes the author(s)
1146 that appear(s) on the cover (“title”) page.
1150 If you don’t require differing authors for doc cover and cover
1151 pages, <kbd>.AUTHOR</kbd>, without the optional first argument, is
1152 sufficient, provided you give the word, <kbd>AUTHOR</kbd> as an
1153 argument to the macro
1154 <a href="cover.html#doc-cover">DOC_COVER</a>
1156 <a href="cover.html#cover">COVER</a>
1161 <div class="macro-id-overline">
1162 <h3 id="chapter" class="macro-id">CHAPTER</h3>
1165 <div class="box-macro-args">
1166 Macro: <b>CHAPTER</b> <kbd class="macro-args"><chapter number></kbd>
1170 The chapter number can be in any form you like—a digit, a roman
1171 numeral, a word. If you choose
1172 <a href="#doctype">DOCTYPE CHAPTER</a>,
1173 mom prints whatever argument you pass CHAPTER beside the word,
1174 “Chapter”, as a single line
1175 <a href="definitions.html#docheader">docheader</a>.
1176 She also puts the same thing in the middle of
1177 <a href="definitions.html#header">page headers</a>.
1181 Please note that if your argument to CHAPTER runs to more than one
1182 word, you must enclose the argument in double-quotes.
1186 If you’re not using DOCTYPE CHAPTER, the macro can
1187 be used to identify any document as a chapter <i>for the purpose of
1188 prepending a chapter number to numbered head elements</i>, provided
1190 <a href="definitions.html#numericargument">numeric argument</a>.
1192 <a href="docelement.html#prefix-chapter-number">PREFIX_CHAPTER_NUMBER</a>.
1195 <!-- -CHAPTER_STRING- -->
1197 <h3 id="chapter-string" class="docs">Chapter string</h3>
1200 If you’re not writing in English, you can ask mom to use the
1201 word for “chapter” in your own language by telling her
1202 what it is with the CHAPTER_STRING macro, like this:
1205 .CHAPTER_STRING "Chapître"
1210 If you would like a blank chapter string, ie you’d like
1211 the chapter number to appear without “Chapter”
1212 beforehand, enter <kbd>.CHAPTER_STRING "\&"</kbd>.
1215 <!-- -CHAPTER_TITLE- -->
1217 <div class="macro-id-overline">
1218 <h3 id="chapter-title" class="macro-id">CHAPTER_TITLE</h3>
1221 <div class="box-macro-args">
1222 Macro: <b>CHAPTER_TITLE</b> <kbd class="macro-args">"<chapter title>" ["<2nd line>" ["<3rd line>" ... ] ]</kbd>
1224 <p class="requires">
1225 • Arguments must be enclosed in double-quotes
1229 If, either in addition to or instead of “Chapter
1230 <n>” appearing at the top of chapters, you want your
1231 chapter to have a title, use CHAPTER_TITLE, with your title enclosed
1232 in double-quotes, like this:
1235 .CHAPTER_TITLE "The DMCA Nazis"
1240 CHAPTER_TITLE accepts multiple arguments, each surrounded by
1241 double-quotes. Each argument is printed on a separate line,
1242 permitting you to create multi-line chapter titles in your
1247 If you’ve used
1248 <a href="#chapter">CHAPTER</a>
1249 to give the chapter a number, both “Chapter <n>”
1250 and the chapter title will appear at the top of the chapter, like
1253 <span class="pre-in-pp">
1257 In such a case, by default, only the chapter’s title will appear in
1259 <a href="definitions.html#header">page headers</a>,
1260 not “Chapter <n>”.
1264 If you omit CHAPTER when setting up your reference macros, only the
1265 title will appear, both at the top of page one and in subsequent
1270 The style of the chapter title can be altered by
1271 <a href="docelement.html#docelement-control">control macros</a>,
1272 e.g., CHAPTER_TITLE_FAMILY, CHAPTER_TITLE_FONT, etc. The default
1273 family, font and point size are Times Roman, Bold Italic, 4 points
1275 <a href="definitions.html#running">running text</a>.
1280 <div class="macro-id-overline">
1281 <h3 id="draft" class="macro-id">DRAFT</h3>
1284 <div class="box-macro-args">
1285 Macro: <b>DRAFT</b> <kbd class="macro-args"><draft number></kbd>
1289 DRAFT only gets used with
1290 <a href="#copystyle">COPYSTYLE DRAFT</a>.
1291 If the COPYSTYLE is FINAL (the default), mom ignores DRAFT. DRAFT
1292 accepts both alphabetic and numeric arguments, hence it’s
1293 possible to do either
1303 Mom prints the argument to <kbd>.DRAFT</kbd> (ie the draft number)
1304 beside the word “Draft” in the middle part of
1305 <a href="definitions.html#header">page headers</a>.
1308 <div class="box-tip">
1310 <span class="note">A small word of caution:</span>
1311 If your argument to <kbd>.DRAFT</kbd> is more than one word long,
1312 you must enclose the argument in double-quotes.
1317 You may, if you wish, invoke <kbd>.DRAFT</kbd> without an
1318 argument, in which case, no draft number will be printed beside
1319 “Draft” in headers or footers.
1322 <!-- -DRAFT_STRING- -->
1324 <h3 id="draft-string" class="docs">The draft string</h3>
1327 If you’re not writing in English, you can ask mom
1328 to use the word for “draft” in your own language by
1329 telling her what it is with the DRAFT_STRING macro,
1338 Equally, DRAFT_STRING can be used to roll your own solution to
1339 something other than the word “Draft.” For example, you
1340 might want “Trial run alpha-three” to appear in the
1341 headers of a draft version. You’d accomplish this by doing
1345 .DRAFT_STRING "Trial run"
1350 If you wanted only “Trial run” to appear, entering
1351 <kbd>.DRAFT</kbd> without an argument as well as
1352 <kbd>.DRAFT_STRING "Trial run"</kbd> is how you’d do it.
1355 <div class="box-tip">
1357 <span class="note">Note:</span>
1358 If you define both a blank <kbd>.DRAFT</kbd> and a blank
1359 <kbd>.DRAFT_STRING</kbd>, mom skips the draft field in headers
1360 entirely. If this is what you want, this is also the only way
1361 to do it. Simply omitting invocations of <kbd>.DRAFT</kbd> and
1362 <kbd>.DRAFT_STRING</kbd> will result in mom using her default, which
1363 is to print “Draft <number>”.
1369 <div class="macro-id-overline">
1370 <h3 id="revision" class="macro-id">REVISION</h3>
1373 <div class="box-macro-args">
1374 Macro: <b>REVISION</b> <kbd class="macro-args"><revision number></kbd>
1378 REVISION only gets used with
1379 <a href="#copystyle">COPYSTYLE DRAFT</a>.
1380 If the COPYSTYLE is FINAL (the default), mom ignores the REVISION
1381 macro. REVISION accepts both alphabetic and numeric arguments, hence
1382 it’s possible to do either
1384 <span class="pre" style="margin-bottom: -1em;">
1388 <span class="pre" style="margin-top: -.5em;">
1394 Mom prints the revision number beside the shortform
1395 “Rev.” in the middle part of
1396 <a href="definitions.html#header">page headers</a>.
1399 <div class="box-tip">
1401 <span class="note">A small word of caution:</span>
1402 If your argument to <kbd>.REVISION</kbd> is more than one word long,
1403 you must enclose the argument in double-quotes.
1408 You may, if you wish, invoke <kbd>.REVISION</kbd> without an
1409 argument, in which case, no revision number will be printed beside
1410 “Rev.” in headers or footers.
1413 <!-- -REVISION_STRING- -->
1415 <h3 id="revision-string" class="docs">The revision string</h3>
1418 If you’re not writing in English, you can ask mom
1419 to use the word for “revision,” or a shortform
1420 thereof, in your own language by telling her what it is with the
1421 REVISION_STRING macro, like this:
1424 .REVISION_STRING "Rév."
1429 Additionally, you may sometimes want to make use of mom’s
1430 <a href="#copystyle">COPYSTYLE DRAFT</a>
1431 but not actually require any draft information. For example,
1432 you might like mom to indicate only the revision number of
1433 your document. The way to do that is to define an empty
1434 <kbd>.DRAFT</kbd> and <kbd>.DRAFT_STRING</kbd> in addition to
1435 <kbd>.REVISION</kbd>, like this:
1445 Equally, if you want to roll your own solution to what revision
1446 information appears in headers, you could do something like this:
1451 .REVISION "two-twenty-two"
1452 .REVISION_STRING "Revision"
1457 The above, naturally, has no draft information. If you want to roll
1458 your own <kbd>.DRAFT</kbd> and/or <kbd>.DRAFT_STRING</kbd> as well,
1459 simply supply arguments to either or both.
1462 <!-- -COPYRIGHT- -->
1464 <div class="macro-id-overline">
1465 <h3 id="copyright" class="macro-id">COPYRIGHT</h3>
1468 <div class="box-macro-args">
1469 Macro: <b>COPYRIGHT</b> <kbd class="macro-args">[COVER | DOC_COVER] "<copyright info>"</kbd>
1472 <p class="requires">
1473 • Argument must be enclosed in double-quotes
1477 The argument passed to COPYRIGHT is only used on cover or doc cover
1478 pages, and then only if the argument COPYRIGHT is passed to
1479 <a href="cover.html#cover">COVER</a>
1481 <a href="cover.html#doc-cover">DOC_COVER</a>.
1482 Do not include the copyright symbol in the argument passed to
1483 COPYRIGHT; mom puts it in for you.
1487 If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
1488 is given to COPYRIGHT, the string argument represents the copyright
1489 information that will appear on cover or document cover pages (see
1491 <a href="cover.html#cover-intro">Introduction to cover pages</a>
1492 for a description of the difference between “document
1493 covers” and “covers”). Thus, it is possible to
1494 have differing copyright information on the document cover and on
1495 the cover (“title”) page. An example might be:
1497 <span class="pre-in-pp">
1498 .COPYRIGHT DOC_COVER "2010 John Smith and Jane Doe"
1499 .COPYRIGHT COVER "2008 Joe Blow"
1501 The first invocation of <kbd>.COPYRIGHT</kbd> establishes the
1502 copyright information that appears on the document cover; the second
1503 establishes the copyright information that appears on the cover
1504 (“title”) page.
1508 If you don’t require differing copyright information for
1509 doc cover and cover pages, <kbd>.COPYRIGHT</kbd>, without the
1510 optional first argument, is sufficient, provided you give the word,
1511 <kbd>COPYRIGHT</kbd>, as an argument to the macro
1512 <a href="cover.html#doc-cover">DOC_COVER</a>
1514 <a href="cover.html#cover">COVER</a>
1518 Style parameters for the copyright line may be
1519 entered as individual macros or
1520 <a href="docelement.html#grouping">grouped</a>,
1523 <span class="pre-in-pp">
1530 <span class="pre-in-pp">
1536 The vertical position of the copyright line may be raised (-) or
1537 lowered (+) with the macro COPYRIGHT_V_ADJUST. For example, to
1538 raise the copyright line by 3
1539 <a href="definitions.html#picaspoints">points</a>, you’d do
1541 <span class="pre-in-pp">
1542 .COPYRIGHT_V_ADJUST -3p
1544 Alternatively, the COPYRIGHT_STYLE macro may be used with the
1545 argument <kbd>V_ADJUST</kbd>:
1546 <span class="pre-in-pp">
1557 <div class="macro-id-overline">
1558 <h3 id="misc" class="macro-id">MISC</h3>
1561 <div class="box-macro-args">
1562 Macro: <b>MISC</b> <kbd class="macro-args">[COVER | DOC_COVER] "<argument 1>" ["<argument 2>" "<argument 3>" ...]</kbd>
1565 <p class="requires">
1566 • String arguments must be enclosed in double-quotes
1570 The argument(s) passed to MISC are only used on cover or doc cover
1571 pages, and then only if the argument <kbd>MISC</kbd> is passed to
1572 <a href="cover.html#cover">COVER</a>
1574 <a href="cover.html#doc-cover">DOC_COVER</a>.
1575 MISC can contain any information you like. Each argument appears on
1576 a separate line at the bottom of the cover or doc cover page.
1580 For example, if you’re submitting an essay where the prof has
1581 requested that you include the course number, his name and the date,
1584 <span class="pre-in-pp">
1585 .MISC "Music History 101" "Professor Hasbeen" "Dec. 24, 2010"
1587 and the information would appear on the essay’s cover page.
1591 If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
1592 is given to MISC, the string arguments represent the miscellaneous
1593 information that will appear on cover or document cover pages (see
1595 <a href="cover.html#cover-intro">Introduction to cover pages</a>
1596 for a description of the difference between “document
1597 covers” and “covers”). Thus, it is possible to
1598 have differing miscellaneous information on the document cover and
1599 on the cover (“title”) page. An example might be:
1602 .MISC DOC_COVER "Music History 101" "Professor Hasbeen"
1603 .MISC COVER "Spring Term Paper"
1608 The first invocation of <kbd>.MISC</kbd> establishes the
1609 miscellaneous information that appears on the document cover; the
1610 second establishes the miscellaneous information that appears on the
1611 cover (“title”) page.
1615 If you don’t require differing miscellaneous information
1616 for doc cover and cover pages, <kbd>.MISC</kbd>, without the
1617 optional first argument, is sufficient, provided you give the word
1618 “MISC” as an argument to the macro
1619 <a href="cover.html#doc-cover">DOC_COVER</a>
1621 <a href="cover.html#cover">COVER</a>
1624 <!-- -COVER_TITLE- -->
1626 <div class="macro-id-overline">
1627 <h3 class="macro-id">COVERTITLE & DOC_COVERTITLE</h3>
1630 <div id="covertitle" class="box-macro-args">
1631 Macro: <b>COVERTITLE</b> <kbd class="macro-args">"<user defined cover page title>" ["<2nd line>" ["<3rd line>" ... ] ]</kbd>
1633 <p class="requires">
1634 • Arguments must be enclosed in double-quotes
1637 <div id="doc-covertitle" class="box-macro-args">
1638 Macro: <b>DOC_COVERTITLE</b> <kbd class="macro-args">"<user defined document cover page title>" ["<2nd line>" ["<3rd line>" ... ] ]</kbd>
1640 <p class="requires">
1641 • Arguments must be enclosed in double-quotes
1645 The arguments passed to COVERTITLE or DOC_COVERTITLE are only
1646 used on cover or doc cover pages, and then only if the argument
1647 COVERTITLE or DOC_COVERTITLE is passed to
1648 <a href="cover.html#cover">COVER</a>
1650 <a href="cover.html#doc-cover">DOC_COVER</a>.
1654 The only time you require a COVERTITLE or DOC_COVERTITLE is when
1655 none of the required first arguments to COVER or DOC_COVER fits
1656 your needs for the title you want to appear on cover (or doc cover)
1661 COVERTITLE and DOC_COVERTITLE accept multiple arguments, each
1662 surrounded by double-quotes. Each argument is printed on a separate
1663 line, permitting you to create multi-line titles on your cover
1664 and/or doc cover pages.
1667 <div class="macro-id-overline">
1668 <h3 class="macro-id">PDF Title</h3>
1671 <div id="pdftitle" class="box-macro-args">
1672 Macro: <b>PDF_TITLE</b> <kbd class="macro-args">"<pdf viewer window title>" </kbd>
1674 <p class="requires">
1675 • Arguments must be enclosed in double-quotes
1680 <a href="#doc-title">DOCTITLE</a>,
1681 mom does not, by default, provide PDF viewers with a document title.
1682 You may set one, if you like, with PDF_TITLE.
1685 <div class="rule-short"><hr/></div>
1687 <!-- ======================================================================== -->
1689 <h2 id="docstyle-macros" class="macro-group">The docstyle macros</h2>
1692 The docstyle macros tell mom what type of document you’re
1693 writing, whether you want the output typeset or “typewritten,
1694 double-spaced”, and whether you want a draft copy (with draft
1695 and revision information in the headers) or a final copy.
1698 <div class="macro-list-container">
1699 <h3 id="index-docstyle" class="macro-list">Docstyle macros</h3>
1700 <ul class="macro-list">
1701 <li><a href="#doctype">DOCTYPE</a>
1702 <li><a href="#printstyle">PRINTSTYLE</a> – non-optional macro required for document processing
1703 <ul style="margin-left: -.5em; list-style-type: disc;">
1704 <li><a href="#typeset-defaults">Defaults for PRINTSTYLE TYPESET</a></li>
1705 <li><a href="#typewrite-defaults">Defaults for PRINTSTYLE TYPEWRITE</a>
1706 <ul style="margin-left: -.5em; list-style-type: circle;">
1707 <li><a href="#typewrite-control">PRINTSTYLE TYPEWRITE control macros</a>
1708 <ul style="margin-left: -1.5em; list-style-type: square;">
1709 <li><a href="#typewriter-family">Family</a></li>
1710 <li><a href="#typewriter-size">Point size</a></li>
1711 <li><a href="#typewriter-underlining">Underlining of italics</a></li>
1715 <li><a href="#copystyle">COPYSTYLE</a></li>
1721 <div class="macro-id-overline">
1722 <h3 id="doctype" class="macro-id">DOCTYPE</h3>
1725 <div class="box-macro-args">
1726 Macro: <b>DOCTYPE</b> <kbd class="macro-args">DEFAULT | CHAPTER | NAMED "<name>" | LETTER | SLIDES</kbd>
1730 The arguments <kbd>DEFAULT,</kbd> <kbd>CHAPTER</kbd> and
1731 <kbd>NAMED</kbd> tell mom what to put in the
1732 <a href="definitions.html#docheader">docheader</a>
1734 <a href="definitions.html#header">page headers</a>.
1735 <kbd>LETTER</kbd> and <kbd>SLIDES</kbd> tells her you want to write
1736 a letter or create slides.
1740 Mom’s default DOCTYPE is <kbd>DEFAULT</kbd>. If that’s
1741 what you want, you don’t have to give a DOCTYPE command.
1744 <p id="default-doctype">
1745 <kbd>DEFAULT</kbd> prints a
1746 <a href="definitions.html#docheader">docheader</a>
1747 containing the title, subtitle and author information given to the
1748 <a href="#reference-macros">reference macros</a>,
1749 and page headers with the author and title. (See
1750 <a href="headfootpage.html#header-style">Default specs for headers</a>
1751 for how mom outputs each part of the page header.)
1755 <kbd>CHAPTER</kbd> prints “Chapter <n>” in place
1757 <a href="definitions.html#docheader">docheader</a>
1758 (<n> is what you gave to the
1759 <a href="#reference-macros">reference macro</a>,
1760 <kbd><a href="#chapter">CHAPTER</a></kbd>).
1761 If you give the chapter a title with
1762 <a href="#chapter-title">CHAPTER_TITLE</a>,
1763 mom prints “Chapter <n>” and the
1764 title underneath. If you omit the
1765 <a href="#chapter">CHAPTER</a>
1766 reference macro but supply a
1767 <a href="#chapter-title">CHAPTER_TITLE</a>,
1768 mom prints only the chapter title.
1772 The page headers in DOCTYPE <kbd>CHAPTER</kbd> contain the author,
1773 the title of the book (which you gave with
1774 <a href="#title">TITLE</a>),
1775 and “Chapter <n>” (or the chapter title). See
1776 <a href="headfootpage.html#header-style">Default Specs for Headers</a>
1777 for mom’s default type parameters for each part of
1782 <kbd>NAMED</kbd> takes an additional argument: a name for this
1783 particular kind of document (e.g., outline, synopsis, abstract,
1784 memorandum), enclosed in double-quotes. <kbd>NAMED</kbd> is
1785 identical to <kbd>DEFAULT</kbd> except that mom prints the argument
1786 to <kbd>NAMED</kbd> beneath the
1787 <a href="definitions.html#docheader">docheader</a>,
1788 as well as in page headers.
1790 <a href="headfootpage.html#header-style">Default specs for headers</a>
1791 for how mom outputs each part of the page header.)
1794 <div class="box-tip">
1795 <p id="copystyle-note" class="tip">
1796 <span class="note">Note: version 2.1 change</span>
1798 <kbd>DOCTYPE NAMED "string"</kbd> no longer accepts a color argument
1799 after <kbd>"string"</kbd>. Setting the color of the string is now
1800 done with <kbd>DOCTYPE_COLOR <color></kbd>. Default
1801 underscoring of <kbd>"string"</kbd> in the docheader and on covers
1802 has been removed. Use <kbd>DOCTYPE_UNDERLINE</kbd>,
1803 <kbd>DOC_COVER_DOCTYPE_UNDERLINE</kbd> and/or
1804 <kbd>COVER_DOCTYPE_UNDERLINE</kbd> to re-enable it. All three
1805 take the same arguments listed in the
1806 <a href="docelement.html#underline">Underline style, rule weight</a>
1808 <a href="docelement.html#control-macro-args">Arguments to the control macros</a>.
1813 <kbd>LETTER</kbd> tells mom you’re writing a letter. See the
1815 <a href="letters.html#letters">Writing Letters</a>
1816 for instructions on using mom to format letters.
1819 <h4 id="slides" class="docs" style="font-size: 100%; text-transform: uppercase">Slides</h4>
1822 PDF slides are a special kind of mom document, formatted for viewing
1823 in a PDF reader’s presentation mode. In most respects, they
1824 behave identically to the other document types. Key differences
1827 <ul style="margin-top: -.5em">
1828 <li>headers, footers, and pagination are disabled by default</li>
1830 <a href="typesetting.html#quad">QUAD CENTER</a>
1833 <a href="#flex">flex-spacing</a>
1835 <a href="#shim">shimming</a>
1836 are disabled by default; shimming may
1837 be re-enabled (with <kbd>NO_SHIM OFF</kbd>), but not flex-spacing</li>
1838 <li>there’s no need for
1839 <a href="#printstyle">PRINTSTYLE</a></li>
1843 DOCTYPE SLIDES takes up to five optional arguments, which come
1844 immediately after SLIDES. They may be entered in any order.
1846 <span class="pre-in-pp">
1849 HEADER "left" "centre" "right" \
1850 FOOTER "left" "centre" "right" \
1851 TRANSITION "<slide transition effect>" (mode + parameters) \
1852 PAUSE "<text reveal effect>" (mode + parameters)
1854 For convenience, you many want to enter each argument on a single
1855 line as shown above; all but the last must be terminated by a
1859 <h5 class="docs" style="margin-top: .5em">Aspect</h5>
1862 Slides can be formatted for one of two aspect ratios common to
1863 monitors and screens: 4:3 and 16:9. The default is 16:9.
1864 <span class="pre-in-pp">
1866 media size: 11" x 8.25" media size: 11" x 8.1875"
1867 left/right margins: 36 points left/right margins: 36 points
1868 top margin: 90 points top margin: 80 points
1869 bottom margin: 84 points bottom margin: 72 points
1870 base text size: 16 points base text size: 14 points
1871 autoleading: 6 points, adjusted autoleading: 4 points, adjusted
1872 (header/footer size: -3 points) (header/footer size: -2 points)
1874 Note that both media sizes fit on either A4 or US LETTER papersizes.
1877 <h5 class="docs" style="margin-top: .5em">Headers, footers, and pagination</h5>
1880 If you want a header, footer, or both for your slides, pass SLIDES
1881 the <kbd>HEADER</kbd> and/or <kbd>FOOTER</kbd> argument(s). Both
1882 take three additional
1883 <a href="definitions.html#stringargument">string arguments</a>,
1884 which must be enclosed in double-quotes, defining the left, centre,
1885 and right parts of the header/footer. Any parts you want left blank
1886 should be entered as two double-quotes. For example,
1887 <span class="pre-in-pp">
1888 HEADER "" "My slide presentation" ""
1890 will result in a header with only the centre part.
1894 Normal pagination is disabled for slides. If you want your slides
1895 numbered, the slide number must be given to one of the header/footer
1897 <a href="definitions.html#inlines">inline escape</a>
1899 <kbd>\*[SLIDE#]</kbd>. For example:
1900 <span class="pre-in-pp">
1901 HEADER "" "My slide presentation" "" \
1902 FOOTER "" "" "\*[SLIDE#]"
1904 will give you a centred header with numbering at the bottom right of
1909 The overall family, size, and colour of headers may be set with
1910 HEADER_FAMILY, HEADER_SIZE, and HEADER_COLOR. If you request
1911 FOOTERS, you may use the FOOTER_ equivalent of these macros.
1912 If you request both headers and footers, use one or the other but
1913 not both. For example, in a header/footer situation, HEADER_FAMILY
1914 would determine the family for both headers and footers, but if you
1915 attempted to do this
1916 <span class="pre-in-pp">
1920 FOOTER_FAMILY would take precedence, and your header family would be
1921 “<kbd>H</kbd>”.
1925 All other formatting of individual header/footer parts must be
1926 entered as inline escapes inside the double-quotes. If you want,
1927 say, your headers to be red but your footer page numbering to be
1928 black and two points larger, this is how you’d do it:
1929 <span class="pre-in-pp">
1932 HEADER "" "My slide presentation" "" \
1933 FOOTER "" "" "\*[black]\*S[+2]\*[SLIDE#]\*S[-2]"
1937 <div class="box-tip">
1939 <span class="note">Note:</span>
1940 Do not use mom’s
1941 <a href="inlines.html#inline-size-mom"><kbd>\*[SIZE ±n]</kbd></a>
1942 inline escape to change point size in the strings passed to HEADER
1943 or FOOTER. Prefer either mom’s <kbd>\*S[±n]</kbd> or
1944 groff's <kbd>\s[±n]</kbd>.
1949 <h5 class="docs" style="margin-top: .5em">Transition</h5>
1952 “Transition” refers to how new slides appear during a
1953 presentation. The official PDF specification lists a number of modes,
1954 each with a choice of configurable parameters. Modes include Box,
1955 Blinds, Wipe, Fade, and several others. Parameters include things
1956 like duration, dimension, and direction. There are a total of
1957 twelve modes; for each one there are from one to six configurable
1958 parameters. Consult <kbd>man gropdf(1)</kbd> for a complete listing
1959 of modes and parameters.
1963 If you pass SLIDES the <kbd>TRANSTION</kbd> argument, you must
1964 at a minimum follow it with a mode. Afterwards, you may give as
1965 many or as few parameters as you wish. Parameters are, in order,
1966 <span class="pre-in-pp">
1974 You don't have to fill them all out. If you only need the first
1975 three, that's all you need to input. If you need the first and
1976 third, enter the second as a period (dot), which is used any time
1977 you want to leave a parameter at its current default or when it
1978 isn’t applicable. For example, if you want a Box transition
1979 that lasts 1 second, filling the screen from the centre outwards,
1981 <span class="pre-in-pp">
1982 TRANSITION "Box 1 . O"
1984 because Box does not take a “dimension” parameter but it
1985 does take a motion parameter.
1989 Notice that the entire string (mode+parameters) must be enclosed in
1993 <div class="box-tip">
1995 <span class="note">Note:</span>
1996 Not all PDF viewers support all modes. Any that are not supported
1997 are replaced by the “R” mode, which simply replaces one
1998 slide with the next unless the PDF viewer has a different default
2004 <h5 class="docs" style="margin-top: .5em">Pause</h5>
2007 A “pause” occurs when material on a slide is halted (see
2008 <a href="#pause">PAUSE</a>),
2009 awaiting a mouse click, PgDown, Next, or the spacebar to reveal
2010 subsequent material. All the same modes and parameters as
2011 <kbd>TRANSITION</kbd> may be used. The manner of entering them is
2012 is identical, including that the entire mode+parameter string must
2013 be enclosed in double-quotes.
2016 <div class="macro-id-overline">
2017 <h3 id="slide-macros" class="macro-id">SLIDE MACROS</h3>
2020 <div id="newslide" class="box-macro-args">
2021 Macro: <b>NEWSLIDE</b> <kbd class="macro-args">["<transition mode and parameters>"]</kbd>
2025 Unless you want material from one slide to flow onto the next, you
2026 need to tell mom when to start a new slide with the macro NEWSLIDE.
2027 Without any arguments, the new slide will appear with the default
2028 TRANSTION you gave to DOCTYPE SLIDES.
2032 If you would like a different transition, you may pass NEWSLIDE a
2033 new mode and associated parameters, following the same rules as the
2034 TRANSITION argument to DOCTYPE. Note that the new effect becomes
2035 the default. If you wish to return to the original transition, you
2036 must give it explicitly to the appropriate NEWSLIDE.
2039 <div id="pause" class="box-macro-args">
2040 Macro: <b>PAUSE</b> <kbd class="macro-args">["<pause mode and parameters>"]</kbd>
2044 Pauses in slides are accomplished by entering the macro PAUSE at
2045 desired locations in your input file. Subsequent material will be
2046 revealed using the pause mode given to DOCTYPE SLIDES.
2050 If you would like a different mode, you may pass PAUSE a
2051 new mode and associated parameters, following the same rules as the
2052 PAUSE argument to DOCTYPE.
2055 <div id="transition" class="box-macro-args">
2056 Macro: <b>TRANSITION</b> <kbd class="macro-args">["<transition mode and parameters>"]</kbd>
2060 If for some reason you have material that flows from one slide to
2061 the next <i>and</i> you want the next slide to have a transition
2062 different from the current one, you can tell mom about the new
2063 transition with the macro TRANSITION anywhere prior to the break to
2067 <h4 id="slide-printing" class="docs" style="font-size: 100%; text-transform: uppercase">Printing slides</h4>
2070 If you want to print slides as handouts, you have to tell
2071 <kbd>pdfmom</kbd> or <kbd>gropdf</kbd>, otherwise printing will
2072 stop at the first pause. Simply precede <kbd>pdfmom</kbd> or
2073 <kbd>gropdf</kbd> with GROPDF_NOSLIDE=1, like this:
2075 <span class="pre-in-pp">
2076 GROPDF_NOSLIDE=1 pdfmom <options> slidefile.mom > slidefile.pdf
2081 <!-- -PRINTSTYLE- -->
2083 <div class="macro-id-overline">
2084 <h3 id="printstyle" class="macro-id">PRINTSTYLE</h3>
2087 <div class="box-macro-args">
2088 Macro: <b>PRINTSTYLE</b> <kbd class="macro-args">TYPESET | TYPEWRITE [ SINGLESPACE ]</kbd>
2091 <p class="requires">
2092 • Required for document processing, except in the case of
2095 Must come before any changes to default document style
2099 PRINTSTYLE tells mom whether to typeset a document, or to print it
2100 out “typewritten, doubled-spaced”.
2103 <div class="box-important">
2105 <span class="important">Important:</span>
2106 <b>This macro may not be omitted.</b> In order for document
2107 processing to take place, mom requires a PRINTSTYLE. If you
2108 don’t give one, mom will warn you on stderr and print a single
2109 page with a nasty message.
2112 <p class="tip-bottom">
2113 <span class="important">Just as important:</span>
2114 PRINTSTYLE <b>must precede any and all page and style
2115 parameters associated with a document</b> with the exception of
2116 <kbd>PAPER</kbd>, <kbd>PAGEWIDTH</kbd>, and/or
2117 <kbd>PAGELENGTH</kbd>, which should be placed at the top of your
2118 file. PRINTSTYLE sets up complete templates that include default
2119 margins, family, fonts, point sizes, and so on. Therefore, changes
2120 to any aspect of document style must come afterwards. For example,
2122 <span class="pre-in-pp">
2128 will not change mom’s default document leading to 14 points,
2129 nor the default justification style (fully justified) to left
2132 <span class="pre-in-pp">
2144 <kbd>TYPESET</kbd>, as the argument implies, typesets
2145 documents (by default in Times Roman; see
2146 <a href="#typeset-defaults">TYPESET defaults</a>).
2147 You have full access to all the
2148 <a href="typesetting.html#macros-typesetting">typesetting macros</a>
2150 <a href="definitions.html#style-control">style control macros</a>
2151 of document processing.
2155 With <kbd>TYPEWRITE</kbd>, mom does her best to reproduce the look
2156 and feel of typewritten, double-spaced copy (see
2157 <a href="#typewrite-defaults">TYPEWRITE defaults</a>).
2158 <a href="docelement.html#docelement-control">Control macros</a>
2160 <a href="typesetting.html#intro-macros-typesetting">typesetting macros</a>
2161 that alter family, font, point size, and
2162 <a href="definitions.html#leading">leading</a>
2163 are (mostly) ignored. An important exception is
2164 <a href="headfootpage.html#hdrftr-global-size">HEADER_SIZE</a>
2165 (and, by extension, FOOTER_SIZE), which allows you to reduce the
2166 point size of headers/footers should they become too crowded. Most
2167 of mom’s inlines affecting the appearance of type are also
2169 (<kbd><a href="inlines.html#inline-size-mom">\*S[<size>]</a></kbd>
2170 is an exception; there may be a few others).
2174 In short, <kbd>TYPEWRITE</kbd> never produces effects
2175 other than those available on a typewriter. Don’t be fooled
2176 by how brainless this sounds; mom is remarkably sophisticated when
2177 it comes to conveying the typographic sense of a document within the
2178 confines of <kbd>TYPEWRITE</kbd>.
2182 The primary uses of <kbd>TYPEWRITE</kbd> are: outputting hard
2183 copy drafts of your work (for editing) and producing documents
2184 for submission to publishers and agents who (wisely) insist on
2185 typewritten, double-spaced copy. To get a nicely typeset version of
2186 work that’s in the submission phase of its life (say, to show
2187 fellow writers for critiquing), simply change <kbd>TYPEWRITE</kbd>
2188 to <kbd>TYPESET</kbd> and print out a copy.
2192 If, for some reason, you would prefer the output of
2193 <kbd>TYPEWRITE</kbd> single-spaced, pass PRINTSTYLE
2194 <kbd>TYPEWRITE</kbd> the optional argument, <kbd>SINGLESPACE</kbd>.
2197 <div class="defaults-container">
2198 <h3 id="typeset-defaults" class="docs defaults" style="margin-top: 0;">PRINTSTYLE TYPESET defaults</h3>
2199 <span class="pre defaults">
2200 Family = Times Roman
2202 Paragraph leading = 16 points, adjusted
2203 Fill mode = justified
2204 Hyphenation = enabled
2207 interword adjustment = 1 point
2210 Smartquotes = enabled
2211 Word space = groff default
2216 <div class="defaults-container">
2217 <h3 id="typewrite-defaults" class="docs defaults" style="margin-top: 0;">PRINTSTYLE TYPEWRITE defaults</h3>
2218 <span class="pre defaults">
2220 Italics = underlined
2222 Paragraph leading = 24 points, adjusted; 12 points for SINGLESPACE
2224 Hyphenation = disabled
2226 Ligatures = disabled
2227 Smartquotes = disabled
2228 Word space = groff default
2229 Sentence space = groff default
2234 <div class="box-tip" style="margin-top: 1.5em;">
2235 <h3 id="typewrite-control" class="docs control">PRINTSTYLE TYPEWRITE control macros</h3>
2237 <h4 id="typewriter-family" class="docs">Family</h4>
2239 <p style="margin-top: .5em;">
2240 If you’d prefer a monospace
2241 <a href="definitions.html#family">family</a>
2242 for PRINTSTYLE <kbd>TYPEWRITE</kbd> other than than mom's default,
2243 Courier, you can change it with
2244 <kbd>.TYPEWRITER_FAMILY <family></kbd> (or
2245 <kbd>.TYPEWRITER_FAM</kbd>). Since groff ships with only the
2246 Courier family, you will have to install any other monospace family
2248 <a href="appendices.html#fonts">Adding fonts to
2252 <h4 id="typewriter-size" class="docs">Point size</h4>
2254 <p style="margin-top: .5em;">
2255 If you’d like a smaller or larger point size for
2256 for PRINTSTYLE <kbd>TYPEWRITE</kbd> (mom’s default is 12-point),
2257 you can change it with
2258 <kbd>.TYPEWRITER_SIZE <size></kbd>. There’s no need to
2260 <a href="definitions.html#unitofmeasure">unit of measure</a>
2261 to the <kbd><size></kbd> argument; points is assumed. Be
2262 aware, however, that regardless of point size, mom’s
2263 leading/linespacing for <kbd>TYPEWRITE</kbd> is fixed at 24-point
2264 for double-spaced, and 12-point for single-spaced.
2267 <h4 id="typewriter-underlining" class="docs">Underlining of italics</h4>
2270 In PRINTSTYLE <kbd>TYPEWRITE</kbd>, mom, by default, underlines
2271 anything that looks like italics. This includes the
2272 <a href="typesetting.html#slant-inline"><kbd>\*[SLANT]</kbd></a>
2273 <a href="definitions.html#inlines">inline escape</a>
2277 <p id="printstyle-italics">
2278 If you’d prefer that mom were less bloody-minded
2279 about pretending to be a typewriter (ie you’d like italics and
2280 pseudo-italics to come out as italics), use the control macros
2282 <span class="pre-in-pp">
2283 .ITALIC_MEANS_ITALIC
2286 <span class="pre-in-pp">
2289 Neither requires an argument.
2293 Although it’s unlikely, should you wish to reverse
2294 the sense of these macros in the midst of a document,
2295 <kbd>.UNDERLINE_ITALIC</kbd> and <kbd>.UNDERLINE_SLANT</kbd> restore
2296 underlining of italics and pseudo-italics.
2299 <p id="underline-quotes">
2300 Additionally, by default, mom underlines
2301 <a href="definitions.html#quotes">quotes</a>
2303 <a href="definitions.html#blockquotes">blockquotes</a>)
2304 in PRINTSTYLE <kbd>TYPEWRITE</kbd>. If you don’t like this
2305 behaviour, turn it off with
2308 .UNDERLINE_QUOTES OFF
2313 To turn underlining of quotes back on, use UNDERLINE_QUOTES without
2317 <p class="tip-bottom">
2319 <a href="docelement.html#docelement-control">control macros</a>
2320 have no effect on <b>PRINTSTYLE TYPEWRITE</b>, there
2321 is an important exception:
2322 <a href="headfootpage.html#hdrftr-global-size">HEADER_SIZE</a>
2323 (and by extension, FOOTER_SIZE). This is
2324 particularly useful for reducing the point size of
2325 headers/footers should they become crowded (quite likely to
2326 happen if the title of your document is long and your
2327 <kbd><a href="#copystyle">COPYSTYLE</a></kbd>
2332 <!-- -COPYSTYLE- -->
2334 <div class="macro-id-overline">
2335 <h3 id="copystyle" class="macro-id">COPYSTYLE</h3>
2338 <div class="box-macro-args">
2339 Macro: <b>COPYSTYLE</b> <kbd class="macro-args">DRAFT | FINAL</kbd>
2343 Mom’s default COPYSTYLE is <kbd>FINAL</kbd>, so you
2344 don’t have to use this macro unless you want to.
2348 COPYSTYLE <kbd>DRAFT</kbd> exhibits the following behaviour:
2350 <ol style="margin-top: -.5em;">
2351 <li>Documents start on page 1, whether or not you
2352 request a different starting page number with
2353 <a href="headfootpage.html#pagenumber">PAGENUMBER</a>.
2355 <li>Page numbers are set in lower case roman numerals.</li>
2356 <li>The draft number supplied by
2357 <a href="#draft">DRAFT</a>
2358 and a revision number, if supplied with
2359 <a href="#revision">REVISION</a>
2361 <a href="#reference-macros">reference macros</a>),
2362 appear in the centre part of
2363 <a href="definitions.html#header">page headers</a>
2364 (or footers, depending on which you’ve selected) along with
2365 any other information that normally appears there.
2369 <div class="box-important">
2371 <span class="important">Important:</span>
2372 If you define your own centre part for page headers with
2373 <a href="headfootpage.html#hdrftr-center">HEADER_CENTER</a>,
2374 no draft and/or revision number will appear there. If you want
2375 draft and revision information in this circumstance, use
2376 <a href="headfootpage.html#draft-with-pagenumber">DRAFT_WITH_PAGENUMBER</a>.
2381 COPYSTYLE <kbd>FINAL</kbd> differs from <kbd>DRAFT</kbd> in that:
2383 <ol style="margin-top: -.5em;">
2384 <li>It respects the starting page number you give the document.</li>
2385 <li>Page numbers are set in normal (Arabic) digits.</li>
2386 <li>No draft or revision number appears in the page headers.</li>
2389 <div class="box-tip">
2390 <p id="copystyle-note" class="tip">
2391 <span class="note">Note:</span>
2392 The centre part of page headers can get crowded, especially with
2393 <a href="docprocessing.html#doctype">DOCTYPE <kbd>CHAPTER</kbd></a>
2395 <a href="docprocessing.html#doctype">DOCTYPE <kbd>NAMED</kbd></a>,
2396 when the COPYSTYLE is <kbd>DRAFT</kbd>. Three mechanisms are
2397 available to overcome this problem. One is to reduce the overall
2398 size of headers (with
2399 <a href="headfootpage.html#hdrftr-global-size">HEADER_SIZE</a>).
2400 Another, which only works with
2401 <a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>,
2402 is to reduce the size of the header’s centre part only (with
2403 <a href="headfootpage.html#_size">HEADER_CENTER_SIZE</a>).
2404 And finally, you can elect to have the draft/revision information
2405 attached to page numbers instead of having it appear in the centre
2406 of page headers (see
2407 <a href="headfootpage.html#draft-with-pagenumber">DRAFT_WITH_PAGENUMBER</a>).
2411 <div class="rule-short"><hr/></div>
2413 <!-- ======================================================================== -->
2415 <h2 id="start-macro" class="macro-group">Initiate document processing</h2>
2418 In order to use mom’s document element macros (tags), you have
2419 to tell her you want them. The macro to do this is
2420 <a href="#start">START</a>.
2424 START collects the information you gave mom in the setup section at
2425 the top of your file (see
2426 <a href="#docprocessing-tut">Tutorial – Setting up a mom document</a>),
2427 merges it with her defaults, sets up headers and page numbering,
2428 and prepares mom to process your document using the document
2429 element tags. No document processing takes place until you invoke
2435 <div class="macro-id-overline">
2436 <h3 id="start" class="macro-id">START</h3>
2439 <div class="box-macro-args">
2442 <p class="requires">
2443 • Required for document processing
2447 START takes no arguments. It simply instructs mom to begin document
2448 processing. If you don’t want document processing (ie you
2450 <a href="typesetting.html#macros-typesetting">typesetting macros</a>),
2451 don’t use START.
2455 At a barest minimum before START, you must enter a
2456 <a href="#printstyle">PRINTSTYLE</a>
2460 <div class="rule-short"><hr/></div>
2462 <!-- ======================================================================== -->
2464 <h2 id="style-before-start" class="macro-group">Establishing typestyle and formatting parameters before START</h2>
2467 In the third (optional) part of setting up a document (the
2469 <a href="#docprocessing-tut">Tutorial – Setting up a mom document</a>),
2471 <a href="typesetting.html">typesetting macros</a>
2472 to change mom’s document-wide defaults for margins,
2473 line length, family, base point size,
2474 <a href="definitions.html#leading">leading</a>,
2475 and justification style.
2479 Two additional style concerns have to be addressed here (ie in
2481 <a href="#start">START</a>):
2483 <a href="definitions.html#docheader">docheader</a>,
2484 and whether you want you want the document’s nominal leading
2485 adjusted to fill pages fully to the bottom margin.
2488 <div class="macro-list-container" style="margin-top: 2em;">
2489 <h3 id="index-style-before-start" class="macro-list">Type & formatting parameters before START</h3>
2490 <ul class="macro-list">
2491 <li><a href="#type-before-start">Behaviour of the typesetting macros before START</a>
2492 <ul class="sublist" style="line-height: 120%; margin-bottom: .25em;">
2493 <li><a href="#meanings">List of meanings</a></li>
2494 <li><a href="#lrc-note">Special note on LEFT, RIGHT and CENTER</a></li>
2495 <li><a href="#include">Including (sourcing) style sheets and files</a></li>
2496 <li><a href="#color">Initializing colors</a></li>
2498 <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a> – adjust linespacing to fill pages and align bottom margins</li>
2499 <li><a href="#docheader">DOCHEADER</a>
2500 <ul class="sublist" style="line-height: 120%;">
2501 <li><a href="#docheader-control">Docheader control</a></li>
2503 <li><a href="#columns">COLUMNS</a>
2504 <ul class="sublist" style="line-height: 120%;">
2505 <li><a href="#col-next">COL_NEXT</a></li>
2506 <li><a href="#col-break">COL_BREAK</a></li>
2511 <h3 id="type-before-start" class="docs">Behaviour of the typesetting macros before START</h3>
2514 From time to time (or maybe frequently), you’ll want the
2515 overall look of a document to differ from mom’s defaults.
2516 Perhaps you’d like her to use a different
2517 <a href="definitions.html#family">family</a>,
2518 or a different overall
2519 <a href="definitions.html#leading">leading</a>,
2520 or have different left and/or right page margins.
2524 To accomplish such alterations, use the appropriate
2525 <a href="typesetting.html#macros-typesetting">typesetting macros</a>
2526 (listed below) after
2527 <a href="#printstyle">PRINTSTYLE</a>
2529 <a href="#start">START</a>.
2533 More than one user has, quite understandably, not fully grasped the
2534 significance of the preceding sentence. The part they’ve missed is
2535 <i>after</i> PRINTSTYLE.
2539 Changes to any aspect of the default look and/or formatting of a mom
2540 document must come after PRINTSTYLE. For example, it might seem
2541 natural to set up page margins at the very top of a document with
2543 <span class="pre-in-pp">
2547 However, when you invoke <kbd>.PRINTSTYLE</kbd>, those margins
2548 will be overridden. The correct place to set margins—and
2549 all other changes to the look of a document—is <i>after</i>
2553 <div class="box-tip">
2555 <span class="important">Important:</span>
2556 Do not use the macros listed in
2557 <a href="#doc-param-macros">Changing document-wide typesetting parameters after START</a>
2558 prior to START; they are exclusively for use afterwards.
2562 <div id="meanings" class="defaults-container">
2563 <h3 class="docs defaults" style="margin-top: 0;">Meanings</h3>
2564 <p style="margin-left: 9px; margin-top: -.25em;">
2565 When used before START, the
2566 <a href="typesetting.html#macros-typesetting">typesetting macros</a>,
2567 below have the following meanings:
2570 L_MARGIN Left margin of pages, including headers/footers
2571 R_MARGIN Right margin of pages, including headers/footers
2572 T_MARGIN The point at which running text (ie not
2573 headers/footers or page numbers) starts on each
2575 B_MARGIN* The point at which running text (ie not
2576 (see note) headers/footers or page numbers) ends on each page
2578 PAGE If you use PAGE, its final four arguments have the
2579 same meaning as L_ R_ T_ and B_MARGIN (above).
2581 LL The line length for everything on the page;
2582 equivalent to setting the right margin with
2584 FAMILY The family of all type in the document
2585 PT_SIZE The point size of type in paragraphs; mom uses
2586 this to calculate automatic point size changes
2587 (e.g., for heads, footnotes, quotes, headers, etc)
2588 LS/AUTOLEAD** The leading used in paragraphs; all leading and
2589 spacing of running text is calculated from this
2591 QUAD/JUSTIFY Affects paragraphs only
2597 *See <a href="headfootpage.html#footer-margin">FOOTER MARGIN AND BOTTOM MARGIN</a> for an important warning
2598 **See <kbd><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></kbd>
2599 ***See <a href="#lrc-note">Special note</a>
2604 <p style="margin-top: -.75em;">
2605 Other macros that deal with type style, or refinements thereof
2606 (<b>KERN, LIGATURES, HY, WS, SS,</b> etc.), behave normally.
2607 It is not recommended that you set up tabs or indents prior to
2612 If you want to change any of the basic parameters (above)
2613 <i>after</i> START and have them affect a document globally (as if
2614 you’d entered them <i>before</i> START), you must use the macros
2616 <a href="#doc-param-macros">Changing document-wide style parameters after START</a>.
2619 <h4 id="lrc-note" class="docs">Special note on LEFT, RIGHT and CENTER prior to START</h4>
2622 In a word, these three macros have no effect on document processing
2623 when invoked prior to START.
2627 All mom’s document element tags (PP, HEAD, BLOCKQUOTE,
2628 FOOTNOTE, etc.) except
2629 <a href="docelement.html#quote">QUOTE</a>
2631 <a href="definitions.html#filled">fill mode</a>
2632 as soon as they’re invoked. If you wish to turn fill mode off
2633 for the duration of any tag (with
2634 <a href="typesetting.html#lrc">LEFT, RIGHT or CENTER</a>)
2635 you must do so immediately after invoking the tag. Furthermore,
2636 the change affects <i>only</i> the current invocation of the tag.
2637 Subsequent invocations of the same tag for which you want the same
2638 change require that you invoke <kbd>.LEFT</kbd>, <kbd>.RIGHT</kbd>
2639 or <kbd>.CENTER</kbd> immediately after every invocation of the tag.
2644 <h4 id="include" class="docs">Including (sourcing) style sheets and files</h4>
2647 If you routinely make the same changes to mom’s defaults in
2648 order to create similar documents in a similar style—in other
2649 words, you need a template— you can create style-sheet files
2650 and include, or "source", them into your mom documents with the
2651 macro INCLUDE. The right place for such style sheets is after
2652 <a href="#printstyle">PRINTSTYLE</a>
2654 <a href="#start">START</a>.
2658 Say, for example, in a particular kind of document, you always
2659 want main heads set in Helvetica Bold Italic, flush left,
2660 with no underscore. You’d create a file, let’s call it
2661 <kbd>head-template</kbd>, in which you’d place the pertinent HEAD
2664 <span class="pre-in-pp">
2671 Then, in the preliminary document set-up section of your main file,
2672 you’d include the style sheet, or template, like this:
2674 <span class="pre-in-pp">
2675 .TITLE "Sample Document
2679 .INCLUDE head-template
2684 The blank comment lines ( <kbd>\#</kbd> ) aren’t required, but
2685 they do make your file(s) easier to read.
2689 If the file to be included is in the same directory as the file
2690 you’re working, you simply enter the filename after
2691 <kbd>.INCLUDE</kbd>. If the file’s in another directory, you must
2692 provide a full path name to it. For example, if you’re working in
2693 a directory called <kbd>/home/joe/stories</kbd> and your
2694 style-sheet is in <kbd>/home/joe/style-sheets</kbd>, the above
2695 example would have to look like this:
2697 <span class="pre-in-pp">
2698 .TITLE "Sample Document
2702 .INCLUDE /home/joe/style-sheets/head-template
2709 INCLUDE is not restricted to style sheets or templates. You can
2710 include any file at any point into a document, provided the file
2711 contains only text and valid groff or mom formatting commands.
2712 Neither is INCLUDE restricted to use with mom’s document
2713 processing macros. You can use it in plain typeset documents as
2717 <div class="box-tip">
2719 <span class="experts">Experts:</span>
2720 INCLUDE is an alias for the groff request, <kbd>.so</kbd>. Mix 'n'
2721 match with impunity.
2727 <h4 id="color" class="docs">Initializing colours</h4>
2730 Although it doesn’t really matter where you define/initialize
2731 colours for use in document processing (see
2732 <a href="color.html#newcolor">NEWCOLOR</a>
2734 <a href="color.html#xcolor">XCOLOR</a>
2736 <a href="color.html#color-intro">Coloured text</a>),
2737 I recommend doing so before you begin document processing with
2738 <kbd><a href="#start">START</a></kbd>.
2743 <a href="color.html#color">COLOR</a>
2745 <a href="definitions.html#inlines">inline escape</a>,
2746 <a href="color.html#color-inline"><kbd>\*[<colorname>]</kbd></a>
2747 can be used at any time during document processing for occasional
2748 colour effects. However, consistent and reliable colourizing of
2749 various document elements (the docheader, heads, linebreaks,
2750 footnotes, pagenumbers, and so on) must be managed through the use
2752 <a href="docelement.html#docelement-control">document element control macros</a>.
2755 <div class="box-tip">
2757 <span class="note">Note:</span>
2758 If you plan to have mom generate a
2759 <a href="docelement.html#toc">table of contents</a>,
2761 <a href="definitions.html#inlines">inline escapes</a>
2762 (<a href="color.html#color-inline"><kbd>\*[<colorname>]</kbd></a>)
2764 <a href="definitions.html#stringargument">string arguments</a>
2766 <a href="docprocessing.html#reference-macros">reference macros</a>,
2767 nor in the string arguments given to
2768 <a href="docelement.html#heading">HEADING</a>.
2770 <a href="definitions.html#controlmacro">control macros</a>
2771 mom provides to automatically colourize these elements.
2775 <!-- -DOC LEAD ADJUST- -->
2777 <div class="macro-id-overline">
2778 <h3 id="doc-lead-adjust" class="macro-id">Adjust linespacing to fill pages and align bottom margins</h3>
2781 <div class="box-macro-args">
2782 Macro: <b>DOC_LEAD_ADJUST</b> <kbd class="macro-args">toggle</kbd>
2785 <p class="requires">
2786 • Must come after
2787 <a href="typesetting.html#ls"><span class="normal">LS</span></a>
2789 <a href="typesetting.html.#autoloead"><span class="normal">AUTOLEAD</span></a>
2791 <a href="#start"><span class="normal">START</span></a>
2795 DOC_LEAD_ADJUST is a special macro to adjust document
2796 <a href="definitions.html#leading">leading</a>
2797 so that bottom margins fall precisely where you expect.
2801 When you invoke <kbd>.DOC_LEAD_ADJUST</kbd>, mom takes the number
2802 of lines that fit on the page at your requested leading, then
2804 <a href="definitions.html#units">machine units</a>
2805 to the leading until the maximum number of lines at the new leading
2806 that fit on the page coincides perfectly with the bottom margin of
2807 <a href="definitions.html#running">running text</a>.
2811 In most instances, the difference between the requested lead and
2812 the adjusted lead is unnoticeable, and since in almost all cases
2813 adjusted leading is what you want, it’s mom’s default
2814 and you don't have to invoke it explicitly.
2818 However, should you not want adjusted document leading, you must
2819 turn it off manually, like this:
2822 .DOC_LEAD_ADJUST OFF
2827 If you set the document leading prior to START with
2828 <a href="typesetting.html#leading">LS</a>
2830 <a href="typesetting.html#autolead">AUTOLEAD</a>,
2831 DOC_LEAD_ADJUST <kbd>OFF</kbd> must come afterwards, like
2834 <span class="pre-in-pp">
2836 .DOC_LEAD_ADJUST OFF
2838 In this scenario, the maximum number of lines that fit on a page at
2840 <a href="definitions.html#leading">leading</a>
2842 <a href="definitions.html#picaspoints">points</a>
2843 determine where mom ends a page. The effect will be that last lines
2844 usually fall (slightly) short of the “official” bottom
2850 <a href="docprocessing.html#printstyle">PRINTSTYLE</a> <kbd>TYPEWRITE</kbd>,
2851 the leading is always adjusted and can’t be turned off.
2854 <div class="box-tip">
2856 <span class="note">Note:</span>
2857 DOC_LEAD_ADJUST, if used, must be invoked after
2858 <a href="typesetting.html#leading">LS</a>
2860 <a href="typesetting.html#autolead">AUTOLEAD</a>
2862 <a href="#start">START</a>.
2865 <p class="tip-bottom">
2866 <span class="additional-note">Additional note:</span>
2867 Even if you disable DOC_LEAD_ADJUST, mom will still adjust the
2868 leading of endnotes pages and toc pages. See
2869 <a href="docelement.html#endnote-lead">ENDNOTE_LEAD</a>
2871 <a href="docelement.html#toc-lead">TOC_LEAD</a>
2872 for an explanation of how to disable this default behaviour.
2876 <!-- -DOCHEADER- -->
2878 <div class="macro-id-overline">
2879 <h3 id="docheader" class="macro-id">Managing the docheader</h3>
2882 <div class="box-macro-args">
2883 Macro: <b>DOCHEADER</b> <kbd class="macro-args"><toggle> [ distance to advance from top of page ] [ NO_SHIM ]</kbd>
2886 <p class="requires">
2887 • Must come before
2888 <a href="#start"><span class="normal">START</span></a>; <kbd><span class="normal">distance</span></kbd> requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
2892 By default, mom prints a
2893 <a href="definitions.html#docheader">docheader</a>
2894 on the first page of any document (see
2895 <a href="#docheader-desc">below</a>
2896 for a description of the docheader). If you don’t want a docheader,
2899 <span class="pre-in-pp">
2902 DOCHEADER is a toggle macro, so the argument doesn’t
2903 have to be OFF; it can be anything you like.
2907 If you turn the docheader off, mom, by default, starts
2908 the running text of your document on the same top
2909 <a href="definitions.html#baseline">baseline</a>
2910 as all subsequent pages. If you’d like her to start at a different
2911 vertical position, give her the distance you’d like as a second
2914 <span class="pre-in-pp">
2917 This starts the document 1.5 inches from the top of the page PLUS
2918 whatever spacing adjustment mom has to make in order to ensure that
2919 the first baseline of running text falls on a “valid”
2920 baseline (ie one that ensures that the bottom margin of the first
2921 page falls where it should). The distance is measured from the top
2922 edge of the paper to the
2923 <a href="definitions.html#baseline">baseline</a>
2924 of the first line of type.
2928 With <kbd>DOCHEADER OFF</kbd>, it is possible to create your own
2929 custom docheaders (after
2930 <a href="#start">START</a>)
2931 using mom’s typesetting macros. It is recommended that if you
2932 do create a custom docheader, you make
2933 <a href="docprocessing.html#shim"><kbd>.SHIM</kbd></a>
2934 the last macro before the first item of your document (for
2935 example, <kbd>PP</kbd> or <kbd>HEADING 1</kbd>.
2938 <div class="box-tip">
2940 <span class="note">Note:</span>
2941 You may have tried <kbd>DOCHEAHER OFF</kbd> with a distance argument
2942 and discovered that mom will not budge the starting position of the document
2943 from her chosen default location. This is byproduct of
2944 <a href="#shim">shimming</a>,
2945 which mom always applies before the first line of running text after
2946 the docheader, regardless of which
2947 <a href="#vertical-whitespace-management">vertical whitespace management</a>
2948 strategy is in effect. If you encounter the problem, pass
2949 <kbd>DOCHEADER OFF <distance></kbd>
2950 the additional final argument, <kbd>NO_SHIM</kbd>.
2954 <!-- DOCHEADER CONTROL -->
2956 <h3 id="docheader-control" class="docs">Docheader control: How to change the look of docheaders</h3>
2960 <a href="#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>,
2961 the look of docheaders is carved in stone. In
2962 <a href="#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>,
2963 however, you can make a lot of changes. Macros that alter
2964 docheaders must come before
2965 <a href="#start">START</a>.
2968 <h4 id="docheader-desc" class="docs">Docheader description</h4>
2971 A typeset docheader has the following characteristics:
2973 <div class="box-code" style="margin-left: 24px;">
2974 <span class="pre" style="color: #302419;">
2975 TITLE bold, 3.5 points larger than running text (not necessarily caps)
2976 Subtitle medium, same size as running text
2977 by medium italic, same size as running text
2978 Author(s) medium italic, same size as running text
2980 (Document type) bold italic, 3 points larger than running text
2986 <a href="#doctype">DOCTYPE</a>
2987 is <kbd>CHAPTER</kbd>,
2989 <div class="box-code" style="margin-left: 24px;">
2990 <span class="pre" style="color: #302419;">
2991 Chapter <n> bold, 4 points larger than running text
2992 Chapter Title bold italic, 4 points larger than running text
2998 <a href="definitions.html#family">family</a>
2999 is the prevailing family of the whole document. Title, subtitle,
3000 author and document type are what you supply with the
3001 <a href="#reference-macros">reference macros</a>.
3002 Any you leave out will not appear; mom will compensate:
3005 <div class="box-tip">
3007 <span class="note">Note:</span>
3008 If your DOCTYPE is <kbd>CHAPTER</kbd> and you have both “Chapter
3009 <n>” and a “Chapter Title” (as above), mom
3010 inserts a small amount of whitespace between them, equal to
3012 <a href="definitions.html#leading">leading</a>
3013 in effect. If this doesn’t suit you, you can remove or alter
3015 <a href="#space-before">CHAPTER_TITLE_SPACE_BEFORE</a>.
3019 <div class="macro-list-container">
3020 <h3 id="index-docheader-control" class="macro-list">Docheader control</h3>
3022 <p style="margin-top: -1.5em; margin-left: .5em; margin-right: .5em">
3023 With the docheader control macros, you can change the family,
3024 colour, leading and quad direction of the entire docheader. You can
3025 also set the style parameters for each part individually. Style
3026 parameters include family, font, size, colour, lead, space before,
3027 caps, smallcaps and underscoring.
3030 <ul class="macro-list" style="margin-top: -.5em">
3031 <li><a href="#change-whole-docheader">1. Changes to the whole docheader</a>
3032 <ul style="list-style-type: disc">
3033 <li><a href="#change-start">Change the starting position of the docheader</a></li>
3034 <li><a href="#docheader-family">Change the family of the whole docheader</a></li>
3035 <li><a href="#docheader-color">Change the colour of the whole docheader</a></li>
3036 <li><a href="#docheader-lead">Change the leading of the whole docheader</a></li>
3037 <li><a href="#docheader-quad">Change the quad direction of the docheader</a></li>
3040 <li><a href="#part-by-part">2. Part by part changes</a>
3041 <ul style="list-style-type: disc">
3042 <li><a href="#list-of-params">List of parameters and arguments</a></li>
3043 <li><a href="#grouping">Grouping part/parameter changes</a> – very handy</li>
3046 <li><a href="#change-attribute">3. Changing or removing the attribution string (“by”)</a></li>
3050 <h4 id="change-whole-docheader" class="docs" style="font-size: 100%">1. Changes to the whole docheader</h4>
3052 <h5 id="change-start" class="docs">Change the starting position of the docheader</h5>
3055 By default, a docheader starts on the same
3056 <a href="definitions.html#baseline">baseline</a>
3058 <a href="definitions.html#running">running text</a>.
3059 If you’d like it to start somewhere else, use the macro
3060 DOCHEADER_ADVANCE and give it the distance you want (measured from
3061 the top edge of the paper to the first baseline of the docheader),
3064 <span class="pre-in-pp">
3065 .DOCHEADER_ADVANCE 4P
3068 <a href="definitions.html#unitofmeasure">unit of measure</a>
3072 <div class="box-tip">
3074 <span class="note">Note:</span>
3076 <a href="headfootpage.html#headers">HEADERS</a>
3077 are <kbd>OFF</kbd>, mom’s normal top margin for
3078 <a href="definitions.html#running">running text</a>
3080 <a href="definitions.html#picaspoints">picas</a>)
3081 changes to 6 picas (visually approx. 1 inch). Since the first
3082 baseline of the docheader falls on the same baseline as the first
3083 line of running text (on pages after page 1), you might find the
3084 docheaders a bit high when headers are off. Use DOCHEADER_ADVANCE
3085 to place them where you want.
3089 <h5 id="docheader-quad" class="docs">Change the quad direction of the docheader</h5>
3092 By default, mom centres the docheader. If you’d prefer to
3093 have your docheaders set flush left or right, or need to restore
3094 the default centreing, invoke <kbd>.DOCHEADER_QUAD</kbd> with the
3095 quad direction you want, either <kbd>LEFT</kbd> (or <kbd>L</kbd>),
3096 <kbd>RIGHT</kbd> (or <kbd>R</kbd>) or <kbd>CENTER</kbd> (or
3100 <h5 id="docheader-family" class="docs">Change the family of the entire docheader</h5>
3103 By default, mom sets the docheader in the same
3105 <a href="definitions.html#running">running text</a>.
3106 If you’d prefer to have your docheaders set in a different
3107 family, invoke <kbd>.DOCHEADER_FAMILY</kbd> with the family you
3108 want. The argument to DOCHEADER_FAMILY is the same as for
3109 <a href="typesetting.html#family">FAMILY</a>.
3113 For example, mom’s default family for running text is Times
3114 Roman. If you’d like to keep that default, but have the
3115 docheaders set entirely in Helvetica,
3117 <span class="pre-in-pp">
3120 is how you’d do it.
3124 Please note that if you use DOCHEADER_FAMILY, you can still alter
3125 the family of individual parts of the docheader.
3128 <h5 id="docheader-color" class="docs">Change the color of the entire docheader</h5>
3131 The default color for docheaders is black, as you’d expect.
3132 If you wish to change it, use
3133 <kbd>.DOCHEADER_COLOR <color></kbd>, where
3134 <kbd> <color></kbd> is a color pre-initialized with
3135 <a href="color.html#xcolor">XCOLOR</a>
3137 <a href="color.html#newcolor">NEWCOLOR</a>.
3140 <h5 id="docheader-lead" class="docs">Change the leading of the entire docheader</h5>
3143 By default, mom uses the leading in effect for
3144 <a href="definitions.html#running">running text</a>
3145 for docheaders. If you want to increase or
3146 decrease the overall docheader leading, use
3147 <kbd>.DOCHEADER_LEAD +|-<amount></kbd>, where
3148 <kbd><amount></kbd> is the number of
3149 <a href="definitions.html#picaspoints">points</a>
3150 by which to make the adjustment.
3153 <h4 id="part-by-part" class="docs" style="font-size: 100%">2. Part by part changes</h4>
3156 Whenever you want to change the style parameters for any part of
3157 the docheader, simply join the name of the part to the parameter
3158 you wish to change using an underscore, then supply any necessary
3159 arguments. The subitle double-underlined? No problem.
3161 <span class="pre-in-pp">
3162 .SUBTITLE_UNDERLINE DOUBLE
3166 <span class="pre-in-pp">
3170 <span class="pre-in-pp">
3175 <div class="box-tip" style="margin-top: -1em;">
3177 <span class="note">Note:</span>
3178 Use <kbd>ATTRIBUTE</kbd> as the part name for the attribution string
3179 (“by”) that precedes the author, and <kbd>DOCTYPE</kbd>
3180 as the name for the string passed to <kbd>DOCTYPE NAMED "string"</kbd>.
3184 <h5 id="list-of-params" class="docs">List of parameters with arguments</h5>
3187 <dt class="params">_FAMILY</dt>
3189 Takes the same argument as <a href="typesetting.html#family">FAMILY</a>.
3191 <dt class="params">_FONT</dt>
3193 Takes the same argument as <a href="typesetting.html#font">FT</a>.
3195 <dt class="params">_SIZE</dt>
3197 Takes a <kbd>+</kbd> or <kbd>-</kbd> value relative to the size of
3198 <a href="definitions.html#running">running text</a>.
3200 <dt class="params">_COLOR</dt>
3202 Takes the same argument as <a href="color.html#color">COLOR</a>.
3203 Colors should be pre-initialized with
3204 <a href="color.html#xcolor">XCOLOR</a>
3206 <a href="color.html#newcolor">NEWCOLOR</a>.
3208 <dt class="params">_LEAD</dt>
3210 Takes an absolute leading value, i.e. not relative to the
3211 overall leading of the docheader. The leading applies to
3212 multiple lines of type within the same docheader part, e.g.
3213 several authors or a long title that must be split over two
3215 <a href="definitions.html#unitofmeasure">unit of measure</a>
3217 <a href="definitions.html#picaspoints">points</a>
3220 <dt id="space-before" class="params">_SPACE</dt>
3222 Takes a numeric value with a
3223 <a href="definitions.html#unitofmeasure">unit of measure</a>
3224 appended to it. The value may be negative. This allows you
3225 to adjust the whitespace before a docheader part, for example
3226 if you want more whitespace between the title and the author.
3227 <span style="display: block; margin-top: .5em">
3228 Note that <kbd>TITLE</kbd> does not have a <kbd>_SPACE</kbd>
3230 <a href="#change-start">DOCHEADER_ADVANCE</a>
3231 to move the title further down on the page.
3234 <dt class="params">_CAPS</dt>
3236 Capitalizes the entire docheader part. No argument is
3239 <dt class="params">_NO_CAPS</dt>
3241 Only used if you need to reverse the sense of <kbd>_CAPS</kbd>, as
3242 can sometimes happen when
3243 <a href="rectoverso.html#collate">collating</a>
3244 documents that have differing docheader style requirements.
3246 <dt class="params">_SMALLCAPS</dt>
3248 Set the entire docheader part in smallcaps. No argument is
3251 <dt class="params">_NO_SMALLCAPS</dt>
3253 Only used if you need to reverse the sense of
3254 <kbd>_SMALLCAPS</kbd>, as can sometimes happen when
3255 <a href="rectoverso.html#collate">collating</a>
3256 documents that have differing docheader style requirements.
3258 <dt class="params">_UNDERSCORE</dt>
3260 With no argument, underscores the docheader part. With a
3261 single, possibly decimal numeric argument, sets the weight of
3262 the underscore. A second numeric argument to which a
3263 <a href="definitions.html#unitofmeasure">unit of measure</a>
3264 is appended (most likely <kbd>p</kbd>) sets the distance
3265 between the baseline and the underscore.
3266 <span style="display: block; margin-top: .5em">
3267 If the argument <kbd>DOUBLE</kbd> is given, double underscores
3268 the docheader part. With a single, possibly decimal numeric
3269 argument afterwards, sets the weight of the underscore rules.
3270 A third numeric argument to which a
3271 <a href="definitions.html#unitofmeasure">unit of measure</a>
3272 is appended (most likely <kbd>p</kbd>) sets the distance
3273 between the baseline and the first underscore rule. A fourth
3274 numeric argument to which a unit of measure is appended sets
3275 the distance between the two underscore rules.
3277 <span style="display: block; margin-top: .5em">
3278 You may give <kbd>_UNDERLINE</kbd> as the parameter instead of
3279 <kbd>_UNDERSCORE</kbd> if you prefer.
3282 <dt class="params">NO_UNDERSCORE</dt>
3284 Only used if you need to reverse the sense of
3285 <kbd>_UNDERSCORE</kbd>, as can sometimes happen when
3286 <a href="rectoverso.html#collate">collating</a>
3287 documents that have differing docheader style requirements.
3291 <h5 id="grouping" class="docs">Grouping part/parameter changes</h5>
3294 If you want to change several parameters for a particular docheader
3295 part, you may group the changes together in a single macro by
3296 joining the name of the part to <kbd>STYLE</kbd> with an underscore,
3297 for example <kbd>TITLE_STYLE</kbd> or <kbd>AUTHOR_STYLE</kbd>.
3298 The following demonstrates:
3299 <span class="pre-in-pp">
3300 .CHAPTER_TITLE_STYLE \
3306 Notice the use of the backslash character, which is required after
3307 the macro name and all parameters except the last. Grouping reduces
3308 clutter and the finger fatigue caused by entering
3309 <span class="pre-in-pp">
3310 .CHAPTER_TITLE_FAMILY T
3311 .CHAPTER_TITLE_SIZE +4
3312 .CHAPTER_TITLE_UNDERSCORE 2
3313 .CHAPTER_TITLE_SMALLCAPS
3317 <h4 id="change-attribute" class="docs" style="font-size: 100%">3. Changing or removing the attribution string (“by”)</h4>
3320 If you’re not writing in English, you can change what mom
3321 prints where “by” appears in docheaders. For example,
3323 <span class="pre-in-pp">
3324 .ATTRIBUTE_STRING "par"
3326 changes “by” to “par”. ATTRIBUTE_STRING
3327 can also be used, for example, to make the attribution read
3328 “Edited by”.
3332 If you don’t want an attribution string at all, simply pass
3333 ATTRIBUTE_STRING an empty argument, like this:
3335 <span class="pre-in-pp">
3336 .ATTRIBUTE_STRING ""
3338 Mom will deposit a blank line where the attribution string normally
3343 If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
3344 is given to ATTRIBUTE_STRING, the string argument represents the
3345 attribution string that will appear on cover or document cover pages
3347 <a href="cover.html#cover-intro">Introduction to cover pages</a>
3348 for a description of the difference between “document
3349 covers” and “covers”). Thus, it is possible to
3350 have different attribution strings on the document cover page, the
3351 cover (“title”) page, and in the first-page docheader.
3352 An extreme example would be:
3354 <span class="pre-in-pp">
3355 .ATTRIBUTE_STRING ""
3356 .ATTRIBUTE_STRING DOC_COVER "Edited by"
3357 .ATTRIBUTE_STRING COVER "by"
3359 The first invocation of <kbd>.ATTRIBUTE_STRING</kbd> establishes a
3360 blank attribution string that will be incorporated in the first-page
3361 docheader. The second will print “Edited by” on the
3362 document cover; the third will print “by” on the cover
3363 (“title”) page.
3367 If you don’t require differing attribute strings for
3368 doc cover pages, cover pages, or the first-page docheader,
3369 <kbd>.ATTRIBUTE_STRING</kbd>, without either of the optional first
3370 arguments, is sufficient.
3373 <div class="rule-short"><hr/></div>
3377 <h2 id="columns-intro" class="docs">Setting documents in columns</h2>
3380 Setting documents in columns is easy with mom. All you have to do
3381 is is say how many columns you want and how much space you want
3383 <a href="definitions.html#gutter">gutters</a>).
3384 That’s it. Mom takes care of everything else, from soup to
3388 <h3 class="docs">Some words of advice</h3>
3391 If you want your type to achieve a pleasing
3392 <a href="definitions.html#just">justification</a>
3394 <a href="definitions.html#rag">rag</a>
3395 in columns, reduce the point size of type (and probably the
3396 <a href="definitions.html#leading">leading</a>
3397 as well). Mom’s default document point size is 12.5, which
3398 works well across her default 39
3399 <a href="definitions.html#picaspoints">pica</a>
3400 full page line length, but with even just two columns on a page, the
3401 default point size is awkward to work with.
3405 Furthermore, you’ll absolutely need to reduce the indents for
3406 <a href="docelement.html#epigraph-control">epigraphs</a>,
3407 <a href="docelement.html#quote-general">quotes</a>,
3409 <a href="docelement.html#blockquote-general">blockquotes</a>
3411 <a href="docelement.html#para-indent">paragraph first-line indent</a>
3417 <div class="macro-id-overline">
3418 <h3 id="columns" class="macro-id">COLUMNS</h3>
3421 <div class="box-macro-args">
3422 Macro: <b>COLUMNS</b> <kbd class="macro-args"><number of columns> <width of gutters></kbd>
3425 <p class="requires">
3426 • Should be the last macro before START
3429 <i>The second argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a></i>
3433 COLUMNS takes two arguments: the number of columns you want on
3434 document pages, and the width of the
3435 <a href="definitions.html#gutter">gutter</a>
3436 between them. For example, to set up a page with two columns
3437 separated by an 18 point gutter, you’d do
3439 <span class="pre-in-pp">
3442 Nothing to it, really. However, as noted above, COLUMNS should
3443 always be the last document setup macro prior to
3444 <a href="#start">START</a>.
3447 <div class="box-tip">
3449 <span class="note">Note:</span>
3450 Mom ignores columns completely when the
3451 <a href="#printstyle">PRINTSTYLE</a>
3452 is <kbd>TYPEWRITE</kbd>. The notion of typewriter-style
3453 output in columns is just too ghastly for her to bear.
3457 <h3 class="docs" id="marking-col-start">Marking the first page column start position</h3>
3460 If you insert or remove space after the docheader, i.e. immediately after
3461 <a href="#start">START</a>
3462 in your input file, mom needs to know where your first column begins
3463 in order to align subsequent columns on the first page.
3466 <div id="col-mark" class="box-macro-args">
3467 Macro: <b>COL_MARK</b>
3471 <kbd>COL_MARK</kbd> tells mom where the first column after the
3472 docheader begins, in order for the top of subsequent columns on the
3473 first page to be aligned. Note that if you do not manually add
3474 or remove space after the docheader, there is no need to invoke
3475 <kbd>COL_MARK</kbd>.
3478 <div class="box-tip">
3480 <span class="note">Note:</span>
3481 If you do add or subtract space after the docheader, e.g. with
3482 <a href="typesetting.html#ald">ALD</a>
3484 <a href="typesetting.html#SP">SP</a>,
3486 <a href="definitions.html#unitofmeasure">unit of measure</a>
3487 is something other than a multiple of “<kbd>v</kbd>”, be
3488 sure to follow the spacing command with
3489 <a href="docprocessing.html#shim">SHIM</a>
3490 before entering <kbd>.COL_MARK</kbd> unless shimming has been
3492 <a href="#no-shim">NO_SHIM</a>.
3493 If your document is being flex-spaced, do not use
3494 <a href="docprocessing.html#flex">FLEX</a>.
3495 Rather, disable flex-spacing temporarily with
3497 <span class="pre-in-pp">
3503 and re-enable it afterwards with
3504 <span class="pre-in-pp">
3511 <h3 class="docs">Using tabs when COLUMNS are enabled</h3>
3514 Mom’s tabs (both
3515 <a href="typesetting.html#typesetting-tabs">typesetting tabs</a>
3517 <a href="typesetting.html#string-tabs">string tabs</a>)
3518 behave as you’d expect during document processing, even
3519 when COLUMNS are enabled. Tab structures set up during document
3520 processing carry over from page to page and column to column.
3523 <!-- -BREAKING COLUMNS- -->
3525 <h3 id="breaking-columns" class="docs">Breaking columns manually</h3>
3528 Mom takes care of breaking columns when they reach the bottom
3529 margin of a page. However, there may be times you want to break
3530 the columns yourself. There are two macros for breaking columns
3531 manually: COL_NEXT and COL_BREAK.
3534 <div id="col-next" class="box-macro-args">
3535 Macro: <b>COL_NEXT</b>
3539 <kbd>.COL_NEXT</kbd> breaks the line just before it,
3540 <a href="definitions.html#quad">quads</a>
3541 it left (assuming the type is justified or quad left), and moves over
3542 to the top of the next column. If the column happens to be the last
3543 (rightmost) one on the page, mom starts a new page
3544 at the “column 1” position. This is the macro to use when
3545 you want to start a new column after the end of a paragraph.
3548 <div id="col-break" class="box-macro-args">
3549 Macro: <b>COL_BREAK</b>
3553 <kbd>.COL_BREAK</kbd> is almost the same as <kbd>.COL_NEXT</kbd>,
3554 except that instead of breaking and quadding the line preceding it,
3555 mom breaks and spreads it (see
3556 <a href="typesetting.html#spread">SPREAD</a>).
3557 Use this macro whenever you need to start a new column in the middle
3561 <div class="box-important">
3563 <span class="important">Warning:</span>
3564 If you need COL_BREAK in the middle of a blockquote or (god help
3565 you) an epigraph, you must do the following in order for COL_BREAK
3568 <span class="pre-in-pp">
3575 <div class="rule-short"><hr/></div>
3577 <!-- ======================================================================== -->
3582 <h2 id="style-after-start" class="macro-group">Changing basic type and formatting parameters after START</h2>
3584 <ul id="changing-basic-type">
3585 <li><a href="#behaviour">Behaviour of the typesetting macros during document processing</a>
3586 <ul style="margin-left: -.5em;">
3587 <li><a href="#behaviour-specific">Effect of specific typesetting macros</a></li>
3589 <li><a href="#tb-margins">Top and bottom margins in document processing</a></li>
3590 <li><a href="#space">Inserting space at the top of a new page</a>
3591 <ul style="margin-left: -.5em;">
3592 <li><a href="#add-space">ADD_SPACE</a></li>
3596 <div class="rule-medium"><hr/></div>
3598 <h3 id="behaviour" class="docs">Behaviour of the typesetting macros during document processing</h3>
3601 During document processing, most of the
3602 <a href="typesetting.html#macros-typesetting">typesetting macros</a>
3603 affect type in the document globally. For example, if you turn
3604 kerning off, pairwise kerning is disabled not only in paragraphs,
3605 but also in headers, footers, quotes, and so on.
3609 Typesetting macros that alter margins and line lengths affect
3610 <a href="definitions.html#running">running text</a>
3611 globally (or at least try to), but leave headers/footers and
3612 footnotes alone. (To indent footnotes, see the full explanation of
3614 <a href="docelement.html#footnote">FOOTNOTE</a>
3619 Mom’s tabs (both
3620 <a href="typesetting.html#typesetting-tabs">typesetting tabs</a>
3622 <a href="typesetting.html#string-tabs">string tabs</a>)
3623 behave as expected in running text during document processing. Tab
3624 structures that do not exceed the line length of running text are
3625 preserved sensibly from page to page, and, if
3626 <a href="docprocessing.html#columns">COLUMNS</a>
3627 are enabled, from column to column.
3631 Some typesetting macros, however, when used during document
3632 processing, behave in special ways. These are the macros that deal
3633 with the basic parameters of type style: horizontal and vertical
3634 margins, line length,
3635 <a href="definitions.html#family">family</a>,
3636 <a href="definitions.html#font">font</a>,
3637 <a href="definitions.html#ps">point size</a>,
3638 <a href="definitions.html#leading">leading</a>,
3640 <a href="definitions.html#quad">quad</a>.
3644 Mom assumes that any changes to these parameters stem from a
3645 temporary need to set type in a style different from that provided
3647 <a href="docelement.html#index-docelement">document element tags</a>.
3648 In other words, you need to do a bit of creative typesetting in the
3649 middle of a document.
3653 The following lists those typesetting macros whose behaviour during
3654 document processing requires some explanation.
3656 <a href="#tb-margins">Top and bottom margins in document processing</a>
3657 for information on how mom interprets
3658 <a href="typesetting.html#t-margin">T_MARGIN</a>
3660 <a href="typesetting.html#b-margin">B_MARGIN</a>
3661 in document processing. Additionally, see
3662 <a href="#add-space">ADD_SPACE</a>
3663 if you encounter the problem of trying to get mom to put space at
3664 the tops of pages after the first.)
3666 <div id="behaviour-specific" class="box-code" style="margin-left: 24px;">
3667 <span class="pre" style="color: #302419;">
3668 MACRO EFFECT DURING DOCUMENT PROCESSING
3669 ----- ---------------------------------
3671 L_MARGIN •The left margin of all running text
3672 assumes the new value.
3674 •The line length remains unaltered.
3676 •The header and footer left margin
3677 remain at the current document default.
3679 (You won’t use this often by itself. Most
3680 likely, you’ll use it in combination with
3683 R_MARGIN •The right margin of all running text
3684 assumes the new value. In other words,
3685 the line length is altered.
3687 •The header and footer right margin
3688 remain at the current document default.
3690 LL •The line length of all running text
3691 is set to the new value.
3693 •The header and footer line length remain
3694 at the current document default.
3696 FAMILY •Changes family for the duration of the
3697 current tag only. As soon as another document
3698 element tag is invoked, the family reverts to
3699 the current default for the new tag.
3701 FT •Changes font for the duration of the
3702 current tag only. As soon as another document
3703 element tag is entered, the font reverts
3704 to the current default for the new tag.
3706 N.B. — \*[SLANT] and \*[BOLDER] affect
3707 paragraph text, and remain in effect for all
3708 paragraphs until turned off. If you want to
3709 use them in a macro that takes a string
3710 argument, include the escape in the string.
3711 \*[COND] and \*[EXT] behave similarly.
3713 PT_SIZE •Changes point size for the duration of the
3714 current tag only. As soon as another document
3715 element tag is entered, the point size reverts
3716 to the current document default for the new
3719 LS •Changes line space for the duration of the
3720 current tag only. As soon as another document
3721 element tag is entered, the line space reverts
3722 to the current document default for the new
3725 Using LS to temporarily change leading within
3726 a document will almost certainly result in a
3727 bottom margin that doesn’t align with the
3728 bottom margin of subsequent pages. You’ll
3729 need to use the SHIM or FLEX macro to get mom back
3730 on track when you’re ready to return to the
3731 document’s default leading.
3733 <a id="autolead" style="margin-top: -1em">AUTOLEAD</a> •Invoked before START, sets the overall document
3734 leading as a function of the overall document
3735 point size (ie the point size used in paragraphs);
3736 subsequently disabled after START, except for calls
3739 •DOC_LEAD before DOC_PT_SIZE cancels the AUTOLEAD
3742 •Invoked after START, remains in effect for all
3743 subsequent point size changes made with PT_SIZE,
3744 but does not affect the leading of the document
3745 element tags (e.g., HEADING, PP, QUOTE...), or calls
3748 QUAD •Changes quad for the duration of the
3749 current tag only. As soon as another document
3750 element tag is entered, the quad reverts to
3751 the current document default for the new
3754 N.B. — Line-for-line quadding macros
3755 (LEFT, CENTER, RIGHT) are also temporary,
3756 overridden by the QUAD value of any subsequent
3757 document element tag.
3761 <h3 id="tb-margins" class="docs" style="margin-top: 1.5em;">Top and bottom margins in document processing</h3>
3764 Normally, mom establishes the top and bottom
3766 <a href="definitions.html#running">running text</a>
3767 in documents from the values of <b>HEADER_MARGIN +
3768 HEADER_GAP</b> and <b>FOOTER_MARGIN + FOOTER_GAP</b>
3769 respectively. However, if you invoke
3770 <a href="typesetting.html#t-margin">T_MARGIN</a>
3772 <a href="typesetting.html#b-margin">B_MARGIN</a>
3773 either before or after
3774 <a href="docelement.html#start">START</a>,
3775 they set the top and bottom margins of running text irrespective of
3776 HEADER_GAP and FOOTER_GAP.
3780 Put another way, in document processing, T_MARGIN
3781 and B_MARGIN set the top and bottom margins of
3782 running text, but have no effect on the placement of
3783 <a href="definitions.html#header">headers</a>,
3784 <a href="definitions.html#footer">footers</a>,
3788 <!-- ==================================================================== -->
3790 <h3 id="space" class="docs">Inserting space at the top of a new page</h3>
3793 Occasionally, you may want to insert space before the start of
3794 <a href="definitions.html#running">running text</a>
3795 on pages after the first.
3799 You might have tried using
3800 <a href="typesetting.html#ald">ALD</a>
3802 <a href="typesetting.html#space">SPACE</a>
3803 and found it did nothing. This is because mom normally inhibits
3804 any extra space before the start of running text on pages after the
3809 If you need the space, you must use the macro ADD_SPACE in
3811 <a href="typesetting.html#newpage">NEWPAGE</a>.
3814 <!-- -ADD_SPACE- -->
3816 <div class="macro-id-overline">
3817 <h3 id="add-space" class= "macro-id">ADD_SPACE/RESTORE_SPACE</h3>
3820 <div class="box-macro-args">
3821 Macro: <b>ADD_SPACE</b> <kbd class="macro-args"><amount of space></kbd>
3823 Macro: <b>RESTORE_SPACE</b>
3826 <p class="requires">
3827 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
3832 <a href="#doctype">DOCTYPE</a>
3833 is DEFAULT, CHAPTER, NAMED, or LETTER, ADD_SPACE takes as its
3834 single argument the distance you want mom to advance from the normal
3835 baseline position at the top of any page <i>after the first</i> (ie
3836 the one on which the docheader is normally printed). A
3837 <a href="definitions.html#unitofmeasure">unit of measure</a> is
3842 For example, say you wanted to insert 2 inches of space before the
3844 <a href="definitions.html#running">running text</a>
3845 on a page other than the first. You’d accomplish it with
3847 <span class="pre-in-pp">
3851 which would terminate your current page, break to a new page, print
3852 the header (assuming headers are on) and insert 2 inches of space
3853 before the start of running text.
3857 Since adding space in this way is almost sure to disrupt mom’s
3858 ability to guarantee perfectly flush bottom margins, I highly
3860 <a href="docprocessing.html#shim">SHIM</a>
3862 <a href="docprocessing.html#flex">FLEX</a>
3863 macro immediately after ADD_SPACE, which will add the space plus
3864 whatever correction is required by the
3865 <a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
3871 <a href="#doctype">DOCTYPE</a>
3872 is SLIDES, ADD_SPACE may be used on any slide <i>including the
3873 first</i> to introduce additional white space at the top.
3876 <h4 class="docs doc-param-macros" style="margin-top: .5em">RESTORE_SPACE</h4>
3878 <p style="margin-top: .5em">
3879 You may sometimes find that mom refuses to respect
3880 <a href="typesetting.html#space">SP</a>,
3881 <a href="typesetting.html#index-aldrld">ALD/RLD</a>,
3882 <a href="docprocessing.html#shim">SHIM</a>,
3884 <a href="docprocessing.html#flex">FLEX</a>
3885 after the first element (line of text, floated material) output
3886 at the top of a page. Should this happen, insert the macro
3887 RESTORE_SPACE before issuing the spacing command.
3892 <h2 id="intro-doc-param" class="macro-group">Changing document-wide style parameters after START</h2>
3895 In the normal course of things, you establish the basic type style
3896 parameters of a document prior to invoking
3897 <a href="#start">START</a>,
3899 <a href="typesetting.html#macros-typesetting">typesetting macros</a>
3900 (<b>L_MARGIN, FAMILY, PT_SIZE, LS,</b> etc). After START, you must
3901 use the following macros if you wish to make global changes to the
3902 basic type style parameters, for example changing the overall leading or
3903 the justification style.
3906 <div class="box-important">
3908 <span class="important">Important:</span>
3909 Because these macros globally update the chosen parameter, they
3910 should only be used immediately prior to
3911 <a href="rectoverso.html#collate">COLLATE</a>
3912 or, if an occasional effect is desired,
3913 <a href="typesetting.html#newpage">NEWPAGE</a>.
3914 <a href="#doc-pt-size">DOC_PT_SIZE</a>,
3915 for example, updates the point size of every page element, including
3916 headers, footers, page numbers, and so on, which is almost certainly
3917 not what you want in the middle of a page.
3921 <div class="macro-list-container">
3922 <h3 id="index-doc-param" class="macro-list">Post-START global style change macros</h3>
3923 <ul class="macro-list">
3924 <li><a href="#doc-left-margin">DOC_LEFT_MARGIN</a></li>
3925 <li><a href="#doc-right-margin">DOC_RIGHT_MARGIN</a></li>
3926 <li><a href="#doc-line-length">DOC_LINE_LENGTH</a></li>
3927 <li><a href="#doc-family">DOC_FAMILY</a></li>
3928 <li><a href="#doc-pt-size">DOC_PT_SIZE</a></li>
3929 <li><a href="#doc-lead">DOC_LEAD</a></li>
3930 <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></li>
3931 <li><a href="#doc-quad">DOC_QUAD</a></li>
3935 <!-- -DOC_LEFT_MARGIN -->
3937 <div class="macro-id-overline">
3938 <h3 id="doc-left-margin" class="macro-id">DOC_LEFT_MARGIN</h3>
3941 <div class="box-macro-args">
3942 Macro: <b>DOC_LEFT_MARGIN</b> <kbd class="macro-args"><left margin></kbd>
3945 <p class="requires">
3946 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
3949 <h4 class="docs doc-param-macros">Arguments and behaviour</h4>
3951 <ul class="doc-param-macros">
3952 <li>the argument is the same as for
3953 <a href="typesetting.html#l-margin">L_MARGIN</a>
3955 <li>changes all left margins, including headers, footers, and page
3956 numbers to the new value
3958 <li>any document elements that use a left indent calculate
3959 the indent from the new value
3961 <li>the line length remains the same (ie the right margin
3962 shifts when you change the left margin)
3966 <!-- -DOC_RIGHT_MARGIN -->
3968 <div class="macro-id-overline">
3969 <h3 id="doc-right-margin" class="macro-id">DOC_RIGHT_MARGIN</h3>
3972 <div class="box-macro-args">
3973 Macro: <b>DOC_RIGHT_MARGIN</b> <kbd class="macro-args"><right margin></kbd>
3976 <p class="requires">
3977 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
3980 <h4 class="docs doc-param-macros">Arguments and behaviour</h4>
3982 <ul class="doc-param-macros">
3983 <li>the argument is the same as for
3984 <a href="typesetting.html#r-margin">R_MARGIN</a>
3986 <li>changes all right margins, including headers, footers, and
3987 page numbers to the new value;
3989 <li>any document elements that use a right indent calculate
3990 the indent from the new value
3994 <!-- -DOC_RIGHT_MARGIN -->
3996 <div class="macro-id-overline">
3997 <h3 id="doc-line-length" class="macro-id">DOC_LINE_LENGTH</h3>
4000 <div class="box-macro-args">
4001 Macro: <b>DOC_LINE_LENGTH</b> <kbd class="macro-args"><length></kbd>
4004 <p class="requires">
4005 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4008 <h4 class="docs doc-param-macros">Arguments and behaviour</h4>
4010 <ul class="doc-param-macros">
4011 <li>the argument is the same as for
4012 <a href="typesetting.html#linelength">LL</a>
4014 <li>exactly equivalent to changing the right margin with
4015 DOC_RIGHT_MARGIN (see
4016 <a href="#doc-right-margin">above</a>);
4020 <!-- -DOC_FAMILY- -->
4022 <div class="macro-id-overline">
4023 <h3 id="doc-family" class="macro-id">DOC_FAMILY</h3>
4026 <div class="box-macro-args">
4027 Macro: <b>DOC_FAMILY</b> <kbd class="macro-args"><family></kbd>
4030 <h4 class="docs doc-param-macros" style="margin-top: 1em;">Arguments and behaviour</h4>
4032 <ul class="doc-param-macros">
4033 <li>the argument is the same as for
4034 <a href="typesetting.html#family">FAMILY</a>
4036 <li>globally changes the type family for
4038 <li style="margin-left: -.5em;">the <a href="definitions.html#docheader">docheader</a></li>
4039 <li style="margin-left: -.5em;">all <a href="docelement.html#index-docelement">document element tags</a>, including footnotes</li>
4040 <li style="margin-left: -.5em;"><a href="definitions.html#header">headers and/or footers</a></li>
4041 <li style="margin-left: -.5em;"><a href="docelement.html#number-lines-intro">line numbering</a></li>
4042 <li style="margin-left: -.5em;"><a href="headfootpage.html#pagination">page numbering</a></li>
4044 <li>does <i>not</i> change the family of
4046 <li><a href="cover.html#doc-cover">document cover pages</a></li>
4047 <li><a href="cover.html#cover">cover pages</a></li>
4048 <li><a href="docelement.html#endnote-intro">endnotes pages</a></li>
4049 <li><a href="docelement.html#toc-intro">table of contents</a></li>
4051 <li>any page elements (e.g., headers page numbers, footnotes) whose
4052 families you wish to remain at their old values must be
4053 reset with the appropriate
4054 <a href="docelement.html#docelement-control">control macros</a>
4058 <!-- -DOC_PT_SIZE- -->
4060 <div class="macro-id-overline">
4061 <h3 id="doc-pt-size" class="macro-id">DOC_PT_SIZE</h3>
4064 <div class="box-macro-args">
4065 Macro: <b>DOC_PT_SIZE</b> <kbd class="macro-args"><point size></kbd>
4068 <p class="requires">
4069 • Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
4072 <h4 class="docs doc-param-macros">Arguments and behaviour</h4>
4074 <ul class="doc-param-macros">
4075 <li>the argument is the same as for
4076 <a href="typesetting.html#ps">PT_SIZE</a>,
4077 and refers to the point size of type in paragraphs
4079 <li>all automatic point size changes (heads, quotes,
4080 footnotes, headers, etc.) are affected by the new size;
4081 anything you do not want affected must be reset to
4082 its former value (see the Control Macros section of
4083 the pertinent document element for instructions on
4087 <a href="typesetting.html#autolead">AUTOLEAD</a>
4088 was invoked before START; the value of AUTOLEAD will be used
4089 to update the leading of all document element tags except
4090 FOOTNOTE and EPIGRAPH
4096 <div class="macro-id-overline">
4097 <h3 id="doc-lead" class="macro-id">DOC_LEAD</h3>
4100 <div class="box-macro-args">
4101 Macro: <b>DOC_LEAD</b> <kbd class="macro-args"><points> [ ADJUST ]</kbd>
4104 <p class="requires">
4105 • Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
4108 <h4 class="docs doc-param-macros">Arguments and behaviour</h4>
4110 <ul class="doc-param-macros">
4111 <li>the argument is the same as for
4112 <a href="typesetting.html#leading">LS</a>,
4114 <a href="definitions.html#lead">leading</a>
4117 <li>because paragraphs will have a new leading, the leading and
4118 spacing of most running text is influenced by the new value
4120 <li>epigraphs and footnotes remain unaffected;
4121 if you wish to change their leading, use
4122 <a href="docelement.html#epigraph-autolead">EPIGRAPH_AUTOLEAD</a>
4124 <a href="docelement.html#footnote-autolead">FOOTNOTE_AUTOLEAD</a>.
4126 <li>the optional argument <kbd>ADJUST</kbd> performs
4127 leading adjustment as explained in
4128 <a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a>
4131 <a href="typesetting.html#autolead">AUTOLEAD</a>
4132 was invoked before START; the value of that AUTOLEAD will be
4137 <div class="box-tip">
4139 <span class="note">Note:</span>
4140 Even if you don’t pass DOC_LEAD the optional argument
4141 <kbd>ADJUST</kbd>, mom will still adjust the leading of endnotes
4142 pages and toc pages. See
4143 <a href="docelement.html#endnote-lead">ENDNOTE_LEAD</a>
4145 <a href="docelement.html#toc-lead">TOC_LEAD</a>
4146 for an explanation of how to disable this default behaviour.
4152 <div class="macro-id-overline">
4153 <h3 id="doc-quad" class="macro-id">DOC_QUAD</h3>
4156 <div class="box-macro-args">
4157 Macro: <b>DOC_QUAD</b> <kbd class="macro-args">L | R | C | J</kbd>
4160 <h4 class="docs doc-param-macros" style="margin-top: 1em;">Arguments and behaviour</h4>
4162 <ul class="doc-param-macros">
4163 <li>the arguments are the same as for
4164 <a href="typesetting.html#quad">QUAD</a>
4166 <li>affects paragraphs, epigraphs and footnotes; does not
4171 <h2 id="terminating" class="macro-group">Terminating a document</h2>
4174 You need do nothing special to terminate a document. When groff
4175 finishes processing the last
4176 <a href="definitions.html#inputline">input line</a>
4177 of a file, the page is ejected, subject to whatever routines are
4178 needed to complete it (e.g., printing footnotes or adding the page
4183 It happens sometimes, however, that a last line of
4184 <a href="definitions.html#running">running text</a>,
4185 falling on or very near the bottom of the page, tricks groff into
4186 breaking to a new page before terminating. The result is a blank
4187 page at the end of the formatted document.
4191 The situation is rare, generally occurring only when some additional
4192 macro is required after the input text, e.g., to exit a
4193 <a href="docelement.html#list-intro">list</a>
4195 <a href="docelement.html#quote">quote</a>.
4196 To prevent it from ever happening, I recommend getting into the habit
4197 of following the final input line of all your mom files with
4198 <a href="typesetting.html#el"><kbd>.EL</kbd></a>.
4200 <a href="definitions.html#filled">fill mode</a>
4201 in effect, you may also have to append the “join line”
4202 <a href="definitions.html#inlines">escape</a>,
4203 <kbd>\c</kbd>, to the final line.</p>
4206 Thus, for normal text at the end of a paragraph, which is in fill
4209 <span class="pre-in-pp">
4210 and they all lived happily ever after.
4214 <a href="docelement.html#list-intro">LIST</a>
4216 <span class="pre-in-pp">
4218 peaches, pears, plums
4222 whereas, at the end of a
4223 <a href="docelement.html#quote-intro">QUOTE</a>
4224 (which is in nofill mode),
4225 <span class="pre-in-pp">
4226 Shall be lifted\[em]nevermore!\c
4230 Notice that the <kbd>.EL</kbd> comes after the last line of input
4231 text, not any macros following.
4234 <div class="box-tip">
4236 <span class="note">Note:</span>
4237 <a href="inlines.html#b"><kbd>\*[B]</kbd></a>
4238 cannot be used as a replacement for <kbd>.EL</kbd> when terminating
4243 <!-- Navigation links -->
4244 <table style="width: 100%; margin-top: 12px;">
4246 <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
4247 <td style="width: 24%; text-align: center;"><a href="#top">Top</a></td>
4248 <td style="width: 43%; text-align: right;"><a href="docelement.html#top">Next: The document element tags</a></td>
4254 <div class="bottom-spacer"><br/></div>