Import of mom
[s-roff.git] / contrib / mom / momdoc / typesetting.html
blob6bce803a2a5432d0c193d1cc97b7070fac74f259
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
4 <title>Mom -- Typesetting Macros</title>
5 </head>
6 <body bgcolor="#dfdfdf">
8 <!====================================================================>
10 <a href="goodies.html#TOP">Next</a>&nbsp;&nbsp;
11 <a href="definitions.html#TOP">Prev</a>&nbsp;&nbsp;
12 <a href="toc.html">Back to Table of Contents</a>
14 <a name="TOP"></a>
15 <a name="MACROS_TYPESETTING">
16 <h1 align="center"><u>THE TYPESETTING MACROS</u></h1>
17 </a>
19 <a href="#INTRO_MACROS_TYPESETTING">Introduction to the typesetting macros</a>
20 <br>
21 <ul>
22 <li><strong>PAGE SETUP</strong>
23 <ul>
24 <li><a href="#INTRO_SETUP">Introduction to Page Setup</a>
25 <li><a href="#INDEX_SETUP">List of macros</a>
26 </ul>
27 <li><strong>BASIC TYPESETTING PARAMETERS</strong>
28 <ul>
29 <li><a href="#INTRO_BASIC_PARAMS">Introduction to Basic Parameters</a>
30 <li><a href="#INDEX_BASIC">List of macros</a>
31 </ul>
32 <li><strong>JUSTIFYING, QUADDING, FILLING, BREAKING LINES</strong>
33 <ul>
34 <li><a href="#INTRO_JUST_QUAD_FILL">Introduction to justify, quad, fill, break</a>
35 <li><a href="#INDEX_JUST">List of macros</a>
36 </ul>
37 <li><strong>TYPOGRAPHIC REFINEMENTS</strong>
38 <ul>
39 <li><a href="#INTRO_REFINEMENTS">Introduction to typographic refinements</a>
40 <li><a href="#INDEX_REFINEMENTS">List of macros</a>
41 </ul>
42 <li><strong>TYPE MODIFICATIONS -- pseudo italic, bold, condense, extend</strong>
43 <ul>
44 <li><a href="#INTRO_MODIFICATIONS">Introduction to type modifications</a>
45 <li><a href="#INDEX_MODIFICATIONS">List of macros</a>
46 </ul>
47 <li><strong>VERTICAL MOVEMENTS</strong>
48 <ul>
49 <li><a href="#INTRO_ALDRLD">Introduction to vertical movements</a>
50 <li><a href="#INDEX_ALDRLD">List of macros</a>
51 </ul>
52 <li><strong>TABS</strong>
53 <ul>
54 <li><a href="#INTRO_TABS">Introduction to tabs</a>
55 <li><a href="#TYPESETTING_TABS">Typesetting tabs</a>
56 <li><a href="#STRING_TABS">String tabs</a>
57 <li><a href="#INDEX_TABS">List of macros</a>
58 </ul>
59 <li><strong>MULTI-COLUMNS</strong>
60 <ul>
61 <li><a href="#INTRO_MULTI_COLUMNS">Introduction to multi-columns</a>
62 <li><a href="#INDEX_MULTI_COLUMNS">List of macros</a>
63 </ul>
64 <li><strong>INDENTS</strong>
65 <ul>
66 <li><a href="#INTRO_INDENTS">Introduction to indents</a>
67 <li><a href="#INDEX_INDENTS">List of macros</a>
68 </ul>
69 <li><strong>GOODIES</strong>
70 <ul>
71 <li><a href="goodies.html#INTRO_GOODIES">Introduction to goodies</a>
72 <li><a href="goodies.html#INDEX_GOODIES">List of macros</a>
73 </ul>
74 <li><strong>INLINE ESCAPES</strong>
75 <ul>
76 <li><a href="inlines.html#INLINE_ESCAPES_INTRO">Introduction to inline escapes</a>
77 <li><a href="inlines.html#INDEX_INLINES">List of inline escapes</a>
78 </ul>
79 </ul>
80 <hr>
82 <h2><a name="INTRO_MACROS_TYPESETTING"><u>Introduction to the typesetting macros</u></a></h2>
84 <strong>Mom</strong>'s typesetting macros provide access to
85 groff's typesetting capabilities. Aside from controlling basic
86 type parameters (family, font, line length, point size, leading),
87 <strong>mom</strong>'s macros fine-tune wordspacing, letterspacing,
88 kerning, hyphenation, and so on. In addition, <strong>mom</strong>
89 has true typesetting tabs, string tabs, multiple indent styles,
90 line padding, and a batch of other goodies.
91 <p>
92 In some cases, <strong>mom</strong>'s typesetting macros merely imitate
93 groff primitives. In others, they approach typesetting concerns in
94 conceptually new ways (for groff, at least). This should present no
95 problem for newcomers to groff who are learning <strong>mom</strong>.
96 Old groff hands should be careful. Just because it looks like a
97 duck and walks like a duck does not, in this instance, mean that it
98 is a duck. When using <strong>mom</strong>, stay away from groff
99 primitives if <strong>mom</strong> provides a macro that accomplishes
100 the same thing.
102 <strong>Mom</strong>'s typesetting macros can be used as a standalone
103 package, independent of the
104 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
105 With them, you can typeset on-the-fly. Document covers, your best
106 friend's résumé, a poster for a lost dog -- none of these requires
107 structured document processing (page headers, paragraphs, heads,
108 footnotes, etc). What they do demand is precise control over every
109 element on the page. The typesetting macros give you that control.
110 <br>
111 <hr>
113 <!====================================================================>
115 <a name="INTRO_SETUP"></a>
117 <a name="PAGE_MARGINS">
118 <h2><u>Page setup: paper size and page margins</u></h2>
119 </a>
121 The page setup macros establish the physical dimensions of your
122 page and the margins you want it to have. <strong>Groff</strong>
123 has defaults for these, but I recommend setting them at the top
124 of your files anyway unless you're using <strong>mom</strong>'s
125 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
126 and are content with her defaults.
129 <a href="#PAPER">PAPER</a>
130 macro provides a shortcut for setting the page to the correct
131 dimensions for letter, legal, and A4 printer sheets. The
132 <a href="#PAGE">PAGE</a>
133 macro provides a convenient way of setting the page dimensions and
134 some or all of the page margins with a single macro.
135 <br>
137 <a name="INDEX_SETUP">
138 <h3><u>Page setup macros list</u></h3>
139 </a>
141 <ul>
142 <li><a href="#PAGEWIDTH">PAGEWIDTH</a> (page width)
143 <li><a href="#PAGELENGTH">PAGELENGTH</a> (page length)
144 <li><a href="#PAPER">PAPER</a> (common paper sizes)
145 <li><a href="#L_MARGIN">L_MARGIN</a> (left margin)
146 <li><a href="#R_MARGIN">R_MARGIN</a> (right margin)
147 <li><a href="#T_MARGIN">T_MARGIN</a> (top margin)
148 <li><a href="#B_MARGIN">B_MARGIN</a> (bottom margin)
149 <li><a href="#PAGE">PAGE</a> (page dimensions and margins all in one fell swoop)
150 <li><a href="#NEWPAGE">NEWPAGE</a> (start a new page)
151 </ul>
153 <!---PAGEWIDTH--->
155 <hr width="66%" align="left">
156 <a name="PAGEWIDTH"><h3><u>Page width</u></h3></a>
157 <br>
158 Macro: <strong>PAGEWIDTH</strong> <var>&lt;width of printer sheet&gt;</var>
159 <br>
160 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
163 The argument to <strong>PAGEWIDTH</strong> is the width of your
164 printer sheet. <strong>PAGEWIDTH</strong> requires a unit of measure.
165 Decimal fractions are allowed. Hence, to tell <strong>mom</strong>
166 the width of your printer sheet is 8-1/2 inches, you enter
168 <pre>
169 .PAGEWIDTH 8.5i
170 </pre>
172 <!---PAGELENGTH--->
174 <hr width="66%" align="left">
175 <a name="PAGELENGTH"><h3><u>Page length</u></h3></a>
176 <br>
177 Macro: <strong>PAGELENGTH</strong> <var>&lt;length of printer sheet&gt;</var>
178 <br>
179 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
182 <strong>PAGELENGTH</strong> tells <strong>mom</strong> how long your
183 printer sheet is. It works just like
184 <strong>PAGEWIDTH</strong>. Therefore, to tell
185 <strong>mom</strong> your printer sheet is 11 inches long, you
186 enter
188 <pre>
189 .PAGELENGTH 11i
190 </pre>
192 <!---PAPER--->
194 <hr width="66%" align="left">
195 <a name="PAPER"><h3><u>Paper</u></h3></a>
196 <br>
197 Macro: <strong>PAPER</strong> <var>&lt;paper type&gt;</var>
200 <strong>PAPER</strong> provides a convenient way to set the page
201 dimensions for some common printer sheet sizes. <var>&lt;paper
202 type&gt;</var> can be one of:
204 <pre>
205 LETTER
206 LEGAL
207 STATEMENT
208 TABLOID
209 LEDGER
210 FOLIO
211 QUARTO
212 10x14
213 EXECUTIVE
219 </pre>
221 Say, for example, you have A4-sized sheets in your printer.
222 It's shorter (and easier) to enter
224 <pre>
225 .PAPER A4
226 </pre>
228 than to remember the correct dimensions and enter
230 <pre>
231 .PAGEWIDTH 595p
232 .PAGELENGTH 842p
233 </pre>
235 <!---L_MARGIN--->
237 <hr width="66%" align="left">
238 <a name="L_MARGIN"><h3><u>Left margin</u></h3></a>
239 <br>
240 Macro: <strong>L_MARGIN</strong> <var>&lt;left margin&gt;</var>
241 <br>
242 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
245 <strong>L_MARGIN</strong> establishes the distance from the left edge
246 of the printer sheet at which you want your type to start. It may
247 be used any time, and remains in effect until you enter a new value.
249 <a href="#IL">Left indents</a>
251 <a href="#TABS">tabs</a>
252 are calculated from the value you pass to <strong>L_MARGIN</strong>,
253 hence it's always a good idea to invoke it before starting any serious
254 typesetting. A unit of measure is required. Decimal fractions are
255 allowed. Therefore, to set the left margin at 3 picas (1/2 inch),
256 you'd enter either
258 <pre>
259 .L_MARGIN 3P
260 &nbsp;&nbsp;or
261 .L_MARGIN .5i
262 </pre>
264 If you use the macros
265 <a href="#PAGE">PAGE</a>,
266 <a href="#PAGEWIDTH">PAGEWIDTH</a>
268 <a href="#PAPER">PAPER</a>
269 without invoking <strong>L_MARGIN</strong> (either before
270 or afterwards), <strong>mom</strong> automatically sets
271 </strong>L_MARGIN</strong> to 1 inch.
273 <strong>NOTE:</strong> L_MARGIN behaves in a special way when you're
274 using the
275 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
277 <a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a>
278 for an explanation.
279 <br>
281 <!---R_MARGIN--->
283 <hr width="66%" align="left">
284 <a name="R_MARGIN"><h3><u>Right margin</u></h3></a>
285 <br>
286 Macro: <strong>R_MARGIN</strong> <var>&lt;right margin&gt;</var>
287 <br>
288 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
291 <strong>R_MARGIN</strong> establishes the amount of space you
292 want between the end of typeset lines and the right hand edge
293 of the printer sheet. In other words, it sets the line length.
294 <strong>R_MARGIN</strong> requires a unit of measure. Decimal
295 fractions are allowed.
297 The <a href="#LINELENGTH">line length macro</a> (<strong>LL</strong>) can
298 be used in place of <strong>R_MARGIN</strong>. In either case, the
299 last one invoked sets the line length. The choice of which to use is
300 up to you. In some instances, you may find it easier to think of a
301 section of type as having a right margin. In others, giving a line
302 length may make more sense.
304 For example, if you're setting a page of type you know should have
305 6-pica margins left and right, it makes sense to enter a left and
306 right margin, like this:
308 <pre>
309 .L_MARGIN 6P
310 .R_MARGIN 6P
311 </pre>
313 That way, you don't have to worry about calculating the line
314 length. On the other hand, if you know the line length for a
315 patch of type should be 17 picas and 3 points, entering the line
316 length with <strong>LL</strong> is much easier than calculating the
317 right margin.
319 <pre>
320 .LL 17P+3p
321 </pre>
323 If you use the macros
324 <a href="#PAGE">PAGE</a>,
325 <a href="#PAGEWIDTH">PAGEWIDTH</a>
327 <a href="#PAPER">PAPER</a>
328 without invoking <strong>R_MARGIN</strong> afterwards,
329 <strong>mom</strong> automatically sets <strong>R_MARGIN</strong>
330 to 1 inch. If you set a line length after these macros (with
331 <a href="#LINELENGTH">LL</a>),
332 the line length calculated by <strong>R_MARGIN</strong> is, of course,
333 overridden.
335 <strong>IMPORTANT: R_MARGIN</strong>, if used, MUST come after
336 <a href="#PAPER">PAPER</a>,
337 <a href="#PAGEWIDTH">PAGEWIDTH</a>,
338 <a href="#L_MARGIN">L_MARGIN</a>
339 and/or
340 <a href="#PAGE">PAGE</a>
341 (if a right margin isn't given to <strong>PAGE</strong>).
342 The reason is that <strong>R_MARGIN</strong> calculates line
343 length from the overall page dimensions and the left margin.
344 Obviously, it can't make the calculation if it doesn't know the page
345 width and the left margin.
347 <strong>NOTE:</strong> R_MARGIN behaves in a special way
348 when you're using the
349 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
351 <a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a>
352 for an explanation.
353 <br>
355 <!---T_MARGIN--->
357 <hr width="66%" align="left">
358 <a name="T_MARGIN"><h3><u>Top margin</u></h3></a>
359 <br>
360 Macro: <strong>T_MARGIN</strong> <var>&lt;top margin&gt;</var>
361 <br>
362 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
365 <strong>T_MARGIN</strong> establishes the distance from the top of
366 the printer sheet at which you want your type to start. It requires
367 a unit of measure, and decimal fractions are allowed. To set a top
368 margin of 2-1/2 centimeters, you'd enter
370 <pre>
371 .T_MARGIN 2.5c
372 </pre>
374 <strong>T_MARGIN</strong> calculates the vertical position of the
375 first line of type on a page by treating the top edge of the printer
376 sheet as a <a href="definitions.html#TERMS_BASELINE">baseline</a>. Therefore,
378 <pre>
379 .T_MARGIN 1.5i
380 </pre>
382 puts the baseline of the first line of type 1-1/2 inches beneath
383 the top of the page.
385 <strong>IMPORTANT:</strong> <strong>T_MARGIN</strong> does two
386 things: it establishes the top margin for pages that come after
387 it AND it moves to that position on the current page. Therefore,
388 <strong>T_MARGIN</strong> should only be used at the top of a file
389 (prior to entering text) or after
390 <a href="#NEWPAGE">NEWPAGE</a>,
391 like this:
393 <pre>
394 .NEWPAGE
395 .T_MARGIN 6P
396 &lt;text&gt;
397 </pre>
399 <strong>NOTE:</strong> <strong>T_MARGIN</strong> means something
400 slightly different when you're using the
401 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
403 <a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a>
404 for an explanation.
405 <br>
407 <!---B_MARGIN--->
409 <hr width="66%" align="left">
410 <a name="B_MARGIN"><h3><u>Bottom margin</u></h3></a>
411 <br>
412 Macro: <strong>B_MARGIN</strong> <var>&lt;bottom margin&gt;</var>
413 <br>
414 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
417 <strong>B_MARGIN</strong> sets a nominal position at the bottom
418 of the page beyond which you don't want your type to go. When the
419 bottom margin is reached, <strong>mom</strong> starts a new page.
420 <strong>B_MARGIN</strong> requires a unit of measure. Decimal
421 fractions are allowed. To set a nominal bottom margin of 3/4 inch,
422 enter
424 <pre>
425 .B_MARGIN .75i
426 </pre>
428 Obviously, if you haven't spaced the type on your pages so that
429 the last lines fall perfectly at the bottom margin, the margin will
430 vary from page to page. Usually, but not always, the last line of
431 type that fits on a page <em>before</em> the bottom margin causes
432 <strong>mom</strong> to start a new page.
434 Occasionally, owing to a peculiarity in <strong>groff</strong>,
435 an extra line will fall below the nominal bottom margin. If you're
436 using the
437 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>,
438 this is unlikely to happen; the document processing macros are very
439 hard-nosed about aligning bottom margins.
441 <strong>NOTE:</strong> The meaning of <strong>B_MARGIN</strong> is
442 slightly different when you're using the document processing macros.
444 <a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a>
445 for an explanation.
446 <br>
448 <!---PAGE--->
450 <hr width="66%" align="left">
451 <a name="PAGE"><h3><u>Page</u></h3></a>
452 <br>
453 Macro: <strong>PAGE</strong>
454 <var>&lt;width&gt;&nbsp;[ &lt;length&gt; [ &lt;lm&gt; [ &lt;rm&gt; [ &lt;tm&gt; [ &lt;bm&gt; ] ] ] ] ]</var>
455 <br>
456 <em>*All arguments require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
459 <strong>PAGE</strong> lets you establish paper dimensions and page
460 margins with a single macro. The only required argument is page width.
461 The rest are optional, <strong>but they must appear in order and you can't
462 skip over any.</strong> <var>&lt;lm&gt;, &lt;rm&gt;, &lt;tm&gt;</var>
463 and <var>&lt;bm&gt;</var> refer to the left, right, top and bottom
464 margins respectively.
466 Assuming your page dimensions are 11 inches by 17 inches, and that's
467 all you want to set, enter
469 <pre>
470 .PAGE 11i 17i
471 </pre>
473 If you want to set the left margin as well, say, at 1 inch,
474 <strong>PAGE</strong> would look like this:
476 <pre>
477 .PAGE 11i 17i 1i
478 </pre>
480 Now suppose you also want to set the top margin, say, at 1-1/2
481 inches. <var>&lt;tm&gt;</var> comes after <var>&lt;rm&gt;</var>
482 in the optional arguments, but you can't skip over any arguments,
483 therefore to set the top margin, you must also give a right margin.
484 The <strong>PAGE</strong> macro would look like this:
486 <pre>
487 .PAGE 11i 17i 1i 1i 1.5i
489 required right___| |___top margin
490 margin
491 </pre>
493 Clearly, <strong>PAGE</strong> is best used when you want a convenient
494 way to tell <strong>mom</strong> just the dimensions of your printer
495 sheet (width and length), or when you want to tell her everything
496 about the page (dimensions and all the margins), for example
498 <pre>
499 .PAGE 8.5i 11i 45p 45p 45p 45p
500 </pre>
502 This sets up an 8-1/2 by 11 inch page with margins of 45 points
503 (5/8-inch) all around.
505 <strong>NOTE:</strong> Only use <strong>PAGE</strong> at the
506 start of a document, before entering any text. And remember,
507 when you're using the
508 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>,
509 top margin and bottom margin mean something slightly different than
510 when you're using just the typesetting macros (see
511 <a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a>).
513 Additionally, if you invoke <strong>PAGE</strong> with a top margin
514 argument, any macros you invoke after <strong>PAGE</strong> will
515 almost certainly move the
516 <a href="definitions.html#TERMS_BASELINE">baseline</a>
517 of the first line of text down by one linespace. To compensate, do
519 <pre>
520 .RLD 1v
521 </pre>
523 immediately before entering any text, or, if it's feasible, make
524 <strong>PAGE</strong> the last macro you invoke prior to entering text.
525 <br>
527 <!---NEWPAGE--->
529 <hr width="66%" align="left">
530 <a name="NEWPAGE"><h3><u>Start a new page</u></h3></a>
531 <br>
532 Macro: <strong>NEWPAGE</strong>
535 Whenever you want to start a new page, use <strong>NEWPAGE</strong>, by
536 itself with no argument. <strong>Mom</strong> will finish up
537 processing the current page and move you to the top of a new one
538 (subject to the top margin set with
539 <a href="#T_MARGIN">T_MARGIN</a>.
541 <strong>Experts:</strong> <strong>NEWPAGE</strong> is an alias of
542 <strong>.bp</strong>. You can use either, or mix 'n' match with
543 impunity.
544 <br>
545 <hr>
547 <!====================================================================>
549 <a name="INTRO_BASIC_PARAMS"></a>
551 <a name="BASIC_PARAMS">
552 <h2><u>Basic Typesetting Parameters</u></h2>
553 </a>
555 Basic parameter macros deal with the fundamental requirements
556 for setting type: family, font, point size, leading and line length.
558 If you're using the typesetting macros only, the arguments passed
559 to the basic parameter macros remain in effect until you change them.
560 The document processing macros handle things differently. See
561 <a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a>
562 for an explanation.
563 <br>
565 <a name="INDEX_BASIC"><h3><u>Basic parameter macros list</u></h3></a>
566 <ul>
567 <li><a href="#FAMILY">FAMILY</a> (type family)
568 <li><a href="#FONT">FONT</a> (font)
569 <li><a href="#PS">PS</a> (point size of type)
570 <li><a href="#LEADING">LS</a> (line spacing/leading)
571 <li><a href="#AUTOLEAD">AUTOLEAD</a> (automatic line spacing)
572 <li><a href="#LINELENGTH">LL</a> (line length)
573 </ul>
575 <!---FAMILY--->
577 <hr width="66%" align="left">
578 <a name="FAMILY"><h3><u>Type family</u></h3></a>
579 <br>
580 Macro: <strong>FAMILY</strong> <var>&lt;family&gt;</var>
581 <br>
582 Alias: <strong>FAM</strong>
585 <strong>FAMILY</strong> takes one argument: the name of the type family
586 you want. Groff comes with a number of PostScript families, each
587 identified by a 1-, 2- or 3-letter mnemonic. The standard families
588 are:
589 <table valign="baseline" summary="family">
590 <tr><td width="15"><td><strong>A</strong><td>Avant Garde
591 <tr><td><td><strong>BM</strong> <td>Bookman
592 <tr><td><td><strong>H</strong><td>Helvetica
593 <tr><td><td><strong>N</strong><td>New Century Schoolbook
594 <tr><td><td><strong>P</strong><td>Palatino
595 <tr><td><td><strong>T</strong><td>Times Roman</td></tr>
596 </table>
598 The argument you pass to <strong>FAMILY</strong> is the identifier at
599 left above. For example, if you want Helvetica, enter
601 <pre>
602 .FAMILY H
603 </pre>
605 <strong>NOTE:</strong> The <a href="#FONT">font macro</a>
606 (<strong>FT</strong>) lets you to specify both the type family
607 and the desired font with a single macro. While this saves a few
608 keystrokes, I recommend using <strong>FAMILY</strong> for family,
609 and <strong>FT</strong> for font, except where doing so is genuinely
610 inconvenient.
612 <strong>Experts:</strong>
613 <br>
614 If you add other PostScript families to groff's /font/devps directory,
615 be sure to follow the groff standard for naming families and fonts.
616 For example, if you add the Garamond family, name the font files
618 <pre>
619 GARAMONDR
620 GARAMONDI
621 GARAMONDB
622 GARAMONDBI
623 </pre>
625 GARAMOND then becomes a legal family name you can pass to
626 <strong>FAMILY</strong>. (You could, of course, shorten GARAMOND to just
627 G, or GD.) R, I, B, and BI after GARAMOND are the roman, italic,
628 bold and bold-italic fonts respectively.
629 <br>
631 <!---FT--->
633 <hr width="66%" align="left">
634 <a name="FONT"><h3><u>Font</u></h3></a>
635 <br>
636 Macro: <strong>FT</strong> <var>R | I | B | BI</var>
639 <strong>FT</strong> takes one of four possible arguments specifying the
640 desired font:
641 <table valign="baseline" summary="font">
642 <tr><td width="15"><td><strong>R</strong><td> = <td>roman
643 <tr><td><td><strong>I</strong><td> = <td>italic
644 <tr><td><td><strong>B</strong><td> = <td>bold
645 <tr><td><td><strong>BI</strong><td> = <td>bold-italic</td></tr>
646 </table>
648 For example, if your family is Helvetica, entering
650 <pre>
651 .FT B
652 </pre>
654 will give you the Helvetica bold font. If your family were
655 Palatino, you'd get the Palatino bold font.
657 You can specify both family and font in the <strong>FT</strong> macro.
658 As an example,
660 <pre>
661 .FT HB
662 </pre>
664 sets the font to Helvetica bold. I strongly recommend keeping
665 family and font separate.
667 Fonts can also be changed inline. See
668 <a href="inlines.html#INLINE_FONTS_MOM">Inline Escapes, font control</a>.
669 <br>
671 <!---PS--->
673 <hr width="66%" align="left">
674 <a name="PS"><h3><u>Point size of type</u></h3></a>
675 <br>
676 Macro: <strong>PS</strong> <var>&lt;size of type in points&gt;</var>
677 <br>
678 <em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
681 <strong>PS</strong> (Point Size) takes one argument: the size of type
682 in points. Unlike most other macros that establish the size or measure
683 of something, <strong>PS</strong> does not require that you supply a
684 unit of measure since it's a near universal convention that type size
685 is measured in points. Therefore, to change the type size to, say,
686 11 points, enter
688 <pre>
689 .PS 11
690 </pre>
692 Point sizes may be fractional (e.g. 10.25 or 12.5).
694 You can prepend a plus or a minus sign to the argument to
695 <strong>PS</strong>, in which case the point size will be changed by +
696 or - the original value. For example, if the point size is 12,
697 and you want 14, you can do
699 <pre>
700 .PS +2
701 </pre>
703 then later reset it to 12 with
705 <pre>
706 .PS -2
707 </pre>
709 The size of type can also be changed inline. See
710 <a href="inlines.html#INLINE_SIZE_MOM">Inline Escapes, changing point size</a>.
711 <br>
713 <!---LS--->
715 <hr width="66%" align="left">
716 <a name="LEADING"><h3><u>Line spacing/leading</u></h3></a>
717 <br>
718 Macro: <strong>LS</strong> <var>&lt;distance between lines&gt;</var>
719 <br>
720 <em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
723 <strong>LS</strong> (Line Space) takes one argument: the distance you want, typically
724 in points, from baseline to baseline of type. The argument may
725 be fractional (e.g. 12.25 or 14.5). Like <strong>PS</strong>,
726 <strong>LS</strong> does not require a unit of measure, since
727 <a href="definitions.html#TERMS_LEADING">leading</a>
728 is most often given in points. Therefore, to set the linespace to
729 14 points, you would enter
731 <pre>
732 .LS 14
733 </pre>
735 However, if you wish, you may specify a unit of measure by appending
736 it directly to the argument passed to <strong>LS</strong>. For example,
737 if you want a linespace of 1/4 of an inch, enter
739 <pre>
740 .LS .25i
741 </pre>
743 You can prepend a plus or a minus sign to the argument to
744 <strong>LS</strong>, in which case the line spacing will be changed
745 by + or - the original value. For example, if the line spacing is
746 14 points, and you want 17 points, you can do
748 <pre>
749 .LS +3
750 </pre>
752 then later reset it to 14 points with
754 <pre>
755 .LS -3
756 </pre>
758 <strong>Experts:</strong>
759 <br>
760 <strong>LS</strong> should not be confused with the groff primitive
761 <strong>ls</strong>. <strong>LS</strong> acts like <strong>vs</strong>.
762 <strong>mom</strong> does not provide a macro analogous to
763 <strong>ls</strong>.
764 <br>
766 <!---AUTOLEAD--->
768 <hr width="66%" align="left">
769 <a name="AUTOLEAD"><h3><u>Automatic line spacing</u></h3></a>
770 <br>
771 Macro: <strong>AUTOLEAD</strong> <var>&lt;amount of automatic leading&gt; [FACTOR]</var>
772 <br>
773 <em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
776 Without the <strong>FACTOR</strong> argument, <strong>AUTOLEAD</strong>
777 calculates the linespace for you by adding its argument to the
778 current point size of type. All subsequent <strong>PS</strong>
779 requests automatically update the linespacing by the autolead amount.
781 Used in this way, <strong>AUTOLEAD</strong> does not require a unit
782 of measure; points is assumed. However, you may use an alternate
783 unit of measure by appending it to the argument. The argument may
784 be a decimal fraction (e.g. .5 or 2.75).
786 As an example, if your current point size of type is 12, entering
788 <pre>
789 .AUTOLEAD 2
790 </pre>
792 changes the linespace to 14 points, regardless any linespacing
793 already in effect. From here on, every change to the size of type
794 (with <strong>PS</strong>, not
795 <a href="definitions.html#TERMS_INLINES">inline</a>)
796 changes the linespace as well. If you decrease the type size to 9
797 points, the leading decreases to 11 points. If you increase the type
798 size to 16 points, the leading increases to 18 points.
800 Automatic updating of the linespacing continues until you enter a
801 &quot;manual&quot; line space value with <strong>LS</strong>.
803 If you give <strong>AUTOLEAD</strong> the optional
804 <strong>FACTOR</strong> argument, <strong>AUTOLEAD</strong>
805 calculates the line space as a factor of the
806 <a href="definitions.html#TERMS_NUMERICARGUMENT">numeric argument</a>
807 you gave <strong>AUTOLEAD</strong>. For example, if your point
808 size is 12,
810 <pre>
811 .AUTOLEAD 1.125 FACTOR
812 </pre>
813 sets the leading at 13.5 points. If you change the point size
814 to 14, the leading automatically changes to 15.75 (14 x 1.125).
816 <strong>NOTE:</strong> There's no need to prepend a plus sign (+)
817 to <strong>AUTOLEAD</strong>'s argument, although you may do so if you
818 wish.
819 <br>
821 <!---LL--->
823 <hr width="66%" align="left">
824 <a name="LINELENGTH"><h3><u>Line length</u></h3></a>
825 <br>
826 Macro: <strong>LL</strong> <var>&lt;line length&gt;</var>
827 <br>
828 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
831 <strong>LL</strong> (Line Length) takes one argument: the distance from the
832 left margin of the page to the maximum allowable point on the
833 right at which groff should place type. The line length, in
834 other words, as the macro suggests.
836 <strong>LL</strong> requires a unit of measure. Therefore, to set the line
837 length to 39 picas, you would enter
839 <pre>
840 .LL 39P
841 </pre>
843 As with other macros that require a unit of measure, the argument to
844 <strong>LL</strong> may be fractional. For example,
846 <pre>
847 .LL 4.5i
848 </pre>
850 sets the line length to 4-1/2 inches.
853 <strong>NOTE:</strong> The <a href="#R_MARGIN">right margin
854 macro</a> (<strong>R_MARGIN</strong>) can also be used to set line
855 length.
856 <br>
857 <hr>
859 <!====================================================================>
861 <a name="INTRO_JUST_QUAD_FILL"></a>
863 <a name="JUST_QUAD_FILL">
864 <h2><u>Justifying, quadding, filling and breaking lines</u></h2>
865 </a>
867 The justification and quadding macros deal with how type aligns along
868 the left and right margins. In a nutshell, type either aligns at the
869 left margin, at the right margin, at both margins, or at neither margin
870 (centered).
872 These macros also determine whether or not
873 <a href="definitions.html#TERMS_INPUTLINE">input lines</a> are joined and
874 <a href="definitions.html#TERMS_FILLED">filled</a> during output.
876 Additionally, macros that deal with how to break
877 <a href="definitions.html#TERMS_OUTPUTLINE">output lines</a> are covered in this
878 section, as is the
879 <a href="definitions.html#TERMS_INLINES">inline escape</a> for joining output lines.
881 You may encounter some words here that are unfamiliar. Refer to
882 <a href="definitions.html#TERMS_TYPESETTING">Typesetting terms</a> and
883 <a href="definitions.html#TERMS_GROFF">Groff terms</a> for an explanation.
885 <a name="INDEX_JUST"><h3><u>Justification, quad, fill, and break macro list</u></h3></a>
887 <ul>
888 <li><strong>Fill modes</strong>
889 <ul>
890 <li><a href="#JUSTIFY">JUSTIFY</a> (set lines justified)
891 <li><a href="#QUAD">QUAD</a> (set filled lines flush left, right or centered)
892 </ul>
893 <li><strong>Nofill modes</strong>
894 <ul>
895 <li><a href="#LRC">LEFT</a> (set non-filled lines flush left)
896 <li><a href="#LRC">RIGHT</a> (set non-filled lines flush right)
897 <li><a href="#LRC">CENTER</a> (set non-filled lines centered)
898 </ul>
899 <li><strong>Breaking lines</strong>
900 <ul>
901 <li><a href="#BR">BR</a> (manually break an output line)
902 <li><a href="#EL">EL</a> (break a line without advancing to the next output line)
903 <li><a href="#SPACE">SPACE</a> (break a line and add space before the next output line)
904 <li><a href="#SPREAD">SPREAD</a> (break and force-justify an output line)
905 </ul>
906 <li><strong>Joining lines</strong>
907 <ul>
908 <li><a href="#JOIN">\c</a> inline escape
909 </ul>
910 </ul>
912 <!---JUSTIFY--->
914 <hr width="66%" align="left">
915 <a name="JUSTIFY"><h3><u>Justify lines</u></h3></a>
916 <br>
917 Macro: <strong>JUSTIFY</strong>
918 <br>
919 <a href="definitions.html#TERMS_FILLED"><em>Fill mode</em></a>
922 <strong>JUSTIFY</strong> doesn't take an argument.
923 <a href="definitions.html#TERMS_INPUTLINE">Input lines</a>
924 after <strong>JUSTIFY</strong> are
925 <a href="definitions.html#TERMS_FILLED">filled</a> and
926 <a href="definitions.html#TERMS_JUST">justified</a>
927 upon output.
929 To break lines and prevent them from being filled and justified,
930 use the
931 <a href="#BR">BR</a> macro.
932 <br>
934 <!---QUAD--->
936 <hr width="66%" align="left">
937 <a name="QUAD"><h3><u>Quad lines left, right, or center</u></h3></a>
938 <br>
939 Macro: <strong>QUAD</strong> <var>L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY</var>
940 <br>
941 Alias: <strong>FILL</strong>
942 <br>
943 <a href="definitions.html#TERMS_FILLED"><em>Fill mode</em></a>
946 <strong>QUAD</strong> takes one argument: the direction in which lines
947 should be
948 <a href="definitions.html#TERMS_QUAD">quadded</a>.
949 <a href="definitions.html#TERMS_INPUTLINE">Input lines</a>
950 after <strong>QUAD</strong> are
951 <a href="definitions.html#TERMS_FILLED">filled</a>
952 upon output.
954 If <strong>L</strong> or <strong>LEFT</strong>, type is set flush
955 along the left margin.
957 If <strong>R</strong> or <strong>RIGHT</strong>, type is
958 set flush along the right margin.
960 If <strong>C</strong> or <strong>CENTER</strong> type is set centered
961 on the current line length.
963 <strong>J</strong> and <strong>JUSTIFY</strong> justify text,
964 and are included as a convenience only. Obviously, if text is
965 justified, it isn't quadded. <strong>QUAD J</strong> and
966 <strong>QUAD JUSTIFY</strong> have exactly the same effect as <a
967 href="#JUSTIFY">JUSTIFY</a>.
969 To break lines and prevent them from being filled, use the
970 <a href="#BR">BR</a> macro.
971 <br>
973 <!---LEFT, RIGHT, CENTER--->
975 <hr width="66%" align="left">
976 <a name="LRC"><h3><u>Set non-filled lines flush left, right, or centered</u></h3></a>
977 <br>
978 Macro: <strong>LEFT</strong>
979 &nbsp;&nbsp;Macro: <strong>RIGHT</strong>
980 &nbsp;&nbsp;Macro: <strong>CENTER</strong>
981 &nbsp;(alias <strong>CENTRE</strong>)
982 <br>
983 <a href="definitions.html#TERMS_NOFILL"><em>Nofill mode</em></a>
986 <strong>LEFT</strong>, <strong>RIGHT</strong> and
987 <strong>CENTER</strong> let you enter text on a line for line basis
988 without having to use the
989 <a href="#BR">BR</a> macro after each line.
990 Consider the following:
992 <pre>
993 .QUAD LEFT
994 So runs my dream, but what am I?
996 An infant crying in the night
998 An infant crying for the light
1000 And with no language but a cry.
1002 </pre>
1004 Because text after <strong>QUAD</strong> is
1005 <a href="definitions.html#TERMS_FILLED">filled</a>, you have to use the
1006 <a href="#BR">BR</a>
1007 macro to prevent the lines from running together. Not only is this
1008 annoying to type, it's awkward to read in a text editor. Much better
1009 to do
1011 <pre>
1012 .LEFT
1013 So runs my dream, but what am I?
1014 An infant crying in the night
1015 An infant crying for the light
1016 And with no language but a cry.
1017 </pre>
1019 <strong>IMPORTANT:</strong> Because <strong>LEFT</strong>,
1020 <strong>RIGHT</strong> and <strong>CENTER</strong> are nofill
1021 modes, groff does not always respect the current line length.
1022 <a href="definitions.html#TERMS_INPUTLINE">Input lines</a>
1023 that run long may exceed it, or get broken in undesirable ways.
1024 Therefore, when using these three macros, you should preview your
1025 work to ensure that all lines fit as expected.
1026 <br>
1028 <!---BR--->
1030 <hr width="66%" align="left">
1031 <a name="BR"><h3><u>Manually break lines</u></h3></a>
1032 <br>
1033 Macro: <strong>BR</strong>
1036 When using <strong>JUSTIFY</strong> or <strong>QUAD</strong>,
1037 <strong>BR</strong> tells <strong>mom</strong> about partial lines
1038 that you want broken (as opposed to
1039 <a href="definitions.html#TERMS_FILLED">filled</a>).
1040 Any partial
1041 <a href="definitions.html#TERMS_OUTPUTLINE">output line</a>
1042 that immediately precedes <strong>BR</strong> will be
1043 <a href="definitions.html#TERMS_QUAD">quadded</a>
1044 in the direction of the current quad, or set flush left if text is
1045 <a href="definitions.html#TERMS_JUST">justified</a>.
1048 Most of the time, you won't need the <strong>BR</strong> macro.
1049 In fill modes, <strong>mom</strong> tries to be sensible about
1050 where breaks are needed. If the nature of a macro is such that under
1051 most circumstances you'd expect a break, <strong>mom</strong> puts
1052 it in herself. Equally, in macros where a break isn't normally
1053 desirable, no break occurs. This means text files don't get cluttered
1054 with annoying <strong>BR</strong>'s.
1056 <strong>NOTE:</strong> Lines of text in
1057 <a href="definitions.html#TERMS_NOFILL">nofill mode</a>
1058 never require a <strong>BR</strong>. Furthermore, in nofill mode,
1059 ALL macros cause a break. If a break is not desired, use the
1060 <a href="#JOIN">\c</a>
1061 <a href="definitions.html#TERMS_INLINES">inline escape</a>.
1064 <strong>Experts: BR</strong> is an alias for <strong>br</strong>.
1065 You can use either, or mix 'n' match with impunity.
1066 <br>
1068 <!---EL--->
1070 <hr width="66%" align="left">
1071 <a name="EL"><h3><u>Manually break a line without advancing on the page</u></h3></a>
1072 <br>
1073 Macro: <strong>EL</strong>
1076 The mnemonic "EL" is borrowed from old Compugraphic typesetting
1077 systems, where it stood for "End Line." Conceptually,
1078 <strong>EL</strong> is equivalent to the notion of a carriage return
1079 with no linefeed.
1082 Every once in a while, the need arises for breaking a line without
1083 advancing on the page. Imagine, for example, that you're working from
1084 marked-up copy. The markup indicates 24 points of space between
1085 two given lines, but the prevailing line spacing is 12.5 points.
1086 You may find it more convenient to break the first line with
1087 <strong>EL</strong> and instruct <strong>mom</strong> to advance 24
1088 points to the next line, rather than calculating the lead that needs
1089 to be added to 12.5 to get 24. To demonstrate:
1091 <pre>
1092 .LS 12.5
1093 A line of text.
1095 .ALD 24p
1096 The next line of text.
1097 </pre>
1099 may be more instuitive than
1101 <pre>
1102 .LS 12.5
1103 A line of text.
1104 .ALD 11.5p
1105 The next line of text.
1106 </pre>
1108 The first example has the further advantage that should you wish
1109 to change the prevailing line space but keep the 24 points lead,
1110 you don't have to recalculate the extra space.
1112 "ALD" in the above examples stands for "<strong>A</strong>dvance
1113 <strong>L</strong>ea<strong>D</strong>" (another mnemonic borrowed
1114 from Compugraphic), which is covered in the section
1115 <a href="#ALDRLD">Vertical movement</a>.
1117 <strong>IMPORTANT:</strong>
1118 <strong>EL</strong> does not work as advertised on the last
1119 <a name="TERMS_OUTPUTLINE">output line</a>
1120 of pages that contain a footer trap (e.g. one set with
1121 <a href="#B_MARGIN">B_MARGIN</a>
1122 or in documents formatted using the
1123 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>).
1124 The reason is that the <strong>EL</strong> macro itself deposits
1125 a line break that trips the trap (hey, I like that --
1126 &quot;trips the trap&quot;), and once the trap has been sprung,
1127 <strong>mom</strong> can't recover. She places the line after
1128 the <strong>EL</strong> on the next page.
1130 If you need <strong>EL</strong> functionality on the last line of
1131 a page with a footer trap, turn the trap off with
1132 <a href="goodies.html#TRAP">TRAP</a>,
1133 as in this example:
1135 <pre>
1137 .TRAP OFF
1139 .TRAP
1140 \*[FP12]Establish, once and for all, if 42 really is the answer.
1141 </pre>
1143 The above looks something like this upon output:
1145 <pre>
1146 3. Establish, once and for all, if 42 really is the answer.
1147 </pre>
1149 with &quot;3.&quot; flush at the left margin, and &quot;Establish,
1150 once and for all...&quot; on the same line as &quot;3.&quot; but
1151 starting 12 points in from the left margin.
1153 If you hadn't turned the trap off for <kbd>.EL</kbd>,
1154 &quot;3.&quot; would have appeared at the bottom of the page by
1155 itself, with &quot;Establish, once and for all...&quot;
1156 appearing at the top of the next page.
1157 <br>
1159 <!---SP--->
1161 <hr width="66%" align="left">
1162 <a name="SPACE"><h3><u>Break lines and add space between</u></h3></a>
1163 <br>
1164 Macro: <strong>SPACE</strong> <var>&lt;space to add between lines&gt;</var>
1165 <br>
1166 Alias: <strong>SP</strong>
1169 <strong>SPACE</strong> breaks a line, just like
1170 <strong>BR</strong>, then adds space after the line. With no
1171 argument, it adds an extra line space. If you pass it a numeric
1172 argument without supplying a
1173 <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>,
1174 it advances that number of extra line spaces. For example:
1176 <pre>
1177 .SPACE
1178 </pre>
1180 breaks the line then adds an extra linespace, whereas
1182 <pre>
1183 .SPACE 2
1184 </pre>
1186 breaks the line and adds two extra linespaces.
1189 If you supply a unit of measure, <strong>SPACE</strong> breaks the
1190 line then adds the specified amount of extra space to the current
1191 linespace, as in
1193 <pre>
1194 .SPACE 6p
1195 </pre>
1197 which breaks the line then adds six points of space to the current
1198 linespace.
1201 <strong>SUGGESTION: SPACE</strong> and
1202 <a href="#ALD">ALD</a>
1203 can be used interchangeably (<code>.SPACE&nbsp;6p</code> and
1204 <code>.ALD&nbsp;6p</code> are equivalent). However,
1205 <strong>ALD</strong> without an argument does nothing, whereas
1206 <strong>SPACE</strong> without an argument adds an extra line
1207 space. I recommend using <strong>SPACE</strong> when you
1208 want an extra line space (or multiple thereof), and
1209 <strong>ALD</strong> whenever you want some other value of space
1210 after a line.
1213 <strong>Experts: SPACE</strong> is an alias of <strong>sp</strong>.
1214 You can use either, or mix 'n' match with impunity.
1215 <br>
1217 <!---SPREAD--->
1219 <hr width="66%" align="left">
1220 <a name="SPREAD"><h3><u>Break and force justify (spread) lines</u></h3></a>
1221 <br>
1222 Macro: <strong>SPREAD</strong>
1225 Sometimes, you need to break a line of
1226 <a href="definitions.html#TERMS_JUST">justified</a>
1227 text and have it come out fully justified, not
1228 <a href="definitions.html#TERMS_QUAD">quadded</a>
1229 left the way it would be with the <strong>BR</strong> macro.
1230 An example of where you'd do this would be when you want to prevent a
1231 word at the end of a line from being hyphenated (say, a proper name).
1232 <strong>SPREAD</strong> is the macro that lets you break the line
1233 and have it came out fully justified.
1236 <strong>Experts: SPREAD</strong> is an alias for <strong>brp</strong>.
1237 You can use either, or mix 'n' match with impunity.
1238 <br>
1240 <!---JOIN--->
1242 <hr width="66%" align="left">
1243 <a name="JOIN"><h3><u>Join input lines</u></h3></a>
1244 <br>
1245 Inline: <strong>\c</strong>
1248 Sometimes, especially when in one of the
1249 <a href="definitions.html#TERMS_NOFILL">nofill modes</a>,
1250 a macro will cause a break where you don't want one. In order
1251 to prevent this from happening (in other words, to join
1252 <a href="definitions.html#TERMS_INPUTLINE">input lines</a>
1253 together, forming one
1254 <a href="definitions.html#TERMS_OUTPUTLINE">output line</a>),
1255 use the groff
1256 <a href="definitions.html#TERMS_INLINES">inline escape</a>
1257 <strong>\c</strong> at the end of each input line to
1258 be joined to another, like this:
1260 <pre>
1261 .LEFT
1262 .FAMILY T
1263 .FT R
1264 Some lines of text to be \c
1265 .FAMILY H
1266 .FT B
1267 joined \c
1268 .FAMILY T
1269 .FT R
1270 together.
1271 </pre>
1273 Upon output, the lines will be joined together to read
1275 <pre>
1276 Some lines of text to be joined together.
1277 </pre>
1279 with the word &quot;joined&quot; in Helvetica bold. Note the
1280 space before <strong>\c</strong>. Without it, the last three
1281 words of the output line would read
1283 <pre>
1284 bejoinedtogether
1285 </pre>
1287 Please also note that had the example been in one of the
1288 <a href="definitions.html#TERMS_FILLED">fill modes</a>,
1289 there'd have been no need for the <strong>\c</strong>.
1290 <br>
1291 <hr>
1293 <!====================================================================>
1295 <a name="INTRO_REFINEMENTS"></a>
1297 <a name="REFINEMENTS">
1298 <h2><u>Typographic refinements</u></h2>
1299 </a>
1301 The macros in this section help you tweak groff's behaviour,
1302 ensuring that your documents look typographically professional.
1303 <br>
1305 <a name="INDEX_REFINEMENTS">
1306 <h3><u>Typographic refinements macro list</u></h3>
1307 </a>
1309 <ul>
1310 <li><strong>Word and sentence spacing</strong>
1311 <ul>
1312 <li><a href="#WS">WS</a> (word spacing)
1313 <li><a href="#SS">SS</a> (sentence space)
1314 </ul>
1315 <li><strong>Letter spacing (track kerning)</strong>
1316 <ul>
1317 <li><a href="#RW">RW</a> (reduce whitespace)
1318 <li><a href="#EW">EW</a> (expand whitespace)
1319 <li><a href="#BR_AT_LINE_KERN">BR_AT_LINE_KERN</a>
1320 </ul>
1321 <li><strong>Hyphenation</strong>
1322 <ul>
1323 <li><a href="#HY">HY</a> (turn auto hyphenation on/off, or set specific hyphenation parameters)
1324 <li><a href="#HY_SET">HY_SET</a> (set all hyphenation parameters)
1325 </ul>
1326 <li><strong>Automatic kerning and ligatures</strong>
1327 <ul>
1328 <li><a href="#KERN">KERN</a> (turn automatic pairwise kerning on or off)
1329 <li><a href="#LIGATURES">LIGATURES</a> (turn automatic generation of ligatures on or off)
1330 </ul>
1331 </ul>
1333 <!---WS--->
1335 <hr width="66%" align="left">
1336 <a name="WS"><h3><u>Word spacing</u></h3></a>
1337 <br>
1338 Macro: <strong>WS</strong> <var>&lt;+|-wordspace&gt; | DEFAULT</var>
1341 <strong>WS</strong> (Word Space) increases or decreases the amount
1342 of space between words. In
1343 <a href="definitions.html#TERMS_NOFILL">nofill modes</a>,
1344 or if
1345 <a href="#QUAD">QUAD</a>
1346 is in effect, the space between words is fixed. Therefore, if you
1347 change the word spacing with <strong>WS</strong>, the change applies
1348 uniformly to the space between every word on every line. However,
1349 when text is
1350 <a href="definitions.html#TERMS_JUST">justified</a>,
1351 the space between words varies from line to line (in order to justify
1352 the text). Consequently, the change you make with <strong>WS</strong>
1353 represents the minimum (and ideal) space groff will try to put between
1354 words before deciding whether to hyphenate a final word or to stretch
1355 the word spacing.
1358 Word space is relative to type size. Knowing how it's calculated is
1359 unimportant. What matters is having a sense of how the value passed
1360 to <strong>WS</strong> affects the look of your type. Generally,
1361 in/decreasing the word space by a value of 1 or 2 produces a difference
1362 that in many cases is scarcely visible; in/decreasing by a value of 5
1363 or so produces a subtle but noticeable difference; and in/decreasing
1364 by a value greater than 10 is always apparent. You should preview
1365 your work to assess the effect of <strong>WS</strong>.
1368 <a name="WS_USAGE"><strong>WS</strong></a>
1369 takes as its argument a whole number preceded by a plus or minus sign.
1370 Therefore, to decrease the word space slightly, you might enter
1372 <pre>
1373 .WS -4
1374 </pre>
1376 To increase it by a noticeable amount, you might enter
1378 <pre>
1379 .WS +12
1380 </pre>
1382 You can reset the word spacing to its previous value by switching
1383 the plus or minus sign, like this:
1385 <pre>
1386 .WS +4
1387 A line of text
1388 .WS -4
1389 </pre>
1391 The <code>.WS -4</code> undoes the effect of <code>.WS
1392 +4</code>. You can also reset <strong>WS</strong> to
1393 its groff default by entering
1395 <pre>
1396 .WS DEFAULT
1397 </pre>
1399 This can be particularly useful if you've been playing around
1400 with plus and minus values, and can't remember by how much you
1401 have to in/decrease the word space to get it back to normal.
1402 <br>
1404 <!---SS--->
1406 <hr width="66%" align="left">
1407 <a name="SS"><h3><u>Sentence space</u></h3></a>
1408 <br>
1409 Macro: <strong>SS</strong> <var>&lt;+sentence space&gt; | 0 | DEFAULT</var>
1412 <strong>SS</strong> (Sentence Space) tells groff how to treat double
1413 spaces it encounters between sentences in
1414 <a href="definitions.html#TERMS_INPUTLINE">input lines</a>.
1415 If you use <strong>SS</strong>, input sentences with two spaces
1416 after them AND input sentences that fall at the end of input lines
1417 all receive a normal word space plus an additional amount of space
1418 whose size is determined by the + value passed as an argument to
1419 <strong>SS</strong>. Thus,
1421 <pre>
1422 .SS +2
1423 </pre>
1425 means that input sentences with two spaces after them receive a normal
1426 word space PLUS the +2 value passed to <strong>SS</strong>.
1428 Like
1429 <strong>WS</strong>, increasing the sentence space by a value of
1430 1 or 2 produces a difference that in many cases is scarcely visible;
1431 increasing by a value of 5 or so produces a subtle but noticeable
1432 difference (i.e. the space between double-spaced input sentences will
1433 be slightly but visibly greater than the space between words); and
1434 increasing by a value greater than 10 is always apparent. You should
1435 preview your work to assess the effect of <strong>SS</strong>.
1437 There's an additional argument you can pass <strong>SS</strong>:
1438 the number zero (without the + sign). It's the argument you'll
1439 use most often. Typeset copy should never have two spaces between
1440 sentences, and the "zero" argument tells groff to give the extra
1441 spaces no space at all (effectively removing them). Therefore,
1442 if you double-space your sentences (as you should when writing in a
1443 text editor), get in the habit of putting
1445 <pre>
1446 .SS 0
1447 </pre>
1449 at the top of your files.
1452 If you do use <strong>SS</strong> for something other than ensuring
1453 that you don't get unwanted sentence spaces in output copy, you
1454 can set or reset the sentence space to the groff default (the same
1455 width as a word space, i.e. double-spaced input sentences will appear
1456 double-spaced on output as well) with
1458 <pre>
1459 .SS DEFAULT
1460 </pre>
1462 If you're using the
1463 <a href="docprocessing.html">document processing macros</a>
1464 and your
1465 <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE</a>
1466 is <strong>TYPEWRITE</strong>, <code>.SS DEFAULT</code> is the default,
1467 because you <em>do</em> want double spaces between sentences in copy
1468 that imitates the look of a typewritten document.
1470 <strong>IMPORTANT: SS</strong> with an argument other than
1471 &quot;0&quot; should only be used if you're of the old (and wise)
1472 school of typists that puts two spaces between sentences. If you
1473 ignore this advice and use <strong>SS</strong> when you habitually
1474 put only one space between sentences, you risk producing output where
1475 the space between sentences is not equal.
1476 <br>
1478 <!---HY--->
1480 <hr width="66%" align="left">
1481 <a name="HY"><h3><u>Automatic hyphenation control</u></h3></a>
1482 <br>
1483 Macro: <strong>HY</strong> <var>toggle</var>
1484 <br>
1485 Macro: <strong>HY</strong> <var>LINES &lt;max. number of consecutive hyphenated lines&gt;</var>
1486 <br>
1487 Macro: <strong>HY</strong> <var>MARGIN &lt;size of hyphenation margin&gt;</var>
1488 <br>
1489 Macro: <strong>HY</strong> <var>SPACE &lt;extra interword spacing to prevent hyphenation&gt;</var>
1490 <br>
1491 Macro: <strong>HY</strong> <var>DEFAULT</var>
1492 <br>
1493 Aliases: <strong>HYPHENATE, HYPHENATION</strong>
1496 <strong>HY</strong>, as you can see, can be invoked with a number of
1497 arguments. In all cases, the aliases <strong>HYPHENATE</strong>
1498 or <strong>HYPHENATION</strong> can be used in place of
1499 <strong>HY</strong>. To aid in understanding the various arguments
1500 you can pass to <strong>HY</strong>, I've broken them down into
1501 separate sections.
1503 <h3><u>1. HY</u></h3>
1506 <strong>HY</strong> by itself (i.e. with no argument) simply turns
1507 automatic hyphenation on. Any argument other than <strong>LINES,
1508 MARGIN, SPACE</strong> or <strong>DEFAULT</strong>, <strong>HY</strong>
1509 turns automatic hyphenation off. For example, as explained in
1510 <a href="intro.html#MACRO_ARGS">How to read macro arguments</a>,
1511 you could turn <strong>HY</strong> off by entering
1513 <pre>
1514 .HY OFF
1516 .HY X
1518 .HY END
1519 </pre>
1521 <strong>HY</strong> observes the following default hyphenation rules:
1522 <br>
1523 <ol>
1524 <li>Last lines (i.e. ones that will spring a trap -- typically
1525 the last line on a page) will not be hyphenated.
1526 <li>The first and last two characters of a word are never
1527 split off.
1528 </ol>
1530 <h3><u>2. HY LINES</u></h3>
1533 <strong>HY LINES</strong> sets the maximum number of consecutive
1534 hyphenated lines that will appear in output copy. 2 is a very
1535 good choice, and you'd set it with
1537 <pre>
1538 .HY LINES 2
1539 </pre>
1541 By default, when you turn automatic hyphenation on, there is no
1542 limit to the number of consecutive hyphenated lines.
1545 <strong>NOTE:</strong>
1546 <a href="definitions.html#TERMS_DISCRETIONARYHYPHEN">Discretionary hyphens</a>
1547 count when groff is figuring out how many lines to hyphenate;
1548 explicit hyphens do not.
1550 <h3><u>3. HY MARGIN</u></h3>
1553 <strong>HY MARGIN</strong> sets the amount of room allowed at
1554 the end of a line before hyphenation is tripped (e.g. if there's
1555 only 6 points left at the end of a line, groff won't try to hyphenate
1556 the next word). <strong>HY MARGIN</strong> only applies if you're
1557 using
1558 <a href="#QUAD">QUAD</a>, and is really only useful if you're
1559 using <strong>QUAD LEFT</strong>.
1562 As an example, if you don't want groff to hyphenate words when there's
1563 only 18 points of space left at the end of a left-quadded line,
1564 you'd enter
1566 <pre>
1567 .HY MARGIN 18p
1568 </pre>
1570 <strong>NOTE:</strong> The numeric argument after <strong>HY
1571 MARGIN</strong> requires a
1572 <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>.
1574 <h3><u>4. HY SPACE</u></h3>
1577 <strong>HY SPACE</strong> sets an amount of extra interword
1578 space that groff will <em>try</em> to put between words on a
1579 line in order to PREVENT hyphenation. <strong>HY SPACE</strong>
1580 applies only to
1581 <a href="definitions.html#TERMS_JUST">justified lines</a>. Generally speaking,
1582 you'll want this value to be quite small, since too big a value
1583 will result in lines with gaping holes between the words. A reasonable
1584 value might be half a point, or one point, which you'd set with
1586 <pre>
1587 .HY SPACE .5p
1589 .HY SPACE 1p
1590 </pre>
1592 <strong>NOTE:</strong> The numeric argument after <strong>HY
1593 SPACE</strong> requires a
1594 <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>.
1596 <h3><u>4. HY DEFAULT</u></h3>
1599 <strong>HY DEFAULT</strong> resets automatic hyphenation to its
1600 default behaviour, cancelling any changes made with <strong>LINES,
1601 MARGIN,</strong> and/or <strong>SPACE</strong>.
1603 <h3><u>A note on hyphenation in general</u></h3>
1606 Hyphenation is a necessary evil. If it can be avoided, it should be.
1607 If it can't be, it should occur infrequently. That's the reason for
1608 number of parameters you can set with <strong>HY</strong>.
1611 Furthermore, hyphenation in
1612 <a href="definitions.html#TERMS_RAG">rag</a>
1613 copy requires a great deal of attention. At best, it should be
1614 avoided completely by individually adjusting the number of words
1615 on consecutive lines to achieve a pleasing, natural-looking rag.
1616 Since such adjustments are often too fussy for document
1617 processing, I recommend playing around with <strong>HY MARGIN</strong>
1618 a bit if your copy looks hyphen-heavy.
1619 <br>
1621 <!---HY_SET--->
1623 <hr width="66%" align="left">
1624 <a name="HY_SET"><h3><u>Set hyphenation parameters all at once</u></h3></a>
1625 <br>
1626 Macro: <strong>HY_SET</strong> <var>&lt;lines&gt; [ &lt;margin&gt; [ &lt;space&gt; ] ]</var>
1627 <br>
1628 Alias: <strong>HYSET</strong>
1631 <strong>HY_SET</strong> lets you set the parameters for hyphenation
1632 with a single macro. &lt;lines&gt;, &lt;margin&gt; and &lt;space&gt;
1633 correspond to the numeric values required by
1634 <strong>LINES</strong>, <strong>MARGIN</strong> and
1635 <strong>SPACE</strong> as described
1636 <a href="#HY">above</a>.
1639 To set just the maximum number of consecutive hyphenated lines,
1640 you'd enter
1642 <pre>
1643 .HY_SET 2
1644 </pre>
1646 If you wanted the same number of maximum consecutive hyphenated lines
1647 and a hyphenation margin for use with
1648 <a href="definitions.html#TERMS_RAG">rag</a>
1649 copy,
1651 <pre>
1652 .HY_SET 2 36p
1653 </pre>
1655 would set the hyphenation margin to 36 points.
1658 If you wanted the same number of maximum consecutive hyphenated
1659 lines and a hyphenation space of 2 points for use with
1660 <a href="definitions.html#TERMS_JUST">justified</a>
1661 copy,
1663 <pre>
1664 .HYSET 2 0 2p
1665 </pre>
1667 is how you'd do it.
1668 <br>
1670 <!---RW--->
1672 <hr width="66%" align="left">
1673 <a name="RW"><h3><u>Reduce whitespace</u></h3></a>
1674 <br>
1675 Macro: <strong>RW</strong> <var>&lt;amount of whitespace reduction between letters&gt;</var>
1676 <br>
1679 <strong>RW</strong> (Reduce Whitespace) and its corresponding macro,
1680 <strong>EW</strong> (Expand Whitespace), allow you to tighten
1681 (or loosen)
1682 <a href="definitions.html#TERMS_OUTPUTLINE">output lines</a>
1683 by uniformly reducing or expanding the space between characters.
1684 This is particularly useful when you want to squeeze or stretch
1685 lines on a narrow measure.
1688 The value passed to <strong>RW</strong> may be a whole number or a
1689 decimal fraction. Since a value of 1 produces a noticeable reduction
1690 in the space between letters at text sizes, you'll most likely use
1691 small decimal values when tightening lines. For example,
1693 <pre>
1694 .RW .1
1696 .RW .2
1697 </pre>
1699 may be just enough to squeeze an extra character or two on a
1700 line without the change in letter spacing being obvious. I
1701 highly recommend previewing your work to assess the effect of
1702 <strong>RW</strong>.
1706 <strong>IMPORTANT:</strong> <strong>RW</strong> affects all
1707 <a href="definitions.html#TERMS_FONT">fonts</a>
1708 in the
1709 <a href="definitions.html#TERMS_FAMILY">family</a>
1710 current at the time it's invoked. It must be reset to zero to
1711 cancel its effect (<code>.RW 0</code>) on those fonts, or reinvoked
1712 (possibly with a different value) if you change family.
1714 <strong>NOTE:</strong> By default, <strong>RW</strong> does not deposit a
1715 <a href="#BR">break</a>
1716 (<strong>BR</strong>) when it's invoked. If you want
1717 <strong>RW</strong> to break at the ends of the previous
1718 <a href="definitions.html#TERMS_INPUTLINE">input lines</a>,
1719 you can tell <strong>mom</strong> that's what you want by invoking the
1720 <a href="#BR_AT_LINE_KERN">BR_AT_LINE_KERN</a>
1721 toggle macro.
1722 <br>
1724 <!---EW--->
1726 <hr width="66%" align="left">
1727 <a name="EW"><h3><u>Expand whitespace</u></h3></a>
1728 <br>
1729 Macro: <strong>EW</strong> <var>&lt;amount of whitespace expansion between letters&gt;</var>
1730 <br>
1733 <strong>EW</strong> (Expand Whitespace) expands the amount of
1734 whitespace between letters, effectively &quot;loosening&quot; lines
1735 of type.
1738 The value passed to <strong>EW</strong> may be a whole number or a
1739 decimal fraction. Since a value of 1 produces a noticeable
1740 expansion in the space between letters at text sizes, you'll most likely use
1741 small decimal values when loosening lines. For example,
1743 <pre>
1744 .EW .1
1746 .EW .2
1747 </pre>
1749 may be just enough to open up a line without the change in letter
1750 spacing being obvious. I highly recommend previewing your work to
1751 assess the effect of <strong>EW</strong>.
1754 <strong>NOTE:</strong> By default, <strong>EW</strong> does not deposit a
1755 <a href="#BR">break</a>
1756 (<strong>BR</strong>) when it's invoked. If you want
1757 <strong>EW</strong> to break at the ends of the previous
1758 <a href="definitions.html#TERMS_INPUTLINE">input lines</a>,
1759 you can tell <strong>mom</strong> that's what you want by invoking the
1760 <a href="#BR_AT_LINE_KERN">BR_AT_LINE_KERN</a>
1761 toggle macro.
1762 <br>
1764 <!---BR_AT_LINE_KERN--->
1766 <hr width="66%" align="left">
1767 <a name="BR_AT_LINE_KERN"><h3><u>Break before line kerning</u></h3></a>
1768 <br>
1769 Macro: <strong>BR_AT_LINE_KERN</strong> <var>toggle</var>
1770 <br>
1773 By default, <strong>mom</strong> does not break
1774 <a href="definitions.html#TERMS_INPUTLINE>input lines</a>
1775 when you invoke <strong>RW</strong> or <strong>EW</strong>.
1776 If you'd like <strong>mom</strong> to break input lines prior
1777 to <strong>RW</strong> or <strong>EW</strong>, invoke
1778 <strong>BR_AT_INPUT_LINE</strong> without any argument. To
1779 disable the breaks, invoke <strong>BR_AT_INPUT_LINE</strong>
1780 with any argument (<strong>OFF, QUIT, Q, X</strong>...), like
1781 this
1783 <pre>
1784 .BR_AT_LINE_KERN OFF
1786 .BR_AT_LINE_KERN X
1787 </pre>
1788 <br>
1790 <!---KERN--->
1792 <hr width="66%" align="left">
1793 <a name="KERN"><h3><u>Automatic kerning</u></h3></a>
1794 <br>
1795 Macro: <strong>KERN</strong> <var>toggle</var>
1796 <br>
1799 By itself (i.e. with no argument), <strong>KERN</strong> turns
1800 automatic pairwise
1801 <a href="definitions.html#TERMS_KERN">kerning</a>
1802 on. With any argument (e.g. OFF, Q, X), pairwise kerning is turned
1803 off.
1805 Kerning of individual character pairs can be controlled with the
1806 <a href="definitions.html#TERMS_INLINES">inline escapes</a>
1807 <strong>\*[BU#]</strong> and <strong>\*[FU#]</strong>. See
1808 <a href="inlines.html#INLINE_KERNING_MOM">Inline Escapes, kerning</a>.
1809 <br>
1811 <!---LIGATURES--->
1813 <hr width="66%" align="left">
1814 <a name="LIGATURES"><h3><u>Automatic ligature generation</u></h3></a>
1815 <br>
1816 Macro: <strong>LIGATURES</strong> <var>toggle</var>
1817 <br>
1818 Alias: <strong>LIG</strong>
1821 Provided your current font has
1822 <a href="definitions.html#TERMS_LIGATURES">ligatures</a>,
1823 <strong>LIGATURES</strong>, by itself, turns on automatic
1824 generation of ligatures. When automatic ligature generation is
1825 on, simply typing the letters of a ligature combination will
1826 produce the correct ligature upon output. For example, if you
1827 type the word &quot;finally&quot;, the fi combination will be
1828 output as an fi ligature. Generally speaking, ligatures are A
1829 Good Thing, hence <strong>mom</strong> has them on by default.
1831 <strong>LIGATURES</strong> with any argument turns automatic
1832 ligature generation off.
1834 <strong>NOTE:</strong> Not all fonts support ligatures.
1835 <br>
1836 <hr>
1838 <!====================================================================>
1840 <a name="INTRO_MODIFICATIONS"></a>
1842 <a name="MODIFICATIONS">
1843 <h2><u>Type modifications: pseudo-italic, -bold, -condensed, -extended</u></h2>
1844 </a>
1846 It sometimes happens that a PostScript
1847 <a href="definitions.html#TERMS_FAMILY">family</a>
1848 doesn't contain all the fonts you need. You might, for example,
1849 be missing an italic font, or a bold font. Or you might not be able
1850 to get your hands on a condensed family. That's where these macros
1851 and inline escapes come in. With them, you can fake the fonts
1852 you're missing. A word of caution, though: &quot;faked&quot;
1853 fonts are just that -- faked. You should only use them as a
1854 last resort, and then only sparingly. A word or two or a line
1855 or two in a faked font will pass unnoticed; large patches of
1856 type in a faked font look typographically cheap.
1857 <br>
1859 <a name="INDEX_MODIFICATIONS">
1860 <h3><u>Type modifications macro list</u></h3>
1861 </a>
1863 <ul>
1864 <li><strong>Pseudo italic</strong>
1865 <ul>
1866 <li><a href="#SETSLANT">SETSLANT</a> -- degree of pseudo-italicising
1867 <li><a href="#SLANT_INLINE">\*[SLANT]</a> -- inline escape for pseudo-italicising type
1868 </ul>
1869 <li><strong>Pseudo bold</strong>
1870 <ul>
1871 <li><a href="#SETBOLDER">SETBOLDER</a> -- amount of emboldening
1872 <li><a href="#BOLDER_INLINE">\*[BOLDER]</a> -- inline escape for emboldening type
1873 </ul>
1874 <li><strong>Pseudo condensed</strong>
1875 <ul>
1876 <li><a href="#CONDENSE">CONDENSE</a> -- percentage for pseudo-condensed type
1877 <li><a href="#COND_INLINE">\*[COND]</a> -- inline escape for pseudo-condensed type
1878 </ul>
1879 <li><strong>Pseudo extended</strong>
1880 <ul>
1881 <li><a href="#EXTEND">EXTEND</a> -- percentage for pseudo-extended type
1882 <li><a href="#EXT_INLINE">\*[EXT]</a> -- inline escape for pseudo-extending
1883 </ul>
1884 </ul>
1886 <!---SETSLANT--->
1888 <hr width="66%" align="left">
1889 <a name="SETSLANT"><h3><u>Set degree of slant for pseudo-italicising</u></h3></a>
1890 <br>
1891 Macro: <strong>SETSLANT</strong> <var>&lt;degrees to slant type&gt; | RESET</var>
1894 Pseudo-italicising of type is accomplished by slanting a roman font
1895 a certain number of degrees to the right. <strong>SETSLANT</strong>
1896 lets you fix the number of degrees. <strong>Mom</strong>'s
1897 default is 15, which produces an acceptable approximation of an
1898 italic font. If you want another value -- say, 13 degrees --
1899 you'd set it by entering
1901 <pre>
1902 .SETSLANT 13
1903 </pre>
1905 If you change the degree of slant and later want to set it back
1906 to the <strong>mom</strong> default, do
1908 <pre>
1909 .SETSLANT RESET
1910 </pre>
1912 <strong>NOTE:</strong> By itself, <strong>SETSLANT</strong>
1913 will not start pseudo-italicising type; it merely tells
1914 <strong>mom</strong> what degree of slant you want. To start
1915 pseudo-italicising, use the
1916 <a href="definitions.html#TERMS_INLINES">inline escape</a>
1917 <strong>\*[SLANT]</strong>.
1918 <br>
1920 <!---\*[SLANT]--->
1922 <hr width="66%" align="left">
1923 <a name="SLANT_INLINE"><h3><u>Pseudo italic on/off</u></h3></a>
1924 <br>
1925 Inline: <strong>\*[SLANT] -- turn pseudo-italic on</strong>
1926 <br>
1927 Inline: <strong>\*[SLANTX] -- turn pseudo-italic off</strong>
1930 <strong>\*[SLANT]</strong> begins pseudo-italicising type.
1931 <strong>\*[SLANTX]</strong> turns the feature off. Both are
1932 <a href="definitions.html#TERMS_INLINES">inline escapes</a>,
1933 therefore they should not appear as separate lines, but rather
1934 be embedded in text lines, like this:
1936 <pre>
1937 Not \*[SLANT]everything\*[SLANTX] is as it seems.
1938 </pre>
1940 Alternatively, if you wanted the whole line pseudo-italicised,
1941 you'd do
1943 <pre>
1944 \*[SLANT]Not everything is as it seems.\*[SLANTX]
1945 </pre>
1947 Once <strong>\*[SLANT]</strong> is invoked, it remains in effect
1948 until turned off.
1951 <strong>NOTE:</strong> If you're using the
1952 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
1953 with
1954 <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
1955 <strong>mom</strong> underlines pseudo-italics by default. To
1956 change this behaviour, use the special macro
1957 <a href="docprocessing.html#SLANT_MEANS_SLANT">SLANT_MEANS_SLANT</a>.
1958 <br>
1960 <!---SETBOLDER--->
1962 <hr width="66%" align="left">
1963 <a name="SETBOLDER"><h3><u>Set amount of emboldening</u></h3></a>
1964 <br>
1965 Macro: <strong>SETBOLDER</strong> <var>&lt;amount of emboldening, in machine units&gt; | RESET</var>
1968 Emboldening of type is accomplished by printing characters
1969 twice; the second printing is slightly offset from the first,
1970 effectively &quot;thickening&quot; the character.
1971 <strong>SETBOLDER</strong> lets you set the number of
1972 <a href="definitions.html#TERMS_UNITS">machine units</a>
1973 for the offset. <strong>Mom</strong>'s default is 700 units, which
1974 produces an acceptable approximation of a bold font. If you want
1975 another value -- say, 500 units -- you'd set it by entering
1977 <pre>
1978 .SETBOLDER 500
1979 </pre>
1981 If you change the emboldening offset and later want to set it back
1982 to the <strong>mom</strong> default, do
1984 <pre>
1985 .SETBOLDER RESET
1986 </pre>
1988 <strong>NOTE:</strong> By itself, <strong>SETBOLDER</strong>
1989 will not start emboldening type; it merely tells
1990 <strong>mom</strong> what you want the emboldening offset to be.
1991 To start emboldening, use the
1992 <a href="definitions.html#TERMS_INLINES">inline escape</a>
1993 <strong>\*[BOLDER]</strong>.
1994 <br>
1996 <!---\*[BOLDER]--->
1998 <hr width="66%" align="left">
1999 <a name="BOLDER_INLINE"><h3><u>Emboldening on/off</u></h3></a>
2000 <br>
2001 Inline: <strong>\*[BOLDER] -- turn emboldening on</strong>
2002 <br>
2003 Inline: <strong>\*[BOLDERX] -- turn emboldening off</strong>
2006 <strong>\*[BOLDER]</strong> begins emboldening type.
2007 <strong>\*[BOLDERX]</strong> turns the feature off. Both are
2008 <a href="definitions.html#TERMS_INLINES">inline escapes</a>,
2009 therefore they should not appear as separate lines, but rather
2010 be embedded in text lines, like this:
2012 <pre>
2013 Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
2014 </pre>
2016 Alternatively, if you wanted the whole line emboldened,
2017 you'd do
2019 <pre>
2020 \*[BOLDER]Not everything is as it seems.\*[BOLDERX]
2021 </pre>
2023 Once <strong>\*[BOLDER]</strong> is invoked, it remains in effect
2024 until turned off.
2027 <strong>NOTE:</strong> If you're using the
2028 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
2029 with
2030 <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
2031 <strong>mom</strong> ignores <strong>\*[BOLDER]</strong>
2032 requests.
2033 <br>
2035 <!---CONDENSE--->
2037 <hr width="66%" align="left">
2038 <a name="CONDENSE"><h3><u>Set percentage for pseudo-condensed type</u></h3></a>
2039 <br>
2040 Macro: <strong>CONDENSE</strong> <var>&lt;pseudo-condense percentage&gt;</var>
2043 Pseudo-condensing of type is accomplished by reducing the width of
2044 characters at a given point size without reducing their height,
2045 effectively narrowing them so they look like condensed type.
2046 <strong>CONDENSE</strong> tells <strong>mom</strong> what
2047 percentage of the normal character width you want the characters
2048 to be condensed.
2050 <strong>Mom</strong> has no default value for
2051 <strong>CONDENSE</strong>, therefore you must set it before using the
2052 <a href="definitions.html#TERMS_INLINES">inline escape</a>
2053 <a href="#COND_INLINE">\*[COND]</a>.
2054 80 percent of the normal character width is a good value, and
2055 you'd set it like this:
2057 <pre>
2058 .CONDENSE 80
2059 </pre>
2061 <strong>NOTE:</strong> By itself, <strong>CONDENSE</strong>
2062 will not start pseudo-condensing type; it merely tells
2063 <strong>mom</strong> what percentage of the normal character
2064 width you want characters to be condensed.
2065 To start pseudo-condensing, use the
2066 <a href="definitions.html#TERMS_INLINES">inline escape</a>
2067 <strong>\*[COND]</strong>.
2069 <strong>Additional note:</strong> Make sure that pseudo-condensing
2070 is off (with
2071 <a href="#COND_INLINE">\*[CONDX]</a>)
2072 before before making any changes to the pseudo-condense percentage
2073 with <strong>CONDENSE</strong>.
2074 <br>
2076 <!---\*[COND]--->
2078 <hr width="66%" align="left">
2079 <a name="COND_INLINE"><h3><u>Pseudo-condensing on/off</u></h3></a>
2080 <br>
2081 Inline: <strong>\*[COND] -- turn pseudo-condensing on</strong>
2082 <br>
2083 Inline: <strong>\*[CONDX] -- turn pseudo-condensing off</strong>
2086 <strong>\*[COND]</strong> begins pseudo-condensing type.
2087 <strong>\*[CONDX]</strong> turns the feature off. Both are
2088 <a href="definitions.html#TERMS_INLINES">inline escapes</a>,
2089 therefore they should not appear as separate lines, but rather
2090 be embedded in text lines, like this:
2092 <pre>
2093 \*[COND]Not everything is as it seems.\*[CONDX]
2094 </pre>
2096 <strong>\*[COND]</strong> remains in effect until you turn it
2097 off with <strong>\*[CONDX]</strong>.
2100 <strong>IMPORTANT:</strong> You MUST turn <strong>\*[COND]</strong>
2101 off before making any changes to the point size of your type, either
2102 via the
2103 <a href="#PS">PS</a>
2104 macro or with the <strong>\s</strong> inline escape. If you wish
2105 the new point size to be pseudo-condensed, simply reinvoke
2106 <strong>\*[COND]</strong> afterwards. Equally,
2107 <strong>\*[COND]</strong> must be turned off before changing the
2108 condense percentage with <a href="#CONDENSE">CONDENSE</a>.
2111 <strong>NOTE:</strong> If you're using the
2112 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
2113 with
2114 <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
2115 <strong>mom</strong> ignores <strong>\*[COND]</strong>
2116 requests.
2117 <br>
2119 <!---EXTEND--->
2121 <hr width="66%" align="left">
2122 <a name="EXTEND"><h3><u>Set percentage for pseudo-extended type</u></h3></a>
2123 <br>
2124 Macro: <strong>EXTEND</strong> <var>&lt;pseudo-extend percentage&gt;</var>
2127 Pseudo-extending of type is accomplished by increasing the width of
2128 characters at a given point size without increasing their height,
2129 effectively widening them so they look like extended type.
2130 <strong>EXTEND</strong> tells <strong>mom</strong> what
2131 percentage of the normal character width you want the characters
2132 to be extended.
2134 <strong>Mom</strong> has no default value for
2135 <strong>EXTEND</strong>, therefore you must set it before using the
2136 <a href="definitions.html#TERMS_INLINES">inline escape</a>
2137 <a href="#EXT_INLINE">\*[EXT]</a>.
2138 120 percent of the normal character width is a good value, and
2139 you'd set it like this:
2141 <pre>
2142 .EXTEND 120
2143 </pre>
2145 <strong>NOTE:</strong> By itself, <strong>EXTEND</strong>
2146 will not start pseudo-extending type; it merely tells
2147 <strong>mom</strong> what percentage of the normal character
2148 width you want characters to be extended.
2149 To start pseudo-extending, use the
2150 <a href="definitions.html#TERMS_INLINES">inline escape</a>
2151 <strong>\*[EXT]</strong>.
2154 <strong>Additional note:</strong> Make sure that
2155 pseudo-extending is off (with
2156 <a href="#EXT_INLINE">\*[EXTX]</a>)
2157 before before making any changes to the pseudo-extend percentage
2158 with <strong>EXTEND</strong>.
2159 <br>
2161 <!---\*[EXT]--->
2163 <hr width="66%" align="left">
2164 <a name="EXT_INLINE"><h3><u>Pseudo-extending on/off</u></h3></a>
2165 <br>
2166 Inline: <strong>\*[EXT] -- turn pseudo-extending on</strong>
2167 <br>
2168 Inline: <strong>\*[EXTX] -- turn pseudo-extending off</strong>
2171 <strong>\*[EXT]</strong> begins pseudo-extending type.
2172 <strong>\*[EXTX]</strong> turns the feature off. Both are
2173 <a href="definitions.html#TERMS_INLINES">inline escapes</a>,
2174 therefore they should not appear as separate lines, but rather
2175 be embedded in text lines, like this:
2177 <pre>
2178 \*[EXT]Not everything is as it seems.\*[EXTX]
2179 </pre>
2181 <strong>\*[EXT]</strong> remains in effect until you turn it
2182 off with <strong>\*[EXTX]</strong>.
2185 <strong>IMPORTANT:</strong> You MUST turn <strong>\*[EXT]</strong>
2186 off before making any changes to the point size of your type, either
2187 via the
2188 <a href="#PS">PS</a>
2189 macro or with the <strong>\s</strong> inline escape. If you wish
2190 the new point size to be pseudo-extended, simply reinvoke
2191 <strong>\*[EXT]</strong> afterwards. Equally,
2192 <strong>\*[EXT]</strong> must be turned off before changing the
2193 extend percentage with <a href="#EXTEND">EXTEND</a>.
2196 <strong>NOTE:</strong> If you're using the
2197 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
2198 with
2199 <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
2200 <strong>mom</strong> ignores <strong>\*[EXT]</strong>
2201 requests.
2202 <br>
2203 <hr>
2205 <!====================================================================>
2207 <a name="INTRO_ALDRLD"></a>
2209 <a name="ALDRLD">
2210 <h2><u>Vertical movement</u></h2>
2211 </a>
2213 The two macros in this section allow you to move down or up on the page
2214 relative to the current
2215 <a href="definitions.html#TERMS_BASELINE">baseline</a>.
2217 <a name="INDEX_ALDRLD">
2218 <h3><u>Vertical movement macro list</u></h3>
2219 </a>
2220 <ul>
2221 <li><a href="#ALD">ALD</a> -- Advance Lead
2222 <li><a href="#RLD">RLD</a> -- Reverse Lead
2223 </ul>
2225 <!---ALD--->
2227 <hr width="66%" align="left">
2228 <a name="ALD"><h3><u>Advance Lead (move downward)</u></h3></a>
2229 <br>
2230 Macro: <strong>ALD</strong> <var>&lt;distance to move downward&gt;</var>
2231 <br>
2232 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
2235 <strong>ALD</strong> takes one argument: the distance to move downward
2236 on the page relative to the current vertical position.
2238 Used by itself, or preceded by
2239 <a href="#BR">BR</a>,
2240 <strong>ALD</strong> will advance by one line space plus the
2241 distance you specify. Preceded by
2242 <a href="#EL">EL</a>,
2243 it will advance by exactly the distance you specify.
2245 <strong>ALD</strong> requires a unit of measure. Decimal fractions
2246 are allowed, and values may be combined. Therefore, to move down
2247 on the page by 1/4 of an inch, you could enter either
2249 <pre>
2250 .ALD .25i
2252 .ALD 1P+6p
2253 </pre>
2255 As the mnemonic (<strong>A</strong>dvance
2256 <strong>L</strong>ea<strong>D</strong>) suggests, you'll most often
2257 use <strong>ALD</strong> with
2258 <a href="definitions.html#TERMS_PICASPOINTS">points</a>
2259 of lead.
2262 <strong>NOTE:</strong> if you want to use <strong>ALD</strong>
2263 at the top of a page (i.e. to advance to the starting position
2264 of type on a page), combine the value you want with -1v (minus
2265 one line space), like this:
2267 <pre>
2268 .ALD 1i-1v
2269 </pre>
2271 At the top of a page, this will advance one inch from the
2272 top edge of the paper. Without the -1v, the same command would
2273 advance one inch from the top of the page plus the distance of
2274 one line space.
2276 <strong>Important:</strong> Do NOT use <strong>ALD</strong> in this
2277 way if you have set a top margin with
2278 <a href="#T_MARGIN">T_MARGIN</a>
2280 <a href="#PAGE">PAGE</a>.
2281 <br>
2283 <!---RLD--->
2285 <hr width="66%" align="left">
2286 <a name="RLD"><h3><u>Reverse Lead (move upward)</u></h3></a>
2287 <br>
2288 Macro: <strong>RLD</strong> <var>&lt;distance to move upward&gt;</var>
2289 <br>
2290 <em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
2293 <strong>RLD</strong> takes one argument: the distance to move
2294 upward on the page relative to the current vertical position.
2296 Used by itself, or preceded by
2297 <a href="#BR">BR</a>,
2298 <strong>RLD</strong> will advance by one line space, then
2299 reverse by the distance you specify. Preceded by
2300 <a href="#EL">EL</a>,
2301 it will reverse by exactly the distance you specify.
2303 <strong>RLD</strong> requires a unit of measure. Decimal fractions
2304 are allowed, and values may be combined. Therefore, to move up
2305 on the page by 1/4 of an inch, you could enter either
2307 <pre>
2308 .RLD .25i
2310 .RLD 1P+6p
2311 </pre>
2313 As the mnemonic (<strong>R</strong>dvance
2314 <strong>L</strong>ea<strong>D</strong>) suggests, you'll most often
2315 use <strong>RLD</strong> with
2316 <a href="definitions.html#TERMS_PICASPOINTS">points</a>
2317 of lead.
2318 <br>
2319 <hr>
2321 <!====================================================================>
2323 <a name="INTRO_TABS"></a>
2325 <a name="TABS">
2326 <h2><u>Tabs</u></h2>
2327 </a>
2329 <strong>Mom</strong> provides two different kinds of tab setup:
2330 typesetting tabs and string tabs. Neither one has anything to
2331 do with the tab key on your keyboard, and both are utterly
2332 divorced from groff's notion of tabs. I recommend reading this
2333 section carefully in order to understand how
2334 <strong>mom</strong> handles tabs.
2336 <a name="TYPESETTING_TABS"><h3><u>Typesetting tabs</u></h3></a>
2338 Typesetting tabs are defined by both an indent from the left margin and
2339 a line length. This is quite different from typewriter-style tab stops
2340 (the groff norm) that only define the left indent. In conjunction
2341 with the multi-column macros, typesetting tabs significantly facilitate
2342 tabular and columnar work.
2344 Typesetting tabs are created with the <strong>TAB_SET</strong>
2345 macro. <strong>TAB_SET</strong> identifies the tab (by number),
2346 establishes its left indent and line length, and optionally sets
2347 a quad direction and fill mode. After tabs have been created with
2348 <strong>TAB_SET</strong>, they can be called at any time with the
2349 <strong>TAB</strong> macro.
2351 <strong>NOTE:</strong> see the section
2352 <a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a>
2353 for information and advice on using tabs with the
2354 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
2356 <a name="TYPESETTING_TABS_TUT"><h3><u>Quickie tutorial on typesetting tabs</u></h3></a>
2358 Say you want to set up three tabs to produce an employee evaluation
2359 that looks something like this:
2361 <a name="TYPSETTING_TABS_SAMPLE"></a>
2362 <pre>
2363 CRITERION EVALUATION COMMENTS
2365 Service Good Many clients specifically request
2366 support from Joe by name.
2368 Punctuality Satisfactory Tends to arrive after 8:00am, but
2369 often works through lunch hour.
2371 Team spirit Needs work Persistently gives higher priority
2372 to helping clients than respecting
2373 organizational hierarchy.
2374 </pre>
2376 You want the first tab (&quot;CRITERION&quot;)
2377 <br>
2378 <ul>
2379 <li>to begin at the left margin of the page (i.e. no indent)
2380 <li>to have a line length of 5 picas
2381 <li>to be set flush left
2382 </ul>
2383 <br>
2384 Tabs must be numbered, and each has to be set up with a separate
2385 <a href="#TAB_SET">TAB_SET</a>
2386 line. Therefore, to set up tab 1, you enter
2388 <pre>
2389 .TAB_SET 1 0 5P L
2390 | | | |
2391 tab #__| | | |__direction
2393 indent__| |__length
2394 </pre>
2396 You want the second tab (&quot;EVALUATION&quot;)
2397 <br>
2398 <ul>
2399 <li>to begin 8 picas from the left margin
2400 <li>to have a length of 9 picas
2401 <li>to be set centered.
2402 </ul>
2403 <br>
2404 You set it up like this:
2406 <pre>
2407 .TAB_SET 2 8P 9P C
2408 | | | |
2409 tab #__| | | |__direction
2411 indent__| |__length
2412 </pre>
2414 You want the third tab (&quot;COMMENTS&quot;)
2415 <br>
2416 <ul>
2417 <li>to begin 19 picas from the left margin
2418 <li>to have a length of 17 picas
2419 <li>to be set flush left, <a href="definitions.html#TERMS_FILLED">filled</a>
2420 </ul>
2421 <br>
2422 The setup looks like this:
2424 <pre>
2425 .TAB_SET 3 19P 17P L QUAD
2426 | | | | |
2427 | | | | |__fill output lines
2428 | | | |
2429 tab #__| | | |__direction
2431 indent__| |__length
2432 </pre>
2434 Once the tabs are set up, you can call them in one of two ways:
2435 <br>
2436 <ul>
2437 <li><a href="#TAB">TAB</a> (with the tab
2438 number as an argument) breaks the current line,
2439 advances one linespace, and calls the tab.
2440 <li><a href="#TN">TN</a> (Tab Next) keeps
2441 you on the current line and moves over to the next
2442 tab in sequence (i.e. from 1 to 2, 2 to 3, etc.).
2443 </ul>
2444 <br>
2445 To exit from tabs and restore your original left margin, line length,
2446 quad direction and fill mode, use
2447 <a href="#TQ">TQ</a>
2448 (Tab Quit).
2450 Here's how the input for our sample employee evaluation looks
2451 (with some introductory parameters):
2453 <pre>
2454 .PAGE 8.5i 11i 1i 1i 1i
2455 .FAMILY T
2456 .FT R
2457 .PS 14
2458 .LS 16
2459 .QUAD LEFT
2460 .KERN
2461 .HY OFF
2462 .SS 0
2463 .TAB_SET 1 0 5P L
2464 .TAB_SET 2 8P 9P C
2465 .TAB_SET 3 19P 17P L QUAD
2466 .TAB 1
2467 CRITERION
2469 EVALUATION
2471 COMMENTS
2473 .TAB 1
2474 Service
2476 Good
2478 Many clients specifically request support from Joe by name.
2480 .TAB 1
2481 Punctuality
2483 Satisfactory
2485 Tends to arrive after 8:00am, but often works through lunch hour.
2487 .TAB 1
2488 Team spirit
2490 Needs work
2492 Persistently gives higher priority to helping clients
2493 than respecting organizational hierarchy.
2495 </pre>
2497 Try setting this up and previewing it with
2499 <pre>
2500 groff -mom -X &lt;filename&gt;
2501 </pre>
2503 Notice how <kbd>.TN</kbd> simply moves over to the next tab,
2504 while the combination <kbd>.SP/.TAB 1</kbd> breaks the
2505 line, advances by one extra linespace, and calls the first tab.
2507 Notice, too, how the <kbd>QUAD</kbd> argument passed to
2508 tab 3 means you don't have to worry about the length of
2509 <a href="definitions.html#TERMS_INPUTLINE">input lines</a>;
2510 <strong>mom</strong>
2511 <a href="definitions.html#TERMS_FILLED">fills</a>
2512 the tab and sets the type flush left.
2514 <a name="STRING_TABS"><h3><u>String tabs (autotabs)</u></h3></a>
2516 String tabs let you mark off tab positions inline. Left indents
2517 and line lengths are calculated from the beginning and end positions of
2518 the marks. This is especially useful when tab indents and lengths
2519 need to be determined from the text that goes in each tab.
2521 Setting up string tabs is a two-step procedure. First, you enter an
2522 input line in which you mark off where you want tabs to begin and end.
2523 (This is often best done in conjunction with the
2524 <a href="goodies.html#SILENT">SILENT</a>
2525 macro.)
2527 Next, you invoke the
2528 <a href="#ST">ST</a>
2529 macro for every string tab you defined, and optionally pass quad and
2530 fill information to it. That done, string tabs are called with
2532 <a href="#TAB">TAB</a>
2533 macro, just like typesetting tabs.
2535 In combination with the
2536 <a href="goodies.html#PAD">PAD</a>
2537 macro and the groff inline escape
2538 <a href="inlines.html#INLINE_HORIZONTAL_GROFF">\h</a>
2539 (move horizontally across the page) or <strong>mom</strong>'s
2540 <a href="inlines.html#INLINE_HORIZONTAL_MOM">\*[FP#]</a>
2541 (Forward Points) inline, string tabs provide
2542 tremendous flexibility in setting up complex tab structures.
2544 <a name="STRING_TABS_TUT"><h3><u>Quickie tutorial on string tabs</u></h3></a>
2546 Say you want to set up tabs for the
2547 <a href="#TYPSETTING_TABS_SAMPLE">employee evaluation form</a>
2548 used as an example in the
2549 <a href="#TYPESETTING_TABS_TUT">typesetting tabs tutorial</a>.
2550 This time, though, you want to play around with the point size of
2551 type, so you can't know exactly how long the tabs will be or where
2552 they should start. All you know is
2553 <br>
2554 <ul>
2555 <li>CRITERION is the longest line in tab 1
2556 <li>EVALUATION is the longest line in tab 2
2557 <li>tab 3 should extend to the current right margin
2558 <li>you want a 1 pica gutter between each tab
2559 </ul>
2560 <br>
2561 This is an ideal job for string tabs.
2563 The first thing you need for string tabs is an
2564 <a href="definitions.html#TERMS_INPUTLINE">input line</a>
2565 with tab positions marked on it. Tabs are marked with the
2566 <a href="definitions.html#TERMS_INLINES">inline escapes</a>
2567 <strong>\*[ST#]</strong> and <strong>\*[ST#X]</strong>. (In this
2568 example, we enclose the input line with the
2569 <a href="goodies.html#SILENT">SILENT</a>
2570 macro so the line doesn't print. We also use the
2571 <a href="goodies.html#PAD">PAD</a>
2572 macro to permit defining tab 3 as simply &quot;the amount of
2573 space remaining on the input line.&quot;)
2575 The setup looks like this:
2577 <pre>
2578 .SILENT
2579 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
2580 .SILENT OFF
2581 </pre>
2583 The long line after <kbd>.PAD</kbd> looks scary, but it isn't.
2584 Here's what it means when broken down into its component parts:
2585 <br>
2586 <ul>
2587 <li>The longest line in tab 1 is &quot;CRITERION&quot;, so we
2588 enclose CRITERION with begin/end markers for string tab 1:
2590 <kbd>\*[ST1]CRITERION\*[ST1X]</kbd>
2591 <br>
2592 <li>We want a 1 pica (12 points) gutter between tab 1 and 2,
2593 so we insert 12 points of space with \*[FP12]
2594 (<strong>F</strong>orward <strong>P</strong>oints 12):
2596 <kbd>\*[FP12]</kbd>
2597 <br>
2598 <li>The longest line in tab 2 is &quot;EVALUATION&quot;, so
2599 we enclose EVALUATION with begin/end markers for string
2600 tab 2:
2602 <kbd>\*[ST2]EVALUATION\*[ST2X]</kbd>
2603 <br>
2604 <li>We want 1 pica (12 points) between tab 2 and 3, so we
2605 insert 12 points of space with another \*[FP12]:
2607 <kbd>\*[FP12]</kbd>
2608 <br>
2609 <li>We want tab 3 to be as long as whatever space remains on
2610 the current line length, so we enclose the
2611 <a href="goodies.html#PAD_MARKER">pad marker</a>
2612 (#) with begin/end markers for string tab 3:
2614 <kbd>\*[ST3]#\*[ST3X]</kbd>
2615 <br>
2616 </ul>
2617 <br>
2618 The tabs are now defined, but they require
2619 <a href="definitions.html#TERMS_QUAD">quad direction</a>
2621 <a href="definitions.html#TERMS_FILLED">fill</a>
2622 information. For each string tab defined above, enter a
2623 separate
2624 <a href="#ST">ST</a>
2625 line, like this:
2627 <pre>
2628 .ST 1 L
2629 .ST 2 L
2630 .ST 3 L QUAD
2631 | | |
2632 | | |__fill output lines
2634 tab__| |__direction
2635 number
2636 </pre>
2638 From here on in, you call the tabs with
2639 <a href="#TAB">TAB</a>
2641 <a href="#TN">TN</a>
2642 just like typesetting tabs (see
2643 <a href="#TYPESETTING_TABS_TUT">typesetting tabs tutorial</a>).
2645 Here's the complete setup and entry for the sample employee
2646 evaluation form utilising string tabs.
2648 <pre>
2649 .PAGE 8.5i 11i 1i 1i 1i
2650 .FAMILY T
2651 .FT R
2652 .PS 14
2653 .LS 16
2654 .QUAD LEFT
2655 .KERN
2656 .HY OFF
2657 .SS 0
2658 .SILENT
2659 .PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
2660 .SILENT OFF
2661 .ST 1 L
2662 .ST 2 L
2663 .ST 3 L QUAD
2664 .TAB 1
2665 CRITERION
2667 EVALUATION
2669 COMMENTS
2671 .TAB 1
2672 Service
2674 Good
2676 Many clients specifically request support from Joe by name.
2678 .TAB 1
2679 Punctuality
2681 Satisfactory
2683 Tends to arrive after 8:00am, but often works through lunch hour.
2685 .TAB 1
2686 Team spirit
2688 Needs work
2690 Persistently gives higher priority to helping clients
2691 than respecting organizational hierarchy.
2693 </pre>
2695 Try setting this up and previewing it with
2697 <pre>
2698 groff -mom -X &lt;filename&gt;
2699 </pre>
2701 Now, change the point size of the above sample to 12 and preview
2702 it again. You'll see that the tab structure remains identical (tab
2703 1=CRITERION, tab 2=EVALUATION, tab 3=space remaining, and the gutter
2704 between tabs is still 1 pica), while the position and length
2705 of the tabs have altered because of the new point size.
2707 Now try increasing the gutters to 2 picas (put an additional
2708 <kbd>\*[FP12]</kbd> after each <kbd>\*[FP12]</kbd>). Preview the
2709 file again, and notice how the tab structure remains the same, but
2710 the gutters are wider.
2713 <a name="INDEX_TABS">
2714 <h3><u>Tabs macro list</u></h3>
2715 </a>
2717 <ul>
2718 <li><a href="#TAB_SET">TAB_SET</a> (create typesetting tabs)
2719 <li><a href="#INLINE_ST">\*[ST]...\*[STX]</a> (inline escapes for marking String Tabs)
2720 <li><a href="#ST">ST</a> (set String Tabs)
2721 <li><a href="#TAB">TAB</a> (call tabs)
2722 <li><a href="#TN">TN</a> (Tab Next; call next tab in a sequence)
2723 <li><a href="#TQ">TQ</a> (Tab Quit)
2724 </ul>
2726 <!---TAB_SET--->
2728 <hr width="66%" align="left">
2729 <a name="TAB_SET"><h3><u>Set up typsetting tabs</u></h3></a>
2730 <br>
2731 Macro: <strong>TAB_SET</strong> <var>&lt;tab number&gt; &lt;indent&gt; &lt;length&gt; L | R | C | J [ QUAD ]</var>
2732 <br>
2733 Alias: <strong>TS</strong>
2734 <br>
2735 <em>*&lt;indent&gt; and &lt;length&gt; require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
2738 <strong>TAB_SET</strong> creates typesetting tabs that later can be
2739 called with
2740 <a href="#TAB">TAB</a>.
2741 Typesetting tabs are numbered, and defined by an indent, a length,
2742 and a &quot;direction&quot;, hence <strong>TAB_SET</strong> has
2743 four required arguments:
2744 <br>
2745 <ul>
2746 <li>a tab number
2747 <li>an indent (measured from the left margin of the page,
2748 or, if you're already in a tab, from the left margin of the tab)
2749 <li>a length
2750 <li>a direction
2751 </ul>
2752 <br>
2753 To set up a centered tab 6 picas long and 9 points from the left
2754 margin, you'd enter
2756 <pre>
2757 .TAB_SET 1 9p 6P C
2758 </pre>
2760 The tab number in the above (&quot;1&quot;) is simply an
2761 identifier. It could have been 4, or 17, or 296. There's no
2762 need to set up tabs in numerical sequence.
2764 By default, tabs are in
2765 <a href="definitions.html#TERMS_NOFILL">nofill</a>
2766 mode, meaning you can enter text in tabs on a line for line basis
2767 without having to use the
2768 <a href="#BR">BR</a>
2769 macro. If you want a tab to be
2770 <a href="definitions.html#TERMS_FILLED">filled</a>,
2771 pass the optional argument <strong>QUAD</strong>, which will
2772 make the tab behave as if you'd entered <kbd>.QUAD L | R |
2773 C</kbd>.
2776 <a href="definitions.html#TERMS_JUST">justified</a>
2777 tabs, simply pass the argument <strong>J</strong> (without the
2778 <strong>QUAD</strong> argument), like this:
2780 <pre>
2781 .TAB 1 9p 6P J
2782 </pre>
2784 Once tabs are set, they can be called at any time with the
2785 <a href="#TAB">TAB #</a>
2786 macro, where &quot;#&quot; is the number of the desired tab.
2788 You can set up any number of typesetting tabs. However, be
2789 aware that
2790 <a href="#STRING_TABS">string tabs</a>
2791 are also called with <strong>TAB #</strong>, so be careful that you
2792 don't set up a typesetting tab numbered, say, 4, when you already
2793 have a string tab numbered 4. Every tab, typesetting or string,
2794 must have a unique numeric identifier.
2796 <strong>NOTE:</strong> If you use <strong>TAB_SET</strong> while
2797 you're currently inside a tab, the indent argument is the distance from
2798 the tab's left margin, not the left margin of the page. Therefore,
2799 you should exit tabs (with
2800 <a href="#TQ">TQ</a>)
2801 before creating new tabs (unless, of course, you want to set
2802 up a tab structure within the confines of an existing tab).
2804 <strong>IMPORTANT:</strong> Turn all indents off (see
2805 <a href="#INDENTS">Indents</a>)
2806 before setting up tabs with <strong>TAB_SET</strong>, or
2807 <strong>mom</strong> may get confused.
2808 <br>
2810 <!---INLINE_ST--->
2812 <hr width="66%" align="left">
2813 <a name="INLINE_ST"><h3><u>Mark positions of string tabs</u></h3></a>
2814 <br>
2815 Inlines: <strong>\*[ST&lt;number&gt;]...\*[ST&lt;number&gt;X]</strong>
2818 String tabs need to be marked off with
2819 <a href="definitions.html#TERMS_INLINES">inline escapes</a>
2820 before being set up with the
2821 <a href="#ST">ST</a>
2822 macro. Any input line may contain string tab markers.
2823 <i>&lt;number&gt;</i>, above, means the numeric identifier of
2824 the tab. The following shows a sample input line with string
2825 tab markers.
2827 <pre>
2828 \*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
2829 </pre>
2831 String tab 1 begins at the start of the line and ends after the word
2832 &quot;time&quot;. String tab 2 starts at &quot;good&quot; and ends
2833 after &quot;men&quot;. Inline escapes (e.g. font or point size
2834 changes, or horizontal movements, including
2835 <a href="goodies.html#PAD">padding</a>)
2836 are taken into account when <strong>mom</strong> determines the
2837 position and length of string tabs.
2839 Up to nineteen string tabs may be marked (not necessarily all on
2840 the same line, of course), and they must be numbered between 1
2841 and 19.
2843 Once string tabs have been marked in input lines, they have to
2844 be &quot;set&quot; with
2845 <a href="#ST">ST</a>,
2846 after which they may be called, by number, with
2847 <a href="#TAB">TAB</a>.
2849 <strong>NOTE:</strong> Lines with string tabs marked off in them
2850 are normal input lines, i.e. they get printed, just like any
2851 input line. If you want to set up string tabs without the line
2852 printing, use the
2853 <a href="#SILENT">SILENT</a>
2854 macro.
2856 <strong>IMPORTANT:</strong> Do not try to set up string tabs on
2857 a line that is broken with
2858 <a href="#SPREAD">SPREAD</a>.
2859 <strong>Mom</strong> calculates string tab positions and lengths
2860 as she reads the input line, not after the line has undergone
2861 manipulations to the word spacing.
2862 <br>
2864 <!---ST--->
2866 <hr width="66%" align="left">
2867 <a name="ST"><h3><u>Set string tabs</u></h3></a>
2868 <br>
2869 Macro: <strong>ST</strong> <var>&lt;tab number&gt; L | R | C | J [ QUAD ]</var>
2872 After string tabs have been marked off on an input line (see
2873 <a href="#INLINE_ST">\*[ST]...\*[STX]</a>),
2874 you need to &quot;set&quot; them by giving them a direction
2875 and, optionally, the <strong>QUAD</strong> argument. In this
2876 respect, <strong>ST</strong> is like
2877 <a href="#TAB_SET">TAB_SET</a>
2878 except that you don't have to give <strong>ST</strong> an indent
2879 or a line length (that's already taken care of, inline, by
2880 <kbd>\*[ST]...\*[STX]</kbd>). If you want string tab 1 to be
2881 left, enter
2883 <pre>
2884 .ST 1 L
2885 </pre>
2887 If you want it to be left and
2888 <a href="definitions.html#TERMS_FILLED">filled</a>, enter
2890 <pre>
2891 .ST 1 L QUAD
2892 </pre>
2894 If you want it to be justified, enter
2896 <pre>
2897 .ST 1 J
2898 </pre>
2900 See the
2901 <a href="#STRING_TABS_TUT">Quickie tutorial on string tabs</a>
2902 for a full explanation of setting up string tabs.
2903 <br>
2905 <!---TAB--->
2907 <hr width="66%" align="left">
2908 <a name="TAB"><h3><u>Call tabs</u></h3></a>
2909 <br>
2910 Macro: <strong>TAB</strong> <var>&lt;tab number&gt;</var>
2911 <br>
2912 Alias: <strong>TB</strong>
2914 After tabs have been defined (either with
2915 <a href="#TAB_SET">TAB_SET</a>
2917 <a href="#ST">ST</a>),
2918 <strong>TAB</strong> moves to whatever tab number you pass it as
2919 an argument. For example,
2921 <pre>
2922 .TAB 3
2923 </pre>
2925 moves you to tab 3.
2927 <a name="NOTE_TN"></a>
2928 <strong>NOTE:</strong> <strong>TAB</strong> breaks the line preceding
2929 it and advances 1 linespace. Hence,
2931 <pre>
2932 .TAB 1
2933 A line of text in tab 1.
2934 .TAB 2
2935 A line of text in tab 2.
2936 </pre>
2938 produces, on output
2940 <pre>
2941 A line of text in tab 1.
2942 A line of text in tab 2.
2943 </pre>
2945 If you want the tabs to line up, use
2946 <a href="#TN">TN</a>
2947 (Tab Next), like this:
2949 <pre>
2950 .TAB 1
2951 A line of text in tab 1.
2953 A line of text in tab 2.
2954 </pre>
2956 which produces
2958 <pre>
2959 A line of text in tab 1. A line of text in tab 2.
2960 </pre>
2962 If the text in your tabs runs to several lines, and you want the
2963 first lines of each tab to align, you must use the
2964 <a href="#MULTI_COLUMNS">multi-column</a> macros.
2966 <strong>ADDITIONAL NOTE:</strong> Any indents in effect prior to
2967 calling a tab are automatically turned off by <strong>TAB</strong>.
2968 If you were happily zipping down the page with a left indent of 2
2969 picas turned on, and you call a tab whose indent from the left margin
2970 is 6 picas, your new distance from the left margin will be 6 picas,
2971 not 6 picas plus the 2 pica indent.
2972 <br>
2974 <!---TN--->
2976 <hr width="66%" align="left">
2977 <a name="TN"><h3><u>Tab Next</u></h3></a>
2978 <br>
2979 Macro: <strong>TN</strong>
2980 <br>
2983 <strong>TN</strong> moves over to the next tab in numeric
2984 sequence (tab n+1) without advancing on the page. See the
2985 <a href="#NOTE_TN">NOTE</a>
2986 in the description of the <strong>TAB</strong> macro for an
2987 example of how <strong>TN</strong> works.
2989 <strong>NOTE:</strong> <strong>TN</strong> is like
2990 <a href="#EL">EL</a>
2991 in that it doesn't work as advertised on the last line before a
2992 footer trap is sprung. If you need to use <strong>TN</strong>
2993 on the last line of a page with a footer trap, turn the trap off with
2994 <a href="goodies.html#TRAP">TRAP</a>,
2995 as in this example:
2997 <pre>
2998 .TAB_SET 1 0 1P L
2999 .TAB_SET 2 1P 20P L
3000 .TAB 1
3001 .TRAP OFF
3004 The first rule of survival is &quot;make and keep good friends.&quot;
3005 .TRAP
3006 </pre>
3008 The above, at the bottom of a page, will look something like this:
3010 <pre>
3011 1. The first rule of survival is &quot;make and keep good friends.&quot;
3012 </pre>
3014 If you hadn't turned the trap off before <kbd>.TN</kbd>,
3015 &quot;1.&quot; would have appeared as the last line on the page,
3016 with &quot;The first rule of survival...&quot; being the first
3017 line on the next page.
3018 <br>
3020 <!---TQ--->
3022 <hr width="66%" align="left">
3023 <a name="TQ"><h3><u>Tab Quit</u></h3></a>
3024 <br>
3025 Macro: <strong>TQ</strong>
3026 <br>
3029 <strong>TQ</strong> takes you out of whatever tab you were in,
3030 advances 1 linespace, and restores the left margin, line length,
3031 quad direction and
3032 <a href="definitions.html#TERMS_FILLED">fill mode</a>
3033 that were in effect prior to invoking any tabs.
3034 <br>
3035 <hr>
3037 <!====================================================================>
3039 <a name="INTRO_MULTI_COLUMNS"></a>
3041 <a name="MULTI_COLUMNS">
3042 <h2><u>Multi-Columns</u></h2>
3043 </a>
3045 Tabs are not by nature columnar, which is to say that if the text
3046 inside a tab runs to several lines, calling another tab does not
3047 automatically move to the
3048 <a href="definitions.html#TERMS_BASELINE">baseline</a>
3049 of the first line in the previous tab. To demonstrate:
3051 <pre>
3052 .TAB 1
3053 Carrots
3054 Potatoes
3055 Broccoli
3056 .TAB 2
3057 $1.99/5 lbs
3058 $0.25/lb
3059 $0.99/bunch
3060 </pre>
3062 produces, on output
3064 <pre>
3065 Carrots
3066 Potatoes
3067 Broccoli
3068 $1.99/5 lbs
3069 $0.25/lb
3070 $0.99/bunch
3071 </pre>
3073 The multi-column macros allow you to set tabs in columnar
3074 fashion, rather than line by line. When you invoke multi-column
3075 mode (with
3076 <a href="#MCO">MCO</a>),
3077 <strong>mom</strong> saves the position of the current baseline.
3078 <a href="#MCR">MCR</a>
3079 (Multi-column return) at any point while multi-columns are on
3080 returns you to the saved position. Exiting multi-columns
3081 (<a href="#MCX">MCX</a>)
3082 quits the current tab (if you're in one) and moves you to the
3083 bottom of the longest column. (Note that you do not have to use
3084 multi-columns in conjunction with tabs.)
3086 Using our example above, but setting it in multi-column mode,
3088 <pre>
3089 .MCO
3090 .TAB 1
3091 Carrots
3092 Potatoes
3093 Broccoli
3094 .MCR
3095 .TAB 2
3096 $1.99/5 lbs
3097 $0.25/lb
3098 $0.99/bunch
3099 .MCX
3100 </pre>
3102 produces
3104 <pre>
3105 Carrots $1.99/5 lbs
3106 Potatoes $0.25/lb
3107 Broccoli $0.99/bunch
3108 </pre>
3110 <strong>NOTE:</strong> Do not confuse <strong>MCO</strong> with
3112 <a href="docprocessing.html#COLUMNS">COLUMNS</a>
3113 macro in the
3114 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
3116 <a name="INDEX_MULTI_COLUMNS">
3117 <h3><u>Columns macro list</u></h3>
3118 </a>
3119 <ul>
3120 <li><a href="#MCO">MCO (begin multi-column setting)</a>
3121 <li><a href="#MCR">MCR (return to top of column)</a>
3122 <li><a href="#MCX">MCX (exit multi-columns)</a>
3123 </ul>
3125 <!---MCO--->
3127 <hr width="66%" align="left">
3128 <a name="MCO"><h3><u>Begin multi-column setting</u></h3></a>
3129 <br>
3130 Macro: <strong>MCO</strong>
3131 <br>
3134 <strong>MCO</strong>
3135 (<strong>M</strong>ulti-<strong>C</strong>olumn <strong>O</strong>n)
3136 is the macro you use to begin multi-column setting. It marks
3137 the current
3138 <a href="definitions.html#TERMS_BASELINE">baseline</a>
3139 as the top of your columns, for use late with
3140 <a href="#MCR">MCR</a>. See the
3141 <a href="#MULTI_COLUMNS">introduction to columns</a>
3142 for an explanation of multi-columns and some sample
3143 input.
3145 <strong>NOTE:</strong> Do not confuse <strong>MCO</strong> with
3147 <a href="docprocessing.html#COLUMNS">COLUMNS</a>
3148 macro in the
3149 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
3150 <br>
3152 <!---MCR--->
3154 <hr width="66%" align="left">
3155 <a name="MCR"><h3><u>Return to top of column</u></h3></a>
3156 <br>
3157 Macro: <strong>MCR</strong>
3158 <br>
3161 Once you've turned multi-columns on (with
3162 <a href="#MCO">MCO</a>),
3163 <strong>MCR</strong>, at any time, returns you to the top of
3164 your columns.
3165 <br>
3167 <!---MCX--->
3169 <hr width="66%" align="left">
3170 <a name="MCX"><h3><u>Exit multi-columns</u></h3></a>
3171 <br>
3172 Macro: <strong>MCX</strong> <var>[ &lt;distance to advance below longest column&gt; ]</var>
3173 <br>
3174 <em>*Optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
3177 <strong>MCX</strong> takes you out of any tab you were in (by silently
3178 invoking
3179 <a href="#TQ">TQ</a>) and advances to the bottom of the longest
3180 column.
3182 Without an argument, <strong>MCX</strong> advances 1 linespace
3183 below the longest column. Linespace, in this instance, is the
3184 <a href="definitions.html#TERMS_LEADING">leading</a>
3185 in effect <em>at the moment <strong>MCX</strong> is
3186 invoked.</em>
3188 If you pass the <var>&lt;distance&gt;</var> argument to
3189 <strong>MCX</strong>, it advances 1 linespace below the longest
3190 column (see above) PLUS the distance specified by the argumemnt.
3191 The argument requires a unit of measure; therefore, to advance
3192 an extra 6 points below where <strong>MCX</strong> would
3193 normally place you, you'd enter
3195 <pre>
3196 .MCX 6p
3197 </pre>
3199 <strong>NOTE:</strong> If you wish to advance a precise distance
3200 below the
3201 <a href="definitions.html#TERMS_BASELINE">baseline</a>
3202 of the longest column, use <strong>MCX</strong> with an
3203 argument of 0 (zero; no unit of measure required) in conjunction
3204 with the
3205 <a href="#ALD">ALD</a>
3206 macro, like this:
3208 <pre>
3209 .MCX 0
3210 .ALD 24p
3211 </pre>
3213 The above advances to precisely 24 points below the baseline
3214 of the longest column.
3215 <br>
3216 <hr>
3218 <!====================================================================>
3220 <a name="INTRO_INDENTS"></a>
3222 <a name="INDENTS">
3223 <h2><u>Indents</u></h2>
3224 </a>
3226 With <strong>mom</strong>'s indents, you can indent from the left,
3227 the right, or both margins. In addition, <strong>mom</strong>
3228 provides temporary left indents (i.e. only one line is indented,
3229 as at the start of a paragraph) and &quot;hanging&quot; left indents
3230 (the reverse of a temporary indent; the first line isn't indented,
3231 subsequent lines are).
3233 <a name="INDENTS_TUT"><h3><u>A brief explanation of how mom handles indents</u></h3></a>
3235 <strong>Mom</strong> provides five kinds of indents: left, right,
3236 both, temporary, and hanging. Each is invoked by its own name:
3237 <br>
3238 <ul>
3239 <li><strong>IL</strong> = <strong>I</strong>ndent <strong>L</strong>eft
3240 <li><strong>IR</strong> = <strong>I</strong>ndent <strong>R</strong>ight
3241 <li><strong>IB</strong> = <strong>I</strong>ndent <strong>B</strong>oth
3242 <li><strong>HI</strong> = <strong>H</strong>anging <strong>I</strong>ndent
3243 <li><strong>TI</strong> = <strong>T</strong>emporary <strong>I</strong>ndent
3244 </ul>
3245 <br>
3246 In addition, there are four macros to control exiting from
3247 indents:
3248 <br>
3249 <ul>
3250 <li><strong>IX</strong>&nbsp;&nbsp;= exit all active indents
3251 <li><strong>ILX</strong>&nbsp;= exit indent style left
3252 <li><strong>IRX</strong>&nbsp;= exit indent style right
3253 <li><strong>IBX</strong>&nbsp;= exit indent style both
3254 </ul>
3255 <br>
3256 This section deals exclusively with <strong>IL, IR</strong> and
3257 <strong>IB</strong>. For an explanation
3258 of hanging and temporary indents -- how they work and how to use
3259 them -- see
3260 <a href="#HI">Hanging indents</a>
3262 <a href="#TI">Temporary indents</a>.
3264 The first time you invoke any of <strong>mom</strong>'s indents,
3265 you must supply a measure. For example,
3267 <pre>
3268 .IL 2P
3269 </pre>
3271 indents text 2 picas from the left margin (or current tab
3272 indent).
3274 When you want to exit the above indent, use either
3276 <pre>
3279 .ILX
3280 </pre>
3282 The next time you want the same indent, invoke it without the
3283 argument, like this:
3285 <pre>
3287 </pre>
3289 As you can see, once you've supplied a measure to an indent macro
3290 <strong>mom</strong> stores the value, obviating the need to repeat
3291 it on subsequent invocations. And <strong>mom</strong> doesn't just
3292 store the measure -- she hangs on to it tenaciously. Arguments passed
3293 to <strong>IL, IR</strong> and <strong>IB</strong> are additive.
3294 Consider the following:
3296 <pre>
3297 .LL 20P
3298 .IR 2P \"Indent right by 2 picas
3299 A first block of text...
3302 .IX \"Turn indent off
3303 A second block of text...
3306 .IR 2P \"Indent right by an additional 2 picas (i.e. 4 picas)
3307 A third block of text...
3310 </pre>
3312 The first block of text is right indented by 2 picas (i.e. the line
3313 length is shortened by 2 picas to 18 picas). The second block of
3314 text, after <strong>IX</strong>, is, as you'd expect, set to the full
3315 measure. The third block of text -- the one to pay attention to --
3316 is not right indented by 2 picas, but rather by 4 picas.
3317 <strong>Mom</strong> adds the value of arguments to <strong>IL,
3318 IR</strong> and <strong>IB</strong> to whatever value is already
3319 in effect.
3321 If you wanted the third block of text in the example above to
3322 be right indented by just 2 picas (the original measure given to
3323 <strong>IR</strong>), you would enter <kbd>.IR</kbd> without an
3324 argument.
3326 Because indent arguments are additive, putting a minus sign in front
3327 of the argument can be used to subtract from the current value.
3328 In the following example, the first line is indented 18 points, the
3329 second is indented 36 points (18+18), and the third is again indented
3330 18 points (36-18).
3332 <pre>
3333 .IL 18p \"Indent left by 18 points = 18 points
3334 Now is the time
3335 .IL 18p \"Indent left by 18 points more = 36 points
3336 for all good men to come
3337 .IL -18p \"Indent left by 18 points less = 18 points
3338 to the aid of the party.
3339 </pre>
3341 Sometimes, you may want to clear out the stored indent values -- let
3342 <strong>mom</strong> start indenting with a clean slate, as it were.
3343 Giving the optional argument <kbd>CLEAR</kbd> to any of the
3344 &quot;indent quit&quot; macros resets them to zero.
3345 <br>
3346 <ul>
3347 <li><strong>IX CLEAR</strong>&nbsp;&nbsp;= quit and clear all indents
3348 <li><strong>ILX CLEAR</strong>&nbsp;= quit and clear indent style left
3349 <li><strong>IRX CLEAR</strong>&nbsp;= quit and clear indent style right
3350 <li><strong>IBX CLEAR</strong>&nbsp;= quit and clear indent style both
3351 </ul>
3352 <br>
3353 Indent styles may be combined and manipulated separately. You could,
3354 for example, have a left indent of 4 picas and a right indent of 6
3355 picas and control each separately, as in the following example.
3357 <pre>
3358 .IL 4P \"Indent left 4 picas
3359 .IR 6P \"Indent right 6 picas
3360 Some text
3361 .IRX \"Turn off the right indent only
3362 More text \"Text is still indented 4 picas left
3363 </pre>
3365 If, at <kbd>.IRX</kbd>, you wanted the text afterward to have no
3366 indents (either left or right), you would enter <kbd>.IX</kbd>,
3367 which exits all indent styles at once.
3369 <strong>A word of advice:</strong> Indents are best used only when
3370 you have a compelling reason not to change the current left margin or
3371 line length. In many instances where indents might seem expedient,
3372 it's better to use tabs, or actually change the left margin or the
3373 line length. <strong>Mom</strong>'s indenting macros are flexible
3374 and powerful, but easy to get tangled up in. Personally, I don't
3375 use them much, except for cutarounds and multi-level lists à la html,
3376 at which they excel.
3378 <strong>NOTE:</strong> see the section
3379 <a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a>
3380 for information and advice on using idents with the
3381 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>.
3383 <a name="INDEX_INDENTS"><h3><u>Indents macro list</u></h3>
3384 <ul>
3385 <li><a href="#IL">IL</a>&nbsp;&nbsp;(Indent left)
3386 <li><a href="#IR">IR</a>&nbsp;&nbsp;(Indent right)
3387 <li><a href="#IB">IB</a>&nbsp;&nbsp;(Indent both)
3388 <li><a href="#TI">TI</a>&nbsp;&nbsp;(Temporary indent, left)
3389 <li><a href="#HI">HI</a>&nbsp;&nbsp;(Hanging Indent)
3390 <ul>
3391 <li><a href="#NUM_LISTS">A recipe for numbered lists</a>
3392 </ul>
3393 <li><a href="#IX">IX</a>&nbsp;&nbsp;(Exit indents, all)
3394 <li><a href="#IX">ILX</a>&nbsp;(Exit indent style left)
3395 <li><a href="#IX">IRX</a>&nbsp;(Exit indent style right)
3396 <li><a href="#IX">IBX</a>&nbsp;(Exit indent style both)
3397 </ul>
3399 <!---IL--->
3401 <hr width="66%" align="left">
3402 <a name="IL"><h3><u>Indent left</u></h3></a>
3403 <br>
3404 Macro: <strong>IL</strong> <var>[ &lt;measure&gt; ]</var>
3405 <br>
3406 <em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
3409 <strong>IL</strong> indents text from the left margin of the page,
3410 or if you're in a tab, from the left edge of the tab. Once
3411 <strong>IL</strong> is on, the left indent is applied uniformly to
3412 every subsequent line of text, even if you change the line length.
3414 The first time you invoke <strong>IL</strong>, you must give it a
3415 measure. Subsequent invocations with a measure add to the previous
3416 measure. A minus sign may be prepended to the argument to subtract
3417 from the current measure. The
3418 <a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a>
3419 <a href="definitions.html#TERMS_INLINES">inline esacpe</a>
3420 may be used to specify a text-dependent measure, in which case
3421 no unit of measure is required. For example,
3423 <pre>
3424 .IL \w'margarine'
3425 </pre>
3427 indents text by the width of the word &quot;margarine&quot;.
3429 With no argument, <strong>IL</strong> indents by its last
3430 active value. See the
3431 <a href="#INDENTS_TUT">brief explanation of how mom handles indents</a>
3432 for more details.
3434 <strong>NOTE:</strong> Calling a tab (with
3435 <a href="#TAB">TAB</a>)
3436 automatically cancels any active indents.
3438 <strong>ADDITIONAL NOTE:</strong> Invoking <strong>IL</strong>
3439 automtically turns off <strong>IB</strong>.
3440 <br>
3442 <!---IR--->
3444 <hr width="66%" align="left">
3445 <a name="IR"><h3><u>Indent right</u></h3></a>
3446 <br>
3447 Macro: <strong>IR</strong> <var>[ &lt;measure&gt; ]</var>
3448 <br>
3449 <em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
3452 <strong>IR</strong> indents text from the right margin of the
3453 page, or if you're in a tab, from the end of the tab.
3455 The first time you invoke <strong>IR</strong>, you must give it a
3456 measure. Subsequent invocations with a measure add to the previous
3457 indent measure. A minus sign may be prepended to the argument to
3458 subtract from the current indent measure. The
3459 <a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a>
3460 <a href="definitions.html#TERMS_INLINES">inline esacpe</a>
3461 may be used to specify a text-dependent measure, in which case
3462 no unit of measure is required. For example,
3464 <pre>
3465 .IR \w'jello'
3466 </pre>
3468 indents text by the width of the word &quot;jello&quot;.
3470 With no argument, <strong>IR</strong> indents by its last
3471 active value. See the
3472 <a href="#INDENTS_TUT">brief explanation of how mom handles indents</a>
3473 for more details.
3475 <strong>NOTE:</strong> Calling a tab (with
3476 <a href="#TAB">TAB</a>)
3477 automatically cancels any active indents.
3479 <strong>ADDITIONAL NOTE:</strong> Invoking <strong>IR</strong>
3480 automtically turns off <strong>IB</strong>.
3481 <br>
3483 <!---IB--->
3485 <hr width="66%" align="left">
3486 <a name="IB"><h3><u>Indent both</u></h3></a>
3487 <br>
3488 Macro: <strong>IB</strong> <var>[ &lt;left measure&gt; &lt;right measure&gt; ]</var>
3489 <br>
3490 <em>*The optional arguments require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
3493 <strong>IB</strong> allows you to set or invoke a left and a right
3494 indent at the same time.
3496 At its first invocation, you must supply a measure for both indents;
3497 at subsequent invocations when you wish to supply a measure, both must
3498 be given again. As with <strong>IL</strong> and <strong>IR</strong>,
3499 the measures are added to the values previously passed to the macro.
3500 Hence, if you wish to change just one of the values, you must
3501 give an argument of zero to the other.
3503 <strong>A word of advice:</strong> If you need to manipulate left and
3504 right indents separately, use a combination of <strong>IL</strong>
3505 and <strong>IR</strong> instead of <strong>IB</strong>. You'll
3506 save yourself a lot of grief.
3508 A minus sign may be prepended to the arguments to subtract from their
3509 current values. The
3510 <a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a>
3511 <a href="definitions.html#TERMS_INLINES">inline esacpe</a>
3512 may be used to specify text-dependent measures, in which case
3513 no unit of measure is required. For example,
3515 <pre>
3516 .IB \w'margaraine' \w'jello'
3517 </pre>
3519 left indents text by the width of the word &quot;margarine&quot;
3520 and right indents by the width of &quot;jello&quot;.
3522 Like <strong>IL</strong> and <strong>IR</strong>, <strong>IB</strong>
3523 with no argument indents by its last active values. See the
3524 <a href="#INDENTS_TUT">brief explanation of how mom handles indents</a>
3525 for more details.
3527 <strong>NOTE:</strong> Calling a tab (with
3528 <a href="#TAB">TAB</a>)
3529 automatically cancels any active indents.
3531 <strong>ADDITIONAL NOTE:</strong> Invoking <strong>IB</strong>
3532 automtically turns off <strong>IL</strong> and
3533 <strong>IR</strong>.
3534 <br>
3536 <!---TI--->
3538 <hr width="66%" align="left">
3539 <a name="TI"><h3><u>Temporary (left) indent</u></h3></a>
3540 <br>
3541 Macro: <strong>TI</strong> <var>[ &lt;measure&gt; ]</var>
3542 <br>
3543 <em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
3546 A temporary indent is one that applies only to the first line of
3547 text that comes after it. It's chief use is indenting the first
3548 line of paragraphs. (<strong>Mom</strong>'s
3549 <a href="docprocessing.html#PP">PP</a>
3550 macro, for example, uses a temporary indent.)
3552 The first time you invoke <strong>TI</strong>, you must give it
3553 a measure. If you want to indent the first line of a
3554 paragraph by, say, 2
3555 <a href="definitions.html#TERMS_EM">ems</a>,
3558 <pre>
3559 .TI 2m
3560 </pre>
3562 Subsequent invocations of <strong>TI</strong> do not require you
3563 to supply a measure; <strong>mom</strong> keeps track of the
3564 last measure you gave it.
3566 Because temporary indents are temporary, there's no need to turn
3567 them off.
3569 <strong>IMPORTANT:</strong> Unlike <strong>IL, IR</strong> and
3570 <strong>IB</strong>, measures given to <strong>TI</strong>
3571 are NOT additive. In the following example, the second <kbd>.TI
3572 2P</kbd> is exactly 2 picas.
3574 <pre>
3575 .TI 1P
3576 The beginning of a paragraph...
3577 .TI 2P
3578 The beginning of another paragraph...
3579 </pre>
3581 <!---HI--->
3583 <hr width="66%" align="left">
3584 <a name="HI"><h3><u>Hanging indent</u></h3></a>
3585 <br>
3586 Macro: <strong>HI</strong> <var>[ &lt;measure&gt; ]</var>
3587 <br>
3588 <em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
3591 A hanging indent looks like this:
3593 <pre>
3594 The thousand injuries of Fortunato I had borne as best I
3595 could, but when he ventured upon insult, I vowed
3596 revenge. You who so well know the nature of my soul
3597 will not suppose, however, that I gave utterance to a
3598 threat, at length I would be avenged...
3599 </pre>
3601 The first line of text &quot;hangs&quot; outside the left
3602 margin.
3604 In order to use hanging indents, you must first have a left indent
3605 active (set with either
3606 <a href="#IL">IL</a>
3608 <a href="#IB">IB</a>).
3609 <strong>Mom</strong> will not hang text outside the left margin set with
3610 <a href="#L_MARGIN">L_MARGIN</a>
3611 or outside the left margin of a tab.
3613 The first time you invoke <strong>HI</strong>, you must give it
3614 a measure. If you want the first line of a paragraph to hang by,
3615 say, 1 pica, do
3617 <pre>
3618 .IL 1P
3619 .HI 1P
3620 </pre>
3622 Subsequent invocations of <strong>HI</strong> do not require you
3623 to supply a measure; <strong>mom</strong> keeps track of the
3624 last measure you gave it.
3626 Generally speaking, you should invoke <strong>HI</strong> immediately
3627 prior to the line you want hung (i.e. without any intervening
3628 <a href="definitions.html#TERMS_CONTROLLINES">control lines</a>).
3629 And because hanging indents affect only one line, there's no need to turn
3630 them off.
3632 <a name="NUM_LISTS"><h3><u>A recipe for numbered lists</u></h3></a>
3634 A common use for hanging indents is setting numbered lists.
3635 Consider the following example:
3637 <pre>
3638 .PAGE 8.5i 11i 1i 1i 1i 1i
3639 .FAMILY T
3640 .FT R
3641 .PS 12
3642 .LS 14
3643 .JUSTIFY
3644 .KERN
3645 .SS 0
3646 .IL \w'\0\0.' \"Indent left by 2 figure spaces and a period
3647 .HI \w'\0\0.' \"Hang first line of text back by 2 figure spaces and a period
3648 1.\0The most important point to be considered is whether the
3649 answer to the meaning of life, the universe, and everything
3650 really is 42. We have no-one's word on the subject except
3651 Mr. Adams'.
3653 2.\0If the answer to the meaning of life, the universe,
3654 and everything is indeed 42, what impact does this have on
3655 the politics of representation? 42 is, after all not a
3656 prime number. Are we to infer that prime numbers don't
3657 deserve equal rights and equal access in the universe?
3659 3.\0If 42 is deemed non-exclusionary, how do we present it
3660 as the answer and, at the same time, forestall debate on its
3661 exclusionary implications?
3662 </pre>
3664 First, we invoke a left indent with a measure equal to the width
3665 of 2
3666 <a href="definitions.html#TERMS_FIGURESPACE">figures spaces</a>
3667 plus a period (using the
3668 <a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a>
3669 inline escape). At this point, the left indent is active; text
3670 afterward would normally be indented. However, we invoke a hanging
3671 indent of exactly the same width, which hangs the first line (and
3672 first line only!) to the left of the indent by the same distance
3673 (in this case, that means &quot;out to the left margin&quot;).
3674 Because we begin the first line with a number, a period, and a
3675 figure space, the actual text (&quot;The most important point...&quot;)
3676 starts at exactly the same spot as the indented lines that
3677 follow.
3679 Notice that subsequent invocations of <strong>HI</strong> without a
3680 measure produce exactly the same effect.
3682 Paste the example above into a file and preview it with <kbd>groff -mom -X
3683 &lt;filename&gt;</kbd> to see hanging indents in action.
3685 <strong>IMPORTANT:</strong> Unlike <strong>IL, IR</strong> and
3686 <strong>IB</strong>, measures given to <strong>HI</strong>
3687 are NOT additive. Each time you pass a measure to
3688 <strong>HI</strong>, the measure is treated literally.
3689 <br>
3691 <!---IX--->
3693 <hr width="66%" align="left">
3694 <a name="IX"><h3><u>Quitting indents</u></h3></a>
3695 <br>
3696 Macro: <strong>IX</strong>&nbsp;&nbsp;<var>[ CLEAR ]</var> (quit any/all indents)
3697 <br>
3698 Macro: <strong>ILX</strong>&nbsp;<var>[ CLEAR ]</var> (quit <strong>IL</strong>)
3699 <br>
3700 Macro: <strong>IRX</strong>&nbsp;<var>[ CLEAR ]</var> (quit <strong>IR</strong>)
3701 <br>
3702 Macro: <strong>IBX</strong>&nbsp;<var>[ CLEAR ]</var> (quit <strong>IB</strong>)
3705 Without an argument, the macros to quit indents merely restore your
3706 original left margin and line length. The measures stored in the
3707 indent macros themselves are saved so you can call them again without
3708 having to supply a measure.
3710 If you pass these macros the optional argument <strong>CLEAR</strong>,
3711 they not only restore your original left margin and line length,
3712 but also clear any values associated with a particular indent style.
3713 The next time you need an indent of the same style, you have to supply
3714 a measure again.
3716 <strong>IX CLEAR</strong>, as you'd suspect, quits and clears
3717 the values for all indent styles at once.
3720 <hr>
3721 <a href="goodies.html#TOP">Next</a>&nbsp;&nbsp;
3722 <a href="definitions.html#TOP">Prev</a>&nbsp;&nbsp;
3723 <a href="#TOP">Top</a>&nbsp;&nbsp;
3724 <a href="toc.html">Back to Table of Contents</a>
3725 </body>
3726 </html>