1 <?xml version="1.0" encoding="utf-8"?>
3 This file is part of groff, the GNU roff type-setting system.
5 Copyright (C) 2004-2018 Free Software Foundation, Inc.
6 Written by Peter Schaffter (peter@schaffter.ca).
8 Permission is granted to copy, distribute and/or modify this document
9 under the terms of the GNU Free Documentation License, Version 1.3 or
10 any later version published by the Free Software Foundation; with no
11 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
14 A copy of the Free Documentation License is included as a file called
15 FDL in the main directory of the groff source package.
18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml">
22 <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
23 <title>Mom -- 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">Coloured text</a>
113 <ul class="no-enumerator">
114 <li class="item"><a href="color.html#index-color">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, e.g.,
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, e.g.,
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 (e.g., 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 (e.g., 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 (e.g., .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.
1668 <p style="margin-top: -.5em">
1669 <i><b>Suggestion:</b> If you find remembering whether to put in the</i>
1671 <i>bothersome, you may prefer to use the</i>
1672 <a href="definitions.html#inlines">inline escape</a>
1673 <i>alternative to</i> EL,
1674 <a href="inlines.html#b"><kbd>\*[B]</kbd></a>,
1675 <i>which works consistently regardless of the fill mode.
1676 </i>EL <i>does not work after the</i>
1677 <a href="goodies.html#pad">PAD</a>
1679 <a href="goodies.html#nobreak"><kbd>.PAD NOBREAK</kbd></a>
1680 <i>for the way around this.</i>
1684 EL ("<span style="text-decoration: underline;">E</span>nd <span style="text-decoration: underline;">L</span>ine")
1685 is conceptually equivalent to the notion of a carriage return with
1686 no linefeed. Its function is simple: it breaks a line without
1687 advancing on the page. As an example of where you might use it,
1688 imagine that you’re working from marked-up copy. The markup
1689 indicates 24 points of space between two given lines, but the
1690 prevailing line spacing is 12.5 points. You may find it more
1691 convenient to break the first line with EL and instruct mom to
1692 advance 24 points to the next line instead of calculating the lead
1693 that needs to be added to 12.5 to get 24. To demonstrate:
1695 <span class="pre-in-pp">
1701 The next line of text.
1703 may be more intuitive than
1705 <span class="pre-in-pp">
1710 The next line of text.
1712 The first example has the further advantage that should you wish to
1713 change the prevailing line space but keep the 24 points lead, you
1714 don’t have to recalculate the extra space.
1718 ALD in the above examples stands for
1719 “<span style="text-decoration: underline;">A</span>dvance
1720 <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>”,
1721 which is covered in the section
1722 <a href="#aldrld-intro">Vertical movements</a>.
1727 <div class="macro-id-overline">
1728 <h3 id="space" class="macro-id">Break lines and add space between</h3>
1731 <div class="box-macro-args">
1732 Macro: <b>SPACE</b> <kbd class="macro-args"><space to add between lines></kbd>
1735 <i>Alias:</i> <b>SP</b>
1739 SPACE breaks a line, just like
1740 <a href="#br">BR</a>,
1741 then adds space after the line. With no argument, it adds an extra
1742 line space of a value equal to the current
1743 <a href="definitions.html#leading">leading</a>.
1744 If you pass it a numeric argument without supplying a
1745 <a href="definitions.html#unitofmeasure">unit of measure</a>,
1746 it advances that number of extra line spaces. For example:
1748 <span class="pre-in-pp">
1751 breaks the line then adds an extra linespace, whereas
1753 <span class="pre-in-pp">
1756 breaks the line and adds two extra linespaces.
1760 If you supply a unit of measure, SPACE breaks the line then advances
1761 one linespace (at the current
1762 <a href="definitions.html#leading">leading</a>)
1763 PLUS the specified amount of extra space given to SPACE, as in
1765 <span class="pre-in-pp">
1768 which breaks the line and advances one full linespace plus six
1772 <div class="box-tip">
1774 <span class="tip">Tip:</span> SPACE and
1775 <a href="#ald">ALD</a>
1776 can be used interchangeably (<kbd>.SPACE 6p</kbd> and
1777 <kbd>.ALD 6p</kbd> are equivalent). However, ALD without an
1778 argument does nothing, whereas SPACE without an argument adds an
1779 extra line space. I recommend using SPACE when you want an extra
1780 line space (or multiple thereof), and ALD whenever you want some
1781 other value of space after a line.
1784 <p class="tip-bottom">
1785 <span class="experts">Experts:</span> SPACE is an alias of
1786 <kbd>.sp</kbd>. You can use either, or mix ’n’ match
1793 <div class="macro-id-overline">
1794 <h3 id="spread" class="macro-id">Break and force justify (spread) lines</h3>
1797 <div class="box-macro-args">
1798 Macro: <b>SPREAD</b>
1802 Sometimes, you need to break a line of
1803 <a href="definitions.html#just">justified</a>
1804 text and have it come out fully justified, not
1805 <a href="definitions.html#quad">quadded</a>
1806 left the way it would be with the
1807 <a href="#br">BR</a>
1808 macro. An example of where you’d do this would be when you
1809 want to prevent a word at the end of a line from being hyphenated
1810 (say, a proper name). SPREAD is the macro that lets you break the
1811 line and have it came out fully justified.
1814 <div class="box-tip">
1816 <span class="experts">Experts:</span> SPREAD is an alias for
1817 <kbd>.brp</kbd> You can use either, or mix ’n’ match
1824 <div class="macro-id-overline">
1825 <h3 id="join" class="macro-id">Join input lines</h3>
1828 <div class="box-macro-args">
1829 Inline: <kbd class="macro-args">\c</kbd>
1833 Sometimes, especially when in one of the
1834 <a href="definitions.html#filled">nofill modes</a>,
1835 a macro will cause a break where you don’t want one. In order
1836 to prevent this from happening (in other words, to join
1837 <a href="definitions.html#inputline">input lines</a>
1838 together, forming one
1839 <a href="definitions.html#outputline">output line</a>),
1841 <a href="definitions.html#inlines">inline escape</a>
1842 <kbd>\c</kbd> at the end of each input line to be
1843 joined to another, like this:
1845 <span class="pre-in-pp">
1849 Some lines of text to be \c
1857 Upon output, the lines will be joined together to read
1859 <span class="pre-in-pp">
1860 Some lines of text to be joined together.
1862 with the word “joined” in Helvetica bold. Note the
1863 spaces before <kbd>\c</kbd>. Without them, the last three words of
1864 the output line would read
1866 <span class="pre-in-pp">
1869 Please also note that had the example been in one of the
1870 <a href="definitions.html#filled">fill modes</a>,
1871 there’d have been no need for the <kbd>\c</kbd>.
1874 <div class="box-tip">
1876 <b>Addendum:</b> The example, above, is designed to demonstrate the
1877 use of <kbd>\c</kbd>. An easier and more intuitive way
1878 to accomplish the family/font change in the example would be with
1880 <a href="definitions.html#inlines">inline escape</a>,
1881 <kbd><a href="inlines.html#inline-fonts-groff">\f</a></kbd>,
1884 <span class="pre-in-pp" style="padding-bottom: 0px;">
1885 Some lines of text to be \f[HB]joined\*[PREV] together.
1890 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
1892 <!-- ==================================================================== -->
1894 <h2 id="refinements-intro" class="macro-group">Typographic refinements</h2>
1897 The macros in this section help you tweak groff’s behaviour,
1898 ensuring that your documents look typographically professional.
1901 <div id="index-refinements" class="macro-list-container">
1902 <h3 class="macro-list">Typographic refinements macros</h3>
1904 <ul class="macro-list">
1905 <li>Word and sentence spacing
1906 <ul style="list-style-type: none; margin-left: -1em;">
1907 <li><a href="#ws">WS</a> – word spacing</li>
1908 <li><a href="#ss">SS</a> – sentence space</li>
1910 <li>Letter spacing (track kerning)
1911 <ul style="list-style-type: none; margin-left: -1em;">
1912 <li><a href="#rw">RW</a> – reduce whitespace</li>
1913 <li><a href="#ew">EW</a> – expand whitespace</li>
1914 <li><a href="#br-at-line-kern">BR_AT_LINE_KERN</a></li>
1917 <ul style="list-style-type: none; margin-left: -1em;">
1918 <li><a href="#hy">HY</a> – turn auto hyphenation on/off, or set specific hyphenation parameters</li>
1919 <li><a href="#hy-set">HY_SET</a> – set all hyphenation parameters</li>
1921 <li>Automatic kerning and ligatures
1922 <ul style="list-style-type: none; margin-left: -1em;">
1923 <li><a href="#kern">KERN</a> – turn automatic pairwise kerning on or off</li>
1924 <li><a href="#ligatures">LIGATURES</a> – turn automatic generation of ligatures on or off</li>
1931 <div class="macro-id-overline">
1932 <h3 id="ws" class="macro-id">Word spacing</h3>
1935 <div class="box-macro-args">
1936 Macro: <b>WS</b> <kbd class="macro-args"><+|-wordspace> | DEFAULT</kbd>
1940 WS (Word Space) increases or decreases the amount of space between
1942 <a href="definitions.html#filled">nofill modes</a>,
1944 <a href="#quad">QUAD</a>
1945 is in effect, the space between words is fixed. Therefore, if you
1946 change the word spacing with WS, the change applies uniformly to the
1947 space between every word on every line. However, when text is
1948 <a href="definitions.html#just">justified</a>,
1949 the space between words varies from line to line (in order to
1950 justify the text). Consequently, the change you make with WS
1951 represents the minimum (and ideal) space groff will try to put
1952 between words before deciding whether to hyphenate a final word or
1953 to stretch the word spacing.
1957 Word space is relative to point size. Generally, in/decreasing the
1958 word space by a value of 1 or 2 produces a difference that in many
1959 cases is scarcely visible; in/decreasing by a value between 3 and 5
1960 produces a subtle but noticeable difference; and in/decreasing by a
1961 value greater than 6 is almost always apparent. You should preview
1962 your work to assess the effect of WS.
1966 WS takes as its argument a whole number preceded by a plus or minus
1967 sign. Therefore, to decrease the word space slightly, you might
1970 <span class="pre-in-pp">
1973 To increase it by a noticeable amount, you might enter
1975 <span class="pre-in-pp">
1978 You can reset the word spacing to its previous value by switching
1979 the plus or minus sign, like this:
1981 <span class="pre-in-pp">
1986 The <kbd>.WS -2</kbd> undoes the effect of
1987 <kbd>.WS +2</kbd>. You can also reset WS to its groff default
1990 <span class="pre-in-pp">
1993 This can be particularly useful if you’ve been playing around
1994 with plus and minus values, and can’t remember by how much to
1995 in/decrease the word space to get it back to normal.
2000 <div class="macro-id-overline">
2001 <h3 id="ss" class="macro-id">Sentence space</h3>
2004 <div class="box-macro-args">
2005 Macro: <b>SS</b> <kbd class="macro-args"><+sentence space> | 0 | DEFAULT</kbd>
2009 SS (Sentence Space) tells groff how to treat double spaces it
2010 encounters between sentences in
2011 <a href="definitions.html#inputline">input lines</a>.
2012 If you use SS, input sentences with two spaces after them <i>and</i>
2013 input sentences that fall at the end of input lines all receive a
2014 normal word space plus an additional amount of space whose size is
2015 determined by the + value passed as an argument to SS. Thus,
2017 <span class="pre-in-pp">
2020 means that input sentences with two spaces after them receive a
2021 normal word space PLUS the +2 value passed to SS.
2026 <a href="#ws">WS</a>,
2027 increasing the sentence space by a value of 1 or 2 produces a
2028 difference that in many cases is scarcely visible; increasing by a
2029 value of 5 or so produces a subtle but noticeable difference (ie
2030 the space between double-spaced input sentences will be slightly but
2031 visibly greater than the space between words); and increasing by a
2032 value greater than 10 is always apparent. You should preview your
2033 work to assess the effect of SS.
2037 There’s an additional argument you can pass SS: the number
2038 zero (without the + sign). It’s the argument you’ll
2039 use most often. Typeset copy should never have two spaces between
2040 sentences, and the "zero" argument tells groff to give the extra
2041 spaces no space at all (effectively removing them). Therefore, if
2042 you double-space your sentences (as you should when writing in a
2043 text editor), get in the habit of putting
2045 <span class="pre-in-pp">
2048 at the top of your files.
2052 If you do use SS for something other than ensuring that you
2053 don’t get unwanted sentence spaces in output copy, you can set
2054 or reset the sentence space to the groff default (the same width
2055 as a word space, ie double-spaced input sentences will appear
2056 double-spaced on output as well) with
2058 <span class="pre-in-pp">
2061 If you’re using the
2062 <a href="docprocessing.html">document processing macros</a>
2064 <a href="docprocessing.html#printstyle">PRINTSTYLE</a>
2065 is <kbd>TYPEWRITE</kbd>, <kbd>.SS DEFAULT</kbd> is the
2066 default, because you do want double spaces between sentences in copy
2067 that imitates the look of a typewritten document.
2070 <div class="box-important">
2072 <span class="important">IMPORTANT:</span> SS with an argument other
2073 than <kbd>0</kbd> (zero) should only be used if you’re of
2074 the old (and wise) school of typists that puts two spaces between
2075 sentences. If you ignore this advice and use SS when you habitually
2076 put only one space between sentences, you risk producing output
2077 where the space between sentences is not equal.
2083 <div class="macro-id-overline">
2084 <h3 id="hy" class="macro-id">Automatic hyphenation control</h3>
2087 <div class="box-macro-args">
2088 Macro: <b>HY</b> <kbd class="macro-args">LINES <max. number of consecutive hyphenated lines></kbd>
2090 Macro: <b>HY</b> <kbd class="macro-args">MARGIN <size of hyphenation margin></kbd>
2092 Macro: <b>HY</b> <kbd class="macro-args">SPACE <extra interword spacing to prevent hyphenation></kbd>
2094 Macro: <b>HY</b> <kbd class="macro-args">DEFAULT</kbd>
2096 Macro: <b>HY</b> <kbd class="macro-args">toggle</kbd>
2099 <i>Aliases:</i> <b>HYPHENATE, HYPHENATION</b>
2103 HY, as you can see, can be invoked with a number of arguments. In
2104 all cases, the aliases HYPHENATE or HYPHENATION can be used in place
2105 of HY. To aid in understanding the various arguments you can pass
2106 to HY, I’ve broken them down into separate sections.
2109 <h3 class="docs">1. HY</h3>
2112 HY by itself (ie with no argument) simply turns automatic
2113 hyphenation on. Any argument other than LINES, MARGIN, SPACE or
2114 DEFAULT, turns automatic hyphenation off. For example, as explained
2116 <a href="intro.html#macro-args">How to read macro arguments</a>,
2117 you could turn HY off by entering
2119 <span class="pre-in-pp">
2123 <span class="pre-in-pp">
2127 <span class="pre-in-pp">
2130 A subsequent call to HY restores hyphenation with the parameters for
2131 LINES, MARGIN, or SPACE that were formerly in effect (see below).
2135 HY observes the following default hyphenation rules:
2137 <ul style="margin-top: -.5em; margin-left: 18px;">
2138 <li>Last lines (ie ones that will spring a trap—typically
2139 the last line on a page) will not be hyphenated.
2141 <li>The first and last two characters of a word are never
2146 <h3 class="docs numbered">2. HY LINES</h3>
2149 HY LINES sets the maximum number of consecutive hyphenated lines
2150 that will appear in output copy. 2 is a very good choice, and
2151 you’d set it with
2153 <span class="pre-in-pp">
2156 By default, when you turn automatic hyphenation on, there is no
2157 limit to the number of consecutive hyphenated lines.
2160 <div class="box-tip">
2162 <span class="note">Note:</span>
2163 <a href="definitions.html#discretionaryhyphen">Discretionary hyphens</a>
2164 count when groff is figuring out how many lines to hyphenate;
2165 explicit hyphens (ie the actual hyphen character) do not.
2169 <h3 class="docs numbered">3. HY MARGIN</h3>
2172 HY MARGIN sets the amount of room allowed at the end of a line
2173 before hyphenation is tripped (e.g., if there’s only 6 points
2174 left at the end of a line, groff won’t try to hyphenate the
2175 next word). HY MARGIN only applies if you’re using
2176 <a href="#quad">QUAD</a>,
2177 and is really only useful if you’re using QUAD LEFT.
2181 As an example, if you don’t want groff to hyphenate words
2182 when there’s only 18 points of space left at the end of a
2183 left-quadded line, you’d enter
2185 <span class="pre-in-pp" style="margin-bottom: -1em">
2190 <div class="box-tip">
2192 <span class="note">Note:</span> The numeric argument after HY
2194 <a href="definitions.html#unitofmeasure">unit of measure</a>.
2198 <h3 class="docs numbered">4. HY SPACE</h3>
2201 HY SPACE sets an amount of extra interword space that groff will try
2202 to put between words on a line in order to PREVENT hyphenation. HY
2203 SPACE applies only to
2204 <a href="definitions.html#just">justified lines</a>.
2205 Generally speaking, you’ll want this value to be quite small,
2206 since too big a value will result in lines with gaping holes between
2207 the words. A reasonable value might be half a point, or one point,
2208 which you’d set with
2210 <span class="pre-in-pp">
2214 <span class="pre-in-pp" style="margin-bottom: -1em">
2219 <div class="box-tip">
2221 <span class="note">Note:</span> The numeric argument after HY SPACE
2223 <a href="definitions.html#unitofmeasure">unit of measure</a>.
2227 <h3 class="docs numbered">5. HY DEFAULT</h3>
2230 HY DEFAULT resets automatic hyphenation to its default behaviour,
2231 cancelling any changes made with HY <kbd>LINES</kbd>, HY
2232 <kbd>MARGIN</kbd>, and/or HY <kbd>SPACE</kbd>.
2235 <div class="box-notes">
2236 <h3 id="hyphenation-thoughts" class="docs notes">Thoughts on hyphenation in general</h3>
2238 <p style="margin-top: .5em">
2239 Hyphenation is a necessary evil. If it can be avoided, it
2240 should be. If it can’t be, it should occur infrequently.
2241 That’s the reason for the number of parameters you can set
2245 <p class="tip-bottom">
2246 Furthermore, hyphenation in
2247 <a href="definitions.html#rag">rag</a>
2248 copy requires a great deal of attention. At best, it should be
2249 avoided completely by individually adjusting the number of words
2250 on consecutive lines to achieve a pleasing, natural-looking rag.
2251 Since such adjustments are often too fussy for document processing,
2252 I recommend playing around with HY MARGIN a bit if your copy looks
2259 <div class="macro-id-overline">
2260 <h3 id="hy-set" class="macro-id">Set hyphenation parameters all at once</h3>
2263 <div class="box-macro-args">
2264 Macro: <b>HY_SET</b> <kbd class="macro-args"><lines> [ <margin> [ <space> ] ]</kbd>
2268 <i>Alias:</i> <b>HYSET</b>
2272 HY_SET lets you set the parameters for hyphenation
2273 with a single macro. <kbd><lines>,</kbd>
2274 <kbd><margin></kbd> and
2275 <kbd><space></kbd> correspond to the numeric
2276 values required by <kbd>LINES</kbd>,
2277 <kbd>MARGIN</kbd> and <kbd>SPACE</kbd> as described
2278 <a href="#hy">above</a>.
2282 To set just the maximum number of consecutive hyphenated lines,
2285 <span class="pre-in-pp">
2288 If you wanted the same number of maximum consecutive hyphenated
2289 lines and a hyphenation margin for use with
2290 <a href="definitions.html#rag">rag</a>
2293 <span class="pre-in-pp">
2296 would set the hyphenation margin to 36 points.
2300 If you wanted the same number of maximum consecutive hyphenated
2301 lines and a hyphenation space of 2 points for use with
2302 <a href="definitions.html#just">justified</a>
2305 <span class="pre-in-pp">
2308 is how you’d do it.
2313 <div class="macro-id-overline">
2314 <h3 id="rw" class="macro-id">Reduce whitespace</h3>
2317 <div class="box-macro-args">
2318 Macro: <b>RW</b> <kbd class="macro-args"><amount of whitespace reduction between letters></kbd>
2322 RW (<span style="text-decoration: underline;">R</span>educe <span style="text-decoration: underline;">W</span>hitespace)
2323 and its corresponding macro
2324 EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace),
2325 allow you to tighten (or loosen)
2326 <a href="definitions.html#outputline">output lines</a>
2327 by uniformly reducing or expanding the space between characters.
2328 This is particularly useful when you want to squeeze or stretch
2329 lines on a narrow measure.
2333 The value passed to RW may be a whole number or a decimal fraction.
2334 Since a value of 1 produces a noticeable reduction in the space
2335 between letters at text sizes, you’ll most likely use small
2336 decimal values when tightening lines. For example,
2338 <span class="pre-in-pp">
2342 <span class="pre-in-pp">
2345 may be just enough to squeeze an extra character or two on a line
2346 without the change in letter spacing being obvious. I highly
2347 recommend previewing your work to assess the effect of RW.
2350 <div class="box-tip">
2352 <span class="note">Note:</span> By default, RW does not deposit a
2353 <a href="#br">break</a>
2354 when it’s invoked if you’re in one of the
2355 <a href="definitions.html#fill">fill</a>
2357 <a href="#quad">QUAD</a>
2359 <a href="#justify">JUSTIFY</a>).
2361 RW to break at the ends of the previous
2362 <a href="definitions.html#inputline">input lines</a>
2363 while you’re in a fill mode, tell mom
2364 that’s what you want by invoking
2365 <kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>.
2369 <div class="box-important">
2371 <span class="important">IMPORTANT:</span>
2372 RW (and its complement, EW; see below) only affects the current
2373 font, and remains in effect for that font every time it’s
2374 called, hence it must be reset to zero to cancel its effect
2375 (<kbd>.RW 0</kbd>).
2381 <div class="macro-id-overline">
2382 <h3 id="ew" class="macro-id">Expand whitespace</h3>
2385 <div class="box-macro-args">
2386 Macro: <b>EW</b> <kbd class="macro-args"><amount of whitespace expansion between letters></kbd>
2390 EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace)
2391 expands the amount of whitespace between letters, effectively
2392 “loosening” lines of type.
2396 The value passed to EW may be a whole number or a decimal fraction.
2397 Since a value of 1 produces a noticeable expansion in the space
2398 between letters at text sizes, you’ll most likely use small
2399 decimal values when loosening lines. For example,
2401 <span class="pre-in-pp">
2405 <span class="pre-in-pp">
2408 may be just enough to open up a line without the change in letter
2409 spacing being obvious. I highly recommend previewing your work to
2410 assess the effect of EW.
2413 <div class="box-tip">
2415 <span class="note">Note:</span> By default, EW does not deposit a
2416 <a href="#br">break</a>
2417 when it’s invoked if you’re in one of the
2418 <a href="definitions.html#fill">fill</a>
2420 <a href="#quad">QUAD</a>
2422 <a href="#justify">JUSTIFY</a>).
2424 EW to break at the ends of the previous
2425 <a href="definitions.html#inputline">input lines</a>
2426 while you’re in a fill mode, tell mom that’s what you
2427 want by invoking the
2428 <kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>
2433 <div class="box-important">
2435 <span class="important">IMPORTANT:</span>
2436 EW (and its complement, RW; see above) only affects the current
2437 font, and remains in effect for that font every time it’s
2438 called, hence it must be reset to zero to cancel its effect
2439 (<kbd>.RW 0</kbd>).
2443 <!-- -BR_AT_LINE_KERN- -->
2445 <div class="macro-id-overline">
2446 <h3 id="br-at-line-kern" class="macro-id">Break before line kerning</h3>
2449 <div class="box-macro-args">
2450 Macro: <b>BR_AT_LINE_KERN</b> <kbd class="macro-args">toggle</kbd>
2455 <a href="definitions.html#filled">fill</a>
2457 <a href="#quad">QUAD</a>
2459 <a href="#justify">JUSTIFY</a>)
2461 <a href="definitions.html#inputline">input lines</a>
2463 <a href="#rw">RW</a>
2465 <a href="#ew">EW</a>.
2466 If you’d like her to break input lines prior to RW or EW,
2467 invoke <kbd>.BR_AT_INPUT_LINE</kbd> without any argument. To
2468 disable the breaks, invoke <kbd>.BR_AT_INPUT_LINE</kbd> with any
2469 argument (OFF, QUIT, Q, X...), like this
2471 <span class="pre-in-pp">
2472 .BR_AT_LINE_KERN OFF
2475 <span class="pre-in-pp">
2478 With QUAD L, R or C, mom simply breaks the line. With QUAD J (or
2479 just JUSTIFY, which is the same thing), she breaks and
2480 <a href="definitions.html#force">force justifies</a>
2481 the line prior to <kbd>.EW</kbd> or <kbd>.RW</kbd>.
2486 <div class="macro-id-overline">
2487 <h3 id="kern" class="macro-id">Automatic kerning</h3>
2490 <div class="box-macro-args">
2491 Macro: <b>KERN</b> <kbd class="macro-args">toggle</kbd>
2495 By itself (ie with no argument), KERN turns automatic pairwise
2496 <a href="definitions.html#kern">kerning</a>
2497 on. With any argument (e.g., OFF, Q, X), pairwise kerning is turned
2502 Kerning of individual character pairs can be controlled with the
2503 <a href="definitions.html#inlines">inline escapes</a>
2504 <kbd>\*[BU <n>]</kbd> and
2505 <kbd>\*[FU <n>]</kbd>. See
2506 <a href="inlines.html#inline-kerning-mom">Inline Escapes, kerning</a>.
2509 <!-- -LIGATURES- -->
2511 <div class="macro-id-overline">
2512 <h3 id="ligatures" class="macro-id">Automatic ligature generation</h3>
2515 <div class="box-macro-args">
2516 Macro: <b>LIGATURES</b> <kbd class="macro-args">toggle</kbd>
2519 <i>Alias:</i> <b>LIG</b>
2523 Provided your current font has
2524 <a href="definitions.html#ligatures">ligatures</a>,
2525 LIGATURES, by itself, turns on automatic generation of ligatures.
2526 When automatic ligature generation is on, simply typing the letters
2527 of a ligature combination will produce the correct ligature upon
2528 output. For example, if you type the word “finally”,
2529 the fi combination will be output as an fi ligature. Generally
2530 speaking, ligatures are A Good Thing, hence mom has them on by
2535 LIGATURES with any argument turns automatic ligature generation off.
2538 <div class="box-tip">
2540 <span class="note">Note:</span> Not all fonts support ligatures.
2544 <div class="rule-short"><hr/></div>
2546 <!-- ==================================================================== -->
2548 <h2 id="modifications-intro" class="macro-group">Type modifications (pseudo font styles)</h2>
2551 It sometimes happens that a
2552 <a href="definitions.html#family">family</a>
2553 doesn’t contain all the fonts you need. You might, for
2554 example, be missing an italic font, or a bold font. Or you might
2555 not be able to get your hands on the condensed version. That’s
2556 where these macros and inline escapes come in. With them, you
2557 can fake the fonts you’re missing. A word of caution,
2558 though: “faked” fonts are just that—faked. You
2559 should only use them as a last resort, and then only sparingly. A
2560 word or two or a line or two in a faked font will pass unnoticed;
2561 large patches of type in a faked font look typographically cheap.
2564 <div id="index-modifications" class="macro-list-container">
2565 <h3 class="macro-list">Type modifications macros</h3>
2567 <ul class="macro-list">
2569 <ul style="list-style: none; margin-left: -1em;">
2570 <li><a href="#setslant">SETSLANT</a> – degree of pseudo-italicizing</li>
2571 <li><a href="#slant-inline">\*[SLANT]</a> – inline escape for pseudo-italicizing type</li>
2574 <ul style="list-style: none; margin-left: -1em;">
2575 <li><a href="#setbolder">SETBOLDER</a> – amount of emboldening</li>
2576 <li><a href="#bolder-inline">\*[BOLDER]</a> – inline escape for emboldening type</li>
2578 <li>Pseudo condensed
2579 <ul style="list-style: none; margin-left: -1em;">
2580 <li><a href="#condense">CONDENSE</a> – percentage for pseudo-condensed type</li>
2581 <li><a href="#cond-inline">\*[COND]</a> – inline escape for pseudo-condensed type</li>
2584 <ul style="list-style: none; margin-left: -1em;">
2585 <li><a href="#extend">EXTEND</a> – percentage for pseudo-extended type</li>
2586 <li><a href="#ext-inline">\*[EXT]</a> – inline escape for pseudo-extending</li>
2589 <ul style="list-style: none; margin-left: -1em;">
2590 <li><a href="#smallcaps">SMALLCAPS</a> – enable smallcaps</li>
2591 <li><a href="#smallcaps-style">SMALLCAPS_STYLE</a> – size, weight, and width of smallcaps</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>.
2936 </p> <div class="box-important"> <p class="tip">
2937 <span class="important">IMPORTANT:</span> You must turn
2938 <kbd>\*[EXT]</kbd> off before making any changes to the point size
2939 of your type, either via the
2940 <a href="#ps">PT_SIZE</a>
2941 macro or with the <kbd>\s</kbd> inline escape. If you wish the new
2942 point size to be pseudo-extended, simply reinvoke <kbd>\*[EXT]</kbd>
2943 afterwards. Equally, <kbd>\*[EXT]</kbd> must be turned off before
2944 changing the extend percentage with
2945 <a href="#extend">EXTEND</a>.
2948 <div class="box-tip">
2950 <span class="note">Note:</span> If you’re using the
2951 <a href="docprocessing.html#docprocessing">document processing macros</a>
2953 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2954 mom ignores <kbd>\*[EXT]</kbd> requests.
2960 <div class="macro-id-overline">
2961 <h3 id="smallcaps" class="macro-id">Smallcaps</h3>
2964 <div class="box-macro-args">
2965 Macro: <b>SMALLCAPS</b> <kbd class="macro-args"><toggle></kbd>
2969 To begin setting type in pseudo-smallcaps, simply invoke
2970 <kbd>.SMALLCAPS</kbd>. When you no longer want them, invoke
2971 <kbd>SMALLCAPS OFF</kbd> (or <kbd>END</kbd>, <kbd>STOP</kbd>,
2972 <kbd>DONE</kbd>, etc). If you are currently in a
2973 <a href="definitions.html#filled">no-fill mode</a>,
2974 (i.e. <kbd>.LEFT</kbd>, <kbd>.CENTER</kbd>, or <kbd>.RIGHT</kbd>)
2975 and you want the smallcaps to continue on the same line,
2976 append a <kbd>\c</kbd> to the line, like this
2978 <span class="pre-in-pp">
2981 with a few words in smallcaps.
2984 The line preceding <kbd>.SMALLCAPS OFF</kbd> should also have a
2985 <kbd>\c</kbd> appended to it if you wish it to continue unbroken.
2988 <div class="box-tip">
2990 <span class="note">Note:</span>
2991 SMALLCAPS does not have an inline equivalent to
2992 <a href="inlines.html#uc-lc"><kbd>\*[UC]</kbd> / <kbd>\*[LC]</kbd></a>.
2993 Furthermore, if you’re using the
2994 <a href="docprocessing.html#docprocessing">document processing macros</a>
2996 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2997 mom ignores SMALLCAPS.
3000 <p class="tip-bottom">
3001 Additionally, be aware that no automatic
3002 <a href="definitions.html#kern">kerning</a>
3003 takes place while pseudo-smallcaps are in effect.
3007 <div class="macro-id-overline">
3008 <h3 id="smallcaps-style" class="macro-id">Set size, weight, and width of smallcaps</h3>
3011 <div class="box-macro-args">
3012 Macro: <b>SMALLCAPS_STYLE</b> <kbd class="macro-args">SIZE <percentage> WEIGHT_ADJ <percentage> EXTEND <percentage></kbd>
3016 True smallcaps are not a font effect, but, like designer cuts of
3017 bold, condensed, and extended, actual fonts provided with some
3018 families. It is highly recommended that you acquire real smallcaps
3019 fonts rather than relying on mom's pseudo version.
3023 To achieve a reasonable facsimile of designer-cut smallcaps fonts,
3024 mom needs to know the percentage of regular caps at a given point
3025 size by which to reduce the small caps. To make adjustments for
3026 the difference in weight and width of the smaller caps, she also
3027 needs to know by how much to embolden (“fatten”) the
3028 smallcaps, and by how much to increase their width.
3032 All three arguments to SMALLCAPS_STYLE reflect a
3033 percentage of the point size in effect when
3034 <a href="#smallcaps">SMALLCAPS</a>
3035 is invoked. Mom’s defaults for pseudo-smallcaps are:
3037 <span class="pre-in-pp">
3042 To change any or all of the defaults, you might enter
3044 <span class="pre-in-pp">
3045 .SMALLCAPS_STYLE SIZE 80 WEIGHT_ADJ .25 EXTEND 3
3049 <span class="pre-in-pp">
3055 Note that you do not have to give SMALLCAPS_STYLE all three
3056 arguments, and that the arguments may be entered in any order. Any
3057 arguments you omit will remain at their former value.
3060 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
3062 <!-- ==================================================================== -->
3064 <h2 id="aldrld-intro" class="macro-group">Vertical movements</h2>
3066 The two macros in this section allow you to move down or up on the
3067 page relative to the current
3068 <a href="definitions.html#baseline">baseline</a>.
3070 <div id="index-aldrld" class="macro-list-container">
3071 <h3 class="macro-list">Vertical movements macros</h3>
3072 <ul class="macro-list">
3073 <li><a href="#ald">ALD</a> – Advance Lead</li>
3074 <li><a href="#rld">RLD</a> – Reverse Lead</li>
3080 <div class="macro-id-overline">
3081 <h3 id="ald" class="macro-id">Advance Lead (move downward)</h3>
3084 <div class="box-macro-args">
3085 Macro: <b>ALD</b> <kbd class="macro-args"><distance to move downward></kbd>
3087 <p class="requires">
3088 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
3092 ALD takes one argument: the distance to move downward on the page
3093 relative to the current vertical position.
3097 Used by itself, or preceded by
3098 <a href="#br">BR</a>,
3099 ALD will advance by one line space plus the distance you specify.
3101 <a href="#el">EL</a>,
3102 it will advance by exactly the distance you specify.
3106 ALD requires a unit of measure. Decimal fractions are allowed, and
3107 values may be combined. Therefore, to move down on the page by 1/4
3108 of an inch, you could enter either
3110 <span class="pre-in-pp">
3115 <span class="pre-in-pp">
3119 (<span style="text-decoration: underline;">A</span>dvance <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
3120 suggests, you’ll most often use ALD with
3121 <a href="definitions.html#picaspoints">points</a>
3125 <div class="box-tip">
3127 <span class="note">Note:</span> if you want to use ALD at the top
3128 of a page (ie to advance to the starting position of type on a
3129 page), combine the value you want with <kbd>-1v</kbd> (minus one
3130 line space), like this:
3132 <span class="pre-in-pp">
3135 At the top of a page, this will advance one inch from the top edge
3136 of the paper. Without the -1v, the same command would advance one
3137 inch from the top of the page plus the distance of one line space.
3143 <div class="macro-id-overline">
3144 <h3 id="rld" class="macro-id">Reverse Lead (move upward)</h3>
3147 <div class="box-macro-args">
3148 Macro: <b>RLD</b> <kbd class="macro-args"><distance to move upward></kbd>
3150 <p class="requires">
3151 • Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
3155 RLD takes one argument: the distance to move upward on the page
3156 relative to the current vertical position.
3160 Used by itself, or preceded by
3161 <a href="#br">BR</a>,
3162 RLD will advance by one line space, then reverse by the distance you
3163 specify. Preceded by
3164 <a href="#el">EL</a>,
3165 it will reverse by exactly the distance you specify.
3169 RLD requires a unit of measure. Decimal fractions are allowed, and
3170 values may be combined. Therefore, to move up on the page by 1/4 of
3171 an inch, you could enter either
3173 <span class="pre-in-pp">
3177 <span class="pre-in-pp">
3181 (<span style="text-decoration: underline;">R</span>everse <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
3182 suggests, you’ll most often use RLD with
3183 <a href="definitions.html#picaspoints">points</a>
3187 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
3189 <!-- ==================================================================== -->
3191 <h2 id="tabs-intro" class="macro-group">Tabs</h2>
3194 Mom provides two different kinds of tab setup: typesetting tabs
3195 and string tabs. Neither one has anything to do with the tab key
3196 on your keyboard, and both are utterly divorced from groff’s
3197 notion of tabs. I recommend reading this section carefully in order
3198 to understand how mom handles tabs.
3201 <div class="box-tip">
3203 <span class="note">Note:</span> see the section
3204 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
3205 for reassuring information on the use of tabs during
3206 <a href="docprocessing.html#docprocessing">document processing</a>.
3210 <h3 id="typesetting-tabs" class="docs">Typesetting tabs</h3>
3213 Typesetting tabs are defined by both an indent from the left margin
3214 and a line length. This is quite different from typewriter-style
3215 tab stops (the groff norm) that only define the left indent. In
3216 conjunction with the
3217 <a href="#multicolumns-intro">multi-column macros</a>,
3218 typesetting tabs significantly facilitate tabular and columnar work.
3222 Typesetting tabs are created with the
3223 <a href="#tab-set">TAB_SET</a>
3224 macro. TAB_SET identifies the tab (by number), establishes its left
3225 indent and line length, and optionally sets a quad direction and
3226 fill mode. After tabs have been created with TAB_SET, they can be
3227 called at any time with the
3228 <a href="#tab">TAB</a>
3232 <div class="examples-container">
3233 <h3 id="typesetting-tabs-tut" class="docs notes">Quickie tutorial on typesetting tabs</h3>
3235 <p style="margin-top: .5em;">
3236 Say you want to set up three tabs to produce an employee evaluation
3237 that looks something like this:
3240 <div class="box-code" style="padding-bottom: 0;">
3241 <span id="typsetting-tabs-sample" class="pre-in-pp" style="color: #302419">
3242 CRITERION EVALUATION COMMENTS
3244 Service Good Many clients specifically request
3245 support from Joe by name.
3247 Punctuality Satisfactory Tends to arrive after 8:00am, but
3248 often works through lunch hour.
3250 Team spirit Needs work Persistently gives higher priority
3251 to helping clients than respecting
3252 organizational hierarchy.
3257 You want the first tab, CRITERION,
3259 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3260 <li>to begin at the left margin of the page – ie no indent</li>
3261 <li>to have a line length of 5 picas</li>
3262 <li>to be set flush left</li>
3266 Tabs must be numbered, and each has to be set up with a separate
3267 <a href="#tab-set">TAB_SET</a>
3268 line. Therefore, to set up tab 1, you enter
3270 <span class="pre-in-pp">
3273 tab #--+ | | +--direction
3277 You want the second tab, EVALUATION,
3279 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3280 <li>to begin 8 picas from the left margin</li>
3281 <li>to have a length of 9 picas</li>
3282 <li>to be set centered</li>
3286 You set it up like this:
3288 <span class="pre-in-pp">
3291 tab #--+ | | +--direction
3295 You want the third tab, COMMENTS,
3297 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3298 <li>to begin 19 picas from the left margin</li>
3299 <li>to have a length of 17 picas</li>
3300 <li>to be set flush left, <a href="definitions.html#filled">filled</a></li>
3304 The setup looks like this:
3306 <span class="pre-in-pp">
3307 .TAB_SET 3 19P 17P L QUAD
3309 | | | | +--fill output lines
3311 tab #--+ | | +--direction
3315 Once the tabs are set up, you can call them in one of two ways:
3317 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3318 <li>with <kbd><a href="#tab">.TAB</a></kbd> (passing the tab
3319 number as an argument), which breaks the current line,
3320 advances one linespace and calls the tab.</li>
3321 <li>with <kbd><a href="#tn">.TN</a></kbd> (Tab Next), which keeps
3322 you on the current line and moves over to the next
3323 tab in sequence (ie from 1 to 2, 2 to 3, etc.), or, more
3324 conveniently, with the
3325 <kbd><a href="#tn">\*[TB+]</a></kbd>
3326 <a href="definitions.html#inlines">inline escape</a></li>
3330 To exit from tabs and restore your original left margin, line
3331 length, quad direction and fill mode, use
3332 <kbd><a href="#tq">.TQ</a></kbd>
3337 Here’s how the input for our sample employee evaluation looks
3338 (with some introductory parameters):
3341 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3342 <div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: auto;">
3343 <span class="pre-in-pp">
3344 .PAGE 8.5i 11i 1i 1i 1i
3355 .TAB_SET 3 19P 17P L QUAD
3364 Many clients specifically request support from Joe by name.
3369 Tends to arrive after 8:00am, but often works through lunch hour.
3374 Persistently gives higher priority to helping clients
3375 than respecting organizational hierarchy.
3381 Try setting this up and processing it it with
3383 <span class="pre-in-pp">
3384 pdfmom filename.mom > filename.pdf
3386 then previewing the .pdf file. Notice how <kbd>.TN</kbd>
3387 simply moves over to the next tab, while the combination
3388 <kbd>.SP/.TAB 1</kbd> breaks the line, advances by one extra
3389 linespace, and calls the first tab.
3393 Notice, too, how the <kbd>QUAD</kbd> argument passed to tab 3 means
3394 you don’t have to worry about the length of
3395 <a href="definitions.html#inputline">input lines</a>;
3397 <a href="definitions.html#filled">fills</a>
3398 the tab and sets the type flush left.
3402 <h3 id="string-tabs" class="docs">String tabs (autotabs)</h3>
3405 String tabs let you mark off tab positions with
3406 <a href="definitions.html#inlines">inline escapes</a>
3408 <a href="definitions.html#inputline">input lines</a>.
3409 Left indents and line lengths are calculated from the beginning and
3410 end positions of the marks. This is especially useful when tab
3411 indents and lengths need to be determined from the text that goes in
3416 Setting up string tabs is a two-step procedure. First, you enter an
3417 input line in which you mark off where you want tabs to begin and
3418 end. (This is often best done in conjunction with the
3419 <a href="goodies.html#silent">SILENT</a>
3424 Next, you invoke the
3425 <a href="#st">ST</a>
3426 macro for every string tab you defined, and optionally pass quad and
3427 fill information to it. That done, string tabs are called with the
3428 <a href="#tab">TAB</a>
3429 macro, just like typesetting tabs.
3433 In combination with the
3434 <a href="goodies.html#pad">PAD</a>
3435 macro and the groff inline escape
3436 <kbd><a href="inlines.html#inline-horizontal-groff">\h</a></kbd>
3437 (move horizontally across the page) or mom’s
3438 <kbd><a href="inlines.html#inline-horizontal-mom">\*[FWD <distance>]</a></kbd>
3439 (move forward) inline, string tabs provide tremendous flexibility in
3440 setting up complex tab structures.
3443 <div class="examples-container">
3444 <h3 id="string-tabs-tut" class="docs notes">Quickie tutorial on string tabs</h3>
3445 <p style="margin-top: .5em;">
3446 Say you want to set up tabs for the
3447 <a href="#typsetting-tabs-sample">employee evaluation form</a>
3448 used as an example in the
3449 <a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>.
3450 This time, though, you want to play around with the point size of
3451 type, so you can’t know exactly how long the tabs will be or
3452 where they should start. All you know is
3454 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3455 <li>CRITERION is the longest line in tab 1</li>
3456 <li>EVALUATION is the longest line in tab 2</li>
3457 <li>tab 3 should extend to the current right margin</li>
3458 <li>you want a 1 pica gutter between each tab</li>
3462 This is an ideal job for string tabs.
3466 The first thing you need for string tabs is an
3467 <a href="definitions.html#inputline">input line</a>
3468 with tab positions marked on it. Tabs are marked with the
3469 <a href="definitions.html#inlines">inline escapes</a>
3470 <kbd><a href="#inline-st">\*[ST<n>]</a></kbd>
3472 <kbd><a href="#inline-st">\*[ST<n>X]</a></kbd>,
3473 where <kbd><n></kbd>
3474 is the number you want the tab to have. (In this example, we
3475 enclose the input line with the
3476 <a href="goodies.html#silent">SILENT</a>
3477 macro so the line doesn’t print. We also use the
3478 <a href="goodies.html#pad">PAD</a>
3479 macro to permit defining tab 3 as simply “the amount of space
3480 remaining on the input line.”)
3484 The setup looks like this:
3487 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3489 <div class="box-code">
3490 <span class="pre-in-pp">
3492 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
3498 The long line after <kbd>.PAD</kbd> looks scary, but
3499 it isn’t really. Here’s what it means when broken down
3500 into its component parts:
3502 <ul style="margin-bottom: -1em;">
3503 <li>The longest line in tab 1 is “CRITERION”, so we
3504 enclose CRITERION with begin/end markers for string tab 1:
3506 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3507 \*[ST1]CRITERION\*[ST1X]
3510 <li>We want a 1 pica (12 points) gutter between tab 1 and 2,
3511 so we insert 12 points of space with \*[FWD 12p]:
3513 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3517 <li>The longest line in tab 2 is “EVALUATION”, so
3518 we enclose EVALUATION with begin/end markers for string
3520 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3521 \*[ST2]EVALUATION\*[ST2X]
3524 <li>We want 1 pica (12 points) between tab 2 and 3, so we
3527 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3531 <li>We want tab 3 to be as long as whatever space remains on
3532 the current line length, so we enclose the
3533 <a href="goodies.html#pad-marker">pad marker</a>
3534 (#) with begin/end markers for string tab 3:
3535 <span class="pre-in-pp">
3542 The tabs are now defined, but they require
3543 <a href="definitions.html#quad">quad direction</a>
3545 <a href="definitions.html#filled">fill</a>
3546 information. For each string tab defined above, enter a separate
3547 <kbd><a href="#st">.ST</a></kbd>
3550 <span class="pre-in-pp">
3555 | | +--fill output lines
3557 tab #--+ +--direction
3559 From here on in, you call the tabs with
3560 <kbd><a href="#tab">.TAB</a></kbd>,
3561 <kbd><a href="#tn">.TN</a></kbd>,
3563 <kbd><a href="#tn">\*[TB+]</a></kbd>
3564 just like typesetting tabs (see
3565 <a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>).
3569 Here’s the complete setup and entry for the sample employee
3570 evaluation form utilizing string tabs.
3573 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3574 <div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: scroll;">
3575 <span class="pre-in-pp">
3576 .PAGE 8.5i 11i 1i 1i 1i
3586 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
3599 Many clients specifically request support from Joe by name.
3604 Tends to arrive after 8:00am, but often works through lunch hour.
3609 Persistently gives higher priority to helping clients
3610 than respecting organizational hierarchy.
3616 Try setting this up and processing it with
3618 <span class="pre-in-pp">
3619 pdfmom filename.mom > filename.pdf
3621 and previewing the .pdf file.
3625 Now, change the point size of the above sample to 12 and preview it
3626 again. You’ll see that the tab structure remains identical
3627 (tab 1=CRITERION, tab 2=EVALUATION, tab 3=space remaining, and the
3628 gutter between tabs is still 1 pica), while the position and length
3629 of the tabs have altered because of the new point size.
3633 Now try increasing the gutters to 2 picas
3634 (<kbd>\*[FWD 24p]</kbd> or <kbd>\*[FWD 2P]</kbd> instead
3635 of <kbd>\*[FWD 12p]</kbd>). Preview the file again, and notice
3636 how the tab structure remains the same, but the gutters are wider.
3640 <div id="index-tabs" class="macro-list-container">
3641 <h3 class="macro-list">Tabs macros</h3>
3643 <ul class="macro-list">
3644 <li><a href="#tab-set">TAB_SET</a> – create typesetting tabs</li>
3645 <li><a href="#inline-st">\*[ST]...\*[STX]</a> – inline escapes for marking String Tabs</li>
3646 <li><a href="#st">ST</a> – set String Tabs</li>
3647 <li><a href="#tab">TAB</a> – call tabs</li>
3648 <li><a href="#tn">TN</a> – Tab Next; call next tab in sequence</li>
3649 <li><a href="#tn">\*[TB+]</a> – inline escape to call next tab in sequence</li>
3650 <li><a href="#tq">TQ</a> – Tab Quit</li>
3657 <div class="macro-id-overline">
3658 <h3 id="tab-set" class="macro-id">Set up typesetting tabs</h3>
3661 <div class="box-macro-args">
3662 Macro: <b>TAB_SET</b> <kbd class="macro-args"><tab number> <indent> <length> L | R | C | J [ QUAD ]</kbd>
3664 <p class="requires">
3665 • <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>
3668 <p style="margin-bottom: -.5em;">
3669 TAB_SET creates typesetting tabs that later can be called with
3670 <kbd><a href="#tab">.TAB</a></kbd>.
3671 Typesetting tabs are numbered, and defined by an indent, a length,
3672 and a quad direction, hence TAB_SET has four required arguments:
3674 <ul style="margin-top: .5em; margin-bottom: -.5em;">
3675 <li>a tab number</li>
3676 <li>an indent (measured from the left margin of the page,
3677 or, if you’re already in a tab, from the left margin of the tab)</li>
3679 <li>a direction</li>
3683 To set up a centred tab 6 picas long and 9 points from the left
3684 margin, you’d enter
3686 <span class="pre-in-pp">
3689 The tab number in the above (”1”) is simply an
3690 identifier. It could have been 4, or 17, or 296. There’s no
3691 need to set up tabs in numerical sequence.
3695 By default, tabs are in
3696 <a href="definitions.html#filled">nofill</a>
3697 mode, meaning you can enter text in tabs on a line-for-line basis
3698 without having to use the
3699 <a href="#br">BR</a>
3700 macro. If you want a tab to be
3701 <a href="definitions.html#filled">filled</a>,
3702 pass the optional argument <kbd>QUAD</kbd>,
3703 which will make the tab behave as if you’d entered
3704 <kbd class="bold">.QUAD L | R | C</kbd>.
3709 <a href="definitions.html#just">justified</a>
3710 tabs, simply pass the argument J (without the QUAD argument), like
3713 <span class="pre-in-pp">
3716 Once tabs are set, they can be called at any time with the
3717 <a href="#tab">TAB <n></a>
3718 macro, where <n> is the number of the desired tab.
3722 You can set up any number of typesetting tabs. However, be aware
3724 <a href="#string-tabs">string tabs</a>
3725 are also called with TAB <n>, so be careful that you
3726 don’t set up a typesetting tab numbered, say, 4, when you
3727 already have a string tab numbered 4. Every tab, typesetting or
3728 string, must have a unique numeric identifier. </p>
3730 <div class="box-tip">
3732 <span class="note">Note:</span> If you use TAB_SET while
3733 you’re currently inside a tab, the indent argument is the
3734 distance from the tab’s left margin, not the left margin of
3735 the page. Therefore, you should exit tabs (with
3736 <kbd><a href="#tq">.TQ</a></kbd>)
3737 before creating new tabs (unless, of course, you want to set up a
3738 tab structure within the confines of an existing tab).
3742 <div class="box-important">
3744 <span class="important">IMPORTANT:</span> Turn all indents off (see
3745 <a href="#indents">Indents</a>)
3746 before setting up tabs with TAB_SET, or mom may get confused.
3750 <!-- -INLINE_ST- -->
3752 <div class="macro-id-overline">
3753 <h3 id="inline-st" class="macro-id">Mark positions of string tabs</h3>
3756 <div class="box-macro-args">
3757 Inlines: <kbd class="macro-args">\*[ST<number>]...\*[ST<number>X]</kbd>
3760 <p class="requires">
3761 The <a href="definitions.html#quad">quad</a>
3763 <span style="font-style: normal">LEFT</span>
3765 <span style="font-style: normal">JUSTIFY</span>
3767 <a href="#quad"><span style="font-style: normal">QUAD</span></a>
3769 <a href="#justify"><span style="font-style: normal">JUSTIFY</span></a>)
3771 <a href="definitions.html#filled">no-fill mode</a>
3773 <a href="#lrc"><span style="font-style: normal">LEFT</span></a>
3774 in order for these inlines to function properly. Please see
3775 <a href="#important"><span style="font-style: normal">IMPORTANT</span></a>,
3780 String tabs need to be marked off with
3781 <a href="definitions.html#inlines">inline escapes</a>
3782 before being set up with the
3783 <a href="#st">ST</a>
3784 macro. Any input line may contain string tab markers. <kbd
3785 class="bold"><number></kbd>, above, means the numeric
3786 identifier of the tab. The following shows a sample input line with
3789 <span class="pre-in-pp">
3790 \*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
3792 String tab 1 begins at the start of the line and ends after the word
3793 “time”. String tab 2 starts at “good” and
3794 ends after “men”. Inline escapes (e.g., font or point
3795 size changes, or horizontal movements, including
3796 <a href="goodies.html#pad">padding</a>)
3797 are taken into account when mom determines the position and length
3802 Up to nineteen string tabs may be marked (not necessarily all on the
3803 same line, of course), and they must be numbered between 1 and 19.
3807 Once string tabs have been marked in input lines, they have to be
3808 “set” with
3809 <kbd><a href="#st">.ST</a></kbd>,
3810 after which they may be called, by number, with
3811 <kbd><a href="#tab">.TAB</a></kbd>.
3814 <div class="box-tip">
3816 <span class="note">Note:</span> Lines with string tabs marked off
3817 in them are normal input lines, ie they get printed, just like
3818 any input line. If you want to set up string tabs without the line
3820 <a href="goodies.html#silent">SILENT</a>
3825 <div class="box-important">
3827 <span id="important" class="important">IMPORTANT:</span>
3828 Owing to the way groff processes
3829 <a href="definitions.html#inputline">input lines</a>
3831 <a href="definitions.html#outputline">output lines</a>,
3832 it is not possible for mom to “guess” the correct
3833 starting position of string tabs marked off in lines that are
3834 centered or set flush right.
3838 Equally, she cannot guess the starting position if a line is fully
3839 justified and broken with
3840 <a href="#spread">SPREAD</a>.
3844 In other words, in order to use string tabs,
3845 <a href="#lrc">LEFT</a>
3846 must be active, or, if
3847 <a href="#quad">QUAD LEFT</a>
3849 <a href="#justify">JUSTIFY</a>
3850 are active, the line on which the string tabs are marked must be
3851 broken “manually” with
3852 <kbd><a href="#br">.BR</a></kbd>
3854 <kbd><a href="#spread">.SPREAD</a></kbd>).
3857 <p class="tip-bottom">
3858 To circumvent this behaviour, I recommend using the
3859 <a href="goodies.html#pad">PAD</a>
3860 to set up string tabs in centered or flush right lines. Say, for
3861 example, you want to use a string tab to underscore the text of a
3862 centered line with a rule. Rather than this,
3864 <span class="pre-in-pp">
3866 \*[ST1]A line of text\*[ST1X]\c
3878 <span class="pre-in-pp">
3880 .PAD "#\*[ST1]A line of text\*[ST1X]#"
3886 \*[RULE] \" Note that you can’t use \*[UP ] or \*[DOWN] with \*[RULE]
3895 <div class="macro-id-overline">
3896 <h3 id="st" class="macro-id">Set string tabs</h3>
3899 <div class="box-macro-args">
3900 Macro: <b>ST</b> <kbd class="macro-args"><tab number> L | R | C | J [ QUAD ]</kbd>
3904 After string tabs have been marked off on an input line (see
3905 <a href="#inline-st"><kbd>\*[ST]...\*[STX]</kbd></a>),
3906 you need to “set” them by giving them a direction and,
3907 optionally, the <kbd>QUAD</kbd> argument. In this respect, ST is
3909 <a href="#tab-set">TAB_SET</a>
3910 except that you don’t have to give ST an indent or a
3911 line length (that’s already taken care of, inline, by
3912 <kbd>\*[ST]...\*[STX]</kbd>). If you want string tab 1 to be left,
3915 <span class="pre-in-pp">
3918 If you want it to be left and
3919 <a href="definitions.html#filled">filled</a>, enter
3921 <span class="pre-in-pp">
3924 If you want it to be justified, enter
3926 <span class="pre-in-pp">
3930 <a href="#string-tabs-tut">Quickie tutorial on string tabs</a>
3931 for a full explanation of setting up string tabs.
3936 <div class="macro-id-overline">
3937 <h3 id="tab" class="macro-id">Call tabs</h3>
3940 <div class="box-macro-args">
3941 Macro: <b>TAB</b> <kbd class="macro-args"><tab number></kbd>
3944 <i>Alias:</i> <b>TB</b>
3948 After tabs have been defined (either with
3949 <a href="#tab-set">TAB_SET</a>
3951 <a href="#st">ST</a>),
3952 TAB moves to whatever tab number you pass it as an argument. For
3955 <span class="pre-in-pp">
3961 <div id="note-tn" class="box-tip">
3963 <span class="note">Note:</span> TAB breaks the line preceding it and
3964 advances 1 linespace. Hence,
3966 <span class="pre-in-pp">
3968 A line of text in tab 1.
3970 A line of text in tab 2.
3974 <span class="pre-in-pp">
3975 A line of text in tab 1.
3976 A line of text in tab 2.
3978 If you want the tabs to line up, use
3979 <a href="#tn">TN</a>
3981 or, more conveniently, the inline escape
3982 <a href="#tn">\*[TB+]</a>:
3984 <span class="pre-in-pp">
3986 A line of text in tab 1.\*[TB+]
3987 A line of text in tab 2.
3991 <span class="pre-in-pp">
3992 A line of text in tab 1. A line of text in tab 2.
3994 If the text in your tabs runs to several lines, and you want the
3995 first lines of each tab to align, you must use the
3996 <a href="#multicolumns-intro">multi-column</a> macros.
3999 <p id="tab-add-note" class="tip-bottom">
4000 <span class="additional-note">Additional note:</span> Any indents
4001 in effect prior to calling a tab are automatically turned off by
4002 TAB. If you were happily zipping down the page with a left indent
4003 of 2 picas turned on, and you call a tab whose indent from the left
4004 margin is 6 picas, your new distance from the left margin will be 6
4005 picas, not 6 picas plus the 2 pica indent.
4011 <div class="macro-id-overline">
4012 <h3 id="tn" class="macro-id">Tab Next</h3>
4015 <div class="box-macro-args">
4017 <br/>Inline escape: <b>\*[TB+]</b>
4021 TN moves over to the next tab in numeric sequence (tab n+1) without
4022 advancing on the page. See the
4023 <a href="#note-tn">NOTE</a>
4024 in the description of the TAB macro for an example of how TN works.
4028 In tabs that aren’t given the <kbd class="normal">QUAD</kbd>
4029 argument when they’re set up with
4030 <a href="#tab-set" class="normal">TAB_SET</a>
4032 <a href="#st" class="normal">ST</a>,
4033 you must terminate the line preceding <kbd class="normal">.TN</kbd>
4034 with the <kbd class="normal">\c</kbd> inline escape. Conversely,
4035 if you did give a <kbd>QUAD</kbd> argument to TAB_SET or ST, the
4036 <kbd>\c</kbd> must not be used.
4040 If you find remembering whether to put in the
4041 <kbd class="normal">\c</kbd> bothersome, you may prefer to use the
4042 <a href="definitions.html#inlines" class="normal">inline escape</a>
4044 <kbd class="normal">.TN</kbd>,
4045 <kbd class="normal"><a href="inlines.html#tb-plus-mom">\*[TB+]</a></kbd>,
4046 which works consistently regardless of the fill mode.
4049 <div id="tn-note" class="box-tip">
4051 <span class="note">Note:</span> You must put text in the
4052 <a href="definitions.html#inputline">input line</a>
4053 immediately after TN. Stacking of TN’s is not
4054 allowed. In other words, you cannot do
4056 <span class="pre-in-pp">
4065 The above example, assuming tabs numbered from 1 to 4, should be entered
4067 <span class="pre-in-pp">
4078 <kbd>\&</kbd> is a zero-width, non-printing character that groff
4079 recognizes as valid input, hence meets the requirement for input
4080 text following <kbd>.TN</kbd>.
4086 <div class="macro-id-overline">
4087 <h3 id="tq" class="macro-id">Tab Quit</h3>
4090 <div class="box-macro-args">
4095 TQ takes you out of whatever tab you were in, advances 1 linespace,
4096 and restores the left margin, line length, quad direction and
4097 <a href="definitions.html#filled">fill mode</a>
4098 that were in effect prior to invoking any tabs.
4101 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
4103 <!-- ==================================================================== -->
4105 <h2 id="multicolumns-intro" class="macro-group">Multiple columns</h2>
4108 Tabs are not by nature columnar, which is to say that if the text
4109 inside a tab runs to several lines, calling another tab does not
4110 automatically move to the
4111 <a href="definitions.html#baseline">baseline</a>
4112 of the first line in the previous tab. To demonstrate:
4114 <span class="pre-in-pp">
4126 <span class="pre-in-pp">
4134 The multi-column macros allow you to set tabs in columnar fashion,
4135 rather than line by line. When you invoke multi-column mode (with
4136 <kbd><a href="#mco">.MCO</a></kbd> –
4137 <span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">O</span>n),
4138 mom saves the position of the current baseline.
4139 <kbd><a href="#mcr">.MCR</a></kbd>
4140 (<span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">R</span>eturn)
4141 at any point while multi-columns are on returns you to the saved
4142 position. Exiting multi-columns
4143 (<kbd><a href="#mcx">.MCX</a></kbd> –
4144 <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)
4145 quits the current tab (if you’re in one) and moves you to the
4146 bottom of the longest column. (Note that you do not have to use
4147 multi-columns in conjunction with tabs.)
4151 Using our example above, but setting it in multi-column mode,
4153 <span class="pre-in-pp">
4168 <span class="pre-in-pp">
4171 Broccoli $0.99/bunch
4175 <div class="box-tip">
4177 <span class="note">Note:</span> Do not confuse MCO with
4179 <a href="docprocessing.html#columns">COLUMNS</a>
4181 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4185 <div class="box-tip">
4187 <span class="note">Additional Note:</span>
4188 Do not use multi-columns with
4189 <a href="docprocessing.html#slide">DOCTYPE SLIDES</a>
4190 because MCX uses the lowest line on the page to determine column
4191 depth. Owing to the fact that both headers and footers are printed
4192 prior to slides receiving text, MCX will always go to the
4193 footer position. If you need functionality similar to MCO/MCX, use
4194 the groff requests <kbd>.mk</kbd> and <kbd>.rt</kbd>. See
4195 <kbd>info groff --index-search=mk</kbd>.
4199 <div id="index-multicolumns" class="macro-list-container">
4200 <h3 class="macro-list">Multi-columns macros</h3>
4202 <ul class="macro-list">
4203 <li><a href="#mco">MCO</a> – begin multi-column setting</li>
4204 <li><a href="#mcr">MCR</a> – return to top of column</li>
4205 <li><a href="#mcx">MCX</a> – exit multi-columns</li>
4211 <div class="macro-id-overline">
4212 <h3 id="mco" class="macro-id">Begin multi-column setting</h3>
4215 <div class="box-macro-args">
4220 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
4221 setting. It marks the current
4222 <a href="definitions.html#baseline">baseline</a>
4223 as the top of your columns, for use later with
4224 <a href="#mcr">MCR</a>.
4226 <a href="#multicolumns-intro">introduction to columns</a>
4227 for an explanation of multi-columns and some sample
4231 <div class="box-tip">
4233 <span class="note">Note:</span> Do not confuse MCO with
4235 <a href="docprocessing.html#columns">COLUMNS</a>
4237 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4243 <div class="macro-id-overline">
4244 <h3 id="mcr" class="macro-id">Return to top of column</h3>
4247 <div class="box-macro-args">
4252 Once you’ve turned multi-columns on (with
4253 <kbd><a href="#mco">.MCO</a></kbd>),
4254 <kbd>.MCR</kbd>, at any time, returns you to the top of
4260 <div class="macro-id-overline">
4261 <h3 id="mcx" class="macro-id">Exit multi-columns</h3>
4264 <div class="box-macro-args">
4265 Macro: <b>MCX</b> <kbd class="macro-args">[ <distance to advance below longest column> ]</kbd>
4267 <p class="requires">
4268 • Optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4272 MCX takes you out of any tab you were in (by silently invoking
4273 <kbd><a href="#tq">.TQ</a></kbd>)
4274 and advances to the bottom of the longest column.
4278 Without an argument, MCX advances 1 linespace below the longest
4279 column. Linespace, in this instance, is the
4280 <a href="definitions.html#leading">leading</a>
4281 in effect at the moment MCX is invoked.
4285 If you pass the <kbd><distance></kbd> argument to MCX, it
4286 advances 1 linespace below the longest column (see above) PLUS the
4287 distance specified by the argument. The argument requires a unit
4288 of measure; therefore, to advance an extra 6 points below where MCX
4289 would normally place you, you’d enter
4291 <span class="pre-in-pp">
4296 <div class="box-tip">
4298 <span class="note">Note:</span> If you wish to advance a precise
4300 <a href="definitions.html#baseline">baseline</a>
4301 of the longest column, use MCX with an argument of 0 (zero; no unit
4302 of measure required) in conjunction with the
4303 <a href="#ald">ALD</a>
4306 <span class="pre-in-pp" style="margin-bottom: -12px;">
4314 The above advances to precisely 24 points below the baseline
4315 of the longest column.
4318 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
4320 <!-- ==================================================================== -->
4322 <h2 id="indents-intro" class="macro-group">Indents</h2>
4325 With mom’s indents, you can indent from the left, the right,
4326 or both margins. In addition, mom provides temporary left indents
4327 (ie only one line is indented, as at the start of a paragraph)
4328 and “hanging” left indents (the reverse of a temporary
4329 indent; the first line isn’t indented, subsequent lines are).
4332 <h3 id="indents-handling" class="docs">How mom handles indents</h3>
4335 Mom provides five kinds of indents: left, right, both, temporary,
4336 and hanging. Each is invoked by its own name:
4338 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4339 <li>IL – Indent Left</li>
4340 <li>IR – Indent Right</li>
4341 <li>IB – Indent Both</li>
4342 <li>HI – Hanging Indent</li>
4343 <li>TI – Temporary Indent</li>
4347 In addition, there are four macros to control exiting from
4350 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4351 <li>IQ – quit all active indents</li>
4352 <li>ILX – exit indent style left</li>
4353 <li>IRX – exit indent style right</li>
4354 <li>IBX – exit indent style both</li>
4358 This section deals exclusively with IL, IR and IB. For an
4359 explanation of hanging and temporary indents—how they work and
4360 how to use them—see
4361 <a href="#hi">Hanging indents</a>
4363 <a href="#ti">Temporary indents</a>.
4367 The first time you invoke any of mom’s indents, you must
4368 supply a measure. For example,
4370 <span class="pre-in-pp">
4373 indents text 2 picas from the left margin (or current tab indent).
4377 When you want to exit the above indent, use either
4379 <span class="pre-in-pp" style="margin-bottom: -1em;">
4383 <span class="pre-in-pp" style="margin-top: -.5em;">
4386 The next time you want the same indent, invoke it without the
4387 argument, like this:
4389 <span class="pre-in-pp">
4392 As you can see, once you’ve supplied a measure to an indent
4393 macro, mom stores the value, obviating the need to repeat it on
4394 subsequent invocations. And mom doesn’t just store the
4395 measure—she hangs on to it tenaciously. Arguments passed to
4396 IL, IR and IB are additive. Consider the following:
4398 <span class="pre-in-pp">
4400 .IR 2P \"Indent right by 2 picas
4401 A first block of text...
4404 .IQ \"Turn indent off
4405 A second block of text...
4408 .IR 2P \"Indent right by an additional 2 picas (ie 4 picas)
4409 A third block of text...
4413 The first block of text is right indented by 2 picas (ie the line
4414 length is shortened by 2 picas to 18 picas). The second block of
4415 text, after IQ, is, as you’d expect, set to the full measure.
4416 The third block of text—the one to pay attention to—is
4417 not right indented by 2 picas, but rather by 4 picas. Mom adds
4418 the value of arguments to IL, IR and IB to whatever value is already
4423 If you wanted the third block of text in the example above to be
4424 right indented by just 2 picas (the original measure given to IR),
4425 you would enter <kbd>.IR</kbd> without an argument.
4429 Because indent arguments are additive, putting a minus sign in front
4430 of the argument can be used to subtract from the current value.
4431 In the following example, the first line is indented 18 points,
4432 the second is indented 36 points (18 + 18), and the third is again
4433 indented 18 points (36 - 18).
4435 <span class="pre-in-pp">
4436 .IL 18p \"Indent left by 18 points = 18 points
4438 .IL 18p \"Indent left by 18 points more = 36 points
4439 for all good men to come
4440 .IL -18p \"Indent left by 18 points less = 18 points
4441 to the aid of the party.
4443 Sometimes, you may want to clear out the stored indent
4444 values—let mom start indenting with a clean slate, as it
4445 were. Giving the optional argument <kbd>CLEAR</kbd> to any of the
4446 “indent quit” macros resets them to zero.
4448 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4449 <li>IQ CLEAR – quit and clear all indents</li>
4450 <li>ILX CLEAR – quit and clear indent style left</li>
4451 <li>IRX CLEAR – quit and clear indent style right</li>
4452 <li>IBX CLEAR – quit and clear indent style both</li>
4456 Indent styles may be combined and manipulated separately. You
4457 could, for example, have a left indent of 4 picas and a right indent
4458 of 6 picas and control each separately, as in the following example.
4460 <span class="pre-in-pp">
4461 .IL 4P \"Indent left 4 picas
4462 .IR 6P \"Indent right 6 picas
4464 .IRX \"Turn off the right indent only
4465 More text \"Text is still indented 4 picas left
4467 If, at <kbd>.IRX</kbd>, you wanted the text afterwards to have no
4468 indents (either left or right), you would enter <kbd>.IQ</kbd>,
4469 which exits all indent styles at once.
4473 A word of advice: Indents are best used only when you have a
4474 compelling reason not to change the current left margin or line
4475 length. In many instances where indents might seem expedient,
4476 it’s better to use tabs, or actually change the left margin
4477 or the line length. Mom’s indenting macros are flexible and
4478 powerful, but easy to get tangled up in.
4481 <div class="box-tip">
4483 <span class="note">Note:</span> see the section
4484 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
4485 for information and advice on using indents with the
4486 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4490 <div id="index-indents" class="macro-list-container">
4491 <h3 class="macro-list">Indents macros</h3>
4493 <ul class="macro-list">
4494 <li><a href="#il">IL</a> – Indent left</li>
4495 <li><a href="#ir">IR</a> – Indent right</li>
4496 <li><a href="#ib">IB</a> – Indent both</li>
4497 <li><a href="#ti">TI</a> – Temporary indent, left</li>
4498 <li><a href="#hi">HI</a> – Hanging Indent
4499 <ul style="margin-left: -.5em; list-style-type: disc;">
4500 <li><a href="#num-lists">Recipe: a numbered list using hanging indents</a></li>
4502 <li><a href="#iq">IQ</a> – Quit indents, all</li>
4503 <li><a href="#iq">ILX</a> – Exit indent style left</li>
4504 <li><a href="#iq">IRX</a> – Exit indent style right</li>
4505 <li><a href="#iq">IBX</a> – Exit indent style both</li>
4511 <div class="macro-id-overline">
4512 <h3 id="il" class="macro-id">Indent left</h3>
4515 <div class="box-macro-args">
4516 Macro: <b>IL</b> <kbd class="macro-args">[ <measure> ]</kbd>
4518 <p class="requires">
4519 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4523 IL indents text from the left margin of the page, or if you’re
4524 in a tab, from the left edge of the tab. Once IL is on, the left
4525 indent is applied uniformly to every subsequent line of text, even
4526 if you change the line length.
4530 The first time you invoke <kbd>.IL</kbd>, you must give it a
4531 measure. Subsequent invocations with a measure add to the previous
4532 measure. A minus sign may be prepended to the argument to subtract
4533 from the current measure. The
4534 <kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
4535 <a href="definitions.html#inlines">inline escape</a>
4536 may be used to specify a text-dependent measure, in which case no
4537 unit of measure is required. For example,
4539 <span class="pre-in-pp">
4542 indents text by the width of the word “margarine”.
4546 With no argument, IL after an ILX indents by its last active value. See the
4547 <a href="#indents-handling">explanation of how mom handles indents</a>
4551 <div class="box-tip">
4553 <span class="note">Note:</span> Calling a tab (with
4554 <kbd><a href="#tab">.TAB <n></a></kbd>)
4555 automatically cancels any active indents.
4558 <p class="tip-bottom">
4559 <span class="additional-note">Additional note:</span> Invoking IL
4560 automatically turns off IB.
4566 <div class="macro-id-overline">
4567 <h3 id="ir" class="macro-id">Indent right</h3>
4570 <div class="box-macro-args">
4571 Macro: <b>IR</b> <kbd class="macro-args">[ <measure> ]</kbd>
4573 <p class="requires">
4574 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4578 IR indents text from the right margin of the page, or if
4579 you’re in a tab, from the end of the tab.
4583 The first time you invoke <kbd>.IR</kbd>, you must give it a
4584 measure. Subsequent invocations with a measure add to the previous
4585 indent measure. A minus sign may be prepended to the argument to
4586 subtract from the current indent measure. The
4587 <kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
4588 <a href="definitions.html#inlines">inline escape</a>
4589 may be used to specify a text-dependent measure, in which case no
4590 unit of measure is required. For example, <br/>
4591 <span class="pre-in-pp">
4594 indents text by the width of the word “jello”.
4598 With no argument, IR after an IRX indents by its last active value. See the
4599 <a href="#indents-handling">explanation of how mom handles indents</a>
4603 <div class="box-tip">
4605 <span class="note">Note:</span> Calling a tab (with
4606 <kbd><a href="#tab">.TAB <n></a></kbd>)
4607 automatically cancels any active indents.
4610 <p class="tip-bottom">
4611 <span class="additional-note">Additional note:</span> Invoking IR
4612 automatically turns off IB.
4618 <div class="macro-id-overline">
4619 <h3 id="ib" class="macro-id">Indent both</h3>
4622 <div class="box-macro-args">
4623 Macro: <b>IB</b> <kbd class="macro-args">[ <indent-1> <indent-2> ]</kbd>
4625 <p class="requires">
4626 • The optional arguments require a <a href="definitions.html#unitofmeasure">unit of measure</a>
4630 IB allows you to set or invoke a left and a right indent at the same
4635 If you supply only an <kbd>indent-1</kbd> argument, the argument is
4636 the amount to indent from both the left and right margins. If you
4637 give both <kbd>indent-1</kbd> and <kbd>indent-2</kbd>, the first is
4638 the indent from the left margin and the second is the indent from
4643 As with IL and IR, the measures are added to the values previously
4644 passed to the macro. Hence, if you wish to change just one of the
4645 values, you must give an argument of zero to the other. (A word of
4646 advice: If you need to manipulate left and right indents separately,
4647 use a combination of IL and IR instead of IB. You’ll save
4648 yourself a lot of grief.)
4652 A minus sign may be prepended to the arguments to subtract from
4653 their current values. The
4654 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
4655 <a href="definitions.html#inlines">inline escape</a>
4656 may be used to specify text-dependent measures, in which case no
4657 unit of measure is required. For example,
4659 <span class="pre-in-pp">
4660 .IB \w’margarine’ \w'jello'
4662 left indents text by the width of the word “margarine”
4663 and right indents by the width of “jello”.
4667 Like IL and IR, IB with no argument after an IBX indents by its
4668 last active values. See the
4669 <a href="#indents-handling">explanation of how mom handles indents</a>
4673 <div class="box-tip">
4675 <span class="note">Note:</span> Calling a tab (with
4676 <kbd><a href="#tab">.TAB <n></a></kbd>)
4677 automatically cancels any active indents.
4680 <p class="tip-bottom">
4681 <span class="additional-note">Additional note:</span> Invoking IB
4682 automatically turns off IL and IR.
4688 <div class="macro-id-overline">
4689 <h3 id="ti" class="macro-id">Temporary (left) indent</h3>
4692 <div class="box-macro-args">
4693 Macro: <b>TI</b> <kbd class="macro-args">[ <measure> ]</kbd>
4695 <p class="requires">
4696 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4700 A temporary indent is one that applies only to the first line of
4701 text that comes after it. Its chief use is indenting the first line
4702 of paragraphs. (Mom’s
4703 <a href="docelement.html#pp">PP</a>
4704 macro, for example, uses a temporary indent.)
4708 The first time you invoke <kbd>.TI</kbd>, you must give
4709 it a measure. If you want to indent the first line of a paragraph
4711 <a href="definitions.html#em">ems</a>,
4714 <span class="pre-in-pp">
4717 Subsequent invocations of TI do not require you to supply a measure;
4718 mom keeps track of the last measure you gave it.
4722 Because temporary indents are temporary, there’s no need to
4726 <div class="box-important">
4728 <span class="important">IMPORTANT:</span> Unlike IL, IR and IB,
4729 measures given to TI are NOT additive. In the following example,
4730 the second <kbd>.TI 2P</kbd> is exactly 2 picas.
4732 <span class="pre-in-pp" style="margin-bottom: -18px;">
4734 The beginning of a paragraph...
4736 The beginning of another paragraph...
4743 <div class="macro-id-overline">
4744 <h3 id="hi" class="macro-id">Hanging indent</h3>
4747 <div class="box-macro-args">
4748 Macro: <b>HI</b> <kbd class="macro-args">[ <measure> ]</kbd>
4750 <p class="requires">
4751 • The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4755 A hanging indent looks like this:
4757 <span class="pre-in-pp">
4758 The thousand injuries of Fortunato I had borne as best I
4759 could, but when he ventured upon insult, I vowed
4760 revenge. You who so well know the nature of my soul
4761 will not suppose, however, that I gave utterance to a
4762 threat, at length I would be avenged...
4764 The first line of text “hangs” outside the left margin.
4768 In order to use hanging indents, you must first have a left indent
4769 active (set with either
4770 <kbd><a href="#il">.IL</a></kbd>
4772 <kbd><a href="#ib">.IB</a></kbd>).
4773 Mom will not hang text outside the left margin set with
4774 <kbd><a href="#l-margin">.L_MARGIN</a></kbd>
4775 or outside the left margin of a tab.
4779 The first time you invoke <kbd>.HI</kbd>, you must give
4780 it a measure. If you want the first line of a paragraph to hang by,
4783 <span class="pre-in-pp">
4787 Subsequent invocations of HI do not require you to supply a measure;
4788 mom keeps track of the last measure you gave it.
4792 Generally speaking, you should invoke HI immediately prior to the
4793 line you want hung (ie without any intervening
4794 <a href="definitions.html#controllines">control lines</a>).
4795 And because hanging indents affect only one line, there’s no
4796 need to turn them off.
4799 <div class="box-important">
4801 <span class="important">IMPORTANT:</span> Unlike IL, IR and IB,
4802 measures given to HI are NOT additive. Each time you pass a measure
4803 to HI, the measure is treated literally.
4807 <h4 id="num-lists" class="macro-id">Recipe: A numbered list using hanging indents</h4>
4809 <div class="box-tip" style="margin-top: -.5em; margin-bottom: -.5em;">
4811 <span class="note">Note:</span> mom has macros for setting lists (see
4812 <a href="docelement.html#list-intro">Nested lists</a>).
4813 This recipe exists to demonstrate the use of hanging indents only.
4817 <p style="margin-top: 1.5em;">
4818 <span class="pre-in-pp">
4819 .PAGE 8.5i 11i 1i 1i 1i 1i
4829 1.\0The most important point to be considered is whether the
4830 answer to the meaning of Life, the Universe, and Everything
4831 really is 42. We have no-one’s word on the subject except
4834 2.\0If the answer to the meaning of Life, the Universe,
4835 and Everything is indeed 42, what impact does this have on
4836 the politics of representation? 42 is, after all not a
4837 prime number. Are we to infer that prime numbers don’t
4838 deserve equal rights and equal access in the universe?
4840 3.\0If 42 is deemed non-exclusionary, how do we present it
4841 as the answer and, at the same time, forestall debate on its
4842 exclusionary implications?
4844 First, we invoke a left indent with a measure equal to the width of
4846 <a href="definitions.html#figurespace">figures spaces</a>
4847 plus a period (using the
4848 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
4849 inline escape). At this point, the left indent is active; text
4850 afterwards would normally be indented. However, we invoke a
4851 hanging indent of exactly the same width, which hangs the first
4852 line (and first line only!) to the left of the indent by the
4853 same distance (in this case, that means “out to the left
4854 margin”). Because we begin the first line with a number,
4855 a period, and a figure space, the actual text (“The most
4856 important point...”) starts at exactly the same spot as the
4857 indented lines that follow.
4861 Notice that subsequent invocations of <kbd>.HI</kbd> don’t
4862 require a measure to be given.
4866 Paste the example above into a file and preview it with
4868 <span class="pre-in-pp">
4869 pdfmom filename.mom > filename.pdf
4871 to see hanging indents in action.
4876 <div class="macro-id-overline">
4877 <h3 id="iq" class="macro-id">Quitting indents</h3>
4880 <div class="box-macro-args">
4881 Macro: <b>IQ</b> <kbd class="macro-args">[ CLEAR ]</kbd> (quit any/all indents — see IMPORTANT NOTE)
4885 Macro: <b>ILX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Left)
4888 Macro: <b>IRX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Right)
4891 Macro: <b>IBX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Both)
4893 <div class="box-important">
4895 <span class="important">IMPORTANT NOTE:</span> The original macro
4896 for quitting all indents was IX. This usage has been deprecated in
4897 favour of IQ. IX will continue to behave as before, but mom will
4898 issue a warning to stderr indicating that you should update your
4902 <p class="tip-bottom">
4903 As a consequence of this change, ILX, IRX and IBX may now also be
4904 invoked as ILQ, IRQ and IBQ. Both forms are acceptable.
4909 Without an argument, the macros to quit indents merely restore your
4910 original margins and line length. The measures stored in the indent
4911 macros themselves are saved so you can call them again without
4912 having to supply a measure.
4916 If you pass these macros the optional argument <kbd>CLEAR</kbd>,
4917 they not only restore your original left margin and line length, but
4918 also clear any values associated with a particular indent style.
4919 The next time you need an indent of the same style, you have to
4920 supply a measure again.
4924 <kbd>.IQ CLEAR</kbd>, as you’d suspect,
4925 quits and clears the values for all indent styles at once.
4928 <div class="rule-long"><hr/></div>
4930 <!-- Navigation links -->
4931 <table style="width: 100%; margin-top: 12px;">
4933 <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
4934 <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
4935 <td style="width: 33%; text-align: right;"><a href="goodies.html#top">Next: Goodies</a></td>
4941 <div class="bottom-spacer"><br/></div>