3a8722a0f8804a3d73ec0bd7ad38ade01a5e58b6
[platform/upstream/groff.git] / contrib / mom / momdoc / typesetting.html
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 This file is part of groff, the GNU roff type-setting system.
4
5 Copyright (C) 2004-2014 Free Software Foundation, Inc.
6 Written by Peter Schaffter (peter@schaffter.ca).
7
8 Permission is granted to copy, distribute and/or modify this document
9 under the terms of the GNU Free Documentation License, Version 1.3 or
10 any later version published by the Free Software Foundation; with the
11 Invariant Sections being this comment section, with no Front-Cover
12 Texts, and with no Back-Cover Texts.
13
14 A copy of the Free Documentation License is included as a file called
15 FDL in the main directory of the groff source package.
16 -->
17
18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml">
20
21 <head>
22   <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
23   <title>Mom -- Typesetting Macros</title>
24   <link rel="stylesheet" type="text/css" href="stylesheet.css" />
25 </head>
26
27 <body style="background-color: #f5faff;">
28
29 <!-- ==================================================================== -->
30
31 <div id="top" class="page">
32
33 <!-- Navigation links -->
34 <table style="width: 100%;">
35 <tr>
36   <td><a href="toc.html">Back to Table of Contents</a></td>
37   <td style="text-align: right;"><a href="goodies.html#top">Next: Goodies</a></td>
38 </tr>
39 </table>
40
41 <h1 id="typesetting" class="docs">The typesetting macros</h1>
42
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>
48   <ul>
49     <li class="item"><a href="#page-setup-note"><i>Important note on page dimensions &amp; papersize</i></a></li>
50     <li class="item"><a href="#index-page-setup">Macro list</a></li>
51   </ul></li>
52   <li class="list-head"><a href="#basic-params-intro">Basic typesetting parameters</a>
53   <ul>
54     <li class="item"><a href="#index-basic">Macro list</a></li>
55   </ul></li>
56   <li class="list-head"><a href="#justification-intro">Justification and quadding/
57     <br/>
58     <span style="margin-left: 1em;">breaking and joining lines</span></a>
59   <ul>
60     <li class="item"><a href="#index-justification">Macro list</a></li>
61   </ul></li>
62   <li class="list-head"><a href="#refinements-intro">Typographic refinements</a>
63   <ul>
64     <li class="item"><a href="#index-refinements">Macro list</a></li>
65   </ul></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>
69   </ul></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>
73     </li>
74   </ul></li>
75 </ul>
76 </div>
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>
84     </ul></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>
88     </ul></li>
89     <li class="item"><a href="#index-tabs">Macro list</a></li>
90   </ul></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>
94     </li>
95   </ul></li>
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>
100     </li>
101   </ul></li>
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>
105     </li>
106   </ul></li>
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>
110     </li>
111   </ul></li>
112   <li class="list-head"><a href="color.html#colored-text-intro">Coloured text</a>
113   <ul class="no-enumerator">
114     <li class="item"><a href="color.html#colored-text-macros">Macro list</a></li>
115   </ul></li>
116 </ul>
117 </div>
118 </div>
119
120 <div class="rule-medium"><hr/></div>
121
122 <h2 id="typesetting-intro" class="docs">Introduction</h2>
123
124 <p>
125 Mom&#8217;s typesetting macros provide access to groff&#8217;s
126 typesetting capabilities.  Aside from controlling basic type
127 parameters (family, font, line length, point size, leading),
128 mom&#8217;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
131 other goodies.
132 </p>
133
134 <p>
135 In some cases, mom&#8217;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.
143 </p>
144
145 <p>
146 Mom&#8217;s typesetting macros can be used as a standalone package,
147 independent of the
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&#8217;s résumé, a poster for a lost dog&mdash;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
154 control.
155 </p>
156
157 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
158
159 <!-- ==================================================================== -->
160
161 <h2 id="page-setup-intro" class="macro-group">Paper and page setup: paper size &amp; page margins</h2>
162
163 <p>
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.
167 </p>
168
169 <p>
170 If you&#8217;re using mom&#8217;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>.
174 </p>
175
176 <p>
177 The
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.
184 </p>
185
186 <div class="box-notes">
187 <h3 id="page-setup-note" class="docs notes">Important note on page dimensions and papersize</h3>
188
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.
196 </p>
197
198 <p>
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&mdash;or change&mdash;the default papersize by inspecting the
204 files
205 <br/>
206 <span class="pre-in-pp">
207   &lt;path to groff&gt;/font/devps/DESC
208 </span>
209 and
210 <br/>
211 <span class="pre-in-pp">
212   &lt;path to groff&gt;/font/devpdf/DESC
213 </span>
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
216 size.)
217 </p>
218
219 <p>
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&lt;papersize&gt;</kbd> option to <strong>groff</strong>,
224 <strong>pdfroff</strong>, or <strong>pdfmom -Tps</strong>.
225 </p>
226
227 <p>
228 For example, suppose your routine papersize is &#8220;letter&#8221;,
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>
232 and
233 <a href="#pagewidth">PAGEWIDTH</a>
234 or
235 <a href="#paper">PAPER</a>,
236 or
237 <a href="#page">PAGE</a>),
238 you must include <kbd>-P-p&lt;papersize&gt;</kbd> on whichever
239 command line you use, eg
240 <br/>
241 <span class="pre-in-pp">
242   pdfmom -Tps -mom -P-plegal
243 </span>
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.
248 </p>
249
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 &#8220;landscape&#8221;
254 orientation.
255 </p>
256 </div>
257
258 <div class="macro-list-container">
259 <h3 id="index-page-setup" class="macro-list">Paper and page setup macros</h3>
260
261 <ul class="macro-list">
262   <li><a href="#pagewidth">PAGEWIDTH</a> &ndash; page width</li>
263   <li><a href="#pagelength">PAGELENGTH</a> &ndash; page length</li>
264   <li><a href="#paper">PAPER</a> &ndash; common paper sizes</li>
265   <li><a href="#l-margin">L_MARGIN</a> &ndash; left margin</li>
266   <li><a href="#r-margin">R_MARGIN</a> &ndash; right margin</li>
267   <li><a href="#t-margin">T_MARGIN</a> &ndash; top margin</li>
268   <li><a href="#b-margin">B_MARGIN</a> &ndash; bottom margin</li>
269   <li><a href="#page">PAGE</a> &ndash; page dimensions and margins all in one fell swoop</li>
270   <li><a href="#newpage">NEWPAGE</a> &ndash; start a new page</li>
271 </ul>
272 </div>
273
274 <!-- -PAGEWIDTH- -->
275
276 <div class="macro-id-overline">
277 <h3 id="pagewidth" class="macro-id">Page width</h3>
278 </div>
279
280 <div class="box-macro-args">
281 Macro: <b>PAGEWIDTH</b> <kbd class="macro-args">&lt;width of printer sheet&gt;</kbd>
282 </div>
283 <p class="requires">
284 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
285 </p>
286
287 <p>
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
292 <br/>
293 <span class="pre-in-pp">
294   .PAGEWIDTH 8.5i
295 </span>
296 Please read the
297 <a href="#page-setup-note">Important note on page dimensions and papersize</a>
298 for information on ensuring groff respects your
299 PAGEWIDTH.
300 </p>
301
302 <div class="box-important">
303 <p class="tip">
304 <span class="important">Important:</span> <kbd>PAGEWIDTH</kbd>,
305 when you need it, should be placed at the top of your files.
306 </p>
307 </div>
308
309 <!-- -PAGELENGTH- -->
310
311 <div class="macro-id-overline">
312 <h3 id="pagelength" class="macro-id">Page length</h3>
313 </div>
314
315 <div class="box-macro-args">
316 Macro: <b>PAGELENGTH</b> <kbd class="macro-args">&lt;length of printer sheet&gt;</kbd>
317 </div>
318 <p class="requires">
319 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
320 </p>
321
322 <p>
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
326 <br/>
327 <span class="pre-in-pp">
328   .PAGELENGTH 11i
329 </span>
330 Please read the
331 <a href="#page-setup-note">Important note on page dimensions and papersize</a>
332 for information on ensuring groff respects your PAGELENGTH.
333 </p>
334
335 <div class="box-important">
336 <p class="tip">
337 <span class="important">Important:</span> <kbd>PAGELENGTH</kbd>,
338 when you need it, should be placed at the top of your files.
339 </p>
340 </div>
341
342 <!-- -PAPER- -->
343
344 <div class="macro-id-overline">
345 <h3 id="paper" class="macro-id">Paper</h3>
346 </div>
347
348 <div class="box-macro-args">
349 Macro: <b>PAPER</b> <kbd class="macro-args">&lt;paper type&gt; [ LANDSCAPE ]</kbd>
350 </div>
351
352 <p>
353 PAPER provides a convenient way to set the dimensions for some
354 common printer sheet sizes. <kbd>&lt;paper&nbsp;type&gt;</kbd> can
355 be one of:
356 <br/>
357 <span class="pre-in-pp">
358   LETTER       EXECUTIVE
359   LEGAL        10x14
360   STATEMENT    A3
361   TABLOID      A4
362   LEDGER       A5
363   FOLIO        B4 
364   QUARTO       B5
365 </span>
366 Say, for example, you have A4-sized sheets in your printer.  It&#8217;s
367 shorter (and easier) to enter
368 <br/>
369 <span class="pre-in-pp">
370   .PAPER A4
371 </span>
372 than to remember the correct dimensions and enter
373 <br/>
374 <span class="pre-in-pp">
375   .PAGEWIDTH  595p
376   .PAGELENGTH 842p
377 </span>
378 If you&#8217;d like landscape orientation for your paper type,
379 pass PAPER the <kbd>LANDSCAPE</kbd> argument.
380 <p>
381 Please read the
382 <a href="#page-setup-note">Important note on page dimensions and papersize</a>
383 for information on ensuring groff respects your PAPER size.
384 </p>
385
386 <div class="box-important">
387 <p class="tip">
388 <span class="important">Important:</span> <kbd>PAPER</kbd> when you
389 need it, should be placed at the top of your files.
390 </p>
391 </div>
392
393 <!-- -L_MARGIN- -->
394
395 <div class="macro-id-overline">
396 <h3 id="l-margin" class="macro-id">Left margin</h3>
397 </div>
398
399 <div class="box-macro-args">
400 Macro: <b>L_MARGIN</b> <kbd class="macro-args">&lt;left margin&gt;</kbd>
401 </div>
402 <p class="requires">
403 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
404 </p>
405
406 <p>
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.
410 </p>
411
412 <p>
413 <a href="#il">Left indents</a>
414 and
415 <a href="#tabs">tabs</a>
416 are calculated from the value you pass to L_MARGIN, hence it&#8217;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&#8217;d enter either
421 <br/>
422 <span class="pre-in-pp">
423   .L_MARGIN 3P
424 </span>
425 or
426 <span class="pre-in-pp">
427   .L_MARGIN .5i
428 </span>
429 If you use the macros
430 <a href="#page">PAGE</a>,
431 <a href="#pagewidth">PAGEWIDTH</a>
432 or
433 <a href="#paper">PAPER</a>
434 without invoking L_MARGIN (either before or afterwards), mom
435 automatically sets L_MARGIN to 1 inch.
436 </p>
437
438 <div class="box-tip">
439 <p class="tip">
440 <span class="note">Note:</span> L_MARGIN behaves in a special way
441 when you&#8217;re using the
442 <a href="docprocessing.html#docprocessing">document processing macros</a>.
443 See
444 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
445 for an explanation.
446 </p>
447 </div>
448
449 <!-- -R_MARGIN- -->
450
451 <div class="macro-id-overline">
452 <h3 id="r-margin" class="macro-id">Right margin</h3>
453 </div>
454
455 <div class="box-macro-args">
456 Macro: <b>R_MARGIN</b> <kbd class="macro-args">&lt;right margin&gt;</kbd>
457 </div>
458 <p class="requires">
459 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
460 </p>
461
462 <div class="box-important">
463 <p class="tip">
464 <span class="important">IMPORTANT:</span> R_MARGIN, if used, must
465 come after
466 <a href="#paper">PAPER</a>,
467 <a href="#pagewidth">PAGEWIDTH</a>,
468 <a href="#l-margin">L_MARGIN</a>
469 and/or
470 <a href="#page">PAGE</a>
471 (if a right margin isn&#8217;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&#8217;t make the calculation if
474 it doesn&#8217;t know the page width and the left margin.
475 </p>
476 </div>
477
478 <p>
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.
483 </p>
484
485 <p>
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.
493 </p>
494
495 <p>
496 For example, if you&#8217;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:
499 <br/>
500 <span class="pre-in-pp">
501   .L_MARGIN 6P
502   .R_MARGIN 6P
503 </span>
504 That way, you don&#8217;t have to worry about calculating the line
505 length.  On the other hand, if you know the line length for a patch
506 of type should be 17 picas and 3 points, entering the line length
507 with LL is much easier than calculating the right margin, eg
508 <br/>
509 <span class="pre-in-pp">
510   .LL 17P+3p
511 </span>
512 If you use the macros
513 <a href="#page">PAGE</a>,
514 <a href="#pagewidth">PAGEWIDTH</a>
515 or
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
519 macros (with
520 <a href="#linelength">LL</a>),
521 the line length calculated by R_MARGIN is, of course, overridden.
522 </p>
523
524 <div class="box-tip">
525 <p class="tip">
526 <span class="note">Note:</span> R_MARGIN behaves in a special way when you&#8217;re
527 using the
528 <a href="docprocessing.html#docprocessing">document processing macros</a>.
529 See
530 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
531 for an explanation.
532 </p>
533 </div>
534
535 <!-- -T_MARGIN- -->
536
537 <div class="macro-id-overline">
538 <h3 id="t-margin" class="macro-id">Top margin</h3>
539 </div>
540
541 <div class="box-macro-args">
542 Macro: <b>T_MARGIN</b> <kbd class="macro-args">&lt;top margin&gt;</kbd>
543 </div>
544 <p class="requires">
545 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
546 </p>
547
548 <p>
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&#8217;d enter
553 <br/>
554 <span class="pre-in-pp">
555    .T_MARGIN 2.5c
556 </span>
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,
560 <br/>
561 <span class="pre-in-pp">
562   .T_MARGIN 1.5i
563 </span>
564 puts the baseline of the first line of type 1-1/2 inches beneath the
565 top of the page.
566 </p>
567
568 <div class="box-tip">
569 <p class="tip">
570 <span class="note">Note:</span> T_MARGIN means something slightly
571 different when you&#8217;re using the
572 <a href="docprocessing.html#docprocessing">document processing macros</a>.
573 See
574 <a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>
575 for an explanation.
576 </p>
577 </div>
578
579 <div class="box-important">
580 <p class="tip">
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>,
587 like this:
588 <br/>
589 <span class="pre-in-pp" style="margin-bottom: -1em;">
590   .NEWPAGE
591   .T_MARGIN 6P
592   &lt;text&gt;
593 </span>
594 </p>
595 </div>
596
597 <!-- -B_MARGIN- -->
598
599 <div class="macro-id-overline">
600 <h3 id="b-margin" class="macro-id">Bottom margin</h3>
601 </div>
602
603 <div class="box-macro-args">
604 Macro: <b>B_MARGIN</b> <kbd class="macro-args">&lt;bottom margin&gt;</kbd>
605 </div>
606 <p class="requires">
607 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
608 </p>
609
610 <p>
611 B_MARGIN sets a nominal position at the bottom of the page beyond
612 which you don&#8217;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
616 <br/>
617 <span class="pre-in-pp">
618   .B_MARGIN .75i
619 </span>
620 Obviously, if you haven&#8217;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
624 start a new page.
625 </p>
626
627 <p>
628 Occasionally, owing to a peculiarity in groff, an extra line will
629 fall below the nominal bottom margin.  If you&#8217;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.
633 </p>
634
635 <div class="box-tip">
636 <p class="tip">
637 <span class="note">Note:</span> The meaning of B_MARGIN is slightly
638 different when you&#8217;re using the document processing macros.
639 See
640 <a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>
641 for an explanation.
642 </p>
643 </div>
644
645 <!-- -PAGE- -->
646
647 <div class="macro-id-overline">
648 <h3 id="page" class="macro-id">Page</h3>
649 </div>
650
651 <div class="box-macro-args" style="overflow: auto;">
652 Macro: <b>PAGE</b> <kbd class="macro-args">&lt;width&gt;&nbsp;[ &lt;length&gt; [ &lt;lm&gt; [ &lt;rm&gt; [ &lt;tm&gt; [ &lt;bm&gt; ] ] ] ] ]</kbd>
653 </div>
654 <p class="requires">
655 &bull;&nbsp;All arguments require a <a href="definitions.html#unitofmeasure">unit of measure</a>
656 </p>
657
658 <div class="box-important">
659 <p class="tip">
660 <span class="important">IMPORTANT:</span> If you&#8217;re using the
661 <a href="docprocessing.html#docprocessing">document processing macros</a>,
662 PAGE must come after
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&#8217;re using the document processing
666 macros, top margin and bottom margin mean something slightly
667 different than when you&#8217;re using just the typesetting macros
668 (see
669 <a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>).
670 </p>
671 </div>
672
673 <p>
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&#8217;t
677 skip over any. <kbd>&lt;lm&gt;, &lt;rm&gt;, &lt;tm&gt;</kbd> and
678 <kbd>&lt;bm&gt;</kbd> refer to the left, right, top and bottom
679 margins respectively.
680 </p>
681
682 <p>
683 Assuming your page dimensions are 11 inches by 17 inches, and
684 that&#8217;s all you want to set, enter
685 <br/>
686 <span class="pre-in-pp">
687   .PAGE 11i 17i
688 </span>
689 If you want to set the left margin as well, say, at 1 inch, PAGE
690 would look like this:
691 <br/>
692 <span class="pre-in-pp">
693   .PAGE 11i 17i 1i
694 </span>
695 Now suppose you also want to set the top margin, say, at 1-1/2
696 inches. &lt;tm&gt; comes after &lt;rm&gt; in the optional arguments,
697 but you can&#8217;t skip over any arguments, therefore to set the
698 top margin, you must also give a right margin.  The PAGE macro would
699 look like this:
700 <br/>
701 <span class="pre-in-pp">
702   .PAGE 11i 17i 1i 1i 1.5i
703                    |   |
704   required right---+   +---top margin
705       margin
706 </span>
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
711 <br/>
712 <span class="pre-in-pp">
713   .PAGE 8.5i 11i 45p 45p 45p 45p
714 </span>
715 This sets up an 8-1/2 by 11 inch page with margins of 45 points
716 (5/8-inch) all around.
717 </p>
718
719 <p>
720 Additionally, if you invoke <kbd>.PAGE</kbd> with a top margin
721 argument, any macros you invoke after <kbd>.PAGE</kbd> will almost
722 certainly move the
723 <a href="definitions.html#baseline">baseline</a>
724 of the first line of text down by one linespace.  To compensate, do
725 <br/>
726 <span class="pre-in-pp">
727   .RLD 1v
728 </span>
729 immediately before entering any text, or, if it&#8217;s feasible,
730 make PAGE the last macro you invoke prior to entering text.
731 </p>
732
733 <p>
734 Please read the
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
737 margins.
738 </p>
739
740 <!-- -NEWPAGE- -->
741
742 <div class="macro-id-overline">
743 <h3 id="newpage" class="macro-id">Start a new page</h3>
744 </div>
745
746 <div class="box-macro-args">
747 Macro: <b>NEWPAGE</b>
748 </div>
749
750 <p>
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>).
755 </p>
756
757 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
758
759 <!-- ==================================================================== -->
760
761 <h2 id="basic-params-intro" class="macro-group">Basic typesetting parameters</h2>
762
763 <p>
764 The basic typesetting parameter macros deal with fundamental
765 requirements for setting type: family, font, point size, leading and
766 line length.
767 </p>
768
769 <p>
770 If you&#8217;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
773 differently.  See
774 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
775 for an explanation.
776 </p>
777
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> &ndash; type family</li>
782   <li><a href="#font">FT</a> &ndash; font</li>
783   <li><a href="#fallback-font">FALLBACK_FONT</a> &ndash; for invalid fonts</li>
784   <li><a href="#ps">PT_SIZE</a> &ndash; point size of type</li>
785   <li><a href="#leading">LS</a> &ndash; line spacing/leading</li>
786   <li><a href="#autolead">AUTOLEAD</a> &ndash; automatic line spacing</li>
787   <li><a href="#linelength">LL</a> &ndash; line length</li>
788 </ul>
789 </div>
790
791 <!-- -FAMILY- -->
792
793 <div class="macro-id-overline">
794 <h3 id="family" class="macro-id">Type family</h3>
795 </div>
796
797 <div class="box-macro-args">
798 Macro: <b>FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
799 </div>
800 <p class="alias">
801 <i>Alias:</i> <b>FAM</b>
802 </p>
803
804 <p>
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
809 are:
810 <br/>
811 <span class="pre-in-pp">
812   A   = Avant Garde
813   BM  = Bookman
814   H   = Helvetica
815   HN  = Helvetica Narrow
816   N   = New Century Schoolbook
817   P   = Palatino
818   T   = Times Roman
819   ZCM = Zapf Chancery
820 </span>
821 The argument you pass to FAMILY is the identifier at left, above.
822 For example, if you want Helvetica, enter
823 <br/>
824 <span class="pre-in-pp">
825   .FAMILY H
826 </span>
827 </p>
828
829 <div class="box-tip" style="margin-top: -1em;">
830 <p class="tip-top">
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&nbsp;ZCMI</kbd> makes more sense than setting the family to
839 <kbd>ZCM</kbd>, then setting the font to <kbd>I</kbd>.
840 </p>
841
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>.
848 </p>
849 </div>
850
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 &#8220;remembers&#8221; 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
857 example:
858 <br/>
859 <span class="pre-in-pp">
860   .FAMILY BM   \" Bookman family
861   .FT     I    \" Medium Italic
862   &lt;some text&gt;  \" Bookman Medium Italic
863   .FAMILY H    \" Helvetica family
864   &lt;more text&gt;  \" Helvetica Medium Italic
865 </span>
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&#8217;s valid for the family.  For example, assuming
872 you don&#8217;t have the font &#8220;Medium Condensed Roman&#8221;
873 (mom extension &#8220;CD&#8221;) in the Helvetica family:
874 <br/>
875 <span class="pre-in-pp">
876   .FAMILY UN    \" Univers family
877   .FT     CD    \" Medium Condensed
878   &lt;some text&gt;   \" Univers Medium Condensed
879   .FAMILY H     \" Helvetica family
880   &lt;more text&gt;   \" Courier Medium Roman!
881 </span>
882 In the above example, you must follow
883 <kbd>.FAMILY&nbsp;H</kbd> with a FT request
884 that&#8217;s valid for Helvetica.
885 </p>
886
887 <p>
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&#8217;s basic
892 <b>R</b>, <b>I</b>, <b>B</b>, <b>BI</b> styles.
893 </p>
894
895 <div class="box-tip">
896 <p class="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
901 <br/>
902 <span class="pre-in-pp">
903   GARAMONDR
904   GARAMONDI
905   GARAMONDB
906   GARAMONDBI
907 </span>
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.
912 </p>
913 </div>
914
915 <!-- -FT- -->
916
917 <div class="macro-id-overline">
918 <h3 id="font" class="macro-id">FT</h3>
919 </div>
920
921 <div class="box-macro-args">
922 Macro: <b>FT</b> <kbd class="macro-args">R | I | B | BI | &lt;any other valid font style&gt;</kbd>
923 </div>
924 <p class="alias">
925 <i>Alias:</i> <b>FONT</b>
926 </p>
927
928 <p>
929 By default, groff permits FT to take one of four possible arguments
930 specifying the desired font:
931 <br/>
932 <span class="pre-in-pp">
933   R  = (Medium) Roman
934   I  = (Medium) Italic
935   B  = Bold (Roman)
936   BI = Bold Italic
937 </span>
938 For example, if your
939 <a href="definitions.html#family">family</a>
940 is Helvetica, entering
941 <br/>
942 <span class="pre-in-pp">
943   .FT B
944 </span>
945 will give you the Helvetica bold
946 <a href="definitions.html#font">font</a>.
947 If your family were Palatino, you&#8217;d get the Palatino bold
948 font.
949 </p>
950
951 <p>
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>
955 and
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.
966 </p>
967
968 <p>
969 How mom reacts to an invalid argument to FT depends on which version
970 of groff you&#8217;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&#8217;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
978 invalid FT call.
979 </p>
980
981 <p>
982 FT will also accept, as an argument, a full family+font name.  For
983 example,
984 <br/>
985 <span class="pre-in-pp">
986   .FT HB
987 </span>
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.
991 </p>
992
993 <p>
994 For inline control of fonts, see
995 <a href="inlines.html#inline-fonts-mom">Inline Escapes, font control</a>.
996 </p>
997
998
999 <!-- -FALLBACK_FONT- -->
1000
1001 <div class="macro-id-overline">
1002 <h3 id="fallback-font" class="macro-id">Fallback font</h3>
1003 </div>
1004
1005 <div class="box-macro-args">
1006 Macro: <b>FALLBACK_FONT</b> <kbd class="macro-args">&lt;fallback font&gt; [ ABORT | WARN ]</kbd>
1007 </div>
1008
1009 <p>
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
1014 your file.
1015 </p>
1016
1017 <p>
1018 If you&#8217;d prefer another fallback font, pass FALLBACK_FONT the
1019 full family+font name of the font you&#8217;d like.  For example, if
1020 you&#8217;d rather the fallback font were Times Roman Medium Roman,
1021 <br/>
1022 <span class="pre-in-pp">
1023   .FALLBACK_FONT TR
1024 </span>
1025 would do the trick.
1026 </p>
1027
1028 <p>
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&#8217;t registered the
1032 style (see
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
1038 problem.
1039 </p>
1040
1041 <p>
1042 If you&#8217;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.
1046 </p>
1047
1048 <p>
1049 Some examples of invoking FALLBACK_FONT:
1050 </p>
1051
1052 <ul class="no-enumerator" style="margin-left: -1em;">
1053 <li style="margin-top: -.5em;">
1054 <kbd>.FALLBACK_FONT WARN</kbd>
1055 <br/>
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.
1059 <br/>
1060 </li>
1061 <li style="margin-top: .5em;">
1062 <kbd>.FALLBACK_FONT TR WARN</kbd>
1063 <br/>
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, &#8220;TR&#8221; will be
1067 the fallback font whenever you try to access a family that does not
1068 exist.
1069 </li>
1070 <li style="margin-top: .5em;">
1071 <kbd>.FALLBACK_FONT TR ABORT</kbd>
1072 <br/>
1073 mom will abort whenever you try to access a non-existent font, and
1074 will use the fallback font &#8220;TR&#8221; whenever you try to
1075 access a family that does not exist.
1076 </li>
1077 </ul>
1078
1079 <p>
1080 If, for some reason, you want to revert to ABORT, just enter
1081 <kbd>.FALLBACK_FONT&nbsp;ABORT</kbd> and mom will once again abort
1082 on font errors.
1083 </p>
1084
1085 <!-- -PT_SIZE- -->
1086
1087 <div class="macro-id-overline">
1088 <h3 id="ps" class="macro-id">Point size of type</h3>
1089 </div>
1090
1091 <div class="box-macro-args">
1092 Macro: <b>PT_SIZE</b> <kbd class="macro-args">&lt;size of type in points&gt;</kbd>
1093 </div>
1094 <p class="requires">
1095 &bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
1096 </p>
1097
1098 <p>
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&#8217;s a near universal convention that type size
1103 is measured in points.  Therefore, to change the type size to, say,
1104 11 points, enter
1105 <br/>
1106 <span class="pre-in-pp">
1107   .PT_SIZE 11
1108 </span>
1109 Point sizes may be fractional (eg  10.25 or 12.5).
1110 </p>
1111
1112 <p>
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&nbsp;12</kbd>, entering <kbd>.PT_SIZE</kbd>
1116 (i.e. without an argument) resets the point size to 10.
1117 </p>
1118
1119 <p>
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
1123 can do
1124 <br/>
1125 <span class="pre-in-pp">
1126   .PT_SIZE +2
1127 </span>
1128 then later reset it to 12 with
1129 <span class="pre-in-pp">
1130   .PT_SIZE -2
1131 </span>
1132 or, more simply, just
1133 <span class="pre-in-pp">
1134   .PT_SIZE
1135 </span>
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>.
1138 </p>
1139
1140 <div class="box-tip">
1141 <p class="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&#8217;s macro for setting point
1145 sizes can&#8217;t use it.  However, if you aren&#8217;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&#8217;d be no conflict.  For example
1149 <br/>
1150 <span class="pre-in-pp">
1151   .ALIAS PS PT_SIZE
1152 </span>
1153 would allow you to set point sizes with <kbd>.PS</kbd>.
1154 </p>
1155 </div>
1156
1157 <!-- -LS- -->
1158
1159 <div class="macro-id-overline">
1160 <h3 id="leading" class="macro-id">Line spacing/leading</h3>
1161 </div>
1162
1163 <div class="box-macro-args">
1164 Macro: <b>LS</b> <kbd class="macro-args">&lt;distance between lines&gt;</kbd>
1165 </div>
1166 <p class="requires">
1167 &bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
1168 </p>
1169
1170 <p>
1171 LS (Line Space) takes one argument: the distance you want, typically
1172 in points, from baseline to baseline of type.  The argument may be
1173 fractional (eg 12.25 or 14.5).  Like PT_SIZE, LS does not require
1174 a unit of measure, since
1175 <a href="definitions.html#leading">leading</a>
1176 is most often given in points.  Therefore, to set the linespace to
1177 14 points, you would enter
1178 <br/>
1179 <span class="pre-in-pp">
1180   .LS 14
1181 </span>
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
1185 <br/>
1186 <span class="pre-in-pp">
1187   .LS .25i
1188 </span>
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
1193 <br/>
1194 <span class="pre-in-pp">
1195   .LS +3
1196 </span>
1197 then later reset it to 14 points with
1198 <br/>
1199 <span class="pre-in-pp">
1200   .LS -3
1201 </span>
1202 </p>
1203
1204 <div class="box-tip">
1205 <p class="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
1209 <kbd>.ls</kbd>.
1210 </p>
1211 </div>
1212
1213 <!-- -AUTOLEAD- -->
1214
1215 <div class="macro-id-overline">
1216 <h3 id="autolead" class="macro-id">Automatic line spacing</h3>
1217 </div>
1218
1219 <div class="box-macro-args">
1220 Macro: <b>AUTOLEAD</b> <kbd class="macro-args">&lt;amount of automatic leading&gt; [FACTOR]</kbd>
1221 </div>
1222 <p class="requires">
1223 &bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
1224 <br/>
1225 (Please see
1226 <a href="docprocessing.html#autolead">here</a>
1227 for information on using
1228 <span style="font-style: normal">AUTOLEAD</span> during document
1229 processing.)
1230 </p>
1231
1232 <p>
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.
1238 </p>
1239
1240 <p>
1241 Used in this way, AUTOLEAD does not require a unit of measure;
1242 points is assumed.  However, you may use an alternate unit of
1243 measure by appending it to the argument.  The argument may be a
1244 decimal fraction (eg .5 or 2.75).
1245 </p>
1246
1247 <p>
1248 As an example, if your current point size of type is 12, entering
1249 <br/>
1250 <span class="pre-in-pp">
1251   .AUTOLEAD 2
1252 </span>
1253 changes the linespace to 14 points, regardless any linespacing
1254 already in effect.  From here on, every change to the size of type
1255 (with PT_SIZE, not
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.
1260 </p>
1261
1262 <p>
1263 Automatic updating of the linespacing continues until you enter a
1264 &#8220;manual&#8221; line space value with
1265 <a href="#leading">LS</a>.
1266 </p>
1267
1268 <div class="box-tip">
1269 <p class="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.
1274 </p>
1275 </div>
1276
1277 <p>
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,
1282 <br/>
1283 <span class="pre-in-pp">
1284   .AUTOLEAD 1.125 FACTOR
1285 </span>
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).
1288 </p>
1289
1290 <div class="box-tip">
1291 <p class="tip">
1292 <span class="note">Note:</span> There&#8217;s no need to prepend a
1293 plus sign
1294 (<kbd>+</kbd>)
1295 to AUTOLEAD&#8217;s argument, although you may do so if you wish.
1296 </p>
1297 </div>
1298
1299 <!-- -LL- -->
1300
1301 <div class="macro-id-overline">
1302 <h3 id="linelength" class="macro-id">Line length</h3>
1303 </div>
1304
1305 <div class="box-macro-args">
1306 Macro: <b>LL</b> <kbd class="macro-args">&lt;line length&gt;</kbd>
1307 </div>
1308 <p class="requires">
1309 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
1310 </p>
1311
1312 <p>
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
1316 the macro suggests.
1317 </p>
1318
1319 <p>
1320 LL requires a unit of measure.  Therefore, to set the line length to
1321 39 picas, you would enter
1322 <br/>
1323 <span class="pre-in-pp">
1324   .LL 39P
1325 </span>
1326 As with other macros that require a unit of measure, the argument to
1327 LL may be fractional.  For example,
1328 <br/>
1329 <span class="pre-in-pp">
1330   .LL 4.5i
1331 </span>
1332 sets the line length to 4-1/2 inches.
1333 </p>
1334
1335 <p>
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
1340 do
1341 <br/>
1342 <span class="pre-in-pp">
1343   .LL +3p
1344 </span>
1345 This is especially handy when you want to &#8220;hang&#8221;
1346 punctuation outside the right margin since you can pass
1347 groff&#8217;s
1348 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
1349 escape as the argument to LL, like this:
1350 <br/>
1351 <span class="pre=in-pp">
1352   .LL +\w'.'u
1353 </span>
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.
1358 </p>
1359
1360 <div class="box-tip">
1361 <p class="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.
1365 </p>
1366 </div>
1367
1368 <div class="rule-short"><hr/></div>
1369
1370 <!-- ==================================================================== -->
1371
1372 <h2 id="justification-intro" class="macro-group">Justification and quadding/breaking and joining lines</h2>
1373
1374 <p>
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).
1379 </p>
1380
1381 <p>
1382 These macros also determine whether or not
1383 <a href="definitions.html#inputline">input lines</a>
1384 are joined and
1385 <a href="definitions.html#filled">filled</a>
1386 during output.
1387 </p>
1388
1389 <p>
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.
1395 </p>
1396
1397 <p>
1398 You may encounter some words here that are unfamiliar.  Refer to
1399 <a href="definitions.html#typesetting">Typesetting terms</a>
1400 and
1401 <a href="definitions.html#groff">Groff terms</a>
1402 for an explanation.
1403 </p>
1404
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">
1408   <li>Fill modes
1409   <ul style="list-style-type: none; margin-left: -1em;">
1410     <li><a href="#justify">JUSTIFY</a> &ndash; set lines justified</li>
1411     <li><a href="#quad">QUAD</a> &ndash; set filled lines flush left, right or centred</li>
1412   </ul></li>
1413   <li>Nofill modes
1414   <ul style="list-style-type: none; margin-left: -1em;">
1415     <li><a href="#lrc">LEFT</a> &ndash; set non-filled lines flush left</li>
1416     <li><a href="#lrc">RIGHT</a> &ndash; set non-filled lines flush right</li>
1417     <li><a href="#lrc">CENTER</a> &ndash; set non-filled lines centred</li>
1418   </ul></li>
1419   <li>Breaking lines
1420   <ul style="list-style-type: none; margin-left: -1em;">
1421     <li><a href="#br">BR</a> &ndash; manually break an output line</li>
1422     <li><a href="#el">EL</a> &ndash; break a line without advancing to the next output line</li>
1423     <li><a href="#space">SPACE</a> &ndash; break a line and add space before the next output line</li>
1424     <li><a href="#spread">SPREAD</a> &ndash; break and force-justify an output line</li>
1425   </ul></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>
1429   </ul></li>
1430 </ul>
1431 </div>
1432
1433 <!-- -JUSTIFY- -->
1434
1435 <div class="macro-id-overline">
1436 <h3 id="justify" class="macro-id">Justify lines</h3>
1437 </div>
1438
1439 <div class="box-macro-args">
1440 Macro: <b>JUSTIFY</b>
1441 </div>
1442
1443 <p class="requires">
1444 (See
1445 <a href="definitions.html#filled">fill mode</a>
1446 for a definition of the difference between &#8220;fill&#8221; and
1447 &#8220;no-fill&#8221; modes.)
1448 </p>
1449
1450 <p>
1451 JUSTIFY doesn&#8217;t take an argument. 
1452 <a href="definitions.html#inputline">Input lines</a>
1453 after JUSTIFY are
1454 <a href="definitions.html#filled">filled</a>
1455 and
1456 <a href="definitions.html#just">justified</a>
1457 upon output.
1458 </p>
1459
1460 <p>
1461 To break lines and prevent them from being filled and justified, use
1462 the
1463 <a href="#br">BR</a>
1464 macro.
1465 </p>
1466
1467 <!-- -QUAD- -->
1468
1469 <div class="macro-id-overline">
1470 <h3 id="quad" class="macro-id">Quad lines left, right, or centre</h3>
1471 </div>
1472
1473 <div class="box-macro-args">
1474 Macro: <b>QUAD</b> <kbd class="macro-args">L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY</kbd>
1475 </div>
1476
1477 <p class="alias" style="margin-bottom: 0;">
1478 <i>Alias:</i> <b>FILL</b>
1479 </p>
1480
1481 <p class="requires">(See
1482 <a href="definitions.html#filled">fill mode</a>
1483 for a definition of the difference between &#8220;fill&#8221; and
1484 &#8220;no-fill&#8221; modes.)
1485 </p>
1486
1487 <p>
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>
1491 after QUAD are 
1492 <a href="definitions.html#filled">filled</a>
1493 upon output.
1494 </p>
1495
1496 <p>
1497 If <kbd>L</kbd> or <kbd>LEFT</kbd>, type is set flush along the left
1498 margin.
1499 </p>
1500
1501 <p>
1502 If <kbd>R</kbd> or <kbd>RIGHT</kbd>, type is set flush along the
1503 right margin.
1504 </p>
1505
1506 <p>
1507 If <kbd>C</kbd> or <kbd>CENTER</kbd> type is set centred on the
1508 current line length.
1509 </p>
1510
1511 <p>
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&#8217;t quadded. <kbd>.QUAD&nbsp;J</kbd> and
1515 <kbd>.QUAD&nbsp;JUSTIFY</kbd> have exactly the same effect as
1516 <a href="#justify">JUSTIFY</a>.
1517 </p>
1518
1519 <p>
1520 To break lines and prevent them from being filled, use the
1521 <a href="#br">BR</a>
1522 macro.
1523 </p>
1524
1525 <!-- -LEFT, RIGHT, CENTER- -->
1526
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>
1529 </div>
1530
1531 <div class="box-macro-args">
1532 Macro: <b>LEFT</b>
1533 <br/>
1534 Macro: <b>RIGHT</b>
1535 <br/>
1536 Macro: <b>CENTER</b> &nbsp;(alias CENTRE)
1537 </div>
1538
1539 <p class="requires">
1540 (See
1541 <a href="definitions.html#filled">no-fill mode</a>
1542 for a definition of the difference between &#8220;fill&#8221; and
1543 &#8220;no-fill&#8221; modes.)
1544 </p>
1545
1546 <p>
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:
1551 <br/>
1552 <span class="pre-in-pp">
1553   .QUAD LEFT
1554   So runs my dream, but what am I?
1555   .BR
1556   An infant crying in the night
1557   .BR
1558   An infant crying for the light
1559   .BR
1560   And with no language but a cry.
1561   .BR
1562 </span>
1563 Because text after <kbd>.QUAD LEFT</kbd> is
1564 <a href="definitions.html#filled">filled</a>,
1565 you have to use the
1566 <a href="#br">BR</a>
1567 macro to prevent the lines from running together.  Not only is this
1568 annoying to type, it&#8217;s awkward to read in a text editor.  Much
1569 better to do
1570 <br/>
1571 <span class="pre-in-pp">
1572   .LEFT
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.
1577 </span>
1578 </p>
1579
1580 <div class="box-important" style="margin-top: -.5em;">
1581 <p class="tip">
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.
1589 </p>
1590 </div>
1591
1592 <!-- -BR- -->
1593
1594 <div class="macro-id-overline">
1595 <h3 id="br" class="macro-id">Manually break lines</h3>
1596 </div>
1597
1598 <div class="box-macro-args">
1599 Macro: <b>BR</b>
1600 </div>
1601
1602 <p>
1603 When using
1604 <a href="#justify">JUSTIFY</a>
1605 or
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>).
1609 Any partial
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>.
1615 </p>
1616
1617 <p>
1618 Most of the time, you won&#8217;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&#8217;d
1621 expect a break, mom puts it in herself.  Equally, in macros where a
1622 break isn&#8217;t normally desirable, no break occurs.  This means
1623 text files don&#8217;t get cluttered with annoying BR&#8217;s.
1624 </p>
1625
1626 <div class="box-tip">
1627 <p class="tip-top">
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>.
1634 </p>
1635
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 &#8217;n&#8217; match with impunity.
1640 </p>
1641 </div>
1642
1643 <!-- -EL- -->
1644
1645 <div class="macro-id-overline">
1646 <h3 id="el" class="macro-id">Manually break a line without advancing on the page</h3>
1647 </div>
1648
1649 <div class="box-macro-args">
1650 Macro: <b>EL</b>
1651 </div>
1652
1653 <p class="requires">
1654 In nofill modes
1655 <span style="font-style: normal;">
1656 (<a href="#left">LEFT</a>,
1657 <a href="#right">RIGHT</a>,
1658 <a href="#center">CENTER</a>)
1659 </span>
1660 you must terminate the line input preceding
1661 <span style="font-style: normal;">EL</span>
1662 with the
1663 <span style="font-style: normal;">
1664 <kbd>\c</kbd> inline escape.
1665 </span>
1666 See
1667 <span style="font-style: normal;">
1668 <a href="#el-notes">NOTES</a>,
1669 </span>
1670 below.
1671 </p>
1672
1673 <p style="margin-top: -.5em">
1674 <i><b>Suggestion:</b> If you find remembering whether to put in the</i>
1675 <kbd>\c</kbd>
1676 <i>bothersome, you may prefer to use the</i>
1677 <a href="definitions.html#inlines">inline escape</a>
1678 <i>alternative to</i> EL,
1679 <a href="inlines.html#b"><kbd>\*[B]</kbd></a>,
1680 <i>which works consistently regardless of the fill mode.
1681 </i>EL <i>does not work after the</i>
1682 <a href="goodies.html#pad">PAD</a>
1683 <i>macro.  See</i>
1684 <a href="goodies.html#nobreak"><kbd>.PAD&nbsp;NOBREAK</kbd></a>
1685 <i>for the way around this.</i>
1686 </p>
1687
1688 <p id="el-example">
1689 EL ("<span style="text-decoration: underline;">E</span>nd <span style="text-decoration: underline;">L</span>ine")
1690 is conceptually equivalent to the notion of a carriage return with
1691 no linefeed.  Its function is simple: it breaks a line without
1692 advancing on the page.  As an example of where you might use it,
1693 imagine that you&#8217;re working from marked-up copy.  The markup
1694 indicates 24 points of space between two given lines, but the
1695 prevailing line spacing is 12.5 points.  You may find it more
1696 convenient to break the first line with EL and instruct mom to
1697 advance 24 points to the next line instead of calculating the lead
1698 that needs to be added to 12.5 to get 24.  To demonstrate:
1699 <br/>
1700 <span class="pre-in-pp">
1701   .LEFT
1702   .LS 12.5
1703   A line of text.\c
1704   .EL
1705   .ALD 24p
1706   The next line of text.
1707 </span>
1708 may be more intuitive than
1709 <br/>
1710 <span class="pre-in-pp">
1711   .LEFT
1712   .LS 12.5
1713   A line of text.
1714   .ALD 11.5p
1715   The next line of text.
1716 </span>
1717 The first example has the further advantage that should you wish to
1718 change the prevailing line space but keep the 24 points lead, you
1719 don&#8217;t have to recalculate the extra space.
1720 </p>
1721
1722 <p>
1723 ALD in the above examples stands for
1724 &#8220;<span style="text-decoration: underline;">A</span>dvance
1725 <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>&#8221;,
1726 which is covered in the section
1727 <a href="#aldrld-intro">Vertical movements</a>.
1728 </p>
1729
1730 <!-- -SP- -->
1731
1732 <div class="macro-id-overline">
1733 <h3 id="space" class="macro-id">Break lines and add space between</h3>
1734 </div>
1735
1736 <div class="box-macro-args">
1737 Macro: <b>SPACE</b> <kbd class="macro-args">&lt;space to add between lines&gt;</kbd>
1738 </div>
1739 <p class="alias">
1740 <i>Alias:</i> <b>SP</b>
1741 </p>
1742
1743 <p>
1744 SPACE breaks a line, just like
1745 <a href="#br">BR</a>,
1746 then adds space after the line.  With no argument, it adds an extra
1747 line space of a value equal to the current
1748 <a href="definitions.html#leading">leading</a>.
1749 If you pass it a numeric argument without supplying a
1750 <a href="definitions.html#unitofmeasure">unit of measure</a>,
1751 it advances that number of extra line spaces.  For example:
1752 <br/>
1753 <span class="pre-in-pp">
1754   .SPACE
1755 </span>
1756 breaks the line then adds an extra linespace, whereas
1757 <br/>
1758 <span class="pre-in-pp">
1759   .SPACE 2
1760 </span>
1761 breaks the line and adds two extra linespaces.
1762 </p>
1763
1764 <p>
1765 If you supply a unit of measure, SPACE breaks the line then advances
1766 one linespace (at the current
1767 <a href="definitions.html#leading">leading</a>)
1768 PLUS the specified amount of extra space given to SPACE, as in
1769 <br/>
1770 <span class="pre-in-pp">
1771   .SPACE 6p
1772 </span>
1773 which breaks the line and advances one full linespace plus six
1774 points.
1775 </p>
1776
1777 <div class="box-tip">
1778 <p class="tip-top">
1779 <span class="tip">Tip:</span> SPACE and
1780 <a href="#ald">ALD</a>
1781 can be used interchangeably (<kbd>.SPACE&nbsp;6p</kbd> and
1782 <kbd>.ALD&nbsp;6p</kbd> are equivalent).  However, ALD without an
1783 argument does nothing, whereas SPACE without an argument adds an
1784 extra line space.  I recommend using SPACE when you want an extra
1785 line space (or multiple thereof), and ALD whenever you want some
1786 other value of space after a line.
1787 </p>
1788
1789 <p class="tip-bottom">
1790 <span class="experts">Experts:</span> SPACE is an alias of
1791 <kbd>.sp</kbd>.  You can use either, or mix &#8217;n&#8217; match
1792 with impunity.
1793 </p>
1794 </div>
1795
1796 <!-- -SPREAD- -->
1797
1798 <div class="macro-id-overline">
1799 <h3 id="spread" class="macro-id">Break and force justify (spread) lines</h3>
1800 </div>
1801
1802 <div class="box-macro-args">
1803 Macro: <b>SPREAD</b>
1804 </div>
1805
1806 <p>
1807 Sometimes, you need to break a line of
1808 <a href="definitions.html#just">justified</a>
1809 text and have it come out fully justified, not
1810 <a href="definitions.html#quad">quadded</a>
1811 left the way it would be with the
1812 <a href="#br">BR</a>
1813 macro.  An example of where you&#8217;d do this would be when you
1814 want to prevent a word at the end of a line from being hyphenated
1815 (say, a proper name). SPREAD is the macro that lets you break the
1816 line and have it came out fully justified.
1817 </p>
1818
1819 <div class="box-tip">
1820 <p class="tip">
1821 <span class="experts">Experts:</span> SPREAD is an alias for
1822 <kbd>.brp</kbd> You can use either, or mix &#8217;n&#8217; match
1823 with impunity.
1824 </p>
1825 </div>
1826
1827 <!-- -JOIN- -->
1828
1829 <div class="macro-id-overline">
1830 <h3 id="join" class="macro-id">Join input lines</h3>
1831 </div>
1832
1833 <div class="box-macro-args">
1834 Inline: <kbd class="macro-args">\c</kbd>
1835 </div>
1836
1837 <p>
1838 Sometimes, especially when in one of the
1839 <a href="definitions.html#filled">nofill modes</a>,
1840 a macro will cause a break where you don&#8217;t want one.  In order
1841 to prevent this from happening (in other words, to join
1842 <a href="definitions.html#inputline">input lines</a>
1843 together, forming one
1844 <a href="definitions.html#outputline">output line</a>),
1845 use the groff
1846 <a href="definitions.html#inlines">inline escape</a>
1847 <kbd>\c</kbd> at the end of each input line to be
1848 joined to another, like this:
1849 <br/>
1850 <span class="pre-in-pp">
1851   .LEFT
1852   .FAMILY T
1853   .FT R
1854   Some lines of text to be \c
1855   .FAMILY H
1856   .FT B
1857   joined \c
1858   .FAMILY T
1859   .FT R
1860   together.
1861 </span>
1862 Upon output, the lines will be joined together to read
1863 <br/>
1864 <span class="pre-in-pp">
1865   Some lines of text to be joined together.
1866 </span>
1867 with the word &#8220;joined&#8221; in Helvetica bold.  Note the
1868 spaces before <kbd>\c</kbd>.  Without them, the last three words of
1869 the output line would read
1870 <br/>
1871 <span class="pre-in-pp">
1872   bejoinedtogether
1873 </span>
1874 Please also note that had the example been in one of the
1875 <a href="definitions.html#filled">fill modes</a>,
1876 there&#8217;d have been no need for the <kbd>\c</kbd>.  
1877 </p>
1878
1879 <div class="box-tip">
1880 <p class="tip">
1881 <b>Addendum:</b> The example, above, is designed to demonstrate the
1882 use of <kbd>\c</kbd>.  An easier and more intuitive way
1883 to accomplish the family/font change in the example would be with
1884 the groff
1885 <a href="definitions.html#inlines">inline escape</a>,
1886 <kbd><a href="inlines.html#inline-fonts-groff">\f</a></kbd>,
1887 like this:
1888 <br/>
1889 <span class="pre-in-pp" style="padding-bottom: 0px;">
1890   Some lines of text to be \f[HB]joined\*[PREV] together.
1891 </span>
1892 </p>
1893 </div>
1894
1895 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
1896
1897 <!-- ==================================================================== -->
1898
1899 <h2 id="refinements-intro" class="macro-group">Typographic refinements</h2>
1900
1901 <p>
1902 The macros in this section help you tweak groff&#8217;s behaviour,
1903 ensuring that your documents look typographically professional.
1904 </p>
1905
1906 <div id="index-refinements" class="macro-list-container">
1907 <h3 class="macro-list">Typographic refinements macros</h3>
1908
1909 <ul class="macro-list">
1910   <li>Word and sentence spacing
1911   <ul style="list-style-type: none; margin-left: -1em;">
1912     <li><a href="#ws">WS</a> &ndash; word spacing</li>
1913     <li><a href="#ss">SS</a> &ndash; sentence space</li>
1914   </ul></li>
1915   <li>Letter spacing (track kerning)
1916   <ul style="list-style-type: none; margin-left: -1em;">
1917     <li><a href="#rw">RW</a> &ndash; reduce whitespace</li>
1918     <li><a href="#ew">EW</a> &ndash; expand whitespace</li>
1919     <li><a href="#br-at-line-kern">BR_AT_LINE_KERN</a></li>
1920   </ul></li>
1921   <li>Hyphenation
1922   <ul style="list-style-type: none; margin-left: -1em;">
1923     <li><a href="#hy">HY</a> &ndash; turn auto hyphenation on/off, or set specific hyphenation parameters</li>
1924     <li><a href="#hy-set">HY_SET</a> &ndash; set all hyphenation parameters</li>
1925   </ul></li>
1926   <li>Automatic kerning and ligatures
1927   <ul style="list-style-type: none; margin-left: -1em;">
1928     <li><a href="#kern">KERN</a> &ndash; turn automatic pairwise kerning on or off</li>
1929     <li><a href="#ligatures">LIGATURES</a> &ndash; turn automatic generation of ligatures on or off</li>
1930   </ul></li>
1931 </ul>
1932 </div>
1933
1934 <!-- -WS- -->
1935
1936 <div class="macro-id-overline">
1937 <h3 id="ws" class="macro-id">Word spacing</h3>
1938 </div>
1939
1940 <div class="box-macro-args">
1941 Macro: <b>WS</b> <kbd class="macro-args">&lt;+|-wordspace&gt; | DEFAULT</kbd>
1942 </div>
1943
1944 <p>
1945 WS (Word Space) increases or decreases the amount of space between
1946 words.  In
1947 <a href="definitions.html#filled">nofill modes</a>,
1948 or if
1949 <a href="#quad">QUAD</a>
1950 is in effect, the space between words is fixed.  Therefore, if you
1951 change the word spacing with WS, the change applies uniformly to the
1952 space between every word on every line.  However, when text is
1953 <a href="definitions.html#just">justified</a>,
1954 the space between words varies from line to line (in order to
1955 justify the text).  Consequently, the change you make with WS
1956 represents the minimum (and ideal) space groff will try to put
1957 between words before deciding whether to hyphenate a final word or
1958 to stretch the word spacing.
1959 </p>
1960
1961 <p>
1962 Word space is relative to point size.  Generally, in/decreasing the
1963 word space by a value of 1 or 2 produces a difference that in many
1964 cases is scarcely visible; in/decreasing by a value between 3 and 5
1965 produces a subtle but noticeable difference; and in/decreasing by a
1966 value greater than 6 is almost always apparent.  You should preview
1967 your work to assess the effect of WS.
1968 </p>
1969
1970 <p id="ws-usage">
1971 WS takes as its argument a whole number preceded by a plus or minus
1972 sign.  Therefore, to decrease the word space slightly, you might
1973 enter
1974 <br/>
1975 <span class="pre-in-pp">
1976   .WS -2
1977 </span>
1978 To increase it by a noticeable amount, you might enter
1979 <br/>
1980 <span class="pre-in-pp">
1981   .WS +6
1982 </span>
1983 You can reset the word spacing to its previous value by switching
1984 the plus or minus sign, like this:
1985 <br/>
1986 <span class="pre-in-pp">
1987   .WS +2
1988   A line of text
1989   .WS -2
1990 </span>
1991 The <kbd>.WS&nbsp;-2</kbd> undoes the effect of
1992 <kbd>.WS&nbsp;+2</kbd>.  You can also reset WS to its groff default
1993 by entering
1994 <br/>
1995 <span class="pre-in-pp">
1996   .WS DEFAULT
1997 </span>
1998 This can be particularly useful if you&#8217;ve been playing around
1999 with plus and minus values, and can&#8217;t remember by how much to
2000 in/decrease the word space to get it back to normal.
2001 </p>
2002
2003 <!-- -SS- -->
2004
2005 <div class="macro-id-overline">
2006 <h3 id="ss" class="macro-id">Sentence space</h3>
2007 </div>
2008
2009 <div class="box-macro-args">
2010 Macro: <b>SS</b> <kbd class="macro-args">&lt;+sentence space&gt; | 0 | DEFAULT</kbd>
2011 </div>
2012
2013 <p>
2014 SS (Sentence Space) tells groff how to treat double spaces it
2015 encounters between sentences in
2016 <a href="definitions.html#inputline">input lines</a>.
2017 If you use SS, input sentences with two spaces after them <i>and</i>
2018 input sentences that fall at the end of input lines all receive a
2019 normal word space plus an additional amount of space whose size is
2020 determined by the + value passed as an argument to SS.  Thus,
2021 <br/>
2022 <span class="pre-in-pp">
2023   .SS +2
2024 </span>
2025 means that input sentences with two spaces after them receive a
2026 normal word space PLUS the +2 value passed to SS.
2027 </p>
2028
2029 <p>
2030 Like
2031 <a href="#ws">WS</a>,
2032 increasing the sentence space by a value of 1 or 2 produces a
2033 difference that in many cases is scarcely visible; increasing by a
2034 value of 5 or so produces a subtle but noticeable difference (ie
2035 the space between double-spaced input sentences will be slightly but
2036 visibly greater than the space between words); and increasing by a
2037 value greater than 10 is always apparent.  You should preview your
2038 work to assess the effect of SS.
2039 </p>
2040
2041 <p>
2042 There&#8217;s an additional argument you can pass SS: the number
2043 zero (without the + sign).  It&#8217;s the argument you&#8217;ll
2044 use most often.  Typeset copy should never have two spaces between
2045 sentences, and the "zero" argument tells groff to give the extra
2046 spaces no space at all (effectively removing them).  Therefore, if
2047 you double-space your sentences (as you should when writing in a
2048 text editor), get in the habit of putting
2049 <br/>
2050 <span class="pre-in-pp">
2051   .SS 0
2052 </span>
2053 at the top of your files.
2054 </p>
2055
2056 <p>
2057 If you do use SS for something other than ensuring that you
2058 don&#8217;t get unwanted sentence spaces in output copy, you can set
2059 or reset the sentence space to the groff default (the same width
2060 as a word space, ie double-spaced input sentences will appear
2061 double-spaced on output as well) with
2062 <br/>
2063 <span class="pre-in-pp">
2064   .SS DEFAULT
2065 </span>
2066 If you&#8217;re using the
2067 <a href="docprocessing.html">document processing macros</a>
2068 and your
2069 <a href="docprocessing.html#printstyle">PRINTSTYLE</a>
2070 is <kbd>TYPEWRITE</kbd>, <kbd>.SS&nbsp;DEFAULT</kbd> is the
2071 default, because you do want double spaces between sentences in copy
2072 that imitates the look of a typewritten document.
2073 </p>
2074
2075 <div class="box-important">
2076 <p class="tip">
2077 <span class="important">IMPORTANT:</span> SS with an argument other
2078 than <kbd>0</kbd> (zero) should only be used if you&#8217;re of
2079 the old (and wise) school of typists that puts two spaces between
2080 sentences.  If you ignore this advice and use SS when you habitually
2081 put only one space between sentences, you risk producing output
2082 where the space between sentences is not equal.
2083 </p>
2084 </div>
2085
2086 <!-- -HY- -->
2087
2088 <div class="macro-id-overline">
2089 <h3 id="hy" class="macro-id">Automatic hyphenation control</h3>
2090 </div>
2091
2092 <div class="box-macro-args">
2093 Macro: <b>HY</b> <kbd class="macro-args">LINES &lt;max. number of consecutive hyphenated lines&gt;</kbd>
2094   <br/>
2095 Macro: <b>HY</b> <kbd class="macro-args">MARGIN &lt;size of hyphenation margin&gt;</kbd>
2096   <br/>
2097 Macro: <b>HY</b> <kbd class="macro-args">SPACE &lt;extra interword spacing to prevent hyphenation&gt;</kbd>
2098   <br/>
2099 Macro: <b>HY</b> <kbd class="macro-args">DEFAULT</kbd>
2100   <br/>
2101 Macro: <b>HY</b> <kbd class="macro-args">toggle</kbd>
2102 </div>
2103 <p class="alias">
2104 <i>Aliases:</i> <b>HYPHENATE, HYPHENATION</b>
2105 </p>
2106
2107 <p>
2108 HY, as you can see, can be invoked with a number of arguments.  In
2109 all cases, the aliases HYPHENATE or HYPHENATION can be used in place
2110 of HY.  To aid in understanding the various arguments you can pass
2111 to HY, I&#8217;ve broken them down into separate sections.
2112 </p>
2113
2114 <h3 class="docs">1.&nbsp;&nbsp;HY</h3>
2115
2116 <p>
2117 HY by itself (ie with no argument) simply turns automatic
2118 hyphenation on.  Any argument other than LINES, MARGIN, SPACE or
2119 DEFAULT, turns automatic hyphenation off.  For example, as explained
2120 in
2121 <a href="intro.html#macro-args">How to read macro arguments</a>,
2122 you could turn HY off by entering
2123 <br/>
2124 <span class="pre-in-pp">
2125   .HY OFF
2126 </span>
2127 or
2128 <span class="pre-in-pp">
2129   .HY X
2130 </span>
2131 or
2132 <span class="pre-in-pp">
2133   .HY END
2134 </span>
2135 A subsequent call to HY restores hyphenation with the parameters for
2136 LINES, MARGIN, or SPACE that were formerly in effect (see below).
2137 </p>
2138
2139 <p>
2140 HY observes the following default hyphenation rules:
2141 </p>
2142 <ul style="margin-top: -.5em; margin-left: 18px;">
2143   <li>Last lines (ie ones that will spring a trap&mdash;typically
2144       the last line on a page) will not be hyphenated.
2145   </li>
2146   <li>The first and last two characters of a word are never
2147       split off.
2148   </li>
2149 </ul>
2150
2151 <h3 class="docs numbered">2.&nbsp;&nbsp;HY LINES</h3>
2152
2153 <p>
2154 HY LINES sets the maximum number of consecutive hyphenated lines
2155 that will appear in output copy.  2 is a very good choice, and
2156 you&#8217;d set it with
2157 <br/>
2158 <span class="pre-in-pp">
2159   .HY LINES 2
2160 </span>
2161 By default, when you turn automatic hyphenation on, there is no
2162 limit to the number of consecutive hyphenated lines.
2163 </p>
2164
2165 <div class="box-tip">
2166 <p class="tip">
2167 <span class="note">Note:</span>
2168 <a href="definitions.html#discretionaryhyphen">Discretionary hyphens</a>
2169 count when groff is figuring out how many lines to hyphenate;
2170 explicit hyphens (ie the actual hyphen character) do not.
2171 </p>
2172 </div>
2173
2174 <h3 class="docs numbered">3.&nbsp;&nbsp;HY MARGIN</h3>
2175
2176 <p>
2177 HY MARGIN sets the amount of room allowed at the end of a line
2178 before hyphenation is tripped (eg if there&#8217;s only 6 points
2179 left at the end of a line, groff won&#8217;t try to hyphenate the
2180 next word).  HY MARGIN only applies if you&#8217;re using
2181 <a href="#quad">QUAD</a>,
2182 and is really only useful if you&#8217;re using QUAD LEFT.
2183 </p>
2184
2185 <p>
2186 As an example, if you don&#8217;t want groff to hyphenate words
2187 when there&#8217;s only 18 points of space left at the end of a
2188 left-quadded line, you&#8217;d enter
2189 <br/>
2190 <span class="pre-in-pp" style="margin-bottom: -1em">
2191   .HY MARGIN 18p
2192 </span>
2193 </p>
2194
2195 <div class="box-tip">
2196 <p class="tip">
2197 <span class="note">Note:</span> The numeric argument after HY
2198 MARGIN requires a
2199 <a href="definitions.html#unitofmeasure">unit of measure</a>.
2200 </p>
2201 </div>
2202
2203 <h3 class="docs numbered">4.&nbsp;&nbsp;HY SPACE</h3>
2204
2205 <p>
2206 HY SPACE sets an amount of extra interword space that groff will try
2207 to put between words on a line in order to PREVENT hyphenation.  HY
2208 SPACE applies only to
2209 <a href="definitions.html#just">justified lines</a>.
2210 Generally speaking, you&#8217;ll want this value to be quite small,
2211 since too big a value will result in lines with gaping holes between
2212 the words.  A reasonable value might be half a point, or one point,
2213 which you&#8217;d set with
2214 <br/>
2215 <span class="pre-in-pp">
2216   .HY SPACE .5p
2217 </span>
2218 or
2219 <span class="pre-in-pp" style="margin-bottom: -1em">
2220   .HY SPACE 1p
2221 </span>
2222 </p>
2223
2224 <div class="box-tip">
2225 <p class="tip">
2226 <span class="note">Note:</span> The numeric argument after HY SPACE
2227 requires a
2228 <a href="definitions.html#unitofmeasure">unit of measure</a>.
2229 </p>
2230 </div>
2231
2232 <h3 class="docs numbered">5.&nbsp;&nbsp;HY DEFAULT</h3>
2233
2234 <p>
2235 HY DEFAULT resets automatic hyphenation to its default behaviour,
2236 cancelling any changes made with HY <kbd>LINES</kbd>, HY
2237 <kbd>MARGIN</kbd>, and/or HY <kbd>SPACE</kbd>.
2238 </p>
2239
2240 <div class="box-notes">
2241 <h3 id="hyphenation-thoughts" class="docs notes">Thoughts on hyphenation in general</h3>
2242
2243 <p style="margin-top: .5em">
2244 Hyphenation is a necessary evil.  If it can be avoided, it
2245 should be.  If it can&#8217;t be, it should occur infrequently.
2246 That&#8217;s the reason for the number of parameters you can set
2247 with HY.
2248 </p>
2249
2250 <p class="tip-bottom">
2251 Furthermore, hyphenation in
2252 <a href="definitions.html#rag">rag</a>
2253 copy requires a great deal of attention.  At best, it should be
2254 avoided completely by individually adjusting the number of words
2255 on consecutive lines to achieve a pleasing, natural-looking rag.
2256 Since such adjustments are often too fussy for document processing,
2257 I recommend playing around with HY MARGIN a bit if your copy looks
2258 hyphen-heavy.
2259 </p>
2260 </div>
2261
2262 <!-- -HY_SET- -->
2263
2264 <div class="macro-id-overline">
2265 <h3 id="hy-set" class="macro-id">Set hyphenation parameters all at once</h3>
2266 </div>
2267
2268 <div class="box-macro-args">
2269 Macro: <b>HY_SET</b> <kbd class="macro-args">&lt;lines&gt; [ &lt;margin&gt; [ &lt;space&gt; ] ]</kbd>
2270 </div>
2271
2272 <p class="alias">
2273 <i>Alias:</i> <b>HYSET</b>
2274 </p>
2275
2276 <p>
2277 HY_SET lets you set the parameters for hyphenation
2278 with a single macro. <kbd>&lt;lines&gt;,</kbd>
2279 <kbd>&lt;margin&gt;</kbd> and
2280 <kbd>&lt;space&gt;</kbd> correspond to the numeric
2281 values required by <kbd>LINES</kbd>,
2282 <kbd>MARGIN</kbd> and <kbd>SPACE</kbd> as described
2283 <a href="#hy">above</a>.
2284 </p>
2285
2286 <p>
2287 To set just the maximum number of consecutive hyphenated lines,
2288 you&#8217;d enter
2289 <br/>
2290 <span class="pre-in-pp">
2291   .HY_SET 2
2292 </span>
2293 If you wanted the same number of maximum consecutive hyphenated
2294 lines and a hyphenation margin for use with
2295 <a href="definitions.html#rag">rag</a>
2296 copy,
2297 <br/>
2298 <span class="pre-in-pp">
2299   .HY_SET 2 36p
2300 </span>
2301 would set the hyphenation margin to 36 points.
2302 </p>
2303
2304 <p>
2305 If you wanted the same number of maximum consecutive hyphenated
2306 lines and a hyphenation space of 2 points for use with
2307 <a href="definitions.html#just">justified</a>
2308 copy, 
2309 <br/>
2310 <span class="pre-in-pp">
2311   .HYSET 2 0 2p
2312 </span>
2313 is how you&#8217;d do it.
2314 </p>
2315
2316 <!-- -RW- -->
2317
2318 <div class="macro-id-overline">
2319 <h3 id="rw" class="macro-id">Reduce whitespace</h3>
2320 </div>
2321
2322 <div class="box-macro-args">
2323 Macro: <b>RW</b> <kbd class="macro-args">&lt;amount of whitespace reduction between letters&gt;</kbd>
2324 </div>
2325
2326 <p>
2327 RW (<span style="text-decoration: underline;">R</span>educe <span style="text-decoration: underline;">W</span>hitespace)
2328 and its corresponding macro,
2329 EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace),
2330 allow you to tighten (or loosen)
2331 <a href="definitions.html#outputline">output lines</a>
2332 by uniformly reducing or expanding the space between characters.
2333 This is particularly useful when you want to squeeze or stretch
2334 lines on a narrow measure.
2335 </p>
2336
2337 <p>
2338 The value passed to RW may be a whole number or a decimal fraction.
2339 Since a value of 1 produces a noticeable reduction in the space
2340 between letters at text sizes, you&#8217;ll most likely use small
2341 decimal values when tightening lines.  For example,
2342 <br/>
2343 <span class="pre-in-pp">
2344   .RW .1
2345 </span>
2346 or
2347 <span class="pre-in-pp">
2348   .RW .2
2349 </span>
2350 may be just enough to squeeze an extra character or two on a line
2351 without the change in letter spacing being obvious.  I highly
2352 recommend previewing your work to assess the effect of RW.
2353 </p>
2354
2355 <div class="box-tip">
2356 <p class="tip">
2357 <span class="note">Note:</span> By default, RW does not deposit a 
2358 <a href="#br">break</a>
2359 when it&#8217;s invoked if you&#8217;re in one of the
2360 <a href="definitions.html#fill">fill</a>
2361 modes (ie
2362 <a href="#quad">QUAD</a>
2363 L, R, C, J or
2364 <a href="#justify">JUSTIFY</a>).
2365 If you want
2366 RW to break at the ends of the previous
2367 <a href="definitions.html#inputline">input lines</a>
2368 while you&#8217;re in a fill mode, tell mom
2369 that&#8217;s what you want by invoking
2370 <kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>.
2371 </p>
2372 </div>
2373
2374 <div class="box-important">
2375 <p class="tip">
2376 <span class="important">IMPORTANT:</span>
2377 RW (and its complement, EW; see below) only affects the current
2378 font, and remains in effect for that font every time it&#8217;s
2379 called, hence it must be reset to zero to cancel its effect
2380 (<kbd>.RW&nbsp;0</kbd>).
2381 </p>
2382 </div>
2383
2384 <!-- -EW- -->
2385
2386 <div class="macro-id-overline">
2387 <h3 id="ew" class="macro-id">Expand whitespace</h3>
2388 </div>
2389
2390 <div class="box-macro-args">
2391 Macro: <b>EW</b> <kbd class="macro-args">&lt;amount of whitespace expansion between letters&gt;</kbd>
2392 </div>
2393
2394 <p>
2395 EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace)
2396 expands the amount of whitespace between letters, effectively
2397 &#8220;loosening&#8221; lines of type.
2398 </p>
2399
2400 <p>
2401 The value passed to EW may be a whole number or a decimal fraction.
2402 Since a value of 1 produces a noticeable expansion in the space
2403 between letters at text sizes, you&#8217;ll most likely use small
2404 decimal values when loosening lines.  For example,
2405 <br/>
2406 <span class="pre-in-pp">
2407   .EW .1
2408 </span>
2409 or
2410 <span class="pre-in-pp">
2411   .EW .2
2412 </span>
2413 may be just enough to open up a line without the change in letter
2414 spacing being obvious.  I highly recommend previewing your work to
2415 assess the effect of EW.
2416 </p>
2417
2418 <div class="box-tip">
2419 <p class="tip">
2420 <span class="note">Note:</span> By default, EW does not deposit a 
2421 <a href="#br">break</a>
2422 when it&#8217;s invoked if you&#8217;re in one of the
2423 <a href="definitions.html#fill">fill</a>
2424 modes (ie
2425 <a href="#quad">QUAD</a>
2426 L, R, C, J or
2427 <a href="#justify">JUSTIFY</a>).
2428 If you want
2429 EW to break at the ends of the previous
2430 <a href="definitions.html#inputline">input lines</a>
2431 while you&#8217;re in a fill mode, tell mom that&#8217;s what you
2432 want by invoking the
2433 <kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>
2434 toggle macro.
2435 </p>
2436 </div>
2437
2438 <div class="box-important">
2439 <p class="tip">
2440 <span class="important">IMPORTANT:</span>
2441 EW (and its complement, RW; see above) only affects the current
2442 font, and remains in effect for that font every time it&#8217;s
2443 called, hence it must be reset to zero to cancel its effect
2444 (<kbd>.RW&nbsp;0</kbd>).
2445 </p>
2446 </div>
2447
2448 <!-- -BR_AT_LINE_KERN- -->
2449
2450 <div class="macro-id-overline">
2451 <h3 id="br-at-line-kern" class="macro-id">Break before line kerning</h3>
2452 </div>
2453
2454 <div class="box-macro-args">
2455 Macro: <b>BR_AT_LINE_KERN</b> <kbd class="macro-args">toggle</kbd>
2456 </div>
2457
2458 <p>
2459 By default, in
2460 <a href="definitions.html#filled">fill</a>
2461 modes (ie
2462 <a href="#quad">QUAD</a>
2463 L, R, C, J or
2464 <a href="#justify">JUSTIFY</a>)
2465 mom does not break
2466 <a href="definitions.html#inputline">input lines</a>
2467 when you invoke
2468 <a href="#rw">RW</a>
2469 or
2470 <a href="#ew">EW</a>.
2471 If you&#8217;d like her to break input lines prior to RW or EW,
2472 invoke <kbd>.BR_AT_INPUT_LINE</kbd> without any argument.  To
2473 disable the breaks, invoke <kbd>.BR_AT_INPUT_LINE</kbd> with any
2474 argument (OFF, QUIT, Q, X...), like this
2475 <br/>
2476 <span class="pre-in-pp">
2477   .BR_AT_LINE_KERN OFF
2478 </span>
2479 or
2480 <span class="pre-in-pp">
2481   .BR_AT_LINE_KERN X
2482 </span>
2483 With QUAD L, R or C, mom simply breaks the line.  With QUAD J (or
2484 just JUSTIFY, which is the same thing), she breaks and
2485 <a href="definitions.html#force">force justifies</a>
2486 the line prior to <kbd>.EW</kbd> or <kbd>.RW</kbd>.
2487 </p>
2488
2489 <!-- -KERN- -->
2490
2491 <div class="macro-id-overline">
2492 <h3 id="kern" class="macro-id">Automatic kerning</h3>
2493 </div>
2494
2495 <div class="box-macro-args">
2496 Macro: <b>KERN</b> <kbd class="macro-args">toggle</kbd>
2497 </div>
2498
2499 <p>
2500 By itself (ie with no argument), KERN turns automatic pairwise
2501 <a href="definitions.html#kern">kerning</a>
2502 on.  With any argument (eg OFF, Q, X), pairwise kerning is turned
2503 off.
2504 </p>
2505
2506 <p>
2507 Kerning of individual character pairs can be controlled with the
2508 <a href="definitions.html#inlines">inline escapes</a>
2509 <kbd>\*[BU &lt;n&gt;]</kbd> and
2510 <kbd>\*[FU &lt;n&gt;]</kbd>.  See
2511 <a href="inlines.html#inline-kerning-mom">Inline Escapes, kerning</a>.
2512 </p>
2513
2514 <!-- -LIGATURES- -->
2515
2516 <div class="macro-id-overline">
2517 <h3 id="ligatures" class="macro-id">Automatic ligature generation</h3>
2518 </div>
2519
2520 <div class="box-macro-args">
2521 Macro: <b>LIGATURES</b> <kbd class="macro-args">toggle</kbd>
2522 </div>
2523 <p class="alias">
2524 <i>Alias:</i> <b>LIG</b>
2525 </p>
2526
2527 <p>
2528 Provided your current font has
2529 <a href="definitions.html#ligatures">ligatures</a>,
2530 LIGATURES, by itself, turns on automatic generation of ligatures.
2531 When automatic ligature generation is on, simply typing the letters
2532 of a ligature combination will produce the correct ligature upon
2533 output.  For example, if you type the word &#8220;finally&#8221;,
2534 the fi combination will be output as an fi ligature.  Generally
2535 speaking, ligatures are A Good Thing, hence mom has them on by
2536 default.
2537 </p>
2538
2539 <p>
2540 LIGATURES with any argument turns automatic ligature generation off.
2541 </p>
2542
2543 <div class="box-tip">
2544 <p class="tip">
2545 <span class="note">Note:</span> Not all fonts support ligatures.
2546 </p>
2547 </div>
2548
2549 <div class="rule-short"><hr/></div>
2550
2551 <!-- ==================================================================== -->
2552
2553 <h2 id="modifications-intro" class="macro-group">Type modifications (pseudo font styles)</h2>
2554
2555 <p>
2556 It sometimes happens that a
2557 <a href="definitions.html#family">family</a>
2558 doesn&#8217;t contain all the fonts you need.  You might, for
2559 example, be missing an italic font, or a bold font.  Or you might
2560 not be able to get your hands on the condensed version.  That&#8217;s
2561 where these macros and inline escapes come in.  With them, you
2562 can fake the fonts you&#8217;re missing.  A word of caution,
2563 though: &#8220;faked&#8221; fonts are just that&mdash;faked.  You
2564 should only use them as a last resort, and then only sparingly.  A
2565 word or two or a line or two in a faked font will pass unnoticed;
2566 large patches of type in a faked font look typographically cheap.
2567 </p>
2568
2569 <div id="index-modifications" class="macro-list-container">
2570 <h3 class="macro-list">Type modifications macros</h3>
2571
2572 <ul class="macro-list">
2573   <li>Pseudo italic
2574   <ul style="list-style: none; margin-left: -1em;">
2575     <li><a href="#setslant">SETSLANT</a> &ndash; degree of pseudo-italicizing</li>
2576     <li><a href="#slant-inline">\*[SLANT]</a> &ndash; inline escape for pseudo-italicizing type</li>
2577   </ul></li>
2578   <li>Pseudo bold
2579   <ul style="list-style: none; margin-left: -1em;">
2580     <li><a href="#setbolder">SETBOLDER</a> &ndash; amount of emboldening</li>
2581     <li><a href="#bolder-inline">\*[BOLDER]</a> &ndash; inline escape for emboldening type</li>
2582   </ul></li>
2583   <li>Pseudo condensed
2584   <ul style="list-style: none; margin-left: -1em;">
2585     <li><a href="#condense">CONDENSE</a> &ndash; percentage for pseudo-condensed type</li>
2586     <li><a href="#cond-inline">\*[COND]</a> &ndash; inline escape for pseudo-condensed type</li>
2587   </ul></li>
2588   <li>Pseudo extended
2589   <ul style="list-style: none; margin-left: -1em;">
2590     <li><a href="#extend">EXTEND</a> &ndash; percentage for pseudo-extended type</li>
2591     <li><a href="#ext-inline">\*[EXT]</a> &ndash; inline escape for pseudo-extending</li>
2592   </ul></li>
2593 </ul>
2594 </div>
2595
2596 <!-- -SETSLANT- -->
2597
2598 <div class="macro-id-overline">
2599 <h3 id="setslant" class="macro-id">Set degree of slant for pseudo-italicizing</h3>
2600 </div>
2601
2602 <div class="box-macro-args">
2603 Macro: <b>SETSLANT</b> <kbd class="macro-args">&lt;degrees to slant type&gt; | RESET</kbd>
2604 </div>
2605
2606 <p>
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&#8217;s default is 15, which produces an
2610 acceptable approximation of an italic font.  If you want another
2611 value&mdash;say, 13 degrees&mdash;you&#8217;d set it by entering
2612 <br/>
2613 <span class="pre-in-pp">
2614   .SETSLANT 13
2615 </span>
2616 If you change the degree of slant and later want to set it back to
2617 the mom default, do
2618 <br/>
2619 <span class="pre-in-pp">
2620   .SETSLANT RESET
2621 </span>
2622 </p>
2623
2624 <div class="box-tip">
2625 <p class="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>.
2631 </p>
2632 </div>
2633
2634 <!-- -\*[SLANT]- -->
2635
2636 <div class="macro-id-overline">
2637 <h3 id="slant-inline" class="macro-id">Pseudo italic on/off</h3>
2638 </div>
2639
2640 <div class="box-macro-args">
2641 Inline: <kbd class="macro-args">\*[SLANT]</kbd>
2642 <br/>
2643 Inline: <kbd class="macro-args">\*[SLANTX</kbd>]
2644 </div>
2645
2646 <p>
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:
2652 <br/>
2653 <span class="pre-in-pp">
2654   Not \*[SLANT]everything\*[SLANTX] is as it seems.
2655 </span>
2656 Alternatively, if you wanted the whole line pseudo-italicized,
2657 you&#8217;d do
2658 <br/>
2659 <span class="pre-in-pp">
2660   \*[SLANT]Not everything is as it seems.\*[SLANTX]
2661 </span>
2662 Once <kbd>\*[SLANT]</kbd> is invoked, it remains in effect until
2663 turned off.
2664 </p>
2665
2666 <div class="box-tip" style="margin-top: .5em;">
2667 <p class="tip">
2668 <span class="note">Note:</span> If you&#8217;re using the
2669 <a href="docprocessing.html#docprocessing">document processing macros</a>
2670 with
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>.
2675 </p>
2676 </div>
2677
2678 <!-- -SETBOLDER- -->
2679
2680 <div class="macro-id-overline">
2681 <h3 id="setbolder" class="macro-id">Set amount of emboldening</h3>
2682 </div>
2683
2684 <div class="box-macro-args">
2685 Macro: <b>SETBOLDER</b> <kbd class="macro-args">&lt;amount of emboldening, in machine units&gt; | RESET</kbd>
2686 </div>
2687
2688 <p>
2689 Emboldening of type is accomplished by printing characters twice;
2690 the second printing is slightly offset from the first, effectively
2691 &#8220;thickening&#8221; the character.  SETBOLDER lets you set the
2692 number of
2693 <a href="definitions.html#units">machine units</a>
2694 for the offset.  Mom&#8217;s default is 700 units, which produces an
2695 acceptable approximation of a bold font.  If you want another
2696 value&mdash;say, 500 units&mdash;you&#8217;d set it by entering
2697 <br/>
2698 <span class="pre-in-pp">
2699   .SETBOLDER 500
2700 </span>
2701 If you change the emboldening offset and later want to set it back
2702 to the mom default, do
2703 <br/>
2704 <span class="pre-in-pp">
2705   .SETBOLDER RESET
2706 </span>
2707 </p>
2708
2709 <div class="box-tip">
2710 <p class="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>.
2716 </p>
2717 </div>
2718
2719 <!-- -\*[BOLDER]- -->
2720
2721 <div class="macro-id-overline">
2722 <h3 id="bolder-inline" class="macro-id">Emboldening on/off</h3>
2723 </div>
2724
2725 <div class="box-macro-args">
2726 Inline: <kbd class="macro-args">\*[BOLDER]</kbd>
2727 <br/>
2728 Inline: <kbd class="macro-args">\*[BOLDERX]</kbd>
2729 </div>
2730
2731 <p>
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:
2737 <br/>
2738 <span class="pre-in-pp">
2739   Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
2740 </span>
2741 Alternatively, if you wanted the whole line emboldened,
2742 you&#8217;d do
2743 <br/>
2744 <span class="pre-in-pp">
2745   \*[BOLDER]Not everything is as it seems.\*[BOLDERX]
2746 </span>
2747 Once <kbd>\*[BOLDER]</kbd> is invoked, it remains in effect
2748 until turned off.
2749 </p>
2750
2751 <div class="box-tip">
2752 <p class="tip">
2753 <span class="note">Note:</span> If you&#8217;re using the
2754 <a href="docprocessing.html#docprocessing">document processing macros</a>
2755 with
2756 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2757 mom ignores <kbd>\*[BOLDER]</kbd> requests.
2758 </p>
2759 </div>
2760
2761 <!-- -CONDENSE- -->
2762
2763 <div class="macro-id-overline">
2764 <h3 id="condense" class="macro-id">Set percentage for pseudo-condensed type</h3>
2765 </div>
2766
2767 <div class="box-macro-args">
2768 Macro: <b>CONDENSE</b> <kbd class="macro-args">&lt;pseudo-condense percentage&gt;</kbd>
2769 </div>
2770
2771 <p>
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.
2777 </p>
2778
2779 <p>
2780 Mom has no default value for CONDENSE, therefore you must set it
2781 before using the
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&#8217;d set it like this:
2786 <br/>
2787 <span class="pre-in-pp">
2788   .CONDENSE 80
2789 </span>
2790 </p>
2791
2792 <div class="box-tip">
2793 <p class="tip-top">
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>.
2800 </p>
2801
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
2807 with CONDENSE.
2808 </p>
2809 </div>
2810
2811 <!-- -\*[COND]- -->
2812
2813 <div class="macro-id-overline">
2814 <h3 id="cond-inline" class="macro-id">Pseudo-condensing on/off</h3>
2815 </div>
2816
2817 <div class="box-macro-args">
2818 Inline: <kbd class="macro-args">\*[COND]</kbd>
2819 <br/>
2820 Inline: <kbd class="macro-args">\*[CONDX]</kbd>
2821 </div>
2822
2823 <p>
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:
2829 <br/>
2830 <span class="pre-in-pp">
2831   \*[COND]Not everything is as it seems.\*[CONDX]
2832 </span>
2833 <kbd>\*[COND]</kbd> remains in effect until you turn it
2834 off with <kbd>\*[CONDX]</kbd>.
2835 </p>
2836
2837 <div class="box-important">
2838 <p class="tip">
2839 <span class="important">IMPORTANT:</span> You must turn
2840 <kbd>\*[COND]</kbd>
2841 off before making any changes to the point size of your type, either
2842 via the
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>.
2849 </p>
2850 </div>
2851
2852 <div class="box-tip">
2853 <p class="tip">
2854 <span class="note">Note:</span> If you&#8217;re using the
2855 <a href="docprocessing.html#docprocessing">document processing macros</a>
2856 with
2857 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2858 mom ignores <kbd>\*[COND]</kbd> requests.
2859 </p>
2860 </div>
2861
2862 <!-- -EXTEND- -->
2863
2864 <div class="macro-id-overline">
2865 <h3 id="extend" class="macro-id">Set percentage for pseudo-extended type</h3>
2866 </div>
2867
2868 <div class="box-macro-args">
2869 Macro: <b>EXTEND</b> <kbd class="macro-args">&lt;pseudo-extend percentage&gt;</kbd>
2870 </div>
2871
2872 <p>
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.
2878 </p>
2879
2880 <p>
2881 Mom has no default value for EXTEND, therefore you must set it
2882 before using the
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&#8217;d
2886 set it like this:
2887 <br/>
2888 <span class="pre-in-pp">
2889   .EXTEND 120
2890 </span>
2891 </p>
2892
2893 <div class="box-tip">
2894 <p class="tip-top">
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>
2900 <kbd>\*[EXT]</kbd>.
2901 </p>
2902
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
2908 with EXTEND.
2909 </p>
2910 </div>
2911
2912 <!-- -\*[EXT]- -->
2913
2914 <div class="macro-id-overline">
2915 <h3 id="ext-inline" class="macro-id">Pseudo-extending on/off</h3>
2916 </div>
2917
2918 <div class="box-macro-args">
2919 Inline: <kbd class="macro-args">\*[EXT]</kbd>
2920 <br/>
2921 Inline: <kbd class="macro-args">\*[EXTX]</kbd>
2922 </div>
2923
2924 <p>
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:
2930 <br/>
2931 <span class="pre-in-pp">
2932   \*[EXT]Not everything is as it seems.\*[EXTX]
2933 </span>
2934 <kbd>\*[EXT]</kbd> remains in effect until you turn it off with
2935 <kbd>\*[EXTX]</kbd>.
2936 </p>
2937
2938 <div class="box-important">
2939 <p class="tip">
2940 <span class="important">IMPORTANT:</span> You must turn
2941 <kbd>\*[EXT]</kbd> off before making any changes to the point size
2942 of your type, either via the
2943 <a href="#ps">PT_SIZE</a>
2944 macro or with the <kbd>\s</kbd> inline escape.  If you wish the new
2945 point size to be pseudo-extended, simply reinvoke <kbd>\*[EXT]</kbd>
2946 afterwards.  Equally, <kbd>\*[EXT]</kbd> must be turned off before
2947 changing the extend percentage with
2948 <a href="#extend">EXTEND</a>.
2949 </p>
2950 </div>
2951 <div class="box-tip">
2952 <p class="tip">
2953 <span class="note">Note:</span> If you&#8217;re using the
2954 <a href="docprocessing.html#docprocessing">document processing macros</a>
2955 with
2956 <a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
2957 mom ignores <kbd>\*[EXT]</kbd> requests.
2958 </p>
2959 </div>
2960
2961 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
2962
2963 <!-- ==================================================================== -->
2964
2965 <h2 id="aldrld-intro" class="macro-group">Vertical movements</h2>
2966
2967 The two macros in this section allow you to move down or up on the
2968 page relative to the current
2969 <a href="definitions.html#baseline">baseline</a>.
2970
2971 <div id="index-aldrld" class="macro-list-container">
2972 <h3 class="macro-list">Vertical movements macros</h3>
2973 <ul class="macro-list">
2974   <li><a href="#ald">ALD</a> &ndash; Advance Lead</li>
2975   <li><a href="#rld">RLD</a> &ndash; Reverse Lead</li>
2976 </ul>
2977 </div>
2978
2979 <!-- -ALD- -->
2980
2981 <div class="macro-id-overline">
2982 <h3 id="ald" class="macro-id">Advance Lead (move downward)</h3>
2983 </div>
2984
2985 <div class="box-macro-args">
2986 Macro: <b>ALD</b> <kbd class="macro-args">&lt;distance to move downward&gt;</kbd>
2987 </div>
2988 <p class="requires">
2989 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
2990 </p>
2991
2992 <p>
2993 ALD takes one argument: the distance to move downward on the page
2994 relative to the current vertical position.
2995 </p>
2996
2997 <p>
2998 Used by itself, or preceded by
2999 <a href="#br">BR</a>,
3000 ALD will advance by one line space plus the distance you specify.
3001 Preceded by
3002 <a href="#el">EL</a>,
3003 it will advance by exactly the distance you specify.
3004 </p>
3005
3006 <p>
3007 ALD requires a unit of measure.  Decimal fractions are allowed, and
3008 values may be combined.  Therefore, to move down on the page by 1/4
3009 of an inch, you could enter either
3010 <br/>
3011 <span class="pre-in-pp">
3012   .ALD .25i
3013 </span>
3014 or
3015 <br/>
3016 <span class="pre-in-pp">
3017   .ALD 1P+6p
3018 </span>
3019 As the mnemonic
3020 (<span style="text-decoration: underline;">A</span>dvance <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
3021 suggests, you&#8217;ll most often use ALD with
3022 <a href="definitions.html#picaspoints">points</a>
3023 of lead.
3024 </p>
3025
3026 <div class="box-tip">
3027 <p class="tip">
3028 <span class="note">Note:</span> if you want to use ALD at the top
3029 of a page (ie to advance to the starting position of type on a
3030 page), combine the value you want with <kbd>-1v</kbd> (minus one
3031 line space), like this:
3032 <br/>
3033 <span class="pre-in-pp">
3034   .ALD 1i-1v
3035 </span>
3036 At the top of a page, this will advance one inch from the top edge
3037 of the paper.  Without the -1v, the same command would advance one
3038 inch from the top of the page plus the distance of one line space.
3039 </p>
3040 </div>
3041
3042 <!-- -RLD- -->
3043
3044 <div class="macro-id-overline">
3045 <h3 id="rld" class="macro-id">Reverse Lead (move upward)</h3>
3046 </div>
3047
3048 <div class="box-macro-args">
3049 Macro: <b>RLD</b> <kbd class="macro-args">&lt;distance to move upward&gt;</kbd>
3050 </div>
3051 <p class="requires">
3052 &bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
3053 </p>
3054
3055 <p>
3056 RLD takes one argument: the distance to move upward on the page
3057 relative to the current vertical position.
3058 </p>
3059
3060 <p>
3061 Used by itself, or preceded by
3062 <a href="#br">BR</a>,
3063 RLD will advance by one line space, then reverse by the distance you
3064 specify.  Preceded by
3065 <a href="#el">EL</a>,
3066 it will reverse by exactly the distance you specify.
3067 </p>
3068
3069 <p>
3070 RLD requires a unit of measure.  Decimal fractions are allowed, and
3071 values may be combined.  Therefore, to move up on the page by 1/4 of
3072 an inch, you could enter either
3073 <br/>
3074 <span class="pre-in-pp">
3075   .RLD .25i
3076 </span>
3077 or
3078 <span class="pre-in-pp">
3079   .RLD 1P+6p
3080 </span>
3081 As the mnemonic
3082 (<span style="text-decoration: underline;">R</span>everse <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
3083 suggests, you&#8217;ll most often use RLD with
3084 <a href="definitions.html#picaspoints">points</a>
3085 of lead.
3086 </p>
3087
3088 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
3089
3090 <!-- ==================================================================== -->
3091
3092 <h2 id="tabs-intro" class="macro-group">Tabs</h2>
3093
3094 <p>
3095 Mom provides two different kinds of tab setup: typesetting tabs
3096 and string tabs.  Neither one has anything to do with the tab key
3097 on your keyboard, and both are utterly divorced from groff&#8217;s
3098 notion of tabs.  I recommend reading this section carefully in order
3099 to understand how mom handles tabs.
3100 </p>
3101
3102 <div class="box-tip">
3103 <p class="tip">
3104 <span class="note">Note:</span> see the section
3105 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
3106 for reassuring information on the use of tabs during
3107 <a href="docprocessing.html#docprocessing">document processing</a>.
3108 </p>
3109 </div>
3110
3111 <h3 id="typesetting-tabs" class="docs">Typesetting tabs</h3>
3112
3113 <p>
3114 Typesetting tabs are defined by both an indent from the left margin
3115 and a line length.  This is quite different from typewriter-style
3116 tab stops (the groff norm) that only define the left indent.  In
3117 conjunction with the
3118 <a href="#multicolumns-intro">multi-column macros</a>,
3119 typesetting tabs significantly facilitate tabular and columnar work.
3120 </p>
3121
3122 <p>
3123 Typesetting tabs are created with the
3124 <a href="#tab-set">TAB_SET</a>
3125 macro. TAB_SET identifies the tab (by number), establishes its left
3126 indent and line length, and optionally sets a quad direction and
3127 fill mode.  After tabs have been created with TAB_SET, they can be
3128 called at any time with the
3129 <a href="#tab">TAB</a>
3130 macro.
3131 </p>
3132
3133 <div class="examples-container">
3134 <h3 id="typesetting-tabs-tut" class="docs notes">Quickie tutorial on typesetting tabs</h3>
3135
3136 <p style="margin-top: .5em;">
3137 Say you want to set up three tabs to produce an employee evaluation
3138 that looks something like this:
3139 </p>
3140
3141 <div class="box-code" style="padding-bottom: 0;">
3142 <span id="typsetting-tabs-sample" class="pre-in-pp" style="color: #302419">
3143 CRITERION       EVALUATION     COMMENTS
3144
3145 Service           Good         Many clients specifically request
3146                                support from Joe by name.
3147
3148 Punctuality    Satisfactory    Tends to arrive after 8:00am, but
3149                                often works through lunch hour.
3150
3151 Team spirit     Needs work     Persistently gives higher priority
3152                                to helping clients than respecting
3153                                organizational hierarchy.
3154 </span>
3155 </div>
3156
3157 <p>
3158 You want the first tab, CRITERION,
3159 </p>
3160 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3161 <li>to begin at the left margin of the page &ndash; ie no indent</li>
3162 <li>to have a line length of 5 picas</li>
3163 <li>to be set flush left</li>
3164 </ul>
3165
3166 <p>
3167 Tabs must be numbered, and each has to be set up with a separate
3168 <a href="#tab-set">TAB_SET</a>
3169 line.  Therefore, to set up tab 1, you enter
3170 <br/>
3171 <span class="pre-in-pp">
3172   .TAB_SET  1  0  5P  L
3173             |  |  |   |
3174      tab #--+  |  |   +--direction
3175                |  |
3176        indent--+  +--length
3177 </span>
3178 You want the second tab, EVALUATION,
3179 </p>
3180 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3181 <li>to begin 8 picas from the left margin</li>
3182 <li>to have a length of 9 picas</li>
3183 <li>to be set centered</li>
3184 </ul>
3185
3186 <p>
3187 You set it up like this:
3188 <br/>
3189 <span class="pre-in-pp">
3190   .TAB_SET  2  8P  9P  C
3191             |  |   |   |
3192      tab #--+  |   |   +--direction
3193                |   |
3194        indent--+   +--length
3195 </span>
3196 You want the third tab, COMMENTS,
3197 </p>
3198 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3199 <li>to begin 19 picas from the left margin</li>
3200 <li>to have a length of 17 picas</li>
3201 <li>to be set flush left, <a href="definitions.html#filled">filled</a></li>
3202 </ul>
3203
3204 <p>
3205 The setup looks like this:
3206 <br/>
3207 <span class="pre-in-pp">
3208   .TAB_SET  3  19P  17P  L  QUAD
3209             |   |    |   |    |
3210             |   |    |   |    +--fill output lines
3211             |   |    |   |
3212      tab #--+   |    |   +--direction
3213                 |    |
3214         indent--+    +--length
3215 </span>
3216 Once the tabs are set up, you can call them in one of two ways:
3217 </p>
3218 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3219 <li>with <kbd><a href="#tab">.TAB</a></kbd> (passing the tab
3220     number as an argument), which breaks the current line,
3221     advances one linespace and calls the tab.</li>
3222 <li>with <kbd><a href="#tn">.TN</a></kbd> (Tab Next), which keeps
3223     you on the current line and moves over to the next
3224     tab in sequence (ie from 1 to 2, 2 to 3, etc.), or, more
3225     conveniently, with the
3226     <kbd><a href="#tn">\*[TB+]</a></kbd>
3227     <a href="definitions.html#inlines">inline escape</a></li>
3228 </ul>
3229
3230 <p>
3231 To exit from tabs and restore your original left margin, line
3232 length, quad direction and fill mode, use
3233 <kbd><a href="#tq">.TQ</a></kbd>
3234 (Tab Quit).
3235 </p>
3236
3237 <p>
3238 Here&#8217;s how the input for our sample employee evaluation looks
3239 (with some introductory parameters):
3240 </p>
3241
3242 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3243 <div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: auto;">
3244 <span class="pre-in-pp">
3245 .PAGE 8.5i 11i 1i 1i 1i
3246 .FAMILY  T
3247 .FT      R
3248 .PT_SIZE 14
3249 .LS      16
3250 .QUAD    LEFT
3251 .KERN
3252 .HY OFF
3253 .SS 0
3254 .TAB_SET 1 0   5P  L
3255 .TAB_SET 2 8P  9P  C
3256 .TAB_SET 3 19P 17P L QUAD
3257 .TAB 1
3258 CRITERION\*[TB+]
3259 EVALUATION\*[TB+]
3260 COMMENTS
3261 .SP
3262 .TAB 1
3263 Service\*[TB+]
3264 Good\*[TB+]
3265 Many clients specifically request support from Joe by name.
3266 .SP
3267 .TAB 1
3268 Punctuality\*[TB+]
3269 Satisfactory\*[TB+]
3270 Tends to arrive after 8:00am, but often works through lunch hour.
3271 .SP
3272 .TAB 1
3273 Team spirit\*[TB+]
3274 Needs work\*[TB+]
3275 Persistently gives higher priority to helping clients
3276 than respecting organizational hierarchy.
3277 .TQ
3278 </span>
3279 </div>
3280
3281 <p>
3282 Try setting this up and processing it it with
3283 <br/>
3284 <span class="pre-in-pp">
3285   pdfmom filename.mom &gt; filename.pdf
3286 </span>
3287 then previewing the .pdf file.  Notice how <kbd>.TN</kbd>
3288 simply moves over to the next tab, while the combination
3289 <kbd>.SP/.TAB&nbsp;1</kbd> breaks the line, advances by one extra
3290 linespace, and calls the first tab.
3291 </p>
3292
3293 <p>
3294 Notice, too, how the <kbd>QUAD</kbd> argument passed to tab 3 means
3295 you don&#8217;t have to worry about the length of
3296 <a href="definitions.html#inputline">input lines</a>;
3297 mom
3298 <a href="definitions.html#filled">fills</a>
3299 the tab and sets the type flush left.
3300 </p>
3301 </div>
3302
3303 <h3 id="string-tabs" class="docs">String tabs (autotabs)</h3>
3304
3305 <p>
3306 String tabs let you mark off tab positions with
3307 <a href="definitions.html#inlines">inline escapes</a>
3308 embedded in
3309 <a href="definitions.html#inputline">input lines</a>.
3310 Left indents and line lengths are calculated from the beginning and
3311 end positions of the marks.  This is especially useful when tab
3312 indents and lengths need to be determined from the text that goes in
3313 each tab.
3314 </p>
3315
3316 <p>
3317 Setting up string tabs is a two-step procedure.  First, you enter an
3318 input line in which you mark off where you want tabs to begin and
3319 end.  (This is often best done in conjunction with the
3320 <a href="goodies.html#silent">SILENT</a>
3321 macro.)
3322 </p>
3323
3324 <p>
3325 Next, you invoke the
3326 <a href="#st">ST</a>
3327 macro for every string tab you defined, and optionally pass quad and
3328 fill information to it.  That done, string tabs are called with the
3329 <a href="#tab">TAB</a>
3330 macro, just like typesetting tabs.
3331 </p>
3332
3333 <p>
3334 In combination with the
3335 <a href="goodies.html#pad">PAD</a>
3336 macro and the groff inline escape
3337 <kbd><a href="inlines.html#inline-horizontal-groff">\h</a></kbd>
3338 (move horizontally across the page) or mom&#8217;s
3339 <kbd><a href="inlines.html#inline-horizontal-mom">\*[FWD &lt;distance&gt;]</a></kbd>
3340 (move forward) inline, string tabs provide tremendous flexibility in
3341 setting up complex tab structures.
3342 </p>
3343
3344 <div class="examples-container">
3345 <h3 id="string-tabs-tut" class="docs notes">Quickie tutorial on string tabs</h3>
3346 <p style="margin-top: .5em;">
3347 Say you want to set up tabs for the
3348 <a href="#typsetting-tabs-sample">employee evaluation form</a>
3349 used as an example in the
3350 <a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>.
3351 This time, though, you want to play around with the point size of
3352 type, so you can&#8217;t know exactly how long the tabs will be or
3353 where they should start.  All you know is
3354 </p>
3355 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
3356 <li>CRITERION is the longest line in tab 1</li>
3357 <li>EVALUATION is the longest line in tab 2</li>
3358 <li>tab 3 should extend to the current right margin</li>
3359 <li>you want a 1 pica gutter between each tab</li>
3360 </ul>
3361
3362 <p>
3363 This is an ideal job for string tabs.
3364 </p>
3365
3366 <p>
3367 The first thing you need for string tabs is an
3368 <a href="definitions.html#inputline">input line</a>
3369 with tab positions marked on it.  Tabs are marked with the
3370 <a href="definitions.html#inlines">inline escapes</a>
3371 <kbd><a href="#inline-st">\*[ST&lt;n&gt;]</a></kbd>
3372 and
3373 <kbd><a href="#inline-st">\*[ST&lt;n&gt;X]</a></kbd>,
3374 where <kbd>&lt;n&gt;</kbd>
3375 is the number you want the tab to have.  (In this example, we
3376 enclose the input line with the
3377 <a href="goodies.html#silent">SILENT</a>
3378 macro so the line doesn&#8217;t print.  We also use the
3379 <a href="goodies.html#pad">PAD</a>
3380 macro to permit defining tab 3 as simply &#8220;the amount of space
3381 remaining on the input line.&#8221;)
3382 </p>
3383
3384 <p>
3385 The setup looks like this:
3386 </p>
3387
3388 <div class="examples" style="margin-bottom: 0px;">Code:</div>
3389
3390 <div class="box-code">
3391 <span class="pre-in-pp">
3392 .SILENT
3393 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
3394 .SILENT OFF
3395 </span>
3396 </div>
3397
3398 <p>
3399 The long line after <kbd>.PAD</kbd> looks scary, but
3400 it isn&#8217;t really.  Here&#8217;s what it means when broken down
3401 into its component parts:
3402 </p>
3403 <ul style="margin-bottom: -1em;">
3404 <li>The longest line in tab 1 is &#8220;CRITERION&#8221;, so we
3405     enclose CRITERION with begin/end markers for string tab 1:
3406 <br/>
3407 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3408   \*[ST1]CRITERION\*[ST1X]
3409 </span>
3410 </li>
3411 <li>We want a 1 pica (12 points) gutter between tab 1 and 2,
3412     so we insert 12 points of space with \*[FWD 12p]:
3413 <br/>
3414 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3415   \*[FWD 12p]
3416 </span>
3417 </li>
3418 <li>The longest line in tab 2 is &#8220;EVALUATION&#8221;, so
3419     we enclose EVALUATION with begin/end markers for string
3420     tab 2:
3421 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3422   \*[ST2]EVALUATION\*[ST2X]
3423 </span>
3424 </li>
3425 <li>We want 1 pica (12 points) between tab 2 and 3, so we
3426     insert it with: 
3427 <br/>
3428 <span class="pre-in-pp" style="margin-bottom: -.25em;">
3429   \*[FWD 12p]
3430 </span>
3431 </li>
3432 <li>We want tab 3 to be as long as whatever space remains on
3433     the current line length, so we enclose the
3434     <a href="goodies.html#pad-marker">pad marker</a>
3435     (#) with begin/end markers for string tab 3:
3436 <span class="pre-in-pp">
3437   \*[ST3]#\*[ST3X]
3438 </span>
3439    </li>
3440 </ul>
3441
3442 <p>
3443 The tabs are now defined, but they require
3444 <a href="definitions.html#quad">quad direction</a>
3445 and
3446 <a href="definitions.html#filled">fill</a>
3447 information.  For each string tab defined above, enter a separate
3448 <kbd><a href="#st">.ST</a></kbd>
3449 line, like this:
3450 <br/>
3451 <span class="pre-in-pp">
3452   .ST  1  L
3453   .ST  2  L
3454   .ST  3  L  QUAD
3455        |  |   |
3456        |  |   +--fill output lines
3457        |  |
3458 tab #--+  +--direction
3459 </span>
3460 From here on in, you call the tabs with
3461 <kbd><a href="#tab">.TAB</a></kbd>,
3462 <kbd><a href="#tn">.TN</a></kbd>,
3463 or
3464 <kbd><a href="#tn">\*[TB+]</a></kbd>
3465 just like typesetting tabs (see
3466 <a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>).
3467 </p>
3468
3469 <p>
3470 Here&#8217;s the complete setup and entry for the sample employee
3471 evaluation form utilizing string tabs.
3472 </p>
3473
3474 <div class="examples" style="margin-bottom: 0px;">Code:</div> 
3475 <div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: scroll;">
3476 <span class="pre-in-pp">
3477 .PAGE 8.5i 11i 1i 1i 1i
3478 .FAMILY  T
3479 .FT      R
3480 .PT_SIZE 14
3481 .LS      16
3482 .QUAD    LEFT
3483 .KERN
3484 .HY OFF
3485 .SS 0
3486 .SILENT
3487 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
3488 .SILENT OFF
3489 .ST  1  L
3490 .ST  2  L
3491 .ST  3  L  QUAD
3492 .TAB 1
3493 CRITERION\*[TB+]
3494 EVALUATION\*[TB+]
3495 COMMENTS
3496 .SP
3497 .TAB 1
3498 Service\*[TB+]
3499 Good\*[TB+]
3500 Many clients specifically request support from Joe by name.
3501 .SP
3502 .TAB 1
3503 Punctuality\*[TB+]
3504 Satisfactory\*[TB+]
3505 Tends to arrive after 8:00am, but often works through lunch hour.
3506 .SP
3507 .TAB 1
3508 Team spirit\*[TB+]
3509 Needs work\*[TB+]
3510 Persistently gives higher priority to helping clients
3511 than respecting organizational hierarchy.
3512 .TQ
3513 </span>
3514 </div>
3515
3516 <p>
3517 Try setting this up and processing it with
3518 <br/>
3519 <span class="pre-in-pp">
3520   pdfmom filename.mom &gt; filename.pdf
3521 </span>
3522 and previewing the .pdf file.
3523 </p>
3524
3525 <p>
3526 Now, change the point size of the above sample to 12 and preview it
3527 again.  You&#8217;ll see that the tab structure remains identical
3528 (tab 1=CRITERION, tab 2=EVALUATION, tab 3=space remaining, and the
3529 gutter between tabs is still 1 pica), while the position and length
3530 of the tabs have altered because of the new point size.
3531 </p>
3532
3533 <p>
3534 Now try increasing the gutters to 2 picas
3535 (<kbd>\*[FWD&nbsp;24p]</kbd> or <kbd>\*[FWD&nbsp;2P]</kbd> instead
3536 of <kbd>\*[FWD&nbsp;12p]</kbd>).  Preview the file again, and notice
3537 how the tab structure remains the same, but the gutters are wider.
3538 </p>
3539 </div>
3540
3541 <div id="index-tabs" class="macro-list-container">
3542 <h3 class="macro-list">Tabs macros</h3>
3543
3544 <ul class="macro-list">
3545   <li><a href="#tab-set">TAB_SET</a> &ndash; create typesetting tabs</li>
3546   <li><a href="#inline-st">\*[ST]...\*[STX]</a> &ndash; inline escapes for marking String Tabs</li>
3547   <li><a href="#st">ST</a> &ndash; set String Tabs</li>
3548   <li><a href="#tab">TAB</a> &ndash; call tabs</li>
3549   <li><a href="#tn">TN</a> &ndash; Tab Next; call next tab in sequence</li>
3550   <li><a href="#tn">\*[TB+]</a> &ndash; inline escape to call next tab in sequence</li>
3551   <li><a href="#tq">TQ</a> &ndash; Tab Quit</li>
3552 </ul>
3553
3554 </div>
3555
3556 <!-- -TAB_SET- -->
3557
3558 <div class="macro-id-overline">
3559 <h3 id="tab-set" class="macro-id">Set up typesetting tabs</h3>
3560 </div>
3561
3562 <div class="box-macro-args">
3563 Macro: <b>TAB_SET</b> <kbd class="macro-args">&lt;tab number&gt; &lt;indent&gt; &lt;length&gt;  L | R | C | J [ QUAD ]</kbd>
3564 </div>
3565 <p class="requires">
3566 &bull;&nbsp;<kbd style="font-style: normal;">&lt;indent&gt;</kbd> and <kbd style="font-style: normal;">&lt;length&gt;</kbd> require a <a href="definitions.html#unitofmeasure">unit of measure</a>
3567 </p>
3568
3569 <p style="margin-bottom: -.5em;">
3570 TAB_SET creates typesetting tabs that later can be called with
3571 <kbd><a href="#tab">.TAB</a></kbd>.
3572 Typesetting tabs are numbered, and defined by an indent, a length,
3573 and a quad direction, hence TAB_SET has four required arguments:
3574 </p>
3575 <ul style="margin-top: .5em; margin-bottom: -.5em;">
3576 <li>a tab number</li>
3577 <li>an indent (measured from the left margin of the page,
3578     or, if you&#8217;re already in a tab, from the left margin of the tab)</li>
3579 <li>a length</li>
3580 <li>a direction</li>
3581 </ul>
3582
3583 <p>
3584 To set up a centred tab 6 picas long and 9 points from the left
3585 margin, you&#8217;d enter
3586 <br/>
3587 <span class="pre-in-pp">
3588   .TAB_SET 1 9p 6P C
3589 </span>
3590 The tab number in the above (&#8221;1&#8221;) is simply an
3591 identifier.  It could have been 4, or 17, or 296.  There&#8217;s no
3592 need to set up tabs in numerical sequence.
3593 </p>
3594
3595 <p>
3596 By default, tabs are in
3597 <a href="definitions.html#filled">nofill</a>
3598 mode, meaning you can enter text in tabs on a line-for-line basis
3599 without having to use the
3600 <a href="#br">BR</a>
3601 macro.  If you want a tab to be
3602 <a href="definitions.html#filled">filled</a>,
3603 pass the optional argument <kbd>QUAD</kbd>,
3604 which will make the tab behave as if you&#8217;d entered
3605 <kbd class="bold">.QUAD&nbsp;L&nbsp;|&nbsp;R&nbsp;|&nbsp;C</kbd>.
3606 </p>
3607
3608 <p>
3609 For
3610 <a href="definitions.html#just">justified</a>
3611 tabs, simply pass the argument J (without the QUAD argument), like
3612 this:
3613 <br/>
3614 <span class="pre-in-pp">
3615   .TAB 1 9p 6P J
3616 </span>
3617 Once tabs are set, they can be called at any time with the
3618 <a href="#tab">TAB &lt;n&gt;</a>
3619 macro, where &lt;n&gt; is the number of the desired tab.
3620 </p>
3621
3622 <p>
3623 You can set up any number of typesetting tabs.  However, be aware
3624 that
3625 <a href="#string-tabs">string tabs</a>
3626 are also called with TAB &lt;n&gt;, so be careful that you
3627 don&#8217;t set up a typesetting tab numbered, say, 4, when you
3628 already have a string tab numbered 4.  Every tab, typesetting or
3629 string, must have a unique numeric identifier. </p>
3630
3631 <div class="box-tip">
3632 <p class="tip">
3633 <span class="note">Note:</span> If you use TAB_SET while
3634 you&#8217;re currently inside a tab, the indent argument is the
3635 distance from the tab&#8217;s left margin, not the left margin of
3636 the page.  Therefore, you should exit tabs (with
3637 <kbd><a href="#tq">.TQ</a></kbd>)
3638 before creating new tabs (unless, of course, you want to set up a
3639 tab structure within the confines of an existing tab).
3640 </p>
3641 </div>
3642
3643 <div class="box-important">
3644 <p class="tip">
3645 <span class="important">IMPORTANT:</span> Turn all indents off (see
3646 <a href="#indents">Indents</a>)
3647 before setting up tabs with TAB_SET, or mom may get confused.
3648 </p>
3649 </div>
3650
3651 <!-- -INLINE_ST- -->
3652
3653 <div class="macro-id-overline">
3654 <h3 id="inline-st" class="macro-id">Mark positions of string tabs</h3>
3655 </div>
3656
3657 <div class="box-macro-args">
3658 Inlines: <kbd class="macro-args">\*[ST&lt;number&gt;]...\*[ST&lt;number&gt;X]</kbd>
3659 </div>
3660
3661 <p class="requires">
3662 The <a href="definitions.html#quad">quad</a>
3663 direction must be
3664 <span style="font-style: normal">LEFT</span>
3665 or
3666 <span style="font-style: normal">JUSTIFY</span>
3667 (see
3668 <a href="#quad"><span style="font-style: normal">QUAD</span></a>
3669 and
3670 <a href="#justify"><span style="font-style: normal">JUSTIFY</span></a>)
3671 or the
3672 <a href="definitions.html#filled">no-fill mode</a>
3673 set to
3674 <a href="#lrc"><span style="font-style: normal">LEFT</span></a>
3675 in order for these inlines to function properly.  Please see
3676 <a href="#important"><span style="font-style: normal">IMPORTANT</span></a>,
3677 below.
3678 </p>
3679
3680 <p>
3681 String tabs need to be marked off with
3682 <a href="definitions.html#inlines">inline escapes</a>
3683 before being set up with the
3684 <a href="#st">ST</a>
3685 macro.  Any input line may contain string tab markers. <kbd
3686 class="bold">&lt;number&gt;</kbd>, above, means the numeric
3687 identifier of the tab.  The following shows a sample input line with
3688 string tab markers.
3689 <br/>
3690 <span class="pre-in-pp">
3691   \*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
3692 </span>
3693 String tab 1 begins at the start of the line and ends after the word
3694 &#8220;time&#8221;.  String tab 2 starts at &#8220;good&#8221; and
3695 ends after &#8220;men&#8221;.  Inline escapes (eg font or point
3696 size changes, or horizontal movements, including
3697 <a href="goodies.html#pad">padding</a>)
3698 are taken into account when mom determines the position and length
3699 of string tabs.
3700 </p>
3701
3702 <p>
3703 Up to nineteen string tabs may be marked (not necessarily all on the
3704 same line, of course), and they must be numbered between 1 and 19.
3705 </p>
3706
3707 <p>
3708 Once string tabs have been marked in input lines, they have to be
3709 &#8220;set&#8221; with
3710 <kbd><a href="#st">.ST</a></kbd>,
3711 after which they may be called, by number, with
3712 <kbd><a href="#tab">.TAB</a></kbd>.
3713 </p>
3714
3715 <div class="box-tip">
3716 <p class="tip">
3717 <span class="note">Note:</span> Lines with string tabs marked off
3718 in them are normal input lines, ie they get printed, just like
3719 any input line.  If you want to set up string tabs without the line
3720 printing, use the
3721 <a href="goodies.html#silent">SILENT</a>
3722 macro.
3723 </p>
3724 </div>
3725
3726 <div class="box-important">
3727 <p class="tip-top">
3728 <span id="important" class="important">IMPORTANT:</span>
3729 Owing to the way groff processes
3730 <a href="definitions.html#inputline">input lines</a>
3731 and turns them into
3732 <a href="definitions.html#outputline">output lines</a>,
3733 it is not possible for mom to &#8220;guess&#8221; the correct
3734 starting position of string tabs marked off in lines that are
3735 centered or set flush right.
3736 </p>
3737
3738 <p>
3739 Equally, she cannot guess the starting position if a line is fully
3740 justified and broken with
3741 <a href="#spread">SPREAD</a>.
3742 </p>
3743
3744 <p>
3745 In other words, in order to use string tabs,
3746 <a href="#lrc">LEFT</a>
3747 must be active, or, if
3748 <a href="#quad">QUAD LEFT</a>
3749 or
3750 <a href="#justify">JUSTIFY</a>
3751 are active, the line on which the string tabs are marked must be
3752 broken &#8220;manually&#8221; with
3753 <kbd><a href="#br">.BR</a></kbd>
3754 (but not
3755 <kbd><a href="#spread">.SPREAD</a></kbd>).
3756 </p>
3757
3758 <p class="tip-bottom">
3759 To circumvent this behaviour, I recommend using the
3760 <a href="goodies.html#pad">PAD</a>
3761 to set up string tabs in centered or flush right lines.  Say, for
3762 example, you want to use a string tab to underscore the text of a
3763 centered line with a rule.  Rather than this,
3764 <br/>
3765 <span class="pre-in-pp">
3766   .CENTER
3767   \*[ST1]A line of text\*[ST1X]\c
3768   .EL
3769   .ST 1
3770   .TAB 1
3771   .PT_SIZE 24
3772   .ALD 3p
3773   \*[RULE]
3774   .RLD 3p
3775   .TQ
3776 </span>
3777 you should do:
3778 <br/>
3779 <span class="pre-in-pp">
3780   .QUAD CENTER
3781   .PAD "#\*[ST1]A line of text\*[ST1X]#"
3782   .EL
3783   .ST 1
3784   .TAB 1
3785   .PT_SIZE 24
3786   .ALD 3p
3787   \*[RULE] \" Note that you can&#8217;t use \*[UP ] or \*[DOWN] with \*[RULE]
3788   .RLD 3p
3789   .TQ
3790 </span>
3791 </p>
3792 </div>
3793
3794 <!-- -ST- -->
3795
3796 <div class="macro-id-overline">
3797 <h3 id="st" class="macro-id">Set string tabs</h3>
3798 </div>
3799
3800 <div class="box-macro-args">
3801 Macro: <b>ST</b> <kbd class="macro-args">&lt;tab number&gt;  L | R | C | J [ QUAD ]</kbd>
3802 </div>
3803
3804 <p>
3805 After string tabs have been marked off on an input line (see
3806 <a href="#inline-st"><kbd>\*[ST]...\*[STX]</kbd></a>),
3807 you need to &#8220;set&#8221; them by giving them a direction and,
3808 optionally, the <kbd>QUAD</kbd> argument.  In this respect, ST is
3809 like
3810 <a href="#tab-set">TAB_SET</a>
3811 except that you don&#8217;t have to give ST an indent or a
3812 line length (that&#8217;s already taken care of, inline, by
3813 <kbd>\*[ST]...\*[STX]</kbd>).  If you want string tab 1 to be left,
3814 enter
3815 <br/>
3816 <span class="pre-in-pp">
3817   .ST 1 L
3818 </span>
3819 If you want it to be left and
3820 <a href="definitions.html#filled">filled</a>, enter
3821 <br/>
3822 <span class="pre-in-pp">
3823   .ST 1 L QUAD
3824 </span>
3825 If you want it to be justified, enter
3826 <br/>
3827 <span class="pre-in-pp">
3828   .ST 1 J
3829 </span>
3830 See the
3831 <a href="#string-tabs-tut">Quickie tutorial on string tabs</a>
3832 for a full explanation of setting up string tabs.
3833 </p>
3834
3835 <!-- -TAB- -->
3836
3837 <div class="macro-id-overline">
3838 <h3 id="tab" class="macro-id">Call tabs</h3>
3839 </div>
3840
3841 <div class="box-macro-args">
3842 Macro: <b>TAB</b> <kbd class="macro-args">&lt;tab number&gt;</kbd>
3843 </div>
3844 <p class="alias">
3845 <i>Alias:</i> <b>TB</b>
3846 </p>
3847
3848 <p>
3849 After tabs have been defined (either with
3850 <a href="#tab-set">TAB_SET</a>
3851 or
3852 <a href="#st">ST</a>),
3853 TAB moves to whatever tab number you pass it as an argument.  For
3854 example,
3855 <br/>
3856 <span class="pre-in-pp">
3857   .TAB 3
3858 </span>
3859 moves you to tab 3.
3860 </p>
3861
3862 <div id="note-tn" class="box-tip">
3863 <p class="tip-top">
3864 <span class="note">Note:</span> TAB breaks the line preceding it and
3865 advances 1 linespace.  Hence,
3866 <br/>
3867 <span class="pre-in-pp">
3868   .TAB 1
3869   A line of text in tab 1.
3870   .TAB 2
3871   A line of text in tab 2.
3872 </span>
3873 produces, on output
3874 <br/>
3875 <span class="pre-in-pp">
3876   A line of text in tab 1.
3877                              A line of text in tab 2.
3878 </span>
3879 If you want the tabs to line up, use
3880 <a href="#tn">TN</a>
3881 (Tab Next)
3882 or, more conveniently, the inline escape
3883 <a href="#tn">\*[TB+]</a>:
3884 <br/>
3885 <span class="pre-in-pp">
3886   .TAB 1
3887   A line of text in tab 1.\*[TB+]
3888   A line of text in tab 2.
3889 </span>
3890 which produces
3891 <br/>
3892 <span class="pre-in-pp">
3893   A line of text in tab 1.   A line of text in tab 2.
3894 </span>
3895 If the text in your tabs runs to several lines, and you want the
3896 first lines of each tab to align, you must use the
3897 <a href="#multicolumns-intro">multi-column</a> macros.
3898 </p>
3899
3900 <p id="tab-add-note" class="tip-bottom">
3901 <span class="additional-note">Additional note:</span> Any indents
3902 in effect prior to calling a tab are automatically turned off by
3903 TAB.  If you were happily zipping down the page with a left indent
3904 of 2 picas turned on, and you call a tab whose indent from the left
3905 margin is 6 picas, your new distance from the left margin will be 6
3906 picas, not 6 picas plus the 2 pica indent.
3907 </p>
3908 </div>
3909
3910 <!-- -TN- -->
3911
3912 <div class="macro-id-overline">
3913 <h3 id="tn" class="macro-id">Tab Next</h3>
3914 </div>
3915
3916 <div class="box-macro-args">
3917 Macro: <b>TN</b>
3918 <br/>Inline escape: <b>\*[TB+]</b>
3919 </div>
3920
3921 <p>
3922 TN moves over to the next tab in numeric sequence (tab n+1) without
3923 advancing on the page.  See the
3924 <a href="#note-tn">NOTE</a>
3925 in the description of the TAB macro for an example of how TN works.
3926 </p>
3927
3928 <p>
3929 In tabs that aren&#8217;t given the <kbd class="normal">QUAD</kbd>
3930 argument when they&#8217;re set up with
3931 <a href="#tab-set" class="normal">TAB_SET</a>
3932 or
3933 <a href="#st" class="normal">ST</a>,
3934 you must terminate the line preceding <kbd class="normal">.TN</kbd>
3935 with the <kbd class="normal">\c</kbd> inline escape.  Conversely,
3936 if you did give a <kbd>QUAD</kbd> argument to TAB_SET or ST, the
3937 <kbd>\c</kbd> must not be used.
3938 </p>
3939
3940 <p>
3941 If you find remembering whether to put in the
3942 <kbd class="normal">\c</kbd> bothersome, you may prefer to use the
3943 <a href="definitions.html#inlines" class="normal">inline escape</a>
3944 alternative to
3945 <kbd class="normal">.TN</kbd>,
3946 <kbd class="normal"><a href="inlines.html#tb-plus-mom">\*[TB+]</a></kbd>,
3947 which works consistently regardless of the fill mode.
3948 </p>
3949
3950 <div id="tn-note" class="box-tip">
3951 <p class="tip">
3952 <span class="note">Note:</span> You must put text in the
3953 <a href="definitions.html#inputline">input line</a>
3954 immediately after TN. Stacking of TN&#8217;s is not
3955 allowed.  In other words, you cannot do
3956 <br/>
3957 <span class="pre-in-pp">
3958   .TAB 1
3959   Some text\c
3960   .TN
3961   Some more text\c
3962   .TN
3963   .TN
3964   Yet more text
3965 </span>
3966 The above example, assuming tabs numbered from 1 to 4, should be entered
3967 <br/>
3968 <span class="pre-in-pp">
3969   .TAB 1
3970   Some text\c
3971   .TN
3972   Some more text\c
3973   .TN
3974   \&\c
3975   .TN
3976   Yet more text
3977 </span>
3978
3979 <kbd>\&</kbd> is a zero-width, non-printing character that groff
3980 recognizes as valid input, hence meets the requirement for input
3981 text following <kbd>.TN</kbd>.
3982 </p>
3983 </div>
3984
3985 <!-- -TQ- -->
3986
3987 <div class="macro-id-overline">
3988 <h3 id="tq" class="macro-id">Tab Quit</h3>
3989 </div>
3990
3991 <div class="box-macro-args">
3992 Macro: <b>TQ</b>
3993 </div>
3994
3995 <p>
3996 TQ takes you out of whatever tab you were in, advances 1 linespace,
3997 and restores the left margin, line length, quad direction and
3998 <a href="definitions.html#filled">fill mode</a>
3999 that were in effect prior to invoking any tabs.
4000 </p>
4001
4002 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
4003
4004 <!-- ==================================================================== -->
4005
4006 <h2 id="multicolumns-intro" class="macro-group">Multiple columns</h2>
4007
4008 <p>
4009 Tabs are not by nature columnar, which is to say that if the text
4010 inside a tab runs to several lines, calling another tab does not
4011 automatically move to the
4012 <a href="definitions.html#baseline">baseline</a>
4013 of the first line in the previous tab.  To demonstrate:
4014 <br/>
4015 <span class="pre-in-pp">
4016   .TAB 1
4017   Carrots
4018   Potatoes
4019   Broccoli
4020   .TAB 2
4021   $1.99/5 lbs
4022   $0.25/lb
4023   $0.99/bunch
4024 </span>
4025 produces, on output
4026 <br/>
4027 <span class="pre-in-pp">
4028   Carrots
4029   Potatoes
4030   Broccoli
4031             $1.99/5 lbs
4032             $0.25/lb
4033             $0.99/bunch
4034 </span>
4035 The multi-column macros allow you to set tabs in columnar fashion,
4036 rather than line by line.  When you invoke multi-column mode (with
4037 <kbd><a href="#mco">.MCO</a></kbd> &ndash;
4038 <span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">O</span>n),
4039 mom saves the position of the current baseline.
4040 <kbd><a href="#mcr">.MCR</a></kbd>
4041 (<span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">R</span>eturn)
4042 at any point while multi-columns are on returns you to the saved
4043 position.  Exiting multi-columns
4044 (<kbd><a href="#mcx">.MCX</a></kbd> &ndash;
4045 <span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn e<span style="text-decoration: underline">X</span>it)
4046 quits the current tab (if you&#8217;re in one) and moves you to the
4047 bottom of the longest column.  (Note that you do not have to use
4048 multi-columns in conjunction with tabs.)
4049 </p>
4050
4051 <p>
4052 Using our example above, but setting it in multi-column mode,
4053 <br/>
4054 <span class="pre-in-pp">
4055   .MCO
4056   .TAB 1
4057   Carrots
4058   Potatoes
4059   Broccoli
4060   .MCR
4061   .TAB 2
4062   $1.99/5 lbs
4063   $0.25/lb
4064   $0.99/bunch
4065   .MCX
4066 </span>
4067 produces
4068 <br/>
4069 <span class="pre-in-pp">
4070   Carrots   $1.99/5 lbs
4071   Potatoes  $0.25/lb
4072   Broccoli  $0.99/bunch
4073 </span>
4074 </p>
4075
4076 <div class="box-tip">
4077 <p class="tip">
4078 <span class="note">Note:</span> Do not confuse MCO with
4079 the
4080 <a href="docprocessing.html#columns">COLUMNS</a>
4081 macro in the
4082 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4083 </p>
4084 </div>
4085
4086 <div id="index-multicolumns" class="macro-list-container">
4087 <h3 class="macro-list">Multi-columns macros</h3>
4088
4089 <ul class="macro-list">
4090   <li><a href="#mco">MCO</a> &ndash; begin multi-column setting</li>
4091   <li><a href="#mcr">MCR</a> &ndash; return to top of column</li>
4092   <li><a href="#mcx">MCX</a> &ndash; exit multi-columns</li>
4093 </ul>
4094 </div>
4095
4096 <!-- -MCO- -->
4097
4098 <div class="macro-id-overline">
4099 <h3 id="mco" class="macro-id">Begin multi-column setting</h3>
4100 </div>
4101
4102 <div class="box-macro-args">
4103         Macro: <b>MCO</b>
4104 </div>
4105
4106 <p>
4107 MCO (<span style="text-decoration: underline;">M</span>ulti-<span style="text-decoration: underline;">C</span>olumn <span style="text-decoration: underline;">O</span>n) is the macro you use to begin multi-column
4108 setting.  It marks the current
4109 <a href="definitions.html#baseline">baseline</a>
4110 as the top of your columns, for use later with
4111 <a href="#mcr">MCR</a>.
4112 See the
4113 <a href="#multicolumns-intro">introduction to columns</a>
4114 for an explanation of multi-columns and some sample
4115 input.
4116 </p>
4117
4118 <div class="box-tip">
4119 <p class="tip">
4120 <span class="note">Note:</span> Do not confuse MCO with
4121 the
4122 <a href="docprocessing.html#columns">COLUMNS</a>
4123 macro in the
4124 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4125 </p>
4126 </div>
4127
4128 <!-- -MCR- -->
4129
4130 <div class="macro-id-overline">
4131 <h3 id="mcr" class="macro-id">Return to top of column</h3>
4132 </div>
4133
4134 <div class="box-macro-args">
4135 Macro: <b>MCR</b>
4136 </div>
4137
4138 <p>
4139 Once you&#8217;ve turned multi-columns on (with
4140 <kbd><a href="#mco">.MCO</a></kbd>),
4141 <kbd>.MCR</kbd>, at any time, returns you to the top of
4142 your columns.
4143 </p>
4144
4145 <!-- -MCX- -->
4146
4147 <div class="macro-id-overline">
4148 <h3 id="mcx" class="macro-id">Exit multi-columns</h3>
4149 </div>
4150
4151 <div class="box-macro-args">
4152 Macro: <b>MCX</b> <kbd class="macro-args">[ &lt;distance to advance below longest column&gt; ]</kbd>
4153 </div>
4154 <p class="requires">
4155 &bull;&nbsp;Optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4156 </p>
4157
4158 <p>
4159 MCX takes you out of any tab you were in (by silently invoking
4160 <kbd><a href="#tq">.TQ</a></kbd>)
4161 and advances to the bottom of the longest column.
4162 </p>
4163
4164 <p>
4165 Without an argument, MCX advances 1 linespace below the longest
4166 column.  Linespace, in this instance, is the
4167 <a href="definitions.html#leading">leading</a>
4168 in effect at the moment MCX is invoked.
4169 </p>
4170
4171 <p>
4172 If you pass the <kbd>&lt;distance&gt;</kbd> argument to MCX, it
4173 advances 1 linespace below the longest column (see above) PLUS the
4174 distance specified by the argument.  The argument requires a unit
4175 of measure; therefore, to advance an extra 6 points below where MCX
4176 would normally place you, you&#8217;d enter
4177 <br/>
4178 <span class="pre-in-pp">
4179   .MCX 6p
4180 </span>
4181 </p>
4182
4183 <div class="box-tip">
4184 <p class="tip">
4185 <span class="note">Note:</span> If you wish to advance a precise
4186 distance below the
4187 <a href="definitions.html#baseline">baseline</a>
4188 of the longest column, use MCX with an argument of 0 (zero; no unit
4189 of measure required) in conjunction with the
4190 <a href="#ald">ALD</a>
4191 macro, like this:
4192 <br/>
4193 <span class="pre-in-pp" style="margin-bottom: -12px;">
4194   .MCX 0
4195   .ALD 24p
4196 </span>
4197 </p>
4198 </div>
4199
4200 <p>
4201 The above advances to precisely 24 points below the baseline
4202 of the longest column.
4203 </p>
4204
4205 <div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
4206
4207 <!-- ==================================================================== -->
4208
4209 <h2 id="indents-intro" class="macro-group">Indents</h2>
4210
4211 <p>
4212 With mom&#8217;s indents, you can indent from the left, the right,
4213 or both margins.  In addition, mom provides temporary left indents
4214 (ie only one line is indented, as at the start of a paragraph)
4215 and &#8220;hanging&#8221; left indents (the reverse of a temporary
4216 indent; the first line isn&#8217;t indented, subsequent lines are).
4217 </p>
4218
4219 <h3 id="indents-handling" class="docs">How mom handles indents</h3>
4220
4221 <p>
4222 Mom provides five kinds of indents: left, right, both, temporary,
4223 and hanging.  Each is invoked by its own name:
4224 </p>
4225 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4226 <li>IL &ndash; Indent Left</li>
4227 <li>IR &ndash; Indent Right</li>
4228 <li>IB &ndash; Indent Both</li>
4229 <li>HI &ndash; Hanging Indent</li>
4230 <li>TI &ndash; Temporary Indent</li>
4231 </ul>
4232
4233 <p>
4234 In addition, there are four macros to control exiting from
4235 indents:
4236 </p>
4237 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4238 <li>IQ &ndash; quit all active indents</li>
4239 <li>ILX &ndash; exit indent style left</li>
4240 <li>IRX &ndash; exit indent style right</li>
4241 <li>IBX &ndash; exit indent style both</li>
4242 </ul>
4243
4244 <p>
4245 This section deals exclusively with IL, IR and IB.  For an
4246 explanation of hanging and temporary indents&mdash;how they work and
4247 how to use them&mdash;see
4248 <a href="#hi">Hanging indents</a>
4249 and
4250 <a href="#ti">Temporary indents</a>.
4251 </p>
4252
4253 <p>
4254 The first time you invoke any of mom&#8217;s indents, you must
4255 supply a measure.  For example,
4256 <br/>
4257 <span class="pre-in-pp">
4258   .IL 2P
4259 </span>
4260 indents text 2 picas from the left margin (or current tab indent).
4261 </p>
4262
4263 <p>
4264 When you want to exit the above indent, use either
4265 <br/>
4266 <span class="pre-in-pp" style="margin-bottom: -1em;">
4267   .IQ
4268 </span>
4269 or
4270 <span class="pre-in-pp" style="margin-top: -.5em;">
4271   .ILX
4272 </span>
4273 The next time you want the same indent, invoke it without the
4274 argument, like this:
4275 <br/>
4276 <span class="pre-in-pp">
4277   .IL
4278 </span>
4279 As you can see, once you&#8217;ve supplied a measure to an indent
4280 macro, mom stores the value, obviating the need to repeat it on
4281 subsequent invocations.  And mom doesn&#8217;t just store the
4282 measure&mdash;she hangs on to it tenaciously.  Arguments passed to
4283 IL, IR and IB are additive.  Consider the following:
4284 <br/>
4285 <span class="pre-in-pp">
4286   .LL 20P
4287   .IR 2P    \"Indent right by 2 picas
4288   A first block of text...
4289   ...
4290   ...
4291   .IQ       \"Turn indent off
4292   A second block of text...
4293   ...
4294   ...
4295   .IR 2P    \"Indent right by an additional 2 picas (ie 4 picas)
4296   A third block of text...
4297   ...
4298   ...
4299 </span>
4300 The first block of text is right indented by 2 picas (ie the line
4301 length is shortened by 2 picas to 18 picas).  The second block of
4302 text, after IQ, is, as you&#8217;d expect, set to the full measure.
4303 The third block of text&mdash;the one to pay attention to&mdash;is
4304 not right indented by 2 picas, but rather by 4 picas.  Mom adds
4305 the value of arguments to IL, IR and IB to whatever value is already
4306 in effect.
4307 </p>
4308
4309 <p>
4310 If you wanted the third block of text in the example above to be
4311 right indented by just 2 picas (the original measure given to IR),
4312 you would enter <kbd>.IR</kbd> without an argument.
4313 </p>
4314
4315 <p>
4316 Because indent arguments are additive, putting a minus sign in front
4317 of the argument can be used to subtract from the current value.
4318 In the following example, the first line is indented 18 points,
4319 the second is indented 36 points (18 + 18), and the third is again
4320 indented 18 points (36 - 18).
4321 <br/>
4322 <span class="pre-in-pp">
4323   .IL 18p     \"Indent left by 18 points      = 18 points
4324   Now is the time
4325   .IL 18p     \"Indent left by 18 points more = 36 points
4326   for all good men to come
4327   .IL -18p    \"Indent left by 18 points less = 18 points
4328   to the aid of the party.
4329 </span>
4330 Sometimes, you may want to clear out the stored indent
4331 values&mdash;let mom start indenting with a clean slate, as it
4332 were.  Giving the optional argument <kbd>CLEAR</kbd> to any of the
4333 &#8220;indent quit&#8221; macros resets them to zero.
4334 </p>
4335 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
4336   <li>IQ CLEAR &ndash; quit and clear all indents</li>
4337   <li>ILX CLEAR &ndash; quit and clear indent style left</li>
4338   <li>IRX CLEAR &ndash; quit and clear indent style right</li>
4339   <li>IBX CLEAR &ndash; quit and clear indent style both</li>
4340 </ul>
4341
4342 <p>
4343 Indent styles may be combined and manipulated separately.  You
4344 could, for example, have a left indent of 4 picas and a right indent
4345 of 6 picas and control each separately, as in the following example.
4346 <br/>
4347 <span class="pre-in-pp">
4348   .IL 4P     \"Indent left 4 picas
4349   .IR 6P     \"Indent right 6 picas
4350   Some text
4351   .IRX       \"Turn off the right indent only
4352   More text  \"Text is still indented 4 picas left
4353 </span>
4354 If, at <kbd>.IRX</kbd>, you wanted the text afterwards to have no
4355 indents (either left or right), you would enter <kbd>.IQ</kbd>,
4356 which exits all indent styles at once.
4357 </p>
4358
4359 <p>
4360 A word of advice: Indents are best used only when you have a
4361 compelling reason not to change the current left margin or line
4362 length.  In many instances where indents might seem expedient,
4363 it&#8217;s better to use tabs, or actually change the left margin
4364 or the line length. Mom&#8217;s indenting macros are flexible and
4365 powerful, but easy to get tangled up in.
4366 </p>
4367
4368 <div class="box-tip">
4369 <p class="tip">
4370 <span class="note">Note:</span> see the section
4371 <a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
4372 for information and advice on using indents with the
4373 <a href="docprocessing.html#docprocessing">document processing macros</a>.
4374 </p>
4375 </div>
4376
4377 <div id="index-indents" class="macro-list-container">
4378 <h3 class="macro-list">Indents macros</h3>
4379
4380 <ul class="macro-list">
4381   <li><a href="#il">IL</a> &ndash; Indent left</li>
4382   <li><a href="#ir">IR</a> &ndash; Indent right</li>
4383   <li><a href="#ib">IB</a> &ndash; Indent both</li>
4384   <li><a href="#ti">TI</a> &ndash; Temporary indent, left</li>
4385   <li><a href="#hi">HI</a> &ndash; Hanging Indent
4386   <ul style="margin-left: -.5em; list-style-type: disc;">
4387     <li><a href="#num-lists">Recipe: a numbered list using hanging indents</a></li>
4388   </ul></li>
4389   <li><a href="#iq">IQ</a> &ndash; Quit indents, all</li>
4390   <li><a href="#iq">ILX</a> &ndash; Exit indent style left</li>
4391   <li><a href="#iq">IRX</a> &ndash; Exit indent style right</li>
4392   <li><a href="#iq">IBX</a> &ndash; Exit indent style both</li>
4393 </ul>
4394 </div>
4395
4396 <!-- -IL- -->
4397
4398 <div class="macro-id-overline">
4399 <h3 id="il" class="macro-id">Indent left</h3>
4400 </div>
4401
4402 <div class="box-macro-args">
4403 Macro: <b>IL</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
4404 </div>
4405 <p class="requires">
4406 &bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4407 </p>
4408
4409 <p>
4410 IL indents text from the left margin of the page, or if you&#8217;re
4411 in a tab, from the left edge of the tab.  Once IL is on, the left
4412 indent is applied uniformly to every subsequent line of text, even
4413 if you change the line length.
4414 </p>
4415
4416 <p>
4417 The first time you invoke <kbd>.IL</kbd>, you must give it a
4418 measure.  Subsequent invocations with a measure add to the previous
4419 measure.  A minus sign may be prepended to the argument to subtract
4420 from the current measure.  The
4421 <kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
4422 <a href="definitions.html#inlines">inline escape</a>
4423 may be used to specify a text-dependent measure, in which case no
4424 unit of measure is required.  For example,
4425 <br/>
4426 <span class="pre-in-pp">
4427   .IL \w'margarine'
4428 </span>
4429 indents text by the width of the word &#8220;margarine&#8221;.
4430 </p>
4431
4432 <p>
4433 With no argument, IL indents by its last active value.  See the
4434 <a href="#indents-explanation">brief explanation of how mom handles indents</a>
4435 for more details.
4436 </p>
4437
4438 <div class="box-tip">
4439 <p class="tip-top">
4440 <span class="note">Note:</span> Calling a tab (with
4441 <kbd><a href="#tab">.TAB &lt;n&gt;</a></kbd>)
4442 automatically cancels any active indents.
4443 </p>
4444
4445 <p class="tip-bottom">
4446 <span class="additional-note">Additional note:</span> Invoking IL
4447 automatically turns off IB.
4448 </p>
4449 </div>
4450
4451 <!-- -IR- -->
4452
4453 <div class="macro-id-overline">
4454 <h3 id="ir" class="macro-id">Indent right</h3>
4455 </div>
4456
4457 <div class="box-macro-args">
4458 Macro: <b>IR</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
4459 </div>
4460 <p class="requires">
4461 &bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4462 </p>
4463
4464 <p>
4465 IR indents text from the right margin of the page, or if
4466 you&#8217;re in a tab, from the end of the tab.
4467 </p>
4468
4469 <p>
4470 The first time you invoke <kbd>.IR</kbd>, you must give it a
4471 measure.  Subsequent invocations with a measure add to the previous
4472 indent measure.  A minus sign may be prepended to the argument to
4473 subtract from the current indent measure.  The
4474 <kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
4475 <a href="definitions.html#inlines">inline escape</a>
4476 may be used to specify a text-dependent measure, in which case no
4477 unit of measure is required.  For example, <br/>
4478 <span class="pre-in-pp">
4479   .IR \w'jello'
4480 </span>
4481 indents text by the width of the word &#8220;jello&#8221;.
4482 </p>
4483
4484 <p>
4485 With no argument, IR indents by its last active value.  See the
4486 <a href="#indents-explanation">brief explanation of how mom handles indents</a>
4487 for more details.
4488 </p>
4489
4490 <div class="box-tip">
4491 <p class="tip-top">
4492 <span class="note">Note:</span> Calling a tab (with
4493 <kbd><a href="#tab">.TAB &lt;n&gt;</a></kbd>)
4494 automatically cancels any active indents.
4495 </p>
4496
4497 <p class="tip-bottom">
4498 <span class="additional-note">Additional note:</span> Invoking IR
4499 automatically turns off IB.
4500 </p>
4501 </div>
4502
4503 <!-- -IB- -->
4504
4505 <div class="macro-id-overline">
4506 <h3 id="ib" class="macro-id">Indent both</h3>
4507 </div>
4508
4509 <div class="box-macro-args">
4510 Macro: <b>IB</b> <kbd class="macro-args">[ &lt;left measure&gt; &lt;right measure&gt; ]</kbd>
4511 </div>
4512 <p class="requires">
4513 &bull;&nbsp;The optional arguments require a <a href="definitions.html#unitofmeasure">unit of measure</a>
4514 </p>
4515
4516 <p>
4517 IB allows you to set or invoke a left and a right indent at the same
4518 time.
4519 </p>
4520
4521 <p>
4522 At its first invocation, you must supply a measure for both indents;
4523 at subsequent invocations when you wish to supply a measure, both
4524 must be given again.  As with IL and IR, the measures are added to
4525 the values previously passed to the macro.  Hence, if you wish to
4526 change just one of the values, you must give an argument of zero to
4527 the other.
4528 </p>
4529
4530 <p>
4531 A word of advice: If you need to manipulate left and right
4532 indents separately, use a combination of IL and IR instead of IB.
4533 You&#8217;ll save yourself a lot of grief.
4534 </p>
4535
4536 <p>
4537 A minus sign may be prepended to the arguments to subtract from
4538 their current values.  The
4539 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
4540 <a href="definitions.html#inlines">inline escape</a>
4541 may be used to specify text-dependent measures, in which case no
4542 unit of measure is required.  For example,
4543 <br/>
4544 <span class="pre-in-pp">
4545   .IB \w&#8217;margarine&#8217; \w'jello'
4546 </span>
4547 left indents text by the width of the word &#8220;margarine&#8221;
4548 and right indents by the width of &#8220;jello&#8221;.
4549 </p>
4550
4551 <p>
4552 Like IL and IR, IB with no argument indents by its last active
4553 values.  See the
4554 <a href="#indents-explanation">brief explanation of how mom handles indents</a>
4555 for more details.
4556 </p>
4557
4558 <div class="box-tip">
4559 <p class="tip-top">
4560 <span class="note">Note:</span> Calling a tab (with
4561 <kbd><a href="#tab">.TAB &lt;n&gt;</a></kbd>)
4562 automatically cancels any active indents.
4563 </p>
4564
4565 <p class="tip-bottom">
4566 <span class="additional-note">Additional note:</span> Invoking IB
4567 automatically turns off IL and IR.
4568 </p>
4569 </div>
4570
4571 <!-- -TI- -->
4572
4573 <div class="macro-id-overline">
4574 <h3 id="ti" class="macro-id">Temporary (left) indent</h3>
4575 </div>
4576
4577 <div class="box-macro-args">
4578 Macro: <b>TI</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
4579 </div>
4580 <p class="requires">
4581 &bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4582 </p>
4583
4584 <p>
4585 A temporary indent is one that applies only to the first line of
4586 text that comes after it.  Its chief use is indenting the first line
4587 of paragraphs.  (Mom&#8217;s
4588 <a href="docelement.html#pp">PP</a>
4589 macro, for example, uses a temporary indent.)
4590 </p>
4591
4592 <p>
4593 The first time you invoke <kbd>.TI</kbd>, you must give
4594 it a measure.  If you want to indent the first line of a paragraph
4595 by, say, 2
4596 <a href="definitions.html#em">ems</a>,
4597 do
4598 <br/>
4599 <span class="pre-in-pp">
4600   .TI 2m
4601 </span>
4602 Subsequent invocations of TI do not require you to supply a measure;
4603 mom keeps track of the last measure you gave it.
4604 </p>
4605
4606 <p>
4607 Because temporary indents are temporary, there&#8217;s no need to
4608 turn them off.
4609 </p>
4610
4611 <div class="box-important">
4612 <p class="tip">
4613 <span class="important">IMPORTANT:</span> Unlike IL, IR and IB,
4614 measures given to TI are NOT additive.  In the following example,
4615 the second <kbd>.TI&nbsp;2P</kbd> is exactly 2 picas.
4616 <br/>
4617 <span class="pre-in-pp" style="margin-bottom: -18px;">
4618   .TI 1P
4619   The beginning of a paragraph...
4620   .TI 2P
4621   The beginning of another paragraph...
4622 </span>
4623 </p>
4624 </div>
4625
4626 <!-- -HI- -->
4627
4628 <div class="macro-id-overline">
4629 <h3 id="hi" class="macro-id">Hanging indent</h3>
4630 </div>
4631
4632 <div class="box-macro-args">
4633 Macro: <b>HI</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
4634 </div>
4635 <p class="requires">
4636 &bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
4637 </p>
4638
4639 <p>
4640 A hanging indent looks like this:
4641 <br/>
4642 <span class="pre-in-pp">
4643   The thousand injuries of Fortunato I had borne as best I
4644     could, but when he ventured upon insult, I vowed
4645     revenge.  You who so well know the nature of my soul
4646     will not suppose, however, that I gave utterance to a
4647     threat, at length I would be avenged...
4648 </span>
4649 The first line of text &#8220;hangs&#8221; outside the left margin.
4650 </p>
4651
4652 <p>
4653 In order to use hanging indents, you must first have a left indent
4654 active (set with either
4655 <kbd><a href="#il">.IL</a></kbd>
4656 or
4657 <kbd><a href="#ib">.IB</a></kbd>).
4658 Mom will not hang text outside the left margin set with
4659 <kbd><a href="#l-margin">.L_MARGIN</a></kbd>
4660 or outside the left margin of a tab.
4661 </p>
4662
4663 <p>
4664 The first time you invoke <kbd>.HI</kbd>, you must give
4665 it a measure.  If you want the first line of a paragraph to hang by,
4666 say, 1 pica, do
4667 <br/>
4668 <span class="pre-in-pp">
4669   .IL 1P
4670   .HI 1P
4671 </span>
4672 Subsequent invocations of HI do not require you to supply a measure;
4673 mom keeps track of the last measure you gave it.
4674 </p>
4675
4676 <p>
4677 Generally speaking, you should invoke HI immediately prior to the
4678 line you want hung (ie without any intervening
4679 <a href="definitions.html#controllines">control lines</a>).
4680 And because hanging indents affect only one line, there&#8217;s no
4681 need to turn them off.
4682 </p>
4683
4684 <div class="box-important">
4685 <p class="tip">
4686 <span class="important">IMPORTANT:</span> Unlike IL, IR and IB,
4687 measures given to HI are NOT additive.  Each time you pass a measure
4688 to HI, the measure is treated literally.
4689 </p>
4690 </div>
4691
4692 <h4 id="num-lists" class="macro-id">Recipe: A numbered list using hanging indents</h4>
4693
4694 <div class="box-tip" style="margin-top: -.5em; margin-bottom: -.5em;">
4695 <p class="tip">
4696 <span class="note">Note:</span> mom has macros for setting lists (see
4697 <a href="docelement.html#list-intro">Nested lists</a>).
4698 This recipe exists to demonstrate the use of hanging indents only.
4699 </p>
4700 </div>
4701
4702 <p style="margin-top: 1.5em;">
4703 <span class="pre-in-pp">
4704   .PAGE 8.5i 11i 1i 1i 1i 1i
4705   .FAMILY  T
4706   .FT      R
4707   .PT_SIZE 12
4708   .LS      14
4709   .JUSTIFY
4710   .KERN
4711   .SS 0
4712   .IL \w'\0\0.'
4713   .HI \w'\0\0.'
4714   1.\0The most important point to be considered is whether the
4715   answer to the meaning of Life, the Universe, and Everything
4716   really is 42.  We have no-one&#8217;s word on the subject except
4717   Mr. Adams&#8217;.
4718   .HI
4719   2.\0If the answer to the meaning of Life, the Universe,
4720   and Everything is indeed 42, what impact does this have on
4721   the politics of representation?  42 is, after all not a
4722   prime number.  Are we to infer that prime numbers don&#8217;t
4723   deserve equal rights and equal access in the universe?
4724   .HI
4725   3.\0If 42 is deemed non-exclusionary, how do we present it
4726   as the answer and, at the same time, forestall debate on its
4727   exclusionary implications?
4728 </span>
4729 First, we invoke a left indent with a measure equal to the width of
4730 2
4731 <a href="definitions.html#figurespace">figures spaces</a>
4732 plus a period (using the
4733 <a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
4734 inline escape).  At this point, the left indent is active; text
4735 afterwards would normally be indented.  However, we invoke a
4736 hanging indent of exactly the same width, which hangs the first
4737 line (and first line only!) to the left of the indent by the
4738 same distance (in this case, that means &#8220;out to the left
4739 margin&#8221;).  Because we begin the first line with a number,
4740 a period, and a figure space, the actual text (&#8220;The most
4741 important point...&#8221;) starts at exactly the same spot as the
4742 indented lines that follow.
4743 </p>
4744
4745 <p>
4746 Notice that subsequent invocations of <kbd>.HI</kbd> don&#8217;t
4747 require a measure to be given.
4748 </p>
4749
4750 <p>
4751 Paste the example above into a file and preview it with
4752 <br/>
4753 <span class="pre-in-pp">
4754   pdfmom filename.mom &gt; filename.pdf
4755 </span>
4756 to see hanging indents in action.
4757 </p>
4758
4759 <!-- -IX- -->
4760
4761 <div class="macro-id-overline">
4762 <h3 id="iq" class="macro-id">Quitting indents</h3>
4763 </div>
4764
4765 <div class="box-macro-args">
4766 Macro: <b>IQ</b> <kbd class="macro-args">[ CLEAR ]</kbd> (quit any/all indents &mdash; see IMPORTANT NOTE)
4767 </div>
4768 <br/>
4769
4770 Macro: <b>ILX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Left)
4771 <br/>
4772
4773 Macro: <b>IRX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Right)
4774 <br/>
4775
4776 Macro: <b>IBX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Both)
4777
4778 <div class="box-important">
4779 <p class="tip-top">
4780 <span class="important">IMPORTANT NOTE:</span> The original macro
4781 for quitting all indents was IX.  This usage has been deprecated in
4782 favour of IQ.  IX will continue to behave as before, but mom will
4783 issue a warning to stderr indicating that you should update your
4784 documents.
4785 </p>
4786
4787 <p class="tip-bottom">
4788 As a consequence of this change, ILX, IRX and IBX may now also be
4789 invoked as ILQ, IRQ and IBQ.  Both forms are acceptable.
4790 </p>
4791 </div>
4792
4793 <p>
4794 Without an argument, the macros to quit indents merely restore your
4795 original margins and line length.  The measures stored in the indent
4796 macros themselves are saved so you can call them again without
4797 having to supply a measure.
4798 </p>
4799
4800 <p>
4801 If you pass these macros the optional argument <kbd>CLEAR</kbd>,
4802 they not only restore your original left margin and line length, but
4803 also clear any values associated with a particular indent style.
4804 The next time you need an indent of the same style, you have to
4805 supply a measure again.
4806 </p>
4807
4808 <p>
4809 <kbd>.IQ&nbsp;CLEAR</kbd>, as you&#8217;d suspect,
4810 quits and clears the values for all indent styles at once.
4811 </p>
4812
4813 <div class="rule-long"><hr/></div>
4814
4815 <!-- Navigation links -->
4816 <table style="width: 100%; margin-top: 12px;">
4817 <tr>
4818   <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
4819   <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
4820   <td style="width: 33%; text-align: right;"><a href="goodies.html#top">Next: Goodies</a></td>
4821 </tr>
4822 </table>
4823
4824 </div>
4825
4826 <div class="bottom-spacer"><br/></div>
4827
4828 </body>
4829 </html>
4830 <!-- vim: fileencoding=utf-8: nomodified: -->