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-2014 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 the
11 Invariant Sections being this comment section, with no Front-Cover
12 Texts, and with no Back-Cover Texts.
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 -- Typesetting Macros</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="goodies.html#top">Next: Goodies</a></td>
41 <h1 id="typesetting" class="docs">The typesetting macros</h1>
43 <div id="typesetting-macros-mini-toc" class="mini-toc">
44 <div class="mini-toc-col-1">
45 <ul class="no-enumerator">
46 <li class="list-head"><a href="#typesetting-macros">Introduction</a></li>
47 <li class="list-head"><a href="#page-setup-intro">Paper and page setup</a>
49 <li class="item"><a href="#page-setup-note"><i>Important note on page dimensions & papersize</i></a></li>
50 <li class="item"><a href="#index-page-setup">Macro list</a></li>
52 <li class="list-head"><a href="#basic-params-intro">Basic typesetting parameters</a>
54 <li class="item"><a href="#index-basic">Macro list</a></li>
56 <li class="list-head"><a href="#justification-intro">Justification and quadding/
58 <span style="margin-left: 1em;">breaking and joining lines</span></a>
60 <li class="item"><a href="#index-justification">Macro list</a></li>
62 <li class="list-head"><a href="#refinements-intro">Typographic refinements</a>
64 <li class="item"><a href="#index-refinements">Macro list</a></li>
66 <li class="list-head"><a href="#modifications-intro">Type modifications (pseudo font styles)</a>
67 <ul class="no-enumerator">
68 <li class="item"><a href="#index-modifications">Macro list</a></li>
70 <li class="list-head"><a href="#aldrld-intro">Vertical movements</a>
71 <ul class="no-enumerator">
72 <li class="item"><a href="#index-aldrld">Macro list</a>
77 <div class="mini-toc-col-2">
78 <ul class="no-enumerator">
79 <li class="list-head"><a href="#tabs-intro">Tabs</a>
80 <ul class="no-enumerator">
81 <li class="item"><a href="#typesetting-tabs">Typesetting tabs</a>
82 <ul style="margin-left: -.5em;">
83 <li class="item" style="margin-left: -.5em; list-style-type: circle;"><a href="#typesetting-tabs-tut">Quickie tutorial on typesetting tabs</a></li>
85 <li class="item"><a href="#string-tabs">String tabs</a>
86 <ul style="margin-left: -.5em;">
87 <li class="item" style="margin-left: -.5em; list-style-type: circle;"><a href="#string-tabs-tut">Quickie tutorial on string tabs</a></li>
89 <li class="item"><a href="#index-tabs">Macro list</a></li>
91 <li class="list-head"><a href="#multicolumns-intro">Multiple columns</a>
92 <ul class="no-enumerator">
93 <li class="item"><a href="#index-multicolumns">Macro list</a>
96 <li class="list-head"><a href="#indents-intro">Indents</a>
97 <ul class="no-enumerator">
98 <li class="item"><a href="#indents-handling">How mom handles indents</a></li>
99 <li class="item"><a href="#index-indents">Macro list</a>
102 <li class="list-head"><a href="goodies.html#goodies">Goodies</a>
103 <ul class="no-enumerator">
104 <li class="item"><a href="goodies.html#goodies-macros">Macro list</a>
107 <li class="list-head"><a href="inlines.html#top">Inline escapes</a>
108 <ul class="no-enumerator">
109 <li class="item"><a href="inlines.html#index-inlines">List of inline escapes</a>
112 <li class="list-head"><a href="color.html#colored-text-intro">Coloured text</a>
113 <ul class="no-enumerator">
114 <li class="item"><a href="color.html#colored-text-macros">Macro list</a></li>
120 <div class="rule-medium"><hr/></div>
122 <h2 id="typesetting-intro" class="docs">Introduction</h2>
125 Mom’s typesetting macros provide access to groff’s
126 typesetting capabilities. Aside from controlling basic type
127 parameters (family, font, line length, point size, leading),
128 mom’s macros fine-tune wordspacing, letterspacing, kerning,
129 hyphenation, and so on. In addition, mom has true typesetting tabs,
130 string tabs, multiple indent styles, line padding, and a batch of
135 In some cases, mom’s typesetting macros merely imitate groff
136 primitives. In others, they approach typesetting concerns in
137 conceptually new ways (for groff, at least). This should present
138 no problem for newcomers to groff who are learning mom. Old groff
139 hands should be careful. Just because it looks like a duck and
140 walks like a duck does not, in this instance, mean that it is a
141 duck. When using mom, stay away from groff primitives if mom
142 provides a macro that accomplishes the same thing.
146 Mom’s typesetting macros can be used as a standalone package,
148 <a href="docprocessing.html#top">document processing macros</a>.
149 With them, you can typeset on-the-fly. Book covers, your best
150 friend’s résumé, a poster for a lost dog—none of these
151 requires structured document processing (page headers, paragraphs,
152 headings, footnotes, etc). What they do demand is precise control over
153 every element on the page. The typesetting macros give you that
157 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
159 <!-- ==================================================================== -->
161 <h2 id="page-setup-intro" class="macro-group">Paper and page setup: paper size & page margins</h2>
164 The page setup macros establish the physical dimensions of your page
165 and the margins you want it to have. Groff has defaults for these,
166 but I recommend setting them at the top of your files anyway.
170 If you’re using mom’s
171 <a href="docprocessing.html#docprocessing">document processing macros</a>,
172 these macros must come after
173 <a href="docprocessing.html#printstyle">PRINTSTYLE</a>.
178 <a href="#paper">PAPER</a>
179 macro provides a shortcut for setting the page to the correct
180 dimensions for a number of common paper sizes. The
181 <a href="#page">PAGE</a>
182 macro provides a convenient way of setting the page dimensions and
183 some or all of the page margins with a single macro.
186 <div class="box-notes">
187 <h3 id="page-setup-note" class="docs notes">Important note on page dimensions and papersize</h3>
189 <p style="margin-top: .5em;">
190 When mom files are processed with
191 <a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
192 which is recommended (see
193 <a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>),
194 page dimensions are automatically passed to groff, and you don't
195 have to worry about them.
199 Mom documents processed directly with <strong>groff</strong>, or with
200 <strong>pdfroff</strong>, or with <strong>pdfmom -Tps</strong>, require
201 that the papersize be given on the command line as well if the
202 papersize is different from the default on your system. You can
203 verify—or change—the default papersize by inspecting the
206 <span class="pre-in-pp">
207 <path to groff>/font/devps/DESC
211 <span class="pre-in-pp">
212 <path to groff>/font/devpdf/DESC
214 (See <strong>man papersize</strong> for list of valid papersize
215 names, as well as for instructions on how to enter a non-standard
220 If you occasionally need to print on sheets that do not
221 conform to your default papersize, you must, in addition
222 to setting the page dimensions in your mom file, pass the
223 <kbd>-P-p<papersize></kbd> option to <strong>groff</strong>,
224 <strong>pdfroff</strong>, or <strong>pdfmom -Tps</strong>.
228 For example, suppose your routine papersize is “letter”,
229 and you need to print something on a legal-sized sheet. After
230 telling mom about the legal-size sheet (with either
231 <a href="#pagelength">PAGELENGTH</a>
233 <a href="#pagewidth">PAGEWIDTH</a>
235 <a href="#paper">PAPER</a>,
237 <a href="#page">PAGE</a>),
238 you must include <kbd>-P-p<papersize></kbd> on whichever
239 command line you use, eg
241 <span class="pre-in-pp">
242 pdfmom -Tps -mom -P-plegal
244 Remember, though, that
245 <a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
246 with no <kbd>-Tps</kbd> option, is smart enough to know the
247 papersize from the dimensions provided in your mom file.
250 <p class="tip-bottom">
251 Consult <kbd>man groff</kbd>, <kbd>man grops</kbd> and <kbd>man
252 groff_font</kbd> for additional information concerning papersizes,
253 as well as information on printing in “landscape”
258 <div class="macro-list-container">
259 <h3 id="index-page-setup" class="macro-list">Paper and page setup macros</h3>
261 <ul class="macro-list">
262 <li><a href="#pagewidth">PAGEWIDTH</a> – page width</li>
263 <li><a href="#pagelength">PAGELENGTH</a> – page length</li>
264 <li><a href="#paper">PAPER</a> – common paper sizes</li>
265 <li><a href="#l-margin">L_MARGIN</a> – left margin</li>
266 <li><a href="#r-margin">R_MARGIN</a> – right margin</li>
267 <li><a href="#t-margin">T_MARGIN</a> – top margin</li>
268 <li><a href="#b-margin">B_MARGIN</a> – bottom margin</li>
269 <li><a href="#page">PAGE</a> – page dimensions and margins all in one fell swoop</li>
270 <li><a href="#newpage">NEWPAGE</a> – start a new page</li>
276 <div class="macro-id-overline">
277 <h3 id="pagewidth" class="macro-id">Page width</h3>
280 <div class="box-macro-args">
281 Macro: <b>PAGEWIDTH</b> <kbd class="macro-args"><width of printer sheet></kbd>
284 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
288 The argument to PAGEWIDTH is the width of your printer sheet.
289 PAGEWIDTH requires a unit of measure. Decimal fractions are
290 allowed. Hence, to tell mom that the width of your printer sheet is
291 8-1/2 inches, you enter
293 <span class="pre-in-pp">
297 <a href="#page-setup-note">Important note on page dimensions and papersize</a>
298 for information on ensuring groff respects your
302 <div class="box-important">
304 <span class="important">Important:</span> <kbd>PAGEWIDTH</kbd>,
305 when you need it, should be placed at the top of your files.
309 <!-- -PAGELENGTH- -->
311 <div class="macro-id-overline">
312 <h3 id="pagelength" class="macro-id">Page length</h3>
315 <div class="box-macro-args">
316 Macro: <b>PAGELENGTH</b> <kbd class="macro-args"><length of printer sheet></kbd>
319 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
323 PAGELENGTH tells mom how long your printer sheet is. It works just
324 like PAGEWIDTH. Therefore, to tell mom your printer sheet is 11
325 inches long, you enter
327 <span class="pre-in-pp">
331 <a href="#page-setup-note">Important note on page dimensions and papersize</a>
332 for information on ensuring groff respects your PAGELENGTH.
335 <div class="box-important">
337 <span class="important">Important:</span> <kbd>PAGELENGTH</kbd>,
338 when you need it, should be placed at the top of your files.
344 <div class="macro-id-overline">
345 <h3 id="paper" class="macro-id">Paper</h3>
348 <div class="box-macro-args">
349 Macro: <b>PAPER</b> <kbd class="macro-args"><paper type> [ LANDSCAPE ]</kbd>
353 PAPER provides a convenient way to set the dimensions for some
354 common printer sheet sizes. <kbd><paper type></kbd> can
357 <span class="pre-in-pp">
366 Say, for example, you have A4-sized sheets in your printer. It’s
367 shorter (and easier) to enter
369 <span class="pre-in-pp">
372 than to remember the correct dimensions and enter
374 <span class="pre-in-pp">
378 If you’d like landscape orientation for your paper type,
379 pass PAPER the <kbd>LANDSCAPE</kbd> argument.
382 <a href="#page-setup-note">Important note on page dimensions and papersize</a>
383 for information on ensuring groff respects your PAPER size.
386 <div class="box-important">
388 <span class="important">Important:</span> <kbd>PAPER</kbd> when you
389 need it, should be placed at the top of your files.
395 <div class="macro-id-overline">
396 <h3 id="l-margin" class="macro-id">Left margin</h3>
399 <div class="box-macro-args">
400 Macro: <b>L_MARGIN</b> <kbd class="macro-args"><left margin></kbd>
403 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
407 L_MARGIN establishes the distance from the left edge of the printer
408 sheet at which you want your type to start. It may be used any
409 time, and remains in effect until you enter a new value.
413 <a href="#il">Left indents</a>
415 <a href="#tabs">tabs</a>
416 are calculated from the value you pass to L_MARGIN, hence it’s
417 always a good idea to invoke it before starting any serious
418 typesetting. A unit of measure is required. Decimal fractions are
419 allowed. Therefore, to set the left margin at 3 picas (1/2 inch),
420 you’d enter either
422 <span class="pre-in-pp">
426 <span class="pre-in-pp">
429 If you use the macros
430 <a href="#page">PAGE</a>,
431 <a href="#pagewidth">PAGEWIDTH</a>
433 <a href="#paper">PAPER</a>
434 without invoking L_MARGIN (either before or afterwards), mom
435 automatically sets L_MARGIN to 1 inch.
438 <div class="box-tip">
440 <span class="note">Note:</span> L_MARGIN behaves in a special way
441 when you’re using the
442 <a href="docprocessing.html#docprocessing">document processing macros</a>.
444 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
451 <div class="macro-id-overline">
452 <h3 id="r-margin" class="macro-id">Right margin</h3>
455 <div class="box-macro-args">
456 Macro: <b>R_MARGIN</b> <kbd class="macro-args"><right margin></kbd>
459 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
462 <div class="box-important">
464 <span class="important">IMPORTANT:</span> R_MARGIN, if used, must
466 <a href="#paper">PAPER</a>,
467 <a href="#pagewidth">PAGEWIDTH</a>,
468 <a href="#l-margin">L_MARGIN</a>
470 <a href="#page">PAGE</a>
471 (if a right margin isn’t given to PAGE). The reason is that
472 R_MARGIN calculates line length from the overall page dimensions and
473 the left margin. Obviously, it can’t make the calculation if
474 it doesn’t know the page width and the left margin.
479 R_MARGIN establishes the amount of space you want between the end
480 of typeset lines and the right hand edge of the printer sheet. In
481 other words, it sets the line length. R_MARGIN requires a unit of
482 measure. Decimal fractions are allowed.
486 The line length macro
487 (<a href="#linelength">LL</a>)
488 can be used in place of R_MARGIN. In either case, the last one
489 invoked sets the line length. The choice of which to use is up
490 to you. In some instances, you may find it easier to think of a
491 section of type as having a right margin. In others, giving a line
492 length may make more sense.
496 For example, if you’re setting a page of type you know should
497 have 6-pica margins left and right, it makes sense to enter a left
498 and right margin, like this:
500 <span class="pre-in-pp">
504 That way, you don’t have to worry about calculating the line
505 length. On the other hand, if you know the line length for a patch
506 of type should be 17 picas and 3 points, entering the line length
507 with LL is much easier than calculating the right margin, eg
509 <span class="pre-in-pp">
512 If you use the macros
513 <a href="#page">PAGE</a>,
514 <a href="#pagewidth">PAGEWIDTH</a>
516 <a href="#paper">PAPER</a>
517 without invoking <kbd>.R_MARGIN</kbd> afterwards, mom automatically
518 sets R_MARGIN to 1 inch. If you set a line length after these
520 <a href="#linelength">LL</a>),
521 the line length calculated by R_MARGIN is, of course, overridden.
524 <div class="box-tip">
526 <span class="note">Note:</span> R_MARGIN behaves in a special way when you’re
528 <a href="docprocessing.html#docprocessing">document processing macros</a>.
530 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
537 <div class="macro-id-overline">
538 <h3 id="t-margin" class="macro-id">Top margin</h3>
541 <div class="box-macro-args">
542 Macro: <b>T_MARGIN</b> <kbd class="macro-args"><top margin></kbd>
545 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
549 T_MARGIN establishes the distance from the top of the printer
550 sheet at which you want your type to start. It requires a unit of
551 measure, and decimal fractions are allowed. To set a top margin of
552 2-1/2 centimetres, you’d enter
554 <span class="pre-in-pp">
557 T_MARGIN calculates the vertical position of the first line of type
558 on a page by treating the top edge of the printer sheet as a
559 <a href="definitions.html#baseline">baseline</a>. Therefore,
561 <span class="pre-in-pp">
564 puts the baseline of the first line of type 1-1/2 inches beneath the
568 <div class="box-tip">
570 <span class="note">Note:</span> T_MARGIN means something slightly
571 different when you’re using the
572 <a href="docprocessing.html#docprocessing">document processing macros</a>.
574 <a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>
579 <div class="box-important">
581 <span class="important">IMPORTANT:</span> T_MARGIN does two
582 things: it establishes the top margin for pages that come after
583 it <i>and</i> it moves to that position on the current page.
584 Therefore, T_MARGIN should only be used at the top of a file (prior
585 to entering text) or after
586 <a href="#newpage">NEWPAGE</a>,
589 <span class="pre-in-pp" style="margin-bottom: -1em;">
599 <div class="macro-id-overline">
600 <h3 id="b-margin" class="macro-id">Bottom margin</h3>
603 <div class="box-macro-args">
604 Macro: <b>B_MARGIN</b> <kbd class="macro-args"><bottom margin></kbd>
607 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
611 B_MARGIN sets a nominal position at the bottom of the page beyond
612 which you don’t want your type to go. When the bottom margin
613 is reached, mom starts a new page. B_MARGIN requires a unit of
614 measure. Decimal fractions are allowed. To set a nominal bottom
615 margin of 3/4 inch, enter
617 <span class="pre-in-pp">
620 Obviously, if you haven’t spaced the type on your pages so
621 that the last lines fall perfectly at the bottom margin, the margin
622 will vary from page to page. Usually, but not always, the last line
623 of type that fits on a page before the bottom margin causes mom to
628 Occasionally, owing to a peculiarity in groff, an extra line will
629 fall below the nominal bottom margin. If you’re using the
630 <a href="docprocessing.html#docprocessing">document processing macros</a>,
631 this is unlikely to happen; the document processing macros are very
632 hard-nosed about aligning bottom margins.
635 <div class="box-tip">
637 <span class="note">Note:</span> The meaning of B_MARGIN is slightly
638 different when you’re using the document processing macros.
640 <a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>
647 <div class="macro-id-overline">
648 <h3 id="page" class="macro-id">Page</h3>
651 <div class="box-macro-args" style="overflow: auto;">
652 Macro: <b>PAGE</b> <kbd class="macro-args"><width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ]</kbd>
655 • All arguments require a <a href="definitions.html#unitofmeasure">unit of measure</a>
658 <div class="box-important">
660 <span class="important">IMPORTANT:</span> If you’re using the
661 <a href="docprocessing.html#docprocessing">document processing macros</a>,
663 <a href="docprocessing.html#printstyle">PRINTSTYLE</a>.
664 Otherwise, it should go at the top of a document, prior to any
665 text. And remember, when you’re using the document processing
666 macros, top margin and bottom margin mean something slightly
667 different than when you’re using just the typesetting macros
669 <a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>).
674 PAGE lets you establish paper dimensions and page margins with a
675 single macro. The only required argument is page width. The rest
676 are optional, but they must appear in order and you can’t
677 skip over any. <kbd><lm>, <rm>, <tm></kbd> and
678 <kbd><bm></kbd> refer to the left, right, top and bottom
679 margins respectively.
683 Assuming your page dimensions are 11 inches by 17 inches, and
684 that’s all you want to set, enter
686 <span class="pre-in-pp">
689 If you want to set the left margin as well, say, at 1 inch, PAGE
690 would look like this:
692 <span class="pre-in-pp">
695 Now suppose you also want to set the top margin, say, at 1-1/2
696 inches. <tm> comes after <rm> in the optional arguments,
697 but you can’t skip over any arguments, therefore to set the
698 top margin, you must also give a right margin. The PAGE macro would
701 <span class="pre-in-pp">
702 .PAGE 11i 17i 1i 1i 1.5i
704 required right---+ +---top margin
707 Clearly, PAGE is best used when you want a convenient way to tell
708 mom just the dimensions of your printer sheet (width and length), or
709 when you want to tell her everything about the page (dimensions and
710 all the margins), for example
712 <span class="pre-in-pp">
713 .PAGE 8.5i 11i 45p 45p 45p 45p
715 This sets up an 8-1/2 by 11 inch page with margins of 45 points
716 (5/8-inch) all around.
720 Additionally, if you invoke <kbd>.PAGE</kbd> with a top margin
721 argument, any macros you invoke after <kbd>.PAGE</kbd> will almost
723 <a href="definitions.html#baseline">baseline</a>
724 of the first line of text down by one linespace. To compensate, do
726 <span class="pre-in-pp">
729 immediately before entering any text, or, if it’s feasible,
730 make PAGE the last macro you invoke prior to entering text.
735 <a href="#page-setup-note">Important note on page dimensions and papersize</a>
736 for information on ensuring groff respects your PAGE dimensions and
742 <div class="macro-id-overline">
743 <h3 id="newpage" class="macro-id">Start a new page</h3>
746 <div class="box-macro-args">
747 Macro: <b>NEWPAGE</b>
751 Whenever you want to start a new page, use NEWPAGE, by itself with
752 no argument. Mom will finish up processing the current page and move
753 you to the top of a new one (subject to the top margin set with
754 <a href="#t-margin">T_MARGIN</a>).
757 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
759 <!-- ==================================================================== -->
761 <h2 id="basic-params-intro" class="macro-group">Basic typesetting parameters</h2>
764 The basic typesetting parameter macros deal with fundamental
765 requirements for setting type: family, font, point size, leading and
770 If you’re using the typesetting macros only, the arguments
771 passed to the basic parameter macros remain in effect until
772 you change them. The document processing macros handle things
774 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
778 <div id="index-basic" class="macro-list-container">
779 <h3 class="macro-list">Basic parameter macros</h3>
780 <ul class="macro-list">
781 <li><a href="#family">FAMILY</a> – type family</li>
782 <li><a href="#font">FT</a> – font</li>
783 <li><a href="#fallback-font">FALLBACK_FONT</a> – for invalid fonts</li>
784 <li><a href="#ps">PT_SIZE</a> – point size of type</li>
785 <li><a href="#leading">LS</a> – line spacing/leading</li>
786 <li><a href="#autolead">AUTOLEAD</a> – automatic line spacing</li>
787 <li><a href="#linelength">LL</a> – line length</li>
793 <div class="macro-id-overline">
794 <h3 id="family" class="macro-id">Type family</h3>
797 <div class="box-macro-args">
798 Macro: <b>FAMILY</b> <kbd class="macro-args"><family></kbd>
801 <i>Alias:</i> <b>FAM</b>
805 FAMILY takes one argument: the name of the
806 <a href="definitions.html#family">family</a>
807 you want. Groff comes with a small set of basic families, each
808 identified by a 1-, 2-or 3-letter mnemonic. The standard families
811 <span class="pre-in-pp">
815 HN = Helvetica Narrow
816 N = New Century Schoolbook
821 The argument you pass to FAMILY is the identifier at left, above.
822 For example, if you want Helvetica, enter
824 <span class="pre-in-pp">
829 <div class="box-tip" style="margin-top: -1em;">
831 <span class="note">Note:</span> The font macro
832 (<a href="#font">FT</a>)
833 lets you specify both the type family and the desired font with
834 a single macro. While this saves a few keystrokes, I recommend
835 using FAMILY for family, and FT for font, except where doing
836 so is genuinely inconvenient. <kbd>ZCM</kbd>, for example,
837 only exists in one style: Italic (<kbd>I</kbd>). Therefore,
838 <kbd>.FT ZCMI</kbd> makes more sense than setting the family to
839 <kbd>ZCM</kbd>, then setting the font to <kbd>I</kbd>.
842 <p id="fam-add-note" class="tip-bottom">
843 <span class="additional-note">Additional note:</span>
844 If you are running a version of groff lower than 1.19.2, you must
845 follow all FAMILY requests with a FT request, otherwise mom will set
846 all type up to the next FT request in the
847 <a href="#fallback-font">fallback font</a>.
851 <p style="margin-top: -.5em;">
852 If you are running a version of groff greater than or
853 equal to 1.19.2, when you invoke the FAMILY macro, mom
854 “remembers” the font style (Roman, Italic, etc)
855 currently in use (if the font style exists in the new family) and
856 will continue to use the same font style in the new family. For
859 <span class="pre-in-pp">
860 .FAMILY BM \" Bookman family
861 .FT I \" Medium Italic
862 <some text> \" Bookman Medium Italic
863 .FAMILY H \" Helvetica family
864 <more text> \" Helvetica Medium Italic
866 However, if the font style does not exist in the new family, mom
867 will set all subsequent type in the
868 <a href="#fallback-font">fallback font</a>
869 (by default, Courier Medium Roman) until she encounters a
870 <a href="#font">.FT</a>
871 request that’s valid for the family. For example, assuming
872 you don’t have the font “Medium Condensed Roman”
873 (mom extension “CD”) in the Helvetica family:
875 <span class="pre-in-pp">
876 .FAMILY UN \" Univers family
877 .FT CD \" Medium Condensed
878 <some text> \" Univers Medium Condensed
879 .FAMILY H \" Helvetica family
880 <more text> \" Courier Medium Roman!
882 In the above example, you must follow
883 <kbd>.FAMILY H</kbd> with a FT request
884 that’s valid for Helvetica.
888 Please see the Appendices,
889 <a href="appendices.html#fonts">Adding fonts to groff</a>,
890 for information on adding fonts and families to groff, as well as
891 to see a list of the extensions mom provides to groff’s basic
892 <b>R</b>, <b>I</b>, <b>B</b>, <b>BI</b> styles.
895 <div class="box-tip">
897 <span class="tip">Suggestion:</span> When adding
898 families to groff, I recommend following the established standard
899 for the naming families and fonts. For example, if you add the
900 Garamond family, name the font files
902 <span class="pre-in-pp">
908 GARAMOND then becomes a valid family name you can pass to FAMILY.
909 (You could, of course, shorten GARAMOND to just G, or GD.) <b>R</b>,
910 <b>I</b>, <b>B</b>, and <b>BI</b> after GARAMOND are the roman,
911 italic, bold and bold-italic fonts respectively.
917 <div class="macro-id-overline">
918 <h3 id="font" class="macro-id">FT</h3>
921 <div class="box-macro-args">
922 Macro: <b>FT</b> <kbd class="macro-args">R | I | B | BI | <any other valid font style></kbd>
925 <i>Alias:</i> <b>FONT</b>
929 By default, groff permits FT to take one of four possible arguments
930 specifying the desired font:
932 <span class="pre-in-pp">
939 <a href="definitions.html#family">family</a>
940 is Helvetica, entering
942 <span class="pre-in-pp">
945 will give you the Helvetica bold
946 <a href="definitions.html#font">font</a>.
947 If your family were Palatino, you’d get the Palatino bold
952 Mom considerably extends the range of arguments you can pass to FT,
953 making it more convenient to add and access fonts of differing
954 <a href="definitions.html#weight">weights</a>
956 <a href="definitions.html#shape">shapes</a>
957 within the same family. Have a look
958 <a href="appendices.html#style-extensions">here</a>
959 for a list of the weight/style arguments mom allows. Be aware,
960 though, that you must have the fonts, correctly installed and named,
961 in order to use the arguments. (See
962 <a href="appendices.html#fonts">Adding fonts to groff</a>
963 for instructions and information.) Please also read the
964 <a href="#fam-add-note">ADDITIONAL NOTE</a>
965 found in the description of the FAMILY macro.
969 How mom reacts to an invalid argument to FT depends on which version
970 of groff you’re using. If your groff version is greater than
971 or equal to 1.19.2, mom will issue a warning and, depending on how
972 you’ve set up the
973 <a href="#fallback-font">fallback font</a>,
974 either continue processing using the fallback font, or abort
975 (allowing you to correct the problem). If your groff version is
976 less than 1.19.2, mom will silently continue processing, using
977 either the fallback font or the font that was in effect prior to the
982 FT will also accept, as an argument, a full family+font name. For
985 <span class="pre-in-pp">
988 will set subsequent type in Helvetica Bold. However, I strongly
989 recommend keeping family and font separate except where doing so is
990 genuinely inconvenient.
994 For inline control of fonts, see
995 <a href="inlines.html#inline-fonts-mom">Inline Escapes, font control</a>.
999 <!-- -FALLBACK_FONT- -->
1001 <div class="macro-id-overline">
1002 <h3 id="fallback-font" class="macro-id">Fallback font</h3>
1005 <div class="box-macro-args">
1006 Macro: <b>FALLBACK_FONT</b> <kbd class="macro-args"><fallback font> [ ABORT | WARN ]</kbd>
1010 In the event that you pass an invalid argument to
1011 <a href="#font">.FAMILY</a>
1012 (ie a non-existent family), mom, by default, uses the fallback
1013 font, Courier Medium Roman (CR), in order to continue processing
1018 If you’d prefer another fallback font, pass FALLBACK_FONT the
1019 full family+font name of the font you’d like. For example, if
1020 you’d rather the fallback font were Times Roman Medium Roman,
1022 <span class="pre-in-pp">
1029 Mom issues a warning whenever a font style set with
1030 <a href="#font">FT</a>
1031 does not exist, either because you haven’t registered the
1033 <a href="appendices.html#register-style">here</a>
1034 for instructions on registering styles), or because the font style
1035 does not exist in the current family set with
1036 <a href="#family">FAMILY</a>.
1037 By default, mom then aborts, which allows you to correct the
1042 If you’d prefer that mom not abort on non-existent fonts,
1043 but rather continue processing using a fallback font, you can pass
1044 FALLBACK_FONT the argument <kbd>WARN</kbd>, either by itself, or in
1045 conjunction with your chosen fallback font.
1049 Some examples of invoking FALLBACK_FONT:
1052 <ul class="no-enumerator" style="margin-left: -1em;">
1053 <li style="margin-top: -.5em;">
1054 <kbd>.FALLBACK_FONT WARN</kbd>
1056 mom will issue a warning whenever you try to access a non-existent
1057 font but will continue processing your file with the default
1058 fallback font, Courier Medium Roman.
1061 <li style="margin-top: .5em;">
1062 <kbd>.FALLBACK_FONT TR WARN</kbd>
1064 mom will issue a warning whenever you try to access a non-existent
1065 font but will continue processing your file with a fallback font of
1066 Times Roman Medium Roman; additionally, “TR” will be
1067 the fallback font whenever you try to access a family that does not
1070 <li style="margin-top: .5em;">
1071 <kbd>.FALLBACK_FONT TR ABORT</kbd>
1073 mom will abort whenever you try to access a non-existent font, and
1074 will use the fallback font “TR” whenever you try to
1075 access a family that does not exist.
1080 If, for some reason, you want to revert to ABORT, just enter
1081 <kbd>.FALLBACK_FONT ABORT</kbd> and mom will once again abort
1087 <div class="macro-id-overline">
1088 <h3 id="ps" class="macro-id">Point size of type</h3>
1091 <div class="box-macro-args">
1092 Macro: <b>PT_SIZE</b> <kbd class="macro-args"><size of type in points></kbd>
1094 <p class="requires">
1095 • Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
1099 PT_SIZE (Point Size) takes one argument: the size of type in points.
1100 Unlike most other macros that establish the size or measure of
1101 something, PT_SIZE does not require that you supply a unit of
1102 measure since it’s a near universal convention that type size
1103 is measured in points. Therefore, to change the type size to, say,
1106 <span class="pre-in-pp">
1109 Point sizes may be fractional (eg 10.25 or 12.5).
1113 If you invoke PT_SIZE without an argument, it reverts to its former
1114 value. For example, if your point size is 10 and you change it to
1115 12 with <kbd>.PT_SIZE 12</kbd>, entering <kbd>.PT_SIZE</kbd>
1116 (i.e. without an argument) resets the point size to 10.
1120 You can prepend a plus or a minus sign to the argument to PT_SIZE,
1121 in which case the point size will be changed by + or - the original
1122 value. For example, if the point size is 12, and you want 14, you
1125 <span class="pre-in-pp">
1128 then later reset it to 12 with
1129 <span class="pre-in-pp">
1132 or, more simply, just
1133 <span class="pre-in-pp">
1136 The size of type can also be changed inline. See
1137 <a href="inlines.html#inline-size-mom">Inline Escapes, changing point size</a>.
1140 <div class="box-tip">
1142 <span class="note">Note:</span> It is unfortunate that the
1143 <kbd>pic</kbd> preprocessor has already taken the name,
1144 <kbd>PS</kbd>, and thus mom’s macro for setting point
1145 sizes can’t use it. However, if you aren’t using
1146 <kbd>pic</kbd>, you might want to
1147 <a href="goodies.html#alias">alias</a>
1148 PT_SIZE as PS, since there’d be no conflict. For example
1150 <span class="pre-in-pp">
1153 would allow you to set point sizes with <kbd>.PS</kbd>.
1159 <div class="macro-id-overline">
1160 <h3 id="leading" class="macro-id">Line spacing/leading</h3>
1163 <div class="box-macro-args">
1164 Macro: <b>LS</b> <kbd class="macro-args"><distance between lines></kbd>
1166 <p class="requires">
1167 • Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
1171 LS (Line Space) takes one argument: the distance you want, typically
1172 in points, from baseline to baseline of type. The argument may be
1173 fractional (eg 12.25 or 14.5). Like PT_SIZE, LS does not require
1174 a unit of measure, since
1175 <a href="definitions.html#leading">leading</a>
1176 is most often given in points. Therefore, to set the linespace to
1177 14 points, you would enter
1179 <span class="pre-in-pp">
1182 However, if you wish, you may specify a unit of measure by appending
1183 it directly to the argument passed to LS. For example, if you want
1184 a linespace of 1/4 of an inch, enter
1186 <span class="pre-in-pp">
1189 You can prepend a plus or a minus sign to the argument to LS, in
1190 which case the line spacing will be changed by + or - the original
1191 value. For example, if the line spacing is 14 points, and you want
1192 17 points, you can do
1194 <span class="pre-in-pp">
1197 then later reset it to 14 points with
1199 <span class="pre-in-pp">
1204 <div class="box-tip">
1206 <span class="experts">Experts:</span> LS should not be confused with
1207 the groff primitive <kbd>.ls</kbd>. LS acts like
1208 <kbd>.vs</kbd>. mom does not provide a macro analogous to
1215 <div class="macro-id-overline">
1216 <h3 id="autolead" class="macro-id">Automatic line spacing</h3>
1219 <div class="box-macro-args">
1220 Macro: <b>AUTOLEAD</b> <kbd class="macro-args"><amount of automatic leading> [FACTOR]</kbd>
1222 <p class="requires">
1223 • Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
1226 <a href="docprocessing.html#autolead">here</a>
1227 for information on using
1228 <span style="font-style: normal">AUTOLEAD</span> during document
1233 Without the <kbd>FACTOR</kbd> argument, AUTOLEAD calculates the
1234 linespace for you by adding its argument to the current point size
1235 of type. All subsequent
1236 <a href="#ps">PT_SIZE</a>
1237 requests automatically update the linespacing by the autolead amount.
1241 Used in this way, AUTOLEAD does not require a unit of measure;
1242 points is assumed. However, you may use an alternate unit of
1243 measure by appending it to the argument. The argument may be a
1244 decimal fraction (eg .5 or 2.75).
1248 As an example, if your current point size of type is 12, entering
1250 <span class="pre-in-pp">
1253 changes the linespace to 14 points, regardless any linespacing
1254 already in effect. From here on, every change to the size of type
1256 <a href="definitions.html#inlines">inline</a>)
1257 changes the linespace as well. If you decrease the type size to 9
1258 points, the leading decreases to 11 points. If you increase the
1259 type size to 16 points, the leading increases to 18 points.
1263 Automatic updating of the linespacing continues until you enter a
1264 “manual” line space value with
1265 <a href="#leading">LS</a>.
1268 <div class="box-tip">
1270 <span class="experts">Experts:</span> Please note that the groff
1271 <a href="definitions.html#primitives">primitives</a>,
1272 <kbd>.vs</kbd> and <kbd>.ps</kbd>, are unaffected by, and have no
1273 effect, on AUTOLEAD.
1278 If you give AUTOLEAD the optional FACTOR argument, AUTOLEAD
1279 calculates the line space as a factor of the
1280 <a href="definitions.html#numericargument">numeric argument</a>
1281 you gave AUTOLEAD. For example, if your point size is 12,
1283 <span class="pre-in-pp">
1284 .AUTOLEAD 1.125 FACTOR
1286 sets the leading at 13.5 points. If you change the point size to
1287 14, the leading automatically changes to 15.75 (14 x 1.125).
1290 <div class="box-tip">
1292 <span class="note">Note:</span> There’s no need to prepend a
1295 to AUTOLEAD’s argument, although you may do so if you wish.
1301 <div class="macro-id-overline">
1302 <h3 id="linelength" class="macro-id">Line length</h3>
1305 <div class="box-macro-args">
1306 Macro: <b>LL</b> <kbd class="macro-args"><line length></kbd>
1308 <p class="requires">
1309 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
1313 LL (Line Length) takes one argument: the distance from the left
1314 margin of the page to the maximum allowable point on the right at
1315 which groff should place type. The line length, in other words, as
1320 LL requires a unit of measure. Therefore, to set the line length to
1321 39 picas, you would enter
1323 <span class="pre-in-pp">
1326 As with other macros that require a unit of measure, the argument to
1327 LL may be fractional. For example,
1329 <span class="pre-in-pp">
1332 sets the line length to 4-1/2 inches.
1336 Additionally, you may express a new line length relative to the
1337 current line length by prepending a plus or minus sign to the
1338 argument. Thus, if you wanted to increase the line length by 3
1339 <a href="definitions.html#picaspoints">points</a>, you could
1342 <span class="pre-in-pp">
1345 This is especially handy when you want to “hang”
1346 punctuation outside the right margin since you can pass
1348 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
1349 escape as the argument to LL, like this:
1351 <span class="pre=in-pp">
1354 The above example increases the current line length by the width of
1355 a period. Notice that you must append the
1356 <a href="definitions.html#unitofmeasure">unit of measure</a>,
1357 <b>u</b>, to the escape since LL requires a unit of measure.
1360 <div class="box-tip">
1362 <span class="note">Note:</span> The right margin macro,
1363 <a href="#r-margin">(R_MARGIN)</a>,
1364 can also be used to set line length.
1368 <div class="rule-short"><hr/></div>
1370 <!-- ==================================================================== -->
1372 <h2 id="justification-intro" class="macro-group">Justification and quadding/breaking and joining lines</h2>
1375 The justification and quadding macros deal with how type aligns
1376 along the left and right margins. In a nutshell, type either aligns
1377 at the left margin, at the right margin, at both margins, or at
1378 neither margin (centred).
1382 These macros also determine whether or not
1383 <a href="definitions.html#inputline">input lines</a>
1385 <a href="definitions.html#filled">filled</a>
1390 Additionally, macros that deal with how to break
1391 <a href="definitions.html#outputline">output lines</a>
1392 are covered in this section, as is the
1393 <a href="definitions.html#inlines">inline escape</a>
1394 for joining input lines.
1398 You may encounter some words here that are unfamiliar. Refer to
1399 <a href="definitions.html#typesetting">Typesetting terms</a>
1401 <a href="definitions.html#groff">Groff terms</a>
1405 <div id="index-justification" class="macro-list-container">
1406 <h3 class="macro-list">Justification and quadding/breaking and joining lines macros</h3>
1407 <ul class="macro-list">
1409 <ul style="list-style-type: none; margin-left: -1em;">
1410 <li><a href="#justify">JUSTIFY</a> – set lines justified</li>
1411 <li><a href="#quad">QUAD</a> – set filled lines flush left, right or centred</li>
1414 <ul style="list-style-type: none; margin-left: -1em;">
1415 <li><a href="#lrc">LEFT</a> – set non-filled lines flush left</li>
1416 <li><a href="#lrc">RIGHT</a> – set non-filled lines flush right</li>
1417 <li><a href="#lrc">CENTER</a> – set non-filled lines centred</li>
1420 <ul style="list-style-type: none; margin-left: -1em;">
1421 <li><a href="#br">BR</a> – manually break an output line</li>
1422 <li><a href="#el">EL</a> – break a line without advancing to the next output line</li>
1423 <li><a href="#space">SPACE</a> – break a line and add space before the next output line</li>
1424 <li><a href="#spread">SPREAD</a> – break and force-justify an output line</li>
1426 <li>Joining input lines in <a href="definitions.html#filled">nofill mode</a>
1427 <ul style="list-style-type: none; margin-left: -1em;">
1428 <li><a href="#join">\c</a> inline escape</li>
1435 <div class="macro-id-overline">
1436 <h3 id="justify" class="macro-id">Justify lines</h3>
1439 <div class="box-macro-args">
1440 Macro: <b>JUSTIFY</b>
1443 <p class="requires">
1445 <a href="definitions.html#filled">fill mode</a>
1446 for a definition of the difference between “fill” and
1447 “no-fill” modes.)
1451 JUSTIFY doesn’t take an argument.
1452 <a href="definitions.html#inputline">Input lines</a>
1454 <a href="definitions.html#filled">filled</a>
1456 <a href="definitions.html#just">justified</a>
1461 To break lines and prevent them from being filled and justified, use
1463 <a href="#br">BR</a>
1469 <div class="macro-id-overline">
1470 <h3 id="quad" class="macro-id">Quad lines left, right, or centre</h3>
1473 <div class="box-macro-args">
1474 Macro: <b>QUAD</b> <kbd class="macro-args">L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY</kbd>
1477 <p class="alias" style="margin-bottom: 0;">
1478 <i>Alias:</i> <b>FILL</b>
1481 <p class="requires">(See
1482 <a href="definitions.html#filled">fill mode</a>
1483 for a definition of the difference between “fill” and
1484 “no-fill” modes.)
1488 QUAD takes one argument: the direction in which lines should be
1489 <a href="definitions.html#quad">quadded</a>.
1490 <a href="definitions.html#inputline">Input lines</a>
1492 <a href="definitions.html#filled">filled</a>
1497 If <kbd>L</kbd> or <kbd>LEFT</kbd>, type is set flush along the left
1502 If <kbd>R</kbd> or <kbd>RIGHT</kbd>, type is set flush along the
1507 If <kbd>C</kbd> or <kbd>CENTER</kbd> type is set centred on the
1508 current line length.
1512 <kbd>J</kbd> and <kbd>JUSTIFY</kbd> justify text, and are
1513 included as a convenience only. Obviously, if text is
1514 justified, it isn’t quadded. <kbd>.QUAD J</kbd> and
1515 <kbd>.QUAD JUSTIFY</kbd> have exactly the same effect as
1516 <a href="#justify">JUSTIFY</a>.
1520 To break lines and prevent them from being filled, use the
1521 <a href="#br">BR</a>
1525 <!-- -LEFT, RIGHT, CENTER- -->
1527 <div class="macro-id-overline">
1528 <h3 id="lrc" class="macro-id">Set lines flush left, right or centered in no-fill mode</h3>
1531 <div class="box-macro-args">
1536 Macro: <b>CENTER</b> (alias CENTRE)
1539 <p class="requires">
1541 <a href="definitions.html#filled">no-fill mode</a>
1542 for a definition of the difference between “fill” and
1543 “no-fill” modes.)
1547 LEFT, RIGHT and CENTER let you enter text on a line for line basis
1548 without having to use the
1549 <a href="#br">BR</a>
1550 macro after each line. Consider the following:
1552 <span class="pre-in-pp">
1554 So runs my dream, but what am I?
1556 An infant crying in the night
1558 An infant crying for the light
1560 And with no language but a cry.
1563 Because text after <kbd>.QUAD LEFT</kbd> is
1564 <a href="definitions.html#filled">filled</a>,
1566 <a href="#br">BR</a>
1567 macro to prevent the lines from running together. Not only is this
1568 annoying to type, it’s awkward to read in a text editor. Much
1571 <span class="pre-in-pp">
1573 So runs my dream, but what am I?
1574 An infant crying in the night
1575 An infant crying for the light
1576 And with no language but a cry.
1580 <div class="box-important" style="margin-top: -.5em;">
1582 <span class="important">IMPORTANT:</span> Because LEFT,
1583 RIGHT and CENTER are nofill modes, groff does not always respect the
1584 current line length.
1585 <a href="definitions.html#inputline">Input lines</a>
1586 that run long may exceed it, or get broken in undesirable ways.
1587 Therefore, when using these three macros, you should preview your
1588 work to ensure that all lines fit as expected.
1594 <div class="macro-id-overline">
1595 <h3 id="br" class="macro-id">Manually break lines</h3>
1598 <div class="box-macro-args">
1604 <a href="#justify">JUSTIFY</a>
1606 <a href="#quad">QUAD</a>,
1607 BR tells mom about partial lines that you want broken (as opposed to
1608 <a href="definitions.html#filled">filled</a>).
1610 <a href="definitions.html#outputline">output line</a>
1611 that immediately precedes BR will be
1612 <a href="definitions.html#quad">quadded</a>
1613 in the direction of the current quad, or set flush left if text is
1614 <a href="definitions.html#just">justified</a>.
1618 Most of the time, you won’t need the BR macro. In fill modes,
1619 mom tries to be sensible about where breaks are needed. If the
1620 nature of a macro is such that under most circumstances you’d
1621 expect a break, mom puts it in herself. Equally, in macros where a
1622 break isn’t normally desirable, no break occurs. This means
1623 text files don’t get cluttered with annoying BR’s.
1626 <div class="box-tip">
1628 <span class="note">Note:</span> Lines of text in
1629 <a href="definitions.html#filled">nofill mode</a>
1630 never require a BR. Furthermore, in nofill mode, ALL macros cause a
1631 break. If a break is not desired, use the
1632 <a href="#join"><kbd>\c</kbd></a>
1633 <a href="definitions.html#inlines">inline escape</a>.
1636 <p class="tip-bottom" style="margin-top: -1em">
1637 <span class="experts">Experts:</span> BR is an alias for
1638 <kbd>.br</kbd>. You can use either, or mix
1639 ’n’ match with impunity.
1645 <div class="macro-id-overline">
1646 <h3 id="el" class="macro-id">Manually break a line without advancing on the page</h3>
1649 <div class="box-macro-args">
1653 <p class="requires">
1655 <span style="font-style: normal;">
1656 (<a href="#left">LEFT</a>,
1657 <a href="#right">RIGHT</a>,
1658 <a href="#center">CENTER</a>)
1660 you must terminate the line input preceding
1661 <span style="font-style: normal;">EL</span>
1663 <span style="font-style: normal;">
1664 <kbd>\c</kbd> inline escape.
1667 <span style="font-style: normal;">
1668 <a href="#el-notes">NOTES</a>,
1673 <p style="margin-top: -.5em">
1674 <i><b>Suggestion:</b> If you find remembering whether to put in the</i>
1676 <i>bothersome, you may prefer to use the</i>
1677 <a href="definitions.html#inlines">inline escape</a>
1678 <i>alternative to</i> EL,
1679 <a href="inlines.html#b"><kbd>\*[B]</kbd></a>,
1680 <i>which works consistently regardless of the fill mode.
1681 </i>EL <i>does not work after the</i>
1682 <a href="goodies.html#pad">PAD</a>
1684 <a href="goodies.html#nobreak"><kbd>.PAD NOBREAK</kbd></a>
1685 <i>for the way around this.</i>
1689 EL ("<span style="text-decoration: underline;">E</span>nd <span style="text-decoration: underline;">L</span>ine")
1690 is conceptually equivalent to the notion of a carriage return with
1691 no linefeed. Its function is simple: it breaks a line without
1692 advancing on the page. As an example of where you might use it,
1693 imagine that you’re working from marked-up copy. The markup
1694 indicates 24 points of space between two given lines, but the
1695 prevailing line spacing is 12.5 points. You may find it more
1696 convenient to break the first line with EL and instruct mom to
1697 advance 24 points to the next line instead of calculating the lead
1698 that needs to be added to 12.5 to get 24. To demonstrate:
1700 <span class="pre-in-pp">
1706 The next line of text.
1708 may be more intuitive than
1710 <span class="pre-in-pp">
1715 The next line of text.
1717 The first example has the further advantage that should you wish to
1718 change the prevailing line space but keep the 24 points lead, you
1719 don’t have to recalculate the extra space.
1723 ALD in the above examples stands for
1724 “<span style="text-decoration: underline;">A</span>dvance
1725 <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>”,
1726 which is covered in the section
1727 <a href="#aldrld-intro">Vertical movements</a>.
1732 <div class="macro-id-overline">
1733 <h3 id="space" class="macro-id">Break lines and add space between</h3>
1736 <div class="box-macro-args">
1737 Macro: <b>SPACE</b> <kbd class="macro-args"><space to add between lines></kbd>
1740 <i>Alias:</i> <b>SP</b>
1744 SPACE breaks a line, just like
1745 <a href="#br">BR</a>,
1746 then adds space after the line. With no argument, it adds an extra
1747 line space of a value equal to the current
1748 <a href="definitions.html#leading">leading</a>.
1749 If you pass it a numeric argument without supplying a
1750 <a href="definitions.html#unitofmeasure">unit of measure</a>,
1751 it advances that number of extra line spaces. For example:
1753 <span class="pre-in-pp">
1756 breaks the line then adds an extra linespace, whereas
1758 <span class="pre-in-pp">
1761 breaks the line and adds two extra linespaces.
1765 If you supply a unit of measure, SPACE breaks the line then advances
1766 one linespace (at the current
1767 <a href="definitions.html#leading">leading</a>)
1768 PLUS the specified amount of extra space given to SPACE, as in
1770 <span class="pre-in-pp">
1773 which breaks the line and advances one full linespace plus six
1777 <div class="box-tip">
1779 <span class="tip">Tip:</span> SPACE and
1780 <a href="#ald">ALD</a>
1781 can be used interchangeably (<kbd>.SPACE 6p</kbd> and
1782 <kbd>.ALD 6p</kbd> are equivalent). However, ALD without an
1783 argument does nothing, whereas SPACE without an argument adds an
1784 extra line space. I recommend using SPACE when you want an extra
1785 line space (or multiple thereof), and ALD whenever you want some
1786 other value of space after a line.
1789 <p class="tip-bottom">
1790 <span class="experts">Experts:</span> SPACE is an alias of
1791 <kbd>.sp</kbd>. You can use either, or mix ’n’ match
1798 <div class="macro-id-overline">
1799 <h3 id="spread" class="macro-id">Break and force justify (spread) lines</h3>
1802 <div class="box-macro-args">
1803 Macro: <b>SPREAD</b>
1807 Sometimes, you need to break a line of
1808 <a href="definitions.html#just">justified</a>
1809 text and have it come out fully justified, not
1810 <a href="definitions.html#quad">quadded</a>
1811 left the way it would be with the
1812 <a href="#br">BR</a>
1813 macro. An example of where you’d do this would be when you
1814 want to prevent a word at the end of a line from being hyphenated
1815 (say, a proper name). SPREAD is the macro that lets you break the
1816 line and have it came out fully justified.
1819 <div class="box-tip">
1821 <span class="experts">Experts:</span> SPREAD is an alias for
1822 <kbd>.brp</kbd> You can use either, or mix ’n’ match
1829 <div class="macro-id-overline">
1830 <h3 id="join" class="macro-id">Join input lines</h3>
1833 <div class="box-macro-args">
1834 Inline: <kbd class="macro-args">\c</kbd>
1838 Sometimes, especially when in one of the
1839 <a href="definitions.html#filled">nofill modes</a>,
1840 a macro will cause a break where you don’t want one. In order
1841 to prevent this from happening (in other words, to join
1842 <a href="definitions.html#inputline">input lines</a>
1843 together, forming one
1844 <a href="definitions.html#outputline">output line</a>),
1846 <a href="definitions.html#inlines">inline escape</a>
1847 <kbd>\c</kbd> at the end of each input line to be
1848 joined to another, like this:
1850 <span class="pre-in-pp">
1854 Some lines of text to be \c
1862 Upon output, the lines will be joined together to read
1864 <span class="pre-in-pp">
1865 Some lines of text to be joined together.
1867 with the word “joined” in Helvetica bold. Note the
1868 spaces before <kbd>\c</kbd>. Without them, the last three words of
1869 the output line would read
1871 <span class="pre-in-pp">
1874 Please also note that had the example been in one of the
1875 <a href="definitions.html#filled">fill modes</a>,
1876 there’d have been no need for the <kbd>\c</kbd>.
1879 <div class="box-tip">
1881 <b>Addendum:</b> The example, above, is designed to demonstrate the
1882 use of <kbd>\c</kbd>. An easier and more intuitive way
1883 to accomplish the family/font change in the example would be with
1885 <a href="definitions.html#inlines">inline escape</a>,
1886 <kbd><a href="inlines.html#inline-fonts-groff">\f</a></kbd>,
1889 <span class="pre-in-pp" style="padding-bottom: 0px;">
1890 Some lines of text to be \f[HB]joined\*[PREV] together.
1895 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
1897 <!-- ==================================================================== -->
1899 <h2 id="refinements-intro" class="macro-group">Typographic refinements</h2>
1902 The macros in this section help you tweak groff’s behaviour,
1903 ensuring that your documents look typographically professional.
1906 <div id="index-refinements" class="macro-list-container">
1907 <h3 class="macro-list">Typographic refinements macros</h3>
1909 <ul class="macro-list">
1910 <li>Word and sentence spacing
1911 <ul style="list-style-type: none; margin-left: -1em;">
1912 <li><a href="#ws">WS</a> – word spacing</li>
1913 <li><a href="#ss">SS</a> – sentence space</li>
1915 <li>Letter spacing (track kerning)
1916 <ul style="list-style-type: none; margin-left: -1em;">
1917 <li><a href="#rw">RW</a> – reduce whitespace</li>
1918 <li><a href="#ew">EW</a> – expand whitespace</li>
1919 <li><a href="#br-at-line-kern">BR_AT_LINE_KERN</a></li>
1922 <ul style="list-style-type: none; margin-left: -1em;">
1923 <li><a href="#hy">HY</a> – turn auto hyphenation on/off, or set specific hyphenation parameters</li>
1924 <li><a href="#hy-set">HY_SET</a> – set all hyphenation parameters</li>
1926 <li>Automatic kerning and ligatures
1927 <ul style="list-style-type: none; margin-left: -1em;">
1928 <li><a href="#kern">KERN</a> – turn automatic pairwise kerning on or off</li>
1929 <li><a href="#ligatures">LIGATURES</a> – turn automatic generation of ligatures on or off</li>
1936 <div class="macro-id-overline">
1937 <h3 id="ws" class="macro-id">Word spacing</h3>
1940 <div class="box-macro-args">
1941 Macro: <b>WS</b> <kbd class="macro-args"><+|-wordspace> | DEFAULT</kbd>
1945 WS (Word Space) increases or decreases the amount of space between
1947 <a href="definitions.html#filled">nofill modes</a>,
1949 <a href="#quad">QUAD</a>
1950 is in effect, the space between words is fixed. Therefore, if you
1951 change the word spacing with WS, the change applies uniformly to the
1952 space between every word on every line. However, when text is
1953 <a href="definitions.html#just">justified</a>,
1954 the space between words varies from line to line (in order to
1955 justify the text). Consequently, the change you make with WS
1956 represents the minimum (and ideal) space groff will try to put
1957 between words before deciding whether to hyphenate a final word or
1958 to stretch the word spacing.
1962 Word space is relative to point size. Generally, in/decreasing the
1963 word space by a value of 1 or 2 produces a difference that in many
1964 cases is scarcely visible; in/decreasing by a value between 3 and 5
1965 produces a subtle but noticeable difference; and in/decreasing by a
1966 value greater than 6 is almost always apparent. You should preview
1967 your work to assess the effect of WS.
1971 WS takes as its argument a whole number preceded by a plus or minus
1972 sign. Therefore, to decrease the word space slightly, you might
1975 <span class="pre-in-pp">
1978 To increase it by a noticeable amount, you might enter
1980 <span class="pre-in-pp">
1983 You can reset the word spacing to its previous value by switching
1984 the plus or minus sign, like this:
1986 <span class="pre-in-pp">
1991 The <kbd>.WS -2</kbd> undoes the effect of
1992 <kbd>.WS +2</kbd>. You can also reset WS to its groff default
1995 <span class="pre-in-pp">
1998 This can be particularly useful if you’ve been playing around
1999 with plus and minus values, and can’t remember by how much to
2000 in/decrease the word space to get it back to normal.
2005 <div class="macro-id-overline">
2006 <h3 id="ss" class="macro-id">Sentence space</h3>
2009 <div class="box-macro-args">
2010 Macro: <b>SS</b> <kbd class="macro-args"><+sentence space> | 0 | DEFAULT</kbd>
2014 SS (Sentence Space) tells groff how to treat double spaces it
2015 encounters between sentences in
2016 <a href="definitions.html#inputline">input lines</a>.
2017 If you use SS, input sentences with two spaces after them <i>and</i>
2018 input sentences that fall at the end of input lines all receive a
2019 normal word space plus an additional amount of space whose size is
2020 determined by the + value passed as an argument to SS. Thus,
2022 <span class="pre-in-pp">
2025 means that input sentences with two spaces after them receive a
2026 normal word space PLUS the +2 value passed to SS.
2031 <a href="#ws">WS</a>,
2032 increasing the sentence space by a value of 1 or 2 produces a
2033 difference that in many cases is scarcely visible; increasing by a
2034 value of 5 or so produces a subtle but noticeable difference (ie
2035 the space between double-spaced input sentences will be slightly but
2036 visibly greater than the space between words); and increasing by a
2037 value greater than 10 is always apparent. You should preview your
2038 work to assess the effect of SS.
2042 There’s an additional argument you can pass SS: the number
2043 zero (without the + sign). It’s the argument you’ll
2044 use most often. Typeset copy should never have two spaces between
2045 sentences, and the "zero" argument tells groff to give the extra
2046 spaces no space at all (effectively removing them). Therefore, if
2047 you double-space your sentences (as you should when writing in a
2048 text editor), get in the habit of putting
2050 <span class="pre-in-pp">
2053 at the top of your files.
2057 If you do use SS for something other than ensuring that you
2058 don’t get unwanted sentence spaces in output copy, you can set
2059 or reset the sentence space to the groff default (the same width
2060 as a word space, ie double-spaced input sentences will appear
2061 double-spaced on output as well) with
2063 <span class="pre-in-pp">
2066 If you’re using the
2067 <a href="docprocessing.html">document processing macros</a>
2069 <a href="docprocessing.html#printstyle">PRINTSTYLE</a>
2070 is <kbd>TYPEWRITE</kbd>, <kbd>.SS DEFAULT</kbd> is the
2071 default, because you do want double spaces between sentences in copy
2072 that imitates the look of a typewritten document.
2075 <div class="box-important">
2077 <span class="important">IMPORTANT:</span> SS with an argument other
2078 than <kbd>0</kbd> (zero) should only be used if you’re of
2079 the old (and wise) school of typists that puts two spaces between
2080 sentences. If you ignore this advice and use SS when you habitually
2081 put only one space between sentences, you risk producing output
2082 where the space between sentences is not equal.
2088 <div class="macro-id-overline">
2089 <h3 id="hy" class="macro-id">Automatic hyphenation control</h3>
2092 <div class="box-macro-args">
2093 Macro: <b>HY</b> <kbd class="macro-args">LINES <max. number of consecutive hyphenated lines></kbd>
2095 Macro: <b>HY</b> <kbd class="macro-args">MARGIN <size of hyphenation margin></kbd>
2097 Macro: <b>HY</b> <kbd class="macro-args">SPACE <extra interword spacing to prevent hyphenation></kbd>
2099 Macro: <b>HY</b> <kbd class="macro-args">DEFAULT</kbd>
2101 Macro: <b>HY</b> <kbd class="macro-args">toggle</kbd>
2104 <i>Aliases:</i> <b>HYPHENATE, HYPHENATION</b>
2108 HY, as you can see, can be invoked with a number of arguments. In
2109 all cases, the aliases HYPHENATE or HYPHENATION can be used in place
2110 of HY. To aid in understanding the various arguments you can pass
2111 to HY, I’ve broken them down into separate sections.
2114 <h3 class="docs">1. HY</h3>
2117 HY by itself (ie with no argument) simply turns automatic
2118 hyphenation on. Any argument other than LINES, MARGIN, SPACE or
2119 DEFAULT, turns automatic hyphenation off. For example, as explained
2121 <a href="intro.html#macro-args">How to read macro arguments</a>,
2122 you could turn HY off by entering
2124 <span class="pre-in-pp">
2128 <span class="pre-in-pp">
2132 <span class="pre-in-pp">
2135 A subsequent call to HY restores hyphenation with the parameters for
2136 LINES, MARGIN, or SPACE that were formerly in effect (see below).
2140 HY observes the following default hyphenation rules:
2142 <ul style="margin-top: -.5em; margin-left: 18px;">
2143 <li>Last lines (ie ones that will spring a trap—typically
2144 the last line on a page) will not be hyphenated.
2146 <li>The first and last two characters of a word are never
2151 <h3 class="docs numbered">2. HY LINES</h3>
2154 HY LINES sets the maximum number of consecutive hyphenated lines
2155 that will appear in output copy. 2 is a very good choice, and
2156 you’d set it with
2158 <span class="pre-in-pp">
2161 By default, when you turn automatic hyphenation on, there is no
2162 limit to the number of consecutive hyphenated lines.
2165 <div class="box-tip">
2167 <span class="note">Note:</span>
2168 <a href="definitions.html#discretionaryhyphen">Discretionary hyphens</a>
2169 count when groff is figuring out how many lines to hyphenate;
2170 explicit hyphens (ie the actual hyphen character) do not.
2174 <h3 class="docs numbered">3. HY MARGIN</h3>
2177 HY MARGIN sets the amount of room allowed at the end of a line
2178 before hyphenation is tripped (eg if there’s only 6 points
2179 left at the end of a line, groff won’t try to hyphenate the
2180 next word). HY MARGIN only applies if you’re using
2181 <a href="#quad">QUAD</a>,
2182 and is really only useful if you’re using QUAD LEFT.
2186 As an example, if you don’t want groff to hyphenate words
2187 when there’s only 18 points of space left at the end of a
2188 left-quadded line, you’d enter
2190 <span class="pre-in-pp" style="margin-bottom: -1em">
2195 <div class="box-tip">
2197 <span class="note">Note:</span> The numeric argument after HY
2199 <a href="definitions.html#unitofmeasure">unit of measure</a>.
2203 <h3 class="docs numbered">4. HY SPACE</h3>
2206 HY SPACE sets an amount of extra interword space that groff will try
2207 to put between words on a line in order to PREVENT hyphenation. HY
2208 SPACE applies only to
2209 <a href="definitions.html#just">justified lines</a>.
2210 Generally speaking, you’ll want this value to be quite small,
2211 since too big a value will result in lines with gaping holes between
2212 the words. A reasonable value might be half a point, or one point,
2213 which you’d set with
2215 <span class="pre-in-pp">
2219 <span class="pre-in-pp" style="margin-bottom: -1em">
2224 <div class="box-tip">
2226 <span class="note">Note:</span> The numeric argument after HY SPACE
2228 <a href="definitions.html#unitofmeasure">unit of measure</a>.
2232 <h3 class="docs numbered">5. HY DEFAULT</h3>
2235 HY DEFAULT resets automatic hyphenation to its default behaviour,
2236 cancelling any changes made with HY <kbd>LINES</kbd>, HY
2237 <kbd>MARGIN</kbd>, and/or HY <kbd>SPACE</kbd>.
2240 <div class="box-notes">
2241 <h3 id="hyphenation-thoughts" class="docs notes">Thoughts on hyphenation in general</h3>
2243 <p style="margin-top: .5em">
2244 Hyphenation is a necessary evil. If it can be avoided, it
2245 should be. If it can’t be, it should occur infrequently.
2246 That’s the reason for the number of parameters you can set
2250 <p class="tip-bottom">
2251 Furthermore, hyphenation in
2252 <a href="definitions.html#rag">rag</a>
2253 copy requires a great deal of attention. At best, it should be
2254 avoided completely by individually adjusting the number of words
2255 on consecutive lines to achieve a pleasing, natural-looking rag.
2256 Since such adjustments are often too fussy for document processing,
2257 I recommend playing around with HY MARGIN a bit if your copy looks
2264 <div class="macro-id-overline">
2265 <h3 id="hy-set" class="macro-id">Set hyphenation parameters all at once</h3>
2268 <div class="box-macro-args">
2269 Macro: <b>HY_SET</b> <kbd class="macro-args"><lines> [ <margin> [ <space> ] ]</kbd>
2273 <i>Alias:</i> <b>HYSET</b>
2277 HY_SET lets you set the parameters for hyphenation
2278 with a single macro. <kbd><lines>,</kbd>
2279 <kbd><margin></kbd> and
2280 <kbd><space></kbd> correspond to the numeric
2281 values required by <kbd>LINES</kbd>,
2282 <kbd>MARGIN</kbd> and <kbd>SPACE</kbd> as described
2283 <a href="#hy">above</a>.
2287 To set just the maximum number of consecutive hyphenated lines,
2290 <span class="pre-in-pp">
2293 If you wanted the same number of maximum consecutive hyphenated
2294 lines and a hyphenation margin for use with
2295 <a href="definitions.html#rag">rag</a>
2298 <span class="pre-in-pp">
2301 would set the hyphenation margin to 36 points.
2305 If you wanted the same number of maximum consecutive hyphenated
2306 lines and a hyphenation space of 2 points for use with
2307 <a href="definitions.html#just">justified</a>
2310 <span class="pre-in-pp">
2313 is how you’d do it.
2318 <div class="macro-id-overline">
2319 <h3 id="rw" class="macro-id">Reduce whitespace</h3>
2322 <div class="box-macro-args">
2323 Macro: <b>RW</b> <kbd class="macro-args"><amount of whitespace reduction between letters></kbd>
2327 RW (<span style="text-decoration: underline;">R</span>educe <span style="text-decoration: underline;">W</span>hitespace)
2328 and its corresponding macro,
2329 EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace),
2330 allow you to tighten (or loosen)
2331 <a href="definitions.html#outputline">output lines</a>
2332 by uniformly reducing or expanding the space between characters.
2333 This is particularly useful when you want to squeeze or stretch
2334 lines on a narrow measure.
2338 The value passed to RW may be a whole number or a decimal fraction.
2339 Since a value of 1 produces a noticeable reduction in the space
2340 between letters at text sizes, you’ll most likely use small
2341 decimal values when tightening lines. For example,
2343 <span class="pre-in-pp">
2347 <span class="pre-in-pp">
2350 may be just enough to squeeze an extra character or two on a line
2351 without the change in letter spacing being obvious. I highly
2352 recommend previewing your work to assess the effect of RW.
2355 <div class="box-tip">
2357 <span class="note">Note:</span> By default, RW does not deposit a
2358 <a href="#br">break</a>
2359 when it’s invoked if you’re in one of the
2360 <a href="definitions.html#fill">fill</a>
2362 <a href="#quad">QUAD</a>
2364 <a href="#justify">JUSTIFY</a>).
2366 RW to break at the ends of the previous
2367 <a href="definitions.html#inputline">input lines</a>
2368 while you’re in a fill mode, tell mom
2369 that’s what you want by invoking
2370 <kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>.
2374 <div class="box-important">
2376 <span class="important">IMPORTANT:</span>
2377 RW (and its complement, EW; see below) only affects the current
2378 font, and remains in effect for that font every time it’s
2379 called, hence it must be reset to zero to cancel its effect
2380 (<kbd>.RW 0</kbd>).
2386 <div class="macro-id-overline">
2387 <h3 id="ew" class="macro-id">Expand whitespace</h3>
2390 <div class="box-macro-args">
2391 Macro: <b>EW</b> <kbd class="macro-args"><amount of whitespace expansion between letters></kbd>
2395 EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace)
2396 expands the amount of whitespace between letters, effectively
2397 “loosening” lines of type.
2401 The value passed to EW may be a whole number or a decimal fraction.
2402 Since a value of 1 produces a noticeable expansion in the space
2403 between letters at text sizes, you’ll most likely use small
2404 decimal values when loosening lines. For example,
2406 <span class="pre-in-pp">
2410 <span class="pre-in-pp">
2413 may be just enough to open up a line without the change in letter
2414 spacing being obvious. I highly recommend previewing your work to
2415 assess the effect of EW.
2418 <div class="box-tip">
2420 <span class="note">Note:</span> By default, EW does not deposit a
2421 <a href="#br">break</a>
2422 when it’s invoked if you’re in one of the
2423 <a href="definitions.html#fill">fill</a>
2425 <a href="#quad">QUAD</a>
2427 <a href="#justify">JUSTIFY</a>).
2429 EW to break at the ends of the previous
2430 <a href="definitions.html#inputline">input lines</a>
2431 while you’re in a fill mode, tell mom that’s what you
2432 want by invoking the
2433 <kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>
2438 <div class="box-important">
2440 <span class="important">IMPORTANT:</span>
2441 EW (and its complement, RW; see above) only affects the current
2442 font, and remains in effect for that font every time it’s
2443 called, hence it must be reset to zero to cancel its effect
2444 (<kbd>.RW 0</kbd>).
2448 <!-- -BR_AT_LINE_KERN- -->
2450 <div class="macro-id-overline">
2451 <h3 id="br-at-line-kern" class="macro-id">Break before line kerning</h3>
2454 <div class="box-macro-args">
2455 Macro: <b>BR_AT_LINE_KERN</b> <kbd class="macro-args">toggle</kbd>
2460 <a href="definitions.html#filled">fill</a>
2462 <a href="#quad">QUAD</a>
2464 <a href="#justify">JUSTIFY</a>)
2466 <a href="definitions.html#inputline">input lines</a>
2468 <a href="#rw">RW</a>
2470 <a href="#ew">EW</a>.
2471 If you’d like her to break input lines prior to RW or EW,
2472 invoke <kbd>.BR_AT_INPUT_LINE</kbd> without any argument. To
2473 disable the breaks, invoke <kbd>.BR_AT_INPUT_LINE</kbd> with any
2474 argument (OFF, QUIT, Q, X...), like this
2476 <span class="pre-in-pp">
2477 .BR_AT_LINE_KERN OFF
2480 <span class="pre-in-pp">
2483 With QUAD L, R or C, mom simply breaks the line. With QUAD J (or
2484 just JUSTIFY, which is the same thing), she breaks and
2485 <a href="definitions.html#force">force justifies</a>
2486 the line prior to <kbd>.EW</kbd> or <kbd>.RW</kbd>.
2491 <div class="macro-id-overline">
2492 <h3 id="kern" class="macro-id">Automatic kerning</h3>
2495 <div class="box-macro-args">
2496 Macro: <b>KERN</b> <kbd class="macro-args">toggle</kbd>
2500 By itself (ie with no argument), KERN turns automatic pairwise
2501 <a href="definitions.html#kern">kerning</a>
2502 on. With any argument (eg OFF, Q, X), pairwise kerning is turned
2507 Kerning of individual character pairs can be controlled with the
2508 <a href="definitions.html#inlines">inline escapes</a>
2509 <kbd>\*[BU <n>]</kbd> and
2510 <kbd>\*[FU <n>]</kbd>. See
2511 <a href="inlines.html#inline-kerning-mom">Inline Escapes, kerning</a>.
2514 <!-- -LIGATURES- -->
2516 <div class="macro-id-overline">
2517 <h3 id="ligatures" class="macro-id">Automatic ligature generation</h3>
2520 <div class="box-macro-args">
2521 Macro: <b>LIGATURES</b> <kbd class="macro-args">toggle</kbd>
2524 <i>Alias:</i> <b>LIG</b>
2528 Provided your current font has
2529 <a href="definitions.html#ligatures">ligatures</a>,
2530 LIGATURES, by itself, turns on automatic generation of ligatures.
2531 When automatic ligature generation is on, simply typing the letters
2532 of a ligature combination will produce the correct ligature upon
2533 output. For example, if you type the word “finally”,
2534 the fi combination will be output as an fi ligature. Generally
2535 speaking, ligatures are A Good Thing, hence mom has them on by
2540 LIGATURES with any argument turns automatic ligature generation off.
2543 <div class="box-tip">
2545 <span class="note">Note:</span> Not all fonts support ligatures.
2549 <div class="rule-short"><hr/></div>
2551 <!-- ==================================================================== -->
2553 <h2 id="modifications-intro" class="macro-group">Type modifications (pseudo font styles)</h2>
2556 It sometimes happens that a
2557 <a href="definitions.html#family">family</a>
2558 doesn’t contain all the fonts you need. You might, for
2559 example, be missing an italic font, or a bold font. Or you might
2560 not be able to get your hands on the condensed version. That’s
2561 where these macros and inline escapes come in. With them, you
2562 can fake the fonts you’re missing. A word of caution,
2563 though: “faked” fonts are just that—faked. You
2564 should only use them as a last resort, and then only sparingly. A
2565 word or two or a line or two in a faked font will pass unnoticed;
2566 large patches of type in a faked font look typographically cheap.
2569 <div id="index-modifications" class="macro-list-container">
2570 <h3 class="macro-list">Type modifications macros</h3>
2572 <ul class="macro-list">
2574 <ul style="list-style: none; margin-left: -1em;">
2575 <li><a href="#setslant">SETSLANT</a> – degree of pseudo-italicizing</li>
2576 <li><a href="#slant-inline">\*[SLANT]</a> – inline escape for pseudo-italicizing type</li>
2579 <ul style="list-style: none; margin-left: -1em;">
2580 <li><a href="#setbolder">SETBOLDER</a> – amount of emboldening</li>
2581 <li><a href="#bolder-inline">\*[BOLDER]</a> – inline escape for emboldening type</li>
2583 <li>Pseudo condensed
2584 <ul style="list-style: none; margin-left: -1em;">
2585 <li><a href="#condense">CONDENSE</a> – percentage for pseudo-condensed type</li>
2586 <li><a href="#cond-inline">\*[COND]</a> – inline escape for pseudo-condensed type</li>
2589 <ul style="list-style: none; margin-left: -1em;">
2590 <li><a href="#extend">EXTEND</a> – percentage for pseudo-extended type</li>
2591 <li><a href="#ext-inline">\*[EXT]</a> – inline escape for pseudo-extending</li>
2598 <div class="macro-id-overline">
2599 <h3 id="setslant" class="macro-id">Set degree of slant for pseudo-italicizing</h3>
2602 <div class="box-macro-args">
2603 Macro: <b>SETSLANT</b> <kbd class="macro-args"><degrees to slant type> | RESET</kbd>
2607 Pseudo-italicizing of type is accomplished by slanting a roman font
2608 a certain number of degrees to the right. SETSLANT lets you fix the
2609 number of degrees. Mom’s default is 15, which produces an
2610 acceptable approximation of an italic font. If you want another
2611 value—say, 13 degrees—you’d set it by entering
2613 <span class="pre-in-pp">
2616 If you change the degree of slant and later want to set it back to
2619 <span class="pre-in-pp">
2624 <div class="box-tip">
2626 <span class="note">Note:</span> By itself, SETSLANT will not start
2627 pseudo-italicizing type; it merely tells mom what degree of slant
2628 you want. To start pseudo-italicizing, use the
2629 <a href="definitions.html#inlines">inline escape</a>
2630 <kbd>\*[SLANT]</kbd>.
2634 <!-- -\*[SLANT]- -->
2636 <div class="macro-id-overline">
2637 <h3 id="slant-inline" class="macro-id">Pseudo italic on/off</h3>
2640 <div class="box-macro-args">
2641 Inline: <kbd class="macro-args">\*[SLANT]</kbd>
2643 Inline: <kbd class="macro-args">\*[SLANTX</kbd>]
2647 <kbd class="macro-args">\*[SLANT]</kbd> begins pseudo-italicizing type.
2648 <kbd class="macro-args">\*[SLANTX]</kbd> turns the feature off. Both are
2649 <a href="definitions.html#inlines">inline escapes</a>,
2650 therefore they should not appear as separate lines, but rather be
2651 embedded in text lines, like this:
2653 <span class="pre-in-pp">
2654 Not \*[SLANT]everything\*[SLANTX] is as it seems.
2656 Alternatively, if you wanted the whole line pseudo-italicized,
2659 <span class="pre-in-pp">
2660 \*[SLANT]Not everything is as it seems.\*[SLANTX]
2662 Once <kbd>\*[SLANT]</kbd> is invoked, it remains in effect until
2666 <div class="box-tip" style="margin-top: .5em;">
2668 <span class="note">Note:</span> If you’re using the
2669 <a href="docprocessing.html#docprocessing">document processing macros</a>
2671 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2672 mom underlines pseudo-italics by default. To change this behaviour,
2673 use the special macro
2674 <a href="docprocessing.html#typewrite-control">SLANT_MEANS_SLANT</a>.
2678 <!-- -SETBOLDER- -->
2680 <div class="macro-id-overline">
2681 <h3 id="setbolder" class="macro-id">Set amount of emboldening</h3>
2684 <div class="box-macro-args">
2685 Macro: <b>SETBOLDER</b> <kbd class="macro-args"><amount of emboldening, in machine units> | RESET</kbd>
2689 Emboldening of type is accomplished by printing characters twice;
2690 the second printing is slightly offset from the first, effectively
2691 “thickening” the character. SETBOLDER lets you set the
2693 <a href="definitions.html#units">machine units</a>
2694 for the offset. Mom’s default is 700 units, which produces an
2695 acceptable approximation of a bold font. If you want another
2696 value—say, 500 units—you’d set it by entering
2698 <span class="pre-in-pp">
2701 If you change the emboldening offset and later want to set it back
2702 to the mom default, do
2704 <span class="pre-in-pp">
2709 <div class="box-tip">
2711 <span class="note">Note:</span> By itself, SETBOLDER will not start
2712 emboldening type; it merely tells mom what you want the emboldening
2713 offset to be. To start emboldening, use the
2714 <a href="definitions.html#inlines">inline escape</a>
2715 <kbd>\*[BOLDER]</kbd>.
2719 <!-- -\*[BOLDER]- -->
2721 <div class="macro-id-overline">
2722 <h3 id="bolder-inline" class="macro-id">Emboldening on/off</h3>
2725 <div class="box-macro-args">
2726 Inline: <kbd class="macro-args">\*[BOLDER]</kbd>
2728 Inline: <kbd class="macro-args">\*[BOLDERX]</kbd>
2732 <kbd class="macro-args">\*[BOLDER]</kbd> begins emboldening type.
2733 <kbd class="macro-args">\*[BOLDERX]</kbd> turns the feature off. Both are
2734 <a href="definitions.html#inlines">inline escapes</a>,
2735 therefore they should not appear as separate lines, but rather be
2736 embedded in text lines, like this:
2738 <span class="pre-in-pp">
2739 Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
2741 Alternatively, if you wanted the whole line emboldened,
2744 <span class="pre-in-pp">
2745 \*[BOLDER]Not everything is as it seems.\*[BOLDERX]
2747 Once <kbd>\*[BOLDER]</kbd> is invoked, it remains in effect
2751 <div class="box-tip">
2753 <span class="note">Note:</span> If you’re using the
2754 <a href="docprocessing.html#docprocessing">document processing macros</a>
2756 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2757 mom ignores <kbd>\*[BOLDER]</kbd> requests.
2763 <div class="macro-id-overline">
2764 <h3 id="condense" class="macro-id">Set percentage for pseudo-condensed type</h3>
2767 <div class="box-macro-args">
2768 Macro: <b>CONDENSE</b> <kbd class="macro-args"><pseudo-condense percentage></kbd>
2772 Pseudo-condensing of type is accomplished by reducing the width of
2773 characters at a given point size without reducing their height,
2774 effectively narrowing them so they look like condensed type.
2775 CONDENSE tells mom what percentage of the normal character width you
2776 want the characters to be condensed.
2780 Mom has no default value for CONDENSE, therefore you must set it
2782 <a href="definitions.html#inlines">inline escape</a>
2783 <kbd><a href="#cond-inline">\*[COND]</a></kbd>.
2784 80 percent of the normal character width is a good value, and
2785 you’d set it like this:
2787 <span class="pre-in-pp">
2792 <div class="box-tip">
2794 <span class="note">Note:</span> By itself, CONDENSE will not start
2795 pseudo-condensing type; it merely tells mom what percentage of the
2796 normal character width you want characters to be condensed. To
2797 start pseudo-condensing, use the
2798 <a href="definitions.html#inlines">inline escape</a>
2799 <kbd>\*[COND]</kbd>.
2802 <p class="tip-bottom">
2803 <span class="additional-note">Additional note:</span> Make sure that
2804 pseudo-condensing is off (with
2805 <kbd><a href="#cond-inline">\*[CONDX]</a></kbd>)
2806 before before making any changes to the pseudo-condense percentage
2813 <div class="macro-id-overline">
2814 <h3 id="cond-inline" class="macro-id">Pseudo-condensing on/off</h3>
2817 <div class="box-macro-args">
2818 Inline: <kbd class="macro-args">\*[COND]</kbd>
2820 Inline: <kbd class="macro-args">\*[CONDX]</kbd>
2824 <kbd>\*[COND]</kbd> begins pseudo-condensing type.
2825 <kbd>\*[CONDX]</kbd> turns the feature off. Both are
2826 <a href="definitions.html#inlines">inline escapes</a>,
2827 therefore they should not appear as separate lines, but rather be
2828 embedded in text lines, like this:
2830 <span class="pre-in-pp">
2831 \*[COND]Not everything is as it seems.\*[CONDX]
2833 <kbd>\*[COND]</kbd> remains in effect until you turn it
2834 off with <kbd>\*[CONDX]</kbd>.
2837 <div class="box-important">
2839 <span class="important">IMPORTANT:</span> You must turn
2841 off before making any changes to the point size of your type, either
2843 <a href="#ps">PT_SIZE</a>
2844 macro or with the <kbd>\s</kbd> inline escape. If you wish
2845 the new point size to be pseudo-condensed, simply reinvoke
2846 <kbd>\*[COND]</kbd> afterwards. Equally, <kbd>\*[COND]</kbd> must
2847 be turned off before changing the condense percentage with
2848 <kbd><a href="#condense">.CONDENSE</a></kbd>.
2852 <div class="box-tip">
2854 <span class="note">Note:</span> If you’re using the
2855 <a href="docprocessing.html#docprocessing">document processing macros</a>
2857 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2858 mom ignores <kbd>\*[COND]</kbd> requests.
2864 <div class="macro-id-overline">
2865 <h3 id="extend" class="macro-id">Set percentage for pseudo-extended type</h3>
2868 <div class="box-macro-args">
2869 Macro: <b>EXTEND</b> <kbd class="macro-args"><pseudo-extend percentage></kbd>
2873 Pseudo-extending of type is accomplished by increasing the width of
2874 characters at a given point size without increasing their height,
2875 effectively widening them so they look like extended type. EXTEND
2876 tells mom what percentage of the normal character width you want the
2877 characters to be extended.
2881 Mom has no default value for EXTEND, therefore you must set it
2883 <a href="definitions.html#inlines">inline escape</a>
2884 <kbd><a href="#ext-inline">\*[EXT]</a></kbd>.
2885 120% of the normal character width is a good value, and you’d
2888 <span class="pre-in-pp">
2893 <div class="box-tip">
2895 <span class="note">Note:</span> By itself, EXTEND will not start
2896 pseudo-extending type; it merely tells mom what percentage of the
2897 normal character width you want characters to be extended. To start
2898 pseudo-extending, use the
2899 <a href="definitions.html#inlines">inline escape</a>
2903 <p class="tip-bottom">
2904 <span class="additional-note">Additional note:</span> Make sure that
2905 pseudo-extending is off (with
2906 <a href="#ext-inline"><kbd>\*[EXTX]</kbd></a>)
2907 before before making any changes to the pseudo-extend percentage
2914 <div class="macro-id-overline">
2915 <h3 id="ext-inline" class="macro-id">Pseudo-extending on/off</h3>
2918 <div class="box-macro-args">
2919 Inline: <kbd class="macro-args">\*[EXT]</kbd>
2921 Inline: <kbd class="macro-args">\*[EXTX]</kbd>
2925 <kbd>\*[EXT]</kbd> begins pseudo-extending type.
2926 <kbd>\*[EXTX]</kbd> turns the feature off. Both are
2927 <a href="definitions.html#inlines">inline escapes</a>,
2928 therefore they should not appear as separate lines, but rather be
2929 embedded in text lines, like this:
2931 <span class="pre-in-pp">
2932 \*[EXT]Not everything is as it seems.\*[EXTX]
2934 <kbd>\*[EXT]</kbd> remains in effect until you turn it off with
2935 <kbd>\*[EXTX]</kbd>.
2938 <div class="box-important">
2940 <span class="important">IMPORTANT:</span> You must turn
2941 <kbd>\*[EXT]</kbd> off before making any changes to the point size
2942 of your type, either via the
2943 <a href="#ps">PT_SIZE</a>
2944 macro or with the <kbd>\s</kbd> inline escape. If you wish the new
2945 point size to be pseudo-extended, simply reinvoke <kbd>\*[EXT]</kbd>
2946 afterwards. Equally, <kbd>\*[EXT]</kbd> must be turned off before
2947 changing the extend percentage with
2948 <a href="#extend">EXTEND</a>.
2951 <div class="box-tip">
2953 <span class="note">Note:</span> If you’re using the
2954 <a href="docprocessing.html#docprocessing">document processing macros</a>
2956 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2957 mom ignores <kbd>\*[EXT]</kbd> requests.
2961 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
2963 <!-- ==================================================================== -->
2965 <h2 id="aldrld-intro" class="macro-group">Vertical movements</h2>
2967 The two macros in this section allow you to move down or up on the
2968 page relative to the current
2969 <a href="definitions.html#baseline">baseline</a>.
2971 <div id="index-aldrld" class="macro-list-container">
2972 <h3 class="macro-list">Vertical movements macros</h3>
2973 <ul class="macro-list">
2974 <li><a href="#ald">ALD</a> – Advance Lead</li>
2975 <li><a href="#rld">RLD</a> – Reverse Lead</li>
2981 <div class="macro-id-overline">
2982 <h3 id="ald" class="macro-id">Advance Lead (move downward)</h3>
2985 <div class="box-macro-args">
2986 Macro: <b>ALD</b> <kbd class="macro-args"><distance to move downward></kbd>
2988 <p class="requires">
2989 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
2993 ALD takes one argument: the distance to move downward on the page
2994 relative to the current vertical position.
2998 Used by itself, or preceded by
2999 <a href="#br">BR</a>,
3000 ALD will advance by one line space plus the distance you specify.
3002 <a href="#el">EL</a>,
3003 it will advance by exactly the distance you specify.
3007 ALD requires a unit of measure. Decimal fractions are allowed, and
3008 values may be combined. Therefore, to move down on the page by 1/4
3009 of an inch, you could enter either
3011 <span class="pre-in-pp">
3016 <span class="pre-in-pp">
3020 (<span style="text-decoration: underline;">A</span>dvance <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
3021 suggests, you’ll most often use ALD with
3022 <a href="definitions.html#picaspoints">points</a>
3026 <div class="box-tip">
3028 <span class="note">Note:</span> if you want to use ALD at the top
3029 of a page (ie to advance to the starting position of type on a
3030 page), combine the value you want with <kbd>-1v</kbd> (minus one
3031 line space), like this:
3033 <span class="pre-in-pp">
3036 At the top of a page, this will advance one inch from the top edge
3037 of the paper. Without the -1v, the same command would advance one
3038 inch from the top of the page plus the distance of one line space.
3044 <div class="macro-id-overline">
3045 <h3 id="rld" class="macro-id">Reverse Lead (move upward)</h3>
3048 <div class="box-macro-args">
3049 Macro: <b>RLD</b> <kbd class="macro-args"><distance to move upward></kbd>
3051 <p class="requires">
3052 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
3056 RLD takes one argument: the distance to move upward on the page
3057 relative to the current vertical position.
3061 Used by itself, or preceded by
3062 <a href="#br">BR</a>,
3063 RLD will advance by one line space, then reverse by the distance you
3064 specify. Preceded by
3065 <a href="#el">EL</a>,
3066 it will reverse by exactly the distance you specify.
3070 RLD requires a unit of measure. Decimal fractions are allowed, and
3071 values may be combined. Therefore, to move up on the page by 1/4 of
3072 an inch, you could enter either
3074 <span class="pre-in-pp">
3078 <span class="pre-in-pp">
3082 (<span style="text-decoration: underline;">R</span>everse <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
3083 suggests, you’ll most often use RLD with
3084 <a href="definitions.html#picaspoints">points</a>
3088 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
3090 <!-- ==================================================================== -->
3092 <h2 id="tabs-intro" class="macro-group">Tabs</h2>
3095 Mom provides two different kinds of tab setup: typesetting tabs
3096 and string tabs. Neither one has anything to do with the tab key
3097 on your keyboard, and both are utterly divorced from groff’s
3098 notion of tabs. I recommend reading this section carefully in order
3099 to understand how mom handles tabs.
3102 <div class="box-tip">
3104 <span class="note">Note:</span> see the section
3105 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
3106 for reassuring information on the use of tabs during
3107 <a href="docprocessing.html#docprocessing">document processing</a>.
3111 <h3 id="typesetting-tabs" class="docs">Typesetting tabs</h3>
3114 Typesetting tabs are defined by both an indent from the left margin
3115 and a line length. This is quite different from typewriter-style
3116 tab stops (the groff norm) that only define the left indent. In
3117 conjunction with the
3118 <a href="#multicolumns-intro">multi-column macros</a>,
3119 typesetting tabs significantly facilitate tabular and columnar work.
3123 Typesetting tabs are created with the
3124 <a href="#tab-set">TAB_SET</a>
3125 macro. TAB_SET identifies the tab (by number), establishes its left
3126 indent and line length, and optionally sets a quad direction and
3127 fill mode. After tabs have been created with TAB_SET, they can be
3128 called at any time with the
3129 <a href="#tab">TAB</a>
3133 <div class="examples-container">
3134 <h3 id="typesetting-tabs-tut" class="docs notes">Quickie tutorial on typesetting tabs</h3>
3136 <p style="margin-top: .5em;">
3137 Say you want to set up three tabs to produce an employee evaluation
3138 that looks something like this:
3141 <div class="box-code" style="padding-bottom: 0;">
3142 <span id="typsetting-tabs-sample" class="pre-in-pp" style="color: #302419">
3143 CRITERION EVALUATION COMMENTS
3145 Service Good Many clients specifically request
3146 support from Joe by name.
3148 Punctuality Satisfactory Tends to arrive after 8:00am, but
3149 often works through lunch hour.
3151 Team spirit Needs work Persistently gives higher priority
3152 to helping clients than respecting
3153 organizational hierarchy.
3158 You want the first tab, CRITERION,
3160 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3161 <li>to begin at the left margin of the page – ie no indent</li>
3162 <li>to have a line length of 5 picas</li>
3163 <li>to be set flush left</li>
3167 Tabs must be numbered, and each has to be set up with a separate
3168 <a href="#tab-set">TAB_SET</a>
3169 line. Therefore, to set up tab 1, you enter
3171 <span class="pre-in-pp">
3174 tab #--+ | | +--direction
3178 You want the second tab, EVALUATION,
3180 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3181 <li>to begin 8 picas from the left margin</li>
3182 <li>to have a length of 9 picas</li>
3183 <li>to be set centered</li>
3187 You set it up like this:
3189 <span class="pre-in-pp">
3192 tab #--+ | | +--direction
3196 You want the third tab, COMMENTS,
3198 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3199 <li>to begin 19 picas from the left margin</li>
3200 <li>to have a length of 17 picas</li>
3201 <li>to be set flush left, <a href="definitions.html#filled">filled</a></li>
3205 The setup looks like this:
3207 <span class="pre-in-pp">
3208 .TAB_SET 3 19P 17P L QUAD
3210 | | | | +--fill output lines
3212 tab #--+ | | +--direction
3216 Once the tabs are set up, you can call them in one of two ways:
3218 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3219 <li>with <kbd><a href="#tab">.TAB</a></kbd> (passing the tab
3220 number as an argument), which breaks the current line,
3221 advances one linespace and calls the tab.</li>
3222 <li>with <kbd><a href="#tn">.TN</a></kbd> (Tab Next), which keeps
3223 you on the current line and moves over to the next
3224 tab in sequence (ie from 1 to 2, 2 to 3, etc.), or, more
3225 conveniently, with the
3226 <kbd><a href="#tn">\*[TB+]</a></kbd>
3227 <a href="definitions.html#inlines">inline escape</a></li>
3231 To exit from tabs and restore your original left margin, line
3232 length, quad direction and fill mode, use
3233 <kbd><a href="#tq">.TQ</a></kbd>
3238 Here’s how the input for our sample employee evaluation looks
3239 (with some introductory parameters):
3242 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3243 <div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: auto;">
3244 <span class="pre-in-pp">
3245 .PAGE 8.5i 11i 1i 1i 1i
3256 .TAB_SET 3 19P 17P L QUAD
3265 Many clients specifically request support from Joe by name.
3270 Tends to arrive after 8:00am, but often works through lunch hour.
3275 Persistently gives higher priority to helping clients
3276 than respecting organizational hierarchy.
3282 Try setting this up and processing it it with
3284 <span class="pre-in-pp">
3285 pdfmom filename.mom > filename.pdf
3287 then previewing the .pdf file. Notice how <kbd>.TN</kbd>
3288 simply moves over to the next tab, while the combination
3289 <kbd>.SP/.TAB 1</kbd> breaks the line, advances by one extra
3290 linespace, and calls the first tab.
3294 Notice, too, how the <kbd>QUAD</kbd> argument passed to tab 3 means
3295 you don’t have to worry about the length of
3296 <a href="definitions.html#inputline">input lines</a>;
3298 <a href="definitions.html#filled">fills</a>
3299 the tab and sets the type flush left.
3303 <h3 id="string-tabs" class="docs">String tabs (autotabs)</h3>
3306 String tabs let you mark off tab positions with
3307 <a href="definitions.html#inlines">inline escapes</a>
3309 <a href="definitions.html#inputline">input lines</a>.
3310 Left indents and line lengths are calculated from the beginning and
3311 end positions of the marks. This is especially useful when tab
3312 indents and lengths need to be determined from the text that goes in
3317 Setting up string tabs is a two-step procedure. First, you enter an
3318 input line in which you mark off where you want tabs to begin and
3319 end. (This is often best done in conjunction with the
3320 <a href="goodies.html#silent">SILENT</a>
3325 Next, you invoke the
3326 <a href="#st">ST</a>
3327 macro for every string tab you defined, and optionally pass quad and
3328 fill information to it. That done, string tabs are called with the
3329 <a href="#tab">TAB</a>
3330 macro, just like typesetting tabs.
3334 In combination with the
3335 <a href="goodies.html#pad">PAD</a>
3336 macro and the groff inline escape
3337 <kbd><a href="inlines.html#inline-horizontal-groff">\h</a></kbd>
3338 (move horizontally across the page) or mom’s
3339 <kbd><a href="inlines.html#inline-horizontal-mom">\*[FWD <distance>]</a></kbd>
3340 (move forward) inline, string tabs provide tremendous flexibility in
3341 setting up complex tab structures.
3344 <div class="examples-container">
3345 <h3 id="string-tabs-tut" class="docs notes">Quickie tutorial on string tabs</h3>
3346 <p style="margin-top: .5em;">
3347 Say you want to set up tabs for the
3348 <a href="#typsetting-tabs-sample">employee evaluation form</a>
3349 used as an example in the
3350 <a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>.
3351 This time, though, you want to play around with the point size of
3352 type, so you can’t know exactly how long the tabs will be or
3353 where they should start. All you know is
3355 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3356 <li>CRITERION is the longest line in tab 1</li>
3357 <li>EVALUATION is the longest line in tab 2</li>
3358 <li>tab 3 should extend to the current right margin</li>
3359 <li>you want a 1 pica gutter between each tab</li>
3363 This is an ideal job for string tabs.
3367 The first thing you need for string tabs is an
3368 <a href="definitions.html#inputline">input line</a>
3369 with tab positions marked on it. Tabs are marked with the
3370 <a href="definitions.html#inlines">inline escapes</a>
3371 <kbd><a href="#inline-st">\*[ST<n>]</a></kbd>
3373 <kbd><a href="#inline-st">\*[ST<n>X]</a></kbd>,
3374 where <kbd><n></kbd>
3375 is the number you want the tab to have. (In this example, we
3376 enclose the input line with the
3377 <a href="goodies.html#silent">SILENT</a>
3378 macro so the line doesn’t print. We also use the
3379 <a href="goodies.html#pad">PAD</a>
3380 macro to permit defining tab 3 as simply “the amount of space
3381 remaining on the input line.”)
3385 The setup looks like this:
3388 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3390 <div class="box-code">
3391 <span class="pre-in-pp">
3393 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
3399 The long line after <kbd>.PAD</kbd> looks scary, but
3400 it isn’t really. Here’s what it means when broken down
3401 into its component parts:
3403 <ul style="margin-bottom: -1em;">
3404 <li>The longest line in tab 1 is “CRITERION”, so we
3405 enclose CRITERION with begin/end markers for string tab 1:
3407 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3408 \*[ST1]CRITERION\*[ST1X]
3411 <li>We want a 1 pica (12 points) gutter between tab 1 and 2,
3412 so we insert 12 points of space with \*[FWD 12p]:
3414 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3418 <li>The longest line in tab 2 is “EVALUATION”, so
3419 we enclose EVALUATION with begin/end markers for string
3421 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3422 \*[ST2]EVALUATION\*[ST2X]
3425 <li>We want 1 pica (12 points) between tab 2 and 3, so we
3428 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3432 <li>We want tab 3 to be as long as whatever space remains on
3433 the current line length, so we enclose the
3434 <a href="goodies.html#pad-marker">pad marker</a>
3435 (#) with begin/end markers for string tab 3:
3436 <span class="pre-in-pp">
3443 The tabs are now defined, but they require
3444 <a href="definitions.html#quad">quad direction</a>
3446 <a href="definitions.html#filled">fill</a>
3447 information. For each string tab defined above, enter a separate
3448 <kbd><a href="#st">.ST</a></kbd>
3451 <span class="pre-in-pp">
3456 | | +--fill output lines
3458 tab #--+ +--direction
3460 From here on in, you call the tabs with
3461 <kbd><a href="#tab">.TAB</a></kbd>,
3462 <kbd><a href="#tn">.TN</a></kbd>,
3464 <kbd><a href="#tn">\*[TB+]</a></kbd>
3465 just like typesetting tabs (see
3466 <a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>).
3470 Here’s the complete setup and entry for the sample employee
3471 evaluation form utilizing string tabs.
3474 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3475 <div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: scroll;">
3476 <span class="pre-in-pp">
3477 .PAGE 8.5i 11i 1i 1i 1i
3487 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
3500 Many clients specifically request support from Joe by name.
3505 Tends to arrive after 8:00am, but often works through lunch hour.
3510 Persistently gives higher priority to helping clients
3511 than respecting organizational hierarchy.
3517 Try setting this up and processing it with
3519 <span class="pre-in-pp">
3520 pdfmom filename.mom > filename.pdf
3522 and previewing the .pdf file.
3526 Now, change the point size of the above sample to 12 and preview it
3527 again. You’ll see that the tab structure remains identical
3528 (tab 1=CRITERION, tab 2=EVALUATION, tab 3=space remaining, and the
3529 gutter between tabs is still 1 pica), while the position and length
3530 of the tabs have altered because of the new point size.
3534 Now try increasing the gutters to 2 picas
3535 (<kbd>\*[FWD 24p]</kbd> or <kbd>\*[FWD 2P]</kbd> instead
3536 of <kbd>\*[FWD 12p]</kbd>). Preview the file again, and notice
3537 how the tab structure remains the same, but the gutters are wider.
3541 <div id="index-tabs" class="macro-list-container">
3542 <h3 class="macro-list">Tabs macros</h3>
3544 <ul class="macro-list">
3545 <li><a href="#tab-set">TAB_SET</a> – create typesetting tabs</li>
3546 <li><a href="#inline-st">\*[ST]...\*[STX]</a> – inline escapes for marking String Tabs</li>
3547 <li><a href="#st">ST</a> – set String Tabs</li>
3548 <li><a href="#tab">TAB</a> – call tabs</li>
3549 <li><a href="#tn">TN</a> – Tab Next; call next tab in sequence</li>
3550 <li><a href="#tn">\*[TB+]</a> – inline escape to call next tab in sequence</li>
3551 <li><a href="#tq">TQ</a> – Tab Quit</li>
3558 <div class="macro-id-overline">
3559 <h3 id="tab-set" class="macro-id">Set up typesetting tabs</h3>
3562 <div class="box-macro-args">
3563 Macro: <b>TAB_SET</b> <kbd class="macro-args"><tab number> <indent> <length> L | R | C | J [ QUAD ]</kbd>
3565 <p class="requires">
3566 • <kbd style="font-style: normal;"><indent></kbd> and <kbd style="font-style: normal;"><length></kbd> require a <a href="definitions.html#unitofmeasure">unit of measure</a>
3569 <p style="margin-bottom: -.5em;">
3570 TAB_SET creates typesetting tabs that later can be called with
3571 <kbd><a href="#tab">.TAB</a></kbd>.
3572 Typesetting tabs are numbered, and defined by an indent, a length,
3573 and a quad direction, hence TAB_SET has four required arguments:
3575 <ul style="margin-top: .5em; margin-bottom: -.5em;">
3576 <li>a tab number</li>
3577 <li>an indent (measured from the left margin of the page,
3578 or, if you’re already in a tab, from the left margin of the tab)</li>
3580 <li>a direction</li>
3584 To set up a centred tab 6 picas long and 9 points from the left
3585 margin, you’d enter
3587 <span class="pre-in-pp">
3590 The tab number in the above (”1”) is simply an
3591 identifier. It could have been 4, or 17, or 296. There’s no
3592 need to set up tabs in numerical sequence.
3596 By default, tabs are in
3597 <a href="definitions.html#filled">nofill</a>
3598 mode, meaning you can enter text in tabs on a line-for-line basis
3599 without having to use the
3600 <a href="#br">BR</a>
3601 macro. If you want a tab to be
3602 <a href="definitions.html#filled">filled</a>,
3603 pass the optional argument <kbd>QUAD</kbd>,
3604 which will make the tab behave as if you’d entered
3605 <kbd class="bold">.QUAD L | R | C</kbd>.
3610 <a href="definitions.html#just">justified</a>
3611 tabs, simply pass the argument J (without the QUAD argument), like
3614 <span class="pre-in-pp">
3617 Once tabs are set, they can be called at any time with the
3618 <a href="#tab">TAB <n></a>
3619 macro, where <n> is the number of the desired tab.
3623 You can set up any number of typesetting tabs. However, be aware
3625 <a href="#string-tabs">string tabs</a>
3626 are also called with TAB <n>, so be careful that you
3627 don’t set up a typesetting tab numbered, say, 4, when you
3628 already have a string tab numbered 4. Every tab, typesetting or
3629 string, must have a unique numeric identifier. </p>
3631 <div class="box-tip">
3633 <span class="note">Note:</span> If you use TAB_SET while
3634 you’re currently inside a tab, the indent argument is the
3635 distance from the tab’s left margin, not the left margin of
3636 the page. Therefore, you should exit tabs (with
3637 <kbd><a href="#tq">.TQ</a></kbd>)
3638 before creating new tabs (unless, of course, you want to set up a
3639 tab structure within the confines of an existing tab).
3643 <div class="box-important">
3645 <span class="important">IMPORTANT:</span> Turn all indents off (see
3646 <a href="#indents">Indents</a>)
3647 before setting up tabs with TAB_SET, or mom may get confused.
3651 <!-- -INLINE_ST- -->
3653 <div class="macro-id-overline">
3654 <h3 id="inline-st" class="macro-id">Mark positions of string tabs</h3>
3657 <div class="box-macro-args">
3658 Inlines: <kbd class="macro-args">\*[ST<number>]...\*[ST<number>X]</kbd>
3661 <p class="requires">
3662 The <a href="definitions.html#quad">quad</a>
3664 <span style="font-style: normal">LEFT</span>
3666 <span style="font-style: normal">JUSTIFY</span>
3668 <a href="#quad"><span style="font-style: normal">QUAD</span></a>
3670 <a href="#justify"><span style="font-style: normal">JUSTIFY</span></a>)
3672 <a href="definitions.html#filled">no-fill mode</a>
3674 <a href="#lrc"><span style="font-style: normal">LEFT</span></a>
3675 in order for these inlines to function properly. Please see
3676 <a href="#important"><span style="font-style: normal">IMPORTANT</span></a>,
3681 String tabs need to be marked off with
3682 <a href="definitions.html#inlines">inline escapes</a>
3683 before being set up with the
3684 <a href="#st">ST</a>
3685 macro. Any input line may contain string tab markers. <kbd
3686 class="bold"><number></kbd>, above, means the numeric
3687 identifier of the tab. The following shows a sample input line with
3690 <span class="pre-in-pp">
3691 \*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
3693 String tab 1 begins at the start of the line and ends after the word
3694 “time”. String tab 2 starts at “good” and
3695 ends after “men”. Inline escapes (eg font or point
3696 size changes, or horizontal movements, including
3697 <a href="goodies.html#pad">padding</a>)
3698 are taken into account when mom determines the position and length
3703 Up to nineteen string tabs may be marked (not necessarily all on the
3704 same line, of course), and they must be numbered between 1 and 19.
3708 Once string tabs have been marked in input lines, they have to be
3709 “set” with
3710 <kbd><a href="#st">.ST</a></kbd>,
3711 after which they may be called, by number, with
3712 <kbd><a href="#tab">.TAB</a></kbd>.
3715 <div class="box-tip">
3717 <span class="note">Note:</span> Lines with string tabs marked off
3718 in them are normal input lines, ie they get printed, just like
3719 any input line. If you want to set up string tabs without the line
3721 <a href="goodies.html#silent">SILENT</a>
3726 <div class="box-important">
3728 <span id="important" class="important">IMPORTANT:</span>
3729 Owing to the way groff processes
3730 <a href="definitions.html#inputline">input lines</a>
3732 <a href="definitions.html#outputline">output lines</a>,
3733 it is not possible for mom to “guess” the correct
3734 starting position of string tabs marked off in lines that are
3735 centered or set flush right.
3739 Equally, she cannot guess the starting position if a line is fully
3740 justified and broken with
3741 <a href="#spread">SPREAD</a>.
3745 In other words, in order to use string tabs,
3746 <a href="#lrc">LEFT</a>
3747 must be active, or, if
3748 <a href="#quad">QUAD LEFT</a>
3750 <a href="#justify">JUSTIFY</a>
3751 are active, the line on which the string tabs are marked must be
3752 broken “manually” with
3753 <kbd><a href="#br">.BR</a></kbd>
3755 <kbd><a href="#spread">.SPREAD</a></kbd>).
3758 <p class="tip-bottom">
3759 To circumvent this behaviour, I recommend using the
3760 <a href="goodies.html#pad">PAD</a>
3761 to set up string tabs in centered or flush right lines. Say, for
3762 example, you want to use a string tab to underscore the text of a
3763 centered line with a rule. Rather than this,
3765 <span class="pre-in-pp">
3767 \*[ST1]A line of text\*[ST1X]\c
3779 <span class="pre-in-pp">
3781 .PAD "#\*[ST1]A line of text\*[ST1X]#"
3787 \*[RULE] \" Note that you can’t use \*[UP ] or \*[DOWN] with \*[RULE]
3796 <div class="macro-id-overline">
3797 <h3 id="st" class="macro-id">Set string tabs</h3>
3800 <div class="box-macro-args">
3801 Macro: <b>ST</b> <kbd class="macro-args"><tab number> L | R | C | J [ QUAD ]</kbd>
3805 After string tabs have been marked off on an input line (see
3806 <a href="#inline-st"><kbd>\*[ST]...\*[STX]</kbd></a>),
3807 you need to “set” them by giving them a direction and,
3808 optionally, the <kbd>QUAD</kbd> argument. In this respect, ST is
3810 <a href="#tab-set">TAB_SET</a>
3811 except that you don’t have to give ST an indent or a
3812 line length (that’s already taken care of, inline, by
3813 <kbd>\*[ST]...\*[STX]</kbd>). If you want string tab 1 to be left,
3816 <span class="pre-in-pp">
3819 If you want it to be left and
3820 <a href="definitions.html#filled">filled</a>, enter
3822 <span class="pre-in-pp">
3825 If you want it to be justified, enter
3827 <span class="pre-in-pp">
3831 <a href="#string-tabs-tut">Quickie tutorial on string tabs</a>
3832 for a full explanation of setting up string tabs.
3837 <div class="macro-id-overline">
3838 <h3 id="tab" class="macro-id">Call tabs</h3>
3841 <div class="box-macro-args">
3842 Macro: <b>TAB</b> <kbd class="macro-args"><tab number></kbd>
3845 <i>Alias:</i> <b>TB</b>
3849 After tabs have been defined (either with
3850 <a href="#tab-set">TAB_SET</a>
3852 <a href="#st">ST</a>),
3853 TAB moves to whatever tab number you pass it as an argument. For
3856 <span class="pre-in-pp">
3862 <div id="note-tn" class="box-tip">
3864 <span class="note">Note:</span> TAB breaks the line preceding it and
3865 advances 1 linespace. Hence,
3867 <span class="pre-in-pp">
3869 A line of text in tab 1.
3871 A line of text in tab 2.
3875 <span class="pre-in-pp">
3876 A line of text in tab 1.
3877 A line of text in tab 2.
3879 If you want the tabs to line up, use
3880 <a href="#tn">TN</a>
3882 or, more conveniently, the inline escape
3883 <a href="#tn">\*[TB+]</a>:
3885 <span class="pre-in-pp">
3887 A line of text in tab 1.\*[TB+]
3888 A line of text in tab 2.
3892 <span class="pre-in-pp">
3893 A line of text in tab 1. A line of text in tab 2.
3895 If the text in your tabs runs to several lines, and you want the
3896 first lines of each tab to align, you must use the
3897 <a href="#multicolumns-intro">multi-column</a> macros.
3900 <p id="tab-add-note" class="tip-bottom">
3901 <span class="additional-note">Additional note:</span> Any indents
3902 in effect prior to calling a tab are automatically turned off by
3903 TAB. If you were happily zipping down the page with a left indent
3904 of 2 picas turned on, and you call a tab whose indent from the left
3905 margin is 6 picas, your new distance from the left margin will be 6
3906 picas, not 6 picas plus the 2 pica indent.
3912 <div class="macro-id-overline">
3913 <h3 id="tn" class="macro-id">Tab Next</h3>
3916 <div class="box-macro-args">
3918 <br/>Inline escape: <b>\*[TB+]</b>
3922 TN moves over to the next tab in numeric sequence (tab n+1) without
3923 advancing on the page. See the
3924 <a href="#note-tn">NOTE</a>
3925 in the description of the TAB macro for an example of how TN works.
3929 In tabs that aren’t given the <kbd class="normal">QUAD</kbd>
3930 argument when they’re set up with
3931 <a href="#tab-set" class="normal">TAB_SET</a>
3933 <a href="#st" class="normal">ST</a>,
3934 you must terminate the line preceding <kbd class="normal">.TN</kbd>
3935 with the <kbd class="normal">\c</kbd> inline escape. Conversely,
3936 if you did give a <kbd>QUAD</kbd> argument to TAB_SET or ST, the
3937 <kbd>\c</kbd> must not be used.
3941 If you find remembering whether to put in the
3942 <kbd class="normal">\c</kbd> bothersome, you may prefer to use the
3943 <a href="definitions.html#inlines" class="normal">inline escape</a>
3945 <kbd class="normal">.TN</kbd>,
3946 <kbd class="normal"><a href="inlines.html#tb-plus-mom">\*[TB+]</a></kbd>,
3947 which works consistently regardless of the fill mode.
3950 <div id="tn-note" class="box-tip">
3952 <span class="note">Note:</span> You must put text in the
3953 <a href="definitions.html#inputline">input line</a>
3954 immediately after TN. Stacking of TN’s is not
3955 allowed. In other words, you cannot do
3957 <span class="pre-in-pp">
3966 The above example, assuming tabs numbered from 1 to 4, should be entered
3968 <span class="pre-in-pp">
3979 <kbd>\&</kbd> is a zero-width, non-printing character that groff
3980 recognizes as valid input, hence meets the requirement for input
3981 text following <kbd>.TN</kbd>.
3987 <div class="macro-id-overline">
3988 <h3 id="tq" class="macro-id">Tab Quit</h3>
3991 <div class="box-macro-args">
3996 TQ takes you out of whatever tab you were in, advances 1 linespace,
3997 and restores the left margin, line length, quad direction and
3998 <a href="definitions.html#filled">fill mode</a>
3999 that were in effect prior to invoking any tabs.
4002 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
4004 <!-- ==================================================================== -->
4006 <h2 id="multicolumns-intro" class="macro-group">Multiple columns</h2>
4009 Tabs are not by nature columnar, which is to say that if the text
4010 inside a tab runs to several lines, calling another tab does not
4011 automatically move to the
4012 <a href="definitions.html#baseline">baseline</a>
4013 of the first line in the previous tab. To demonstrate:
4015 <span class="pre-in-pp">
4027 <span class="pre-in-pp">
4035 The multi-column macros allow you to set tabs in columnar fashion,
4036 rather than line by line. When you invoke multi-column mode (with
4037 <kbd><a href="#mco">.MCO</a></kbd> –
4038 <span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">O</span>n),
4039 mom saves the position of the current baseline.
4040 <kbd><a href="#mcr">.MCR</a></kbd>
4041 (<span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">R</span>eturn)
4042 at any point while multi-columns are on returns you to the saved
4043 position. Exiting multi-columns
4044 (<kbd><a href="#mcx">.MCX</a></kbd> –
4045 <span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn e<span style="text-decoration: underline">X</span>it)
4046 quits the current tab (if you’re in one) and moves you to the
4047 bottom of the longest column. (Note that you do not have to use
4048 multi-columns in conjunction with tabs.)
4052 Using our example above, but setting it in multi-column mode,
4054 <span class="pre-in-pp">
4069 <span class="pre-in-pp">
4072 Broccoli $0.99/bunch
4076 <div class="box-tip">
4078 <span class="note">Note:</span> Do not confuse MCO with
4080 <a href="docprocessing.html#columns">COLUMNS</a>
4082 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4086 <div id="index-multicolumns" class="macro-list-container">
4087 <h3 class="macro-list">Multi-columns macros</h3>
4089 <ul class="macro-list">
4090 <li><a href="#mco">MCO</a> – begin multi-column setting</li>
4091 <li><a href="#mcr">MCR</a> – return to top of column</li>
4092 <li><a href="#mcx">MCX</a> – exit multi-columns</li>
4098 <div class="macro-id-overline">
4099 <h3 id="mco" class="macro-id">Begin multi-column setting</h3>
4102 <div class="box-macro-args">
4107 MCO (<span style="text-decoration: underline;">M</span>ulti-<span style="text-decoration: underline;">C</span>olumn <span style="text-decoration: underline;">O</span>n) is the macro you use to begin multi-column
4108 setting. It marks the current
4109 <a href="definitions.html#baseline">baseline</a>
4110 as the top of your columns, for use later with
4111 <a href="#mcr">MCR</a>.
4113 <a href="#multicolumns-intro">introduction to columns</a>
4114 for an explanation of multi-columns and some sample
4118 <div class="box-tip">
4120 <span class="note">Note:</span> Do not confuse MCO with
4122 <a href="docprocessing.html#columns">COLUMNS</a>
4124 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4130 <div class="macro-id-overline">
4131 <h3 id="mcr" class="macro-id">Return to top of column</h3>
4134 <div class="box-macro-args">
4139 Once you’ve turned multi-columns on (with
4140 <kbd><a href="#mco">.MCO</a></kbd>),
4141 <kbd>.MCR</kbd>, at any time, returns you to the top of
4147 <div class="macro-id-overline">
4148 <h3 id="mcx" class="macro-id">Exit multi-columns</h3>
4151 <div class="box-macro-args">
4152 Macro: <b>MCX</b> <kbd class="macro-args">[ <distance to advance below longest column> ]</kbd>
4154 <p class="requires">
4155 • Optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4159 MCX takes you out of any tab you were in (by silently invoking
4160 <kbd><a href="#tq">.TQ</a></kbd>)
4161 and advances to the bottom of the longest column.
4165 Without an argument, MCX advances 1 linespace below the longest
4166 column. Linespace, in this instance, is the
4167 <a href="definitions.html#leading">leading</a>
4168 in effect at the moment MCX is invoked.
4172 If you pass the <kbd><distance></kbd> argument to MCX, it
4173 advances 1 linespace below the longest column (see above) PLUS the
4174 distance specified by the argument. The argument requires a unit
4175 of measure; therefore, to advance an extra 6 points below where MCX
4176 would normally place you, you’d enter
4178 <span class="pre-in-pp">
4183 <div class="box-tip">
4185 <span class="note">Note:</span> If you wish to advance a precise
4187 <a href="definitions.html#baseline">baseline</a>
4188 of the longest column, use MCX with an argument of 0 (zero; no unit
4189 of measure required) in conjunction with the
4190 <a href="#ald">ALD</a>
4193 <span class="pre-in-pp" style="margin-bottom: -12px;">
4201 The above advances to precisely 24 points below the baseline
4202 of the longest column.
4205 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
4207 <!-- ==================================================================== -->
4209 <h2 id="indents-intro" class="macro-group">Indents</h2>
4212 With mom’s indents, you can indent from the left, the right,
4213 or both margins. In addition, mom provides temporary left indents
4214 (ie only one line is indented, as at the start of a paragraph)
4215 and “hanging” left indents (the reverse of a temporary
4216 indent; the first line isn’t indented, subsequent lines are).
4219 <h3 id="indents-handling" class="docs">How mom handles indents</h3>
4222 Mom provides five kinds of indents: left, right, both, temporary,
4223 and hanging. Each is invoked by its own name:
4225 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4226 <li>IL – Indent Left</li>
4227 <li>IR – Indent Right</li>
4228 <li>IB – Indent Both</li>
4229 <li>HI – Hanging Indent</li>
4230 <li>TI – Temporary Indent</li>
4234 In addition, there are four macros to control exiting from
4237 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4238 <li>IQ – quit all active indents</li>
4239 <li>ILX – exit indent style left</li>
4240 <li>IRX – exit indent style right</li>
4241 <li>IBX – exit indent style both</li>
4245 This section deals exclusively with IL, IR and IB. For an
4246 explanation of hanging and temporary indents—how they work and
4247 how to use them—see
4248 <a href="#hi">Hanging indents</a>
4250 <a href="#ti">Temporary indents</a>.
4254 The first time you invoke any of mom’s indents, you must
4255 supply a measure. For example,
4257 <span class="pre-in-pp">
4260 indents text 2 picas from the left margin (or current tab indent).
4264 When you want to exit the above indent, use either
4266 <span class="pre-in-pp" style="margin-bottom: -1em;">
4270 <span class="pre-in-pp" style="margin-top: -.5em;">
4273 The next time you want the same indent, invoke it without the
4274 argument, like this:
4276 <span class="pre-in-pp">
4279 As you can see, once you’ve supplied a measure to an indent
4280 macro, mom stores the value, obviating the need to repeat it on
4281 subsequent invocations. And mom doesn’t just store the
4282 measure—she hangs on to it tenaciously. Arguments passed to
4283 IL, IR and IB are additive. Consider the following:
4285 <span class="pre-in-pp">
4287 .IR 2P \"Indent right by 2 picas
4288 A first block of text...
4291 .IQ \"Turn indent off
4292 A second block of text...
4295 .IR 2P \"Indent right by an additional 2 picas (ie 4 picas)
4296 A third block of text...
4300 The first block of text is right indented by 2 picas (ie the line
4301 length is shortened by 2 picas to 18 picas). The second block of
4302 text, after IQ, is, as you’d expect, set to the full measure.
4303 The third block of text—the one to pay attention to—is
4304 not right indented by 2 picas, but rather by 4 picas. Mom adds
4305 the value of arguments to IL, IR and IB to whatever value is already
4310 If you wanted the third block of text in the example above to be
4311 right indented by just 2 picas (the original measure given to IR),
4312 you would enter <kbd>.IR</kbd> without an argument.
4316 Because indent arguments are additive, putting a minus sign in front
4317 of the argument can be used to subtract from the current value.
4318 In the following example, the first line is indented 18 points,
4319 the second is indented 36 points (18 + 18), and the third is again
4320 indented 18 points (36 - 18).
4322 <span class="pre-in-pp">
4323 .IL 18p \"Indent left by 18 points = 18 points
4325 .IL 18p \"Indent left by 18 points more = 36 points
4326 for all good men to come
4327 .IL -18p \"Indent left by 18 points less = 18 points
4328 to the aid of the party.
4330 Sometimes, you may want to clear out the stored indent
4331 values—let mom start indenting with a clean slate, as it
4332 were. Giving the optional argument <kbd>CLEAR</kbd> to any of the
4333 “indent quit” macros resets them to zero.
4335 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4336 <li>IQ CLEAR – quit and clear all indents</li>
4337 <li>ILX CLEAR – quit and clear indent style left</li>
4338 <li>IRX CLEAR – quit and clear indent style right</li>
4339 <li>IBX CLEAR – quit and clear indent style both</li>
4343 Indent styles may be combined and manipulated separately. You
4344 could, for example, have a left indent of 4 picas and a right indent
4345 of 6 picas and control each separately, as in the following example.
4347 <span class="pre-in-pp">
4348 .IL 4P \"Indent left 4 picas
4349 .IR 6P \"Indent right 6 picas
4351 .IRX \"Turn off the right indent only
4352 More text \"Text is still indented 4 picas left
4354 If, at <kbd>.IRX</kbd>, you wanted the text afterwards to have no
4355 indents (either left or right), you would enter <kbd>.IQ</kbd>,
4356 which exits all indent styles at once.
4360 A word of advice: Indents are best used only when you have a
4361 compelling reason not to change the current left margin or line
4362 length. In many instances where indents might seem expedient,
4363 it’s better to use tabs, or actually change the left margin
4364 or the line length. Mom’s indenting macros are flexible and
4365 powerful, but easy to get tangled up in.
4368 <div class="box-tip">
4370 <span class="note">Note:</span> see the section
4371 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
4372 for information and advice on using indents with the
4373 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4377 <div id="index-indents" class="macro-list-container">
4378 <h3 class="macro-list">Indents macros</h3>
4380 <ul class="macro-list">
4381 <li><a href="#il">IL</a> – Indent left</li>
4382 <li><a href="#ir">IR</a> – Indent right</li>
4383 <li><a href="#ib">IB</a> – Indent both</li>
4384 <li><a href="#ti">TI</a> – Temporary indent, left</li>
4385 <li><a href="#hi">HI</a> – Hanging Indent
4386 <ul style="margin-left: -.5em; list-style-type: disc;">
4387 <li><a href="#num-lists">Recipe: a numbered list using hanging indents</a></li>
4389 <li><a href="#iq">IQ</a> – Quit indents, all</li>
4390 <li><a href="#iq">ILX</a> – Exit indent style left</li>
4391 <li><a href="#iq">IRX</a> – Exit indent style right</li>
4392 <li><a href="#iq">IBX</a> – Exit indent style both</li>
4398 <div class="macro-id-overline">
4399 <h3 id="il" class="macro-id">Indent left</h3>
4402 <div class="box-macro-args">
4403 Macro: <b>IL</b> <kbd class="macro-args">[ <measure> ]</kbd>
4405 <p class="requires">
4406 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4410 IL indents text from the left margin of the page, or if you’re
4411 in a tab, from the left edge of the tab. Once IL is on, the left
4412 indent is applied uniformly to every subsequent line of text, even
4413 if you change the line length.
4417 The first time you invoke <kbd>.IL</kbd>, you must give it a
4418 measure. Subsequent invocations with a measure add to the previous
4419 measure. A minus sign may be prepended to the argument to subtract
4420 from the current measure. The
4421 <kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
4422 <a href="definitions.html#inlines">inline escape</a>
4423 may be used to specify a text-dependent measure, in which case no
4424 unit of measure is required. For example,
4426 <span class="pre-in-pp">
4429 indents text by the width of the word “margarine”.
4433 With no argument, IL indents by its last active value. See the
4434 <a href="#indents-explanation">brief explanation of how mom handles indents</a>
4438 <div class="box-tip">
4440 <span class="note">Note:</span> Calling a tab (with
4441 <kbd><a href="#tab">.TAB <n></a></kbd>)
4442 automatically cancels any active indents.
4445 <p class="tip-bottom">
4446 <span class="additional-note">Additional note:</span> Invoking IL
4447 automatically turns off IB.
4453 <div class="macro-id-overline">
4454 <h3 id="ir" class="macro-id">Indent right</h3>
4457 <div class="box-macro-args">
4458 Macro: <b>IR</b> <kbd class="macro-args">[ <measure> ]</kbd>
4460 <p class="requires">
4461 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4465 IR indents text from the right margin of the page, or if
4466 you’re in a tab, from the end of the tab.
4470 The first time you invoke <kbd>.IR</kbd>, you must give it a
4471 measure. Subsequent invocations with a measure add to the previous
4472 indent measure. A minus sign may be prepended to the argument to
4473 subtract from the current indent measure. The
4474 <kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
4475 <a href="definitions.html#inlines">inline escape</a>
4476 may be used to specify a text-dependent measure, in which case no
4477 unit of measure is required. For example, <br/>
4478 <span class="pre-in-pp">
4481 indents text by the width of the word “jello”.
4485 With no argument, IR indents by its last active value. See the
4486 <a href="#indents-explanation">brief explanation of how mom handles indents</a>
4490 <div class="box-tip">
4492 <span class="note">Note:</span> Calling a tab (with
4493 <kbd><a href="#tab">.TAB <n></a></kbd>)
4494 automatically cancels any active indents.
4497 <p class="tip-bottom">
4498 <span class="additional-note">Additional note:</span> Invoking IR
4499 automatically turns off IB.
4505 <div class="macro-id-overline">
4506 <h3 id="ib" class="macro-id">Indent both</h3>
4509 <div class="box-macro-args">
4510 Macro: <b>IB</b> <kbd class="macro-args">[ <left measure> <right measure> ]</kbd>
4512 <p class="requires">
4513 • The optional arguments require a <a href="definitions.html#unitofmeasure">unit of measure</a>
4517 IB allows you to set or invoke a left and a right indent at the same
4522 At its first invocation, you must supply a measure for both indents;
4523 at subsequent invocations when you wish to supply a measure, both
4524 must be given again. As with IL and IR, the measures are added to
4525 the values previously passed to the macro. Hence, if you wish to
4526 change just one of the values, you must give an argument of zero to
4531 A word of advice: If you need to manipulate left and right
4532 indents separately, use a combination of IL and IR instead of IB.
4533 You’ll save yourself a lot of grief.
4537 A minus sign may be prepended to the arguments to subtract from
4538 their current values. The
4539 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
4540 <a href="definitions.html#inlines">inline escape</a>
4541 may be used to specify text-dependent measures, in which case no
4542 unit of measure is required. For example,
4544 <span class="pre-in-pp">
4545 .IB \w’margarine’ \w'jello'
4547 left indents text by the width of the word “margarine”
4548 and right indents by the width of “jello”.
4552 Like IL and IR, IB with no argument indents by its last active
4554 <a href="#indents-explanation">brief explanation of how mom handles indents</a>
4558 <div class="box-tip">
4560 <span class="note">Note:</span> Calling a tab (with
4561 <kbd><a href="#tab">.TAB <n></a></kbd>)
4562 automatically cancels any active indents.
4565 <p class="tip-bottom">
4566 <span class="additional-note">Additional note:</span> Invoking IB
4567 automatically turns off IL and IR.
4573 <div class="macro-id-overline">
4574 <h3 id="ti" class="macro-id">Temporary (left) indent</h3>
4577 <div class="box-macro-args">
4578 Macro: <b>TI</b> <kbd class="macro-args">[ <measure> ]</kbd>
4580 <p class="requires">
4581 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4585 A temporary indent is one that applies only to the first line of
4586 text that comes after it. Its chief use is indenting the first line
4587 of paragraphs. (Mom’s
4588 <a href="docelement.html#pp">PP</a>
4589 macro, for example, uses a temporary indent.)
4593 The first time you invoke <kbd>.TI</kbd>, you must give
4594 it a measure. If you want to indent the first line of a paragraph
4596 <a href="definitions.html#em">ems</a>,
4599 <span class="pre-in-pp">
4602 Subsequent invocations of TI do not require you to supply a measure;
4603 mom keeps track of the last measure you gave it.
4607 Because temporary indents are temporary, there’s no need to
4611 <div class="box-important">
4613 <span class="important">IMPORTANT:</span> Unlike IL, IR and IB,
4614 measures given to TI are NOT additive. In the following example,
4615 the second <kbd>.TI 2P</kbd> is exactly 2 picas.
4617 <span class="pre-in-pp" style="margin-bottom: -18px;">
4619 The beginning of a paragraph...
4621 The beginning of another paragraph...
4628 <div class="macro-id-overline">
4629 <h3 id="hi" class="macro-id">Hanging indent</h3>
4632 <div class="box-macro-args">
4633 Macro: <b>HI</b> <kbd class="macro-args">[ <measure> ]</kbd>
4635 <p class="requires">
4636 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4640 A hanging indent looks like this:
4642 <span class="pre-in-pp">
4643 The thousand injuries of Fortunato I had borne as best I
4644 could, but when he ventured upon insult, I vowed
4645 revenge. You who so well know the nature of my soul
4646 will not suppose, however, that I gave utterance to a
4647 threat, at length I would be avenged...
4649 The first line of text “hangs” outside the left margin.
4653 In order to use hanging indents, you must first have a left indent
4654 active (set with either
4655 <kbd><a href="#il">.IL</a></kbd>
4657 <kbd><a href="#ib">.IB</a></kbd>).
4658 Mom will not hang text outside the left margin set with
4659 <kbd><a href="#l-margin">.L_MARGIN</a></kbd>
4660 or outside the left margin of a tab.
4664 The first time you invoke <kbd>.HI</kbd>, you must give
4665 it a measure. If you want the first line of a paragraph to hang by,
4668 <span class="pre-in-pp">
4672 Subsequent invocations of HI do not require you to supply a measure;
4673 mom keeps track of the last measure you gave it.
4677 Generally speaking, you should invoke HI immediately prior to the
4678 line you want hung (ie without any intervening
4679 <a href="definitions.html#controllines">control lines</a>).
4680 And because hanging indents affect only one line, there’s no
4681 need to turn them off.
4684 <div class="box-important">
4686 <span class="important">IMPORTANT:</span> Unlike IL, IR and IB,
4687 measures given to HI are NOT additive. Each time you pass a measure
4688 to HI, the measure is treated literally.
4692 <h4 id="num-lists" class="macro-id">Recipe: A numbered list using hanging indents</h4>
4694 <div class="box-tip" style="margin-top: -.5em; margin-bottom: -.5em;">
4696 <span class="note">Note:</span> mom has macros for setting lists (see
4697 <a href="docelement.html#list-intro">Nested lists</a>).
4698 This recipe exists to demonstrate the use of hanging indents only.
4702 <p style="margin-top: 1.5em;">
4703 <span class="pre-in-pp">
4704 .PAGE 8.5i 11i 1i 1i 1i 1i
4714 1.\0The most important point to be considered is whether the
4715 answer to the meaning of Life, the Universe, and Everything
4716 really is 42. We have no-one’s word on the subject except
4719 2.\0If the answer to the meaning of Life, the Universe,
4720 and Everything is indeed 42, what impact does this have on
4721 the politics of representation? 42 is, after all not a
4722 prime number. Are we to infer that prime numbers don’t
4723 deserve equal rights and equal access in the universe?
4725 3.\0If 42 is deemed non-exclusionary, how do we present it
4726 as the answer and, at the same time, forestall debate on its
4727 exclusionary implications?
4729 First, we invoke a left indent with a measure equal to the width of
4731 <a href="definitions.html#figurespace">figures spaces</a>
4732 plus a period (using the
4733 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
4734 inline escape). At this point, the left indent is active; text
4735 afterwards would normally be indented. However, we invoke a
4736 hanging indent of exactly the same width, which hangs the first
4737 line (and first line only!) to the left of the indent by the
4738 same distance (in this case, that means “out to the left
4739 margin”). Because we begin the first line with a number,
4740 a period, and a figure space, the actual text (“The most
4741 important point...”) starts at exactly the same spot as the
4742 indented lines that follow.
4746 Notice that subsequent invocations of <kbd>.HI</kbd> don’t
4747 require a measure to be given.
4751 Paste the example above into a file and preview it with
4753 <span class="pre-in-pp">
4754 pdfmom filename.mom > filename.pdf
4756 to see hanging indents in action.
4761 <div class="macro-id-overline">
4762 <h3 id="iq" class="macro-id">Quitting indents</h3>
4765 <div class="box-macro-args">
4766 Macro: <b>IQ</b> <kbd class="macro-args">[ CLEAR ]</kbd> (quit any/all indents — see IMPORTANT NOTE)
4770 Macro: <b>ILX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Left)
4773 Macro: <b>IRX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Right)
4776 Macro: <b>IBX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Both)
4778 <div class="box-important">
4780 <span class="important">IMPORTANT NOTE:</span> The original macro
4781 for quitting all indents was IX. This usage has been deprecated in
4782 favour of IQ. IX will continue to behave as before, but mom will
4783 issue a warning to stderr indicating that you should update your
4787 <p class="tip-bottom">
4788 As a consequence of this change, ILX, IRX and IBX may now also be
4789 invoked as ILQ, IRQ and IBQ. Both forms are acceptable.
4794 Without an argument, the macros to quit indents merely restore your
4795 original margins and line length. The measures stored in the indent
4796 macros themselves are saved so you can call them again without
4797 having to supply a measure.
4801 If you pass these macros the optional argument <kbd>CLEAR</kbd>,
4802 they not only restore your original left margin and line length, but
4803 also clear any values associated with a particular indent style.
4804 The next time you need an indent of the same style, you have to
4805 supply a measure again.
4809 <kbd>.IQ CLEAR</kbd>, as you’d suspect,
4810 quits and clears the values for all indent styles at once.
4813 <div class="rule-long"><hr/></div>
4815 <!-- Navigation links -->
4816 <table style="width: 100%; margin-top: 12px;">
4818 <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
4819 <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
4820 <td style="width: 33%; text-align: right;"><a href="goodies.html#top">Next: Goodies</a></td>
4826 <div class="bottom-spacer"><br/></div>
4830 <!-- vim: fileencoding=utf-8: nomodified: -->