Get rid of the old texinfo.
[dragonfly.git] / contrib / groff / contrib / mom / momdoc / goodies.html
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
4 <title>Mom -- Goodies</title>
5 </head>
6 <body bgcolor="#dfdfdf">
7
8 <!====================================================================>
9
10 <a href="inlines.html#TOP">Next</a>&nbsp;&nbsp;
11 <a href="typesetting.html#TOP">Prev</a>&nbsp;&nbsp;
12 <a href="toc.html">Back to Table of Contents</a>
13
14 <a name="TOP"></a>
15 <a name="GOODIES">
16         <h2><u>Goodies</u></h2>
17 </a>
18
19 <a name="INTRO_GOODIES"></a>
20 The macros in this section are a collection of useful (and sometimes
21 nearly indispensible) routines to simplify typesetting.
22
23 <a name="INDEX_GOODIES">
24         <h3><u>Goodies list</u></h3>
25 </a>
26
27 <ul>
28         <li><a href="#ALIAS">ALIAS</a> (rename macros)
29         <li><a href="#SILENT">SILENT</a> (&quot;hide&quot; input lines from output)
30         <li><a href="#TRAP">TRAP</a> (suspend/re-invoke traps)
31         <li><a href="#SMARTQUOTES">SMARTQUOTES</a>
32         <li><a href="#CAPS">CAPS</a> (convert to upper case)
33         <br>
34         <li><strong>Underscore/underline</strong>
35         <ul>
36                 <li><a href="#UNDERSCORE">UNDERSCORE</a> (single underscore)
37                 <li><a href="#UNDERSCORE2">UNDERSCORE2</a> (double underscore)
38                 <li><a href="#UNDERLINE">UNDERLINE</a> (underline -- Courier only!)
39                 <li><a href="#UL">\*[UL]</a> (inline escape to underline -- Courier only!)
40         </ul>
41         <li><strong>Padding</strong>
42         <ul>
43                 <li><a href="#PAD">PAD</a> (insert equalized space into lines)
44                 <li><a href="#PAD_MARKER">PAD_MARKER</a> (change/set the marker used with <strong>PAD</strong>)
45         </ul>
46         <li><strong>Leaders</strong>
47         <ul>
48                 <li><a href="#LEADER">\*[LEADER]</a> (inline escape to add leaders to a line)
49                 <li><a href="#LEADER_CHARACTER">LEADER_CHARACTER</a> (change/set the leader character)
50         </ul>
51         <li><strong>Drop caps</strong>
52         <ul>
53                 <li><a href="#DROPCAP">DROPCAP</a> (set a drop cap)
54                 <li><strong>Support macros for DROPCAP</strong>
55                 <ul>
56                         <li><a href="#DROPCAP_FAMILY">DROPCAP_FAMILY</a> (change drop cap family)
57                         <li><a href="#DROPCAP_FONT">DROPCAP_FONT</a> (change drop cap font)
58                         <li><a href="#DROPCAP_ADJUST">DROPCAP_ADJUST</a> (alter size of drop cap)
59                         <li><a href="#DROPCAP_GUTTER">DROPCAP_GUTTER</a> (change space between drop cap and running text) 
60                 </ul>
61         </ul>
62         <li><strong>Superscript</strong>
63         <ul>
64                 <li><a href="#SUP">\*[SUP]</a> (set superscript)
65                 <li><a href="#CONDSUP">\*[CONDSUP]</a> (set condensed superscript)
66                 <li><a href="#EXTSUP">\*[EXTSUP}</a> (set extended superscript)
67         </ul>
68 </ul>
69
70 <!---ALIAS--->
71
72 <hr width="66%" align="left">
73 <a name="ALIAS"><h3><u>Rename macros</u></h3></a>
74 <br>
75 Macro: <strong>ALIAS</strong> <var>&lt;new name&gt; &lt;old name&gt;</var>
76
77 <p>
78 The <strong>ALIAS</strong> macro may well be your best friend.  With it,
79 you can change the name of a macro to anything you like
80 (provided the new name is not already being used by
81 <strong>mom</strong>; see the
82 <a href="reserved.html#RESERVED">list of reserved words</a>).
83 <p>
84 Groff has always been a bit intimidating for new users because
85 its standard macro packages use very terse macro names.
86 <strong>Mom</strong> doesn't like people to feel intimidated; she wants
87 them to feel welcome.  Consequently, she tries for easy-to-grasp,
88 self-explanatory macro names.  However, <strong>mom</strong> knows
89 that people have their own ways of thinking, their own preferences,
90 their own habits.  Some of her macro names may not suit you; they
91 might be too long, or aren't what you automatically think of
92 when you want to do a particular thing, or might conflict with habits
93 you've developed over the years.
94 <p>
95 If you don't like one of <strong>mom</strong>'s macro names,
96 say, PAGEWIDTH, change it, like this:
97 <p>
98 <pre>
99         .ALIAS PW PAGEWIDTH
100                |      |
101           new__|      |__official
102          name            name
103 </pre>
104
105 The first argument to <strong>ALIAS</strong> is the new name you want
106 for a macro.  The second is the &quot;official&quot; name by
107 which the macro is normally invoked.  After <strong>ALIAS</strong>,
108 either can be used.
109 <p>
110 Note that in <strong>ALIAS</strong>, you do NOT include the period
111 (dot) that precedes the macro when it's a
112 <a href="definitions.html#TERMS_CONTROLLINES">control line</a>.
113 <p>
114 <strong>NOTE:</strong> If you use <strong>ALIAS</strong> a lot,
115 and always for the same things, consider creating an aliases
116 file of the form
117 <p>
118 <pre>
119         .ALIAS &lt;new name&gt; &lt;old name&gt;
120         .ALIAS &lt;new name&gt; &lt;old name&gt;
121         .ALIAS &lt;new name&gt; &lt;old name&gt;
122         ...etc
123 </pre>
124
125 Put the file someplace convenient and source it at the
126 beginning of your documents using the groff
127 <a href="definitions.html#TERMS_PRIMITIVES">primitive</a>
128 <strong>.so</strong>.  Assuming that you've created an aliases file
129 called mom_aliases in your home directory under a directory
130 called <code>Mom</code>, you'd source it by placing
131 <p>
132 <pre>
133         .so /home/&lt;username&gt;/Mom/mom_aliases
134 </pre>
135
136 at the top of your documents.
137 <p>
138 If you share documents that make use of an alias file, remember that
139 other people don't have the file!  Paste the whole thing at the top
140 of your documents, please.
141 <p>
142 <strong>EXPERTS:</strong> <strong>ALIAS</strong> is an alias of
143 <code>.als</code>.  You can use either, or mix 'n' match with
144 impunity.
145 <br>
146
147 <!---SILENT--->
148
149 <hr width="66%" align="left">
150 <a name="SILENT"><h3><u>Hide input lines from output</u></h3></a>
151 <br>
152 Macro: <strong>SILENT</strong> <var>toggle</var>
153 <br>
154 Alias: <strong>COMMENT</strong>
155
156 <p>
157 Sometimes, you want to &quot;hide&quot;
158 <a href="definitions.html#TERMS_INPUTLINE">input lines</a>
159 from final output.  This is most likely to be the case when setting
160 up string tabs (see the
161 <a href="STRING_TABS_TUT">quickie tutorial on string tabs</a>
162 for an example), but there are other places where you might want input
163 lines to be invisible as well.  Any place you don't want input lines
164 to appear in the output, use the <strong>SILENT</strong> macro.
165 <p>
166 <strong>SILENT</strong> is a toggle.  Invoking it without an argument
167 turns it on; any argument turns it off.  E.g.,
168 <p>
169 <pre>
170         .SILENT
171         A line of text
172         .SILENT OFF
173 </pre>
174
175 The line &quot;A line of text&quot; will not appear in the
176 output copy.
177 <p>
178 <strong>SILENT</strong> is aliased as <strong>COMMENT</strong>.
179 If you want to insert non-printing comments into your documents,
180 you may prefer this.
181 <p>
182 <strong>NOTE: SILENT</strong> does not automatically break an
183 <a href="definitions.html#TERMS_INPUTLINE">input line</a>
184 (see
185 <a href="typesetting.html#BR">BR</a>)
186 when you're in one of the
187 <a href="definitions.html#TERMS_FILLED">fill modes</a>
188 (<a href="typesetting.html#JUSTIFY">JUSTIFY</a>
189 or
190 <a href="typesetting.html#QUAD">QUAD L | R | C | J</a>).
191 The same applies to tabs
192 (<a href="typesetting.html#TAB_SET">typesetting</a>
193 or
194 <a href="typesetting.html#ST">string</a>)
195 to which you've passed the <strong>J</strong> or <strong>QUAD</strong>
196 argument.  You must insert <code>.BR</code> yourself, or risk a
197 portion of your text disappearing into a black hole.
198 <br>
199
200 <!---TRAP--->
201
202 <hr width="66%" align="left">
203 <a name="TRAP"><h3><u>Suspend/re-invoke traps</u></h3></a>
204 <br>
205 Macro: <strong>TRAP</strong> <var>toggle</var>
206
207 <p>
208 Traps are vertical positions on the output page at which you or
209 <strong>mom</strong> have instructed groff to start doing
210 something automatically.  Commonly, this is near the bottom of
211 the page, where automatic behind-the-scenes processing is needed
212 in order for one page to finish and another to start.
213 <p>
214 Sometimes, traps get sprung when you don't want them, notably
215 when using the
216 <a href="#EL">EL</a>
217 and
218 <a href="#TN">TN</a>
219 macros.  If this happens, surround just the offending macros and
220 input lines with
221 <p>
222 <pre>
223         .TRAP OFF
224         ...
225         .TRAP
226 </pre>
227
228 <strong>TRAP</strong> is a toggle, therefore any argument 
229 turns it off (i.e. suspends the trap), and no argument turns it
230 (back) on.
231 <p>
232 Have a look at the <strong>IMPORTANT</strong> sections
233 of <strong>EL</strong> and <strong>TN</strong> to see
234 <strong>TRAP</strong> in action.
235 <br>
236
237 <!---SMARTQUOTES--->
238
239 <hr width="66%" align="left">
240 <a name="SMARTQUOTES"><h3><u>Smartquotes</u></h3></a>
241 <br>
242 Macro: <strong>SMARTQUOTES</strong> <var>toggle</var>
243
244 <p>
245 <strong>SMARTQUOTES</strong> converts all instances of the
246 inch-mark, (<kbd>"</kbd> -- also called a &quot;doublequote&quot;),
247 into the appropriate instances of true open- and close-doublequotes.
248 <p>
249 Typographically, there is a difference between the inch-mark and
250 doublequotes -- a BIG difference.  Sadly, typewriters and computer
251 keyboards supply only one: the inch-mark.  While using inches for
252 doublequotes is, and always has been, acceptable in typewriter-style
253 copy, it has never been, and, God willing, never will be acceptable in
254 typeset copy.  Failure to turn inches into quotes is the first thing
255 a professional typesetter notices in documents prepared by amateurs.
256 And you don't want to look like an amateur, do you?
257 <p>
258 When preparing documents for typesetting, by all means, use the
259 inch-mark.  Just make sure to turn <strong>SMARTQUOTES</strong>
260 on.  <strong>SMARTQUOTES</strong> is a toggle, so invoking it with
261 no argument turns it on, and invoking it with any argument at all
262 turns it off.
263 <p>
264 If you're using the
265 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
266 with
267 <a href="#PRINTSTYLE">PRINTSTYLE TYPESET</a>,
268 <strong>SMARTQUOTES</strong> is on by default; with
269 <a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
270 it's off by default (and should probably stay that way).
271 <p>
272 <strong>NOTE:</strong> <strong>SMARTQUOTES</strong> does not work on
273 single quotes, which most people input with the apostrophe (found at
274 the right-hand end of the &quot;home row&quot; on a QWERTY keyboard).
275 Groff will interpret all instances of the apostrophe as an apostrophe,
276 making the symbol useless as an open-single-quote.  For open single
277 quotes, input the backtick character typically found under the tilde
278 on most keyboards.  (Pour nous autres, &quot;backtick&quot; veut dire
279 l'accent grave.)
280 Here's an example of correct input copy with single quotes:
281 <p>
282 <pre>
283         "But she said, `I don't want to!'"      
284 </pre>
285
286 <strong>ADDITIONAL NOTE:</strong> Whether or not you have
287 <strong>SMARTQUOTES</strong> turned on, get into the habit of entering
288 the foot- and inch-marks, when you need them, with the
289 <a href="definitions.html#TERMS_INLINES">inline escapes</a>
290 <strong>\*[FOOT]</strong> and <strong>\*[INCH]</strong>, instead
291 of <kbd>'</kbd> and <kbd>"</kbd>.
292 <br>
293
294 <!---CAPS--->
295
296 <hr width="66%" align="left">
297 <a name="CAPS"><h3><u>Convert to upper case</u></h3></a>
298 <br>
299 Macro: <strong>CAPS</strong> <var>toggle</var>
300
301 <p>
302 <strong>CAPS</strong> converts all lower case letters to upper
303 case.  Primarily, it's a support macro used by the
304 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>,
305 but you may find it helpful on occasion.  <strong>CAPS</strong>
306 is a toggle, therefore no argument turns it on, any argument
307 turns it off.
308 <p>
309 <pre>
310         .CAPS
311         All work and no play makes Jack a dull boy.
312         .CAPS OFF
313 </pre>
314
315 produces, on output
316 <p>
317 <pre>
318         ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
319 </pre>
320
321 <!---UNDERSCORE--->
322
323 <hr width="66%" align="left">
324 <a name="UNDERSCORE"><h3><u>Single underscore</u></h3></a>
325 <br>
326 Macro: <strong>UNDERSCORE</strong> <var>[ &lt;distance below baseline&gt; ] &quot;&lt;string&gt;&quot;</var>
327 <br>
328 <em>*Optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
329
330 <p>
331 By default, <strong>UNDERSCORE</strong> places an underscore 2 points
332 beneath the required
333 <a href="definitions.html#TERMS_STRINGARGUMENT">string argument</a>.
334 The string must be enclosed in double-quotes, like this:
335 <p>
336 <pre>
337         .UNDERSCORE "Unmonitored monopolies breed high prices and poor products."
338 </pre>
339
340 If you wish to change the distance of the rule from the
341 baseline, use the optional argument <i>&lt;distance below
342 baseline&gt;</i> (with a unit of measure).
343 <p>
344 <pre>
345         .UNDERSCORE 3p "Unmonitored monopolies breed high prices and poor products."
346 </pre>
347
348 The above places the underscore 3 points below the baseline.
349 <p>
350 <a name="NOTES_UNDERSCORE"></a>
351 <strong>NOTES:</strong>
352 <br>
353 <strong>UNDERSCORE</strong> does not work across line breaks in output
354 copy, which is to say that you can't underscore a multi-line passage
355 simply by putting the text of the whole thing in the string you pass
356 to <strong>UNDERSCORE</strong>.  Each
357 <a href="definitions.html#TERMS_OUTPUTLINE">output line</a>
358 or portion of an output line you want underscored must be plugged
359 separately into <strong>UNDERSCORE</strong>.  Bear in mind, though,
360 that underscoring should at best be an occasional effect in typeset
361 copy.  If you want to emphasize an entire passage, it's much, much
362 better to change fonts (e.g. to italic or bold).
363 <p>
364 You can easily and successfully underline entire passages in simulated
365 typewriter-style copy (i.e. if your font is Courier, or you're using
366 the document processing macro
367 <a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>),
368 with the
369 <a href="#UNDERLINE">UNDERLINE</a>
370 macro.  <strong>UNDERLINE</strong> is designed specifically for this
371 purpose, but works only with the Courier font.
372 <p>
373 <strong>Mom</strong> doesn't always get the position and length
374 of the underscore precisely right in
375 <a href="definitions.html#TERMS_JUST">justified</a>
376 copy, although she's fine with all the other
377 <a href="definitions.html#TERMS_FILLED">fill modes</a>,
378 as well as with the no-fill modes.  As of this writing, I have
379 no solution to the occasional problems with justified copy.
380 <p>
381 <strong>UNDERSCORE</strong> tends to confuse
382 <strong>gxditview</strong>, even though the output, when
383 printed, looks fine.  Generally, I recommend using <strong>gv</strong>
384 to preview files anyway.  See the section on
385 <a href="#PREVIEWING">previewing</a>.
386 <br>
387
388 <!---UNDERSCORE2--->
389
390 <hr width="66%" align="left">
391 <a name="UNDERSCORE2"><h3><u>Double underscore</u></h3></a>
392 <br>
393 Macro: <strong>UNDERSCORE2</strong> <var>[ &lt;distance below baseline&gt; [ &lt;distance between rules&gt; ] ] &quot;&lt;string&gt;&quot;</var>
394 <br>
395 <em>*Optional arguments require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>
396
397 <p>
398 By default, <strong>UNDERSCORE2</strong> places a double underscore
399 2 points beneath the required
400 <a href="definitions.html#TERMS_STRINGARGUMENT">string argument</a>.
401 The string must be enclosed in double-quotes, like this:
402 <p>
403 <pre>
404         .UNDERSCORE2 "Unmonitored monopolies breed high prices and poor products."
405 </pre>
406
407 The default distance between the two rules is 2 points.
408 <p>
409 If you wish to change the distance of the double underscore from
410 the baseline, use the optional argument <i>&lt;distance below
411 baseline&gt;</i> (with a unit of measure), e.g.,
412 <p>
413 <pre>
414         .UNDERSCORE2 3p "Unmonitored monopolies breed high prices and poor products."
415 </pre>
416
417 which places the double underscore 3 points below the baseline.
418 <p>
419 If you wish to change the distance between the two rules as
420 well, use the second optional argument <i>&lt;distance between
421 rules&gt;</i> (with a unit of measure).  Be aware that you must
422 give a value for the first optional argument if you want to use
423 the second.
424 <p>
425 <strong>NOTE:</strong> the same restrictions and caveats apply
426 to <strong>UNDERSCORE2</strong> as to
427 <strong>UNDERSCORE</strong>.  See the
428 <a href="#NOTES_UNDERSCORE">NOTES</a>
429 for <strong>UNDERSCORE</strong>.
430 <br>
431
432 <!---UNDERLINE--->
433
434 <hr width="66%" align="left">
435 <a name="UNDERLINE"><h3><u>Underline text -- Courier font only!</u></h3></a>
436 <br>
437 Macro: <strong>UNDERLINE</strong> <var>toggle</var>
438
439 <p>
440 If your font is Courier, or you're using the document processing macro
441 <a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
442 <strong>UNDERLINE</strong> allows you to underline words and
443 passages that, in typeset copy, would be italicised.  You invoke
444 <strong>UNDERLINE</strong> as you do with all toggle macros --
445 by itself (i.e. with no argument) to initiate underlining, and
446 with any argument to turn underlining off.
447 <p>
448 When on, <strong>UNDERLINE</strong> underlines letters, words
449 and numbers, but not punctuation or spaces.  This makes for more
450 readable copy than a solid underline.
451 <p>
452 <strong>NOTE:</strong> Underlining may also be turned on and off
453 <a href="definitions.html#TERMS_INLINES">inline</a>
454 with the escapes
455 <a href="#UL">\*[UL]...\*[ULX].</a>
456 <br>
457
458 <!---UL--->
459
460 <hr width="66%" align="left">
461 <a name="UL"><h3><u>Inline escape for underlining -- Courier font only!</u></h3></a>
462 <br>
463 Inline: <strong>\*[UL]...\*[ULX]</strong>
464
465 <p>
466 If your font is Courier, or you're using the document processing macro
467 <a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>,
468 <strong>\*[UL]...\*[ULX]</strong> underlines words and
469 passages that, in typeset copy, would be italicised.
470 <p>
471 <strong>\*[UL]</strong> underlines all letters, words and numbers
472 following it, but not punctuation or spaces.  This makes for more
473 readable copy than a solid underline.  When you no longer want
474 underlining, <strong>\*[ULX]</strong> turns underlining off.
475 <p>
476 The macro
477 <a href="#UNDERLINE">UNDERLINE</a>
478 and the inline escape <strong>\*[UL]</strong> are functionally
479 identical, hence
480 <p>
481 <pre>
482         .FAM     C
483         .FT      R
484         .PT_SIZE 12
485         .LS      24
486         .SS      0
487         .QUAD    LEFT
488         Which should I heed?
489         .UNDERLINE
490         Just do it
491         .UNDERLINE OFF
492         or
493         .UNDERLINE
494         just say no?
495         .UNDERLINE OFF
496 </pre>
497
498 produces the same result as
499 <p>
500 <pre>
501         .FAM     C
502         .FT      R
503         .PT_SIZE 12
504         .LS      24
505         .SS      0
506         .QUAD    LEFT
507         Which should I heed? \*[UL]Just do it\*[ULX] or \*[UL]just say no?\*[ULX]
508 </pre>
509
510 <!---PAD--->
511
512 <hr width="66%" align="left">
513 <a name="PAD"><h3><u>Insert space into lines</u></h3></a>
514 <br>
515 Macro: <strong>PAD</strong> <var>&quot;&lt;string with pad markers inserted&gt;&quot;</var>
516
517 <p>
518 With <strong>PAD</strong>, you can insert unspecified amounts of
519 whitespace into a line.
520 <p>
521 <strong>PAD</strong> calculates the difference between the length of
522 text on the line and the distance remaining to its end, then inserts
523 the difference (as whitespace) at the place(s) you specify.
524 <p>
525 Take, for example, the following relatively common typesetting
526 situation, found at the bottom of legal agreements:
527 <p>
528 <pre>
529         Date             Signature                               |
530 </pre>
531
532 The person signing the agreement is supposed to fill in the date
533 as well as a signature.  Space needs to be left for both, but
534 the exact amount is neither known, nor important.  All that
535 matters is that there be a little space after Date, and rather
536 more space after Signature.  (In the above, | represents
537 the end of the line at the prevailing line length.)
538 <p>
539 The
540 <a href="#PADMARKER">pad marker</a>
541 (see below) is # (the pound or number sign on your keyboard) and
542 can be used multiple times in a line.  With that in mind, here's how
543 you'd input the Date/Signature line (assuming a length of 30 picas):
544 <p>
545 <pre>
546         .LL 30P
547         .PAD "Date#Signature###"
548 </pre>
549
550 When the line is output, the space remaining on the line, after
551 &quot;Date&quot; and &quot;Signature&quot; have been taken into
552 account, is split into four (because there are four # signs).
553 One quarter of the space is inserted between Date and Signature,
554 the remainder is inserted after Signature.
555 <p>
556 One rarely wants merely to insert space in a line; one usually
557 wants to fill it with something, hence <strong>PAD</strong> is
558 particularly useful in conjunction with
559 <a href="#STRING_TABS">string tabs</a>.
560 The following uses the Date/Signature example above, but adds
561 rules into the whitespace through the use of string tabs and
562 groff's line drawing function,
563 <a href="#INLINE_LINEDRAWING_GROFF">\l</a>.
564 <p>
565 <pre>
566         .LL 30P
567         .PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
568         .EL
569         .ST 1 J
570         .ST 2 J
571         .TAB 1
572         \l'\n(.lu'
573         .TN
574         \l'\n(.lu'
575         .TQ
576 </pre>
577
578 If you're not a typesetter, and if you're new to groff, the
579 example probably looks like gibberish.  My apologies.  However,
580 remember that typesetting is a craft, and without having studied
581 the craft, it takes a while to grasp its concepts.  Also,
582 although <strong>mom</strong> tries very hard to provide
583 consistent-looking, comprehensible alternatives to groff's
584 native
585 <a href="definitions.html#TERMS_INLINES">inline escapes</a>,
586 <strong>mom</strong> has not yet found a replacement for
587 <strong>\l</strong>.
588 <p>
589 Basically, what the example does is:
590 <br>
591 <ol>
592         <li>Pads the Date/Signature line (using the pad marker #),
593                 encloses the padded space with two string tabs markers,
594                 and outputs the line
595         <br>
596         <li>Sets the two string tabs (notice the use of
597                 <a href="#EL">EL</a>
598                 beforehand; you don't want <strong>mom</strong>
599                 to advance a line at this point)
600         <br>
601         <li>Calls the first string tab and draws a rule to its full
602                 length (<kbd>\l'\n(.lu'</kbd>; for an easier way to draw a rule
603                 that fills a tab, see
604                 <a href="inlines.html#INLINE_RULE_MOM">Full measure
605                 rules</a>).
606         <br>
607         <li>Calls the second tab with
608                 <a href="#TN">TN</a>
609                 (which moves to tab 2 and stays on the same baseline)
610                 then draws a rule to the full length of string tab 2
611 </ol>
612 <br>
613 Often, when setting up string tabs this way, you don't want the
614 padded line to print immediately.  To accomplish this, use
615 <a href="#SILENT">SILENT</a>.
616 See the <a href="#STRING_TABS_TUT">quickie tutorial on string tabs</a>
617 for an example.
618 <p>
619 <strong>NOTE:</strong> Because the pound sign (#) is used as the pad
620 marker, you can't use it as a literal part of the pad string.  If you
621 need the sign to appear in the text of a padded line, change the pad
622 marker with <a href="#PAD_MARKER">PAD_MARKER</a>.  Also, be aware
623 that # as a pad marker only applies within the <strong>PAD</strong>
624 macro; at all other times it prints literally, just as you'd expect.
625 <p>
626 Another important consideration when using <strong>PAD</strong> is that
627 because the string must be enclosed in double-quotes, you can't use the
628 double-quote (&quot;) as part of the string.  The way to circumvent
629 this is to use the groff
630 <a href="definitions.html#TERMS_INLINES">inline escapes</a>
631 <strong>\(lq</strong> and <strong>\(rq</strong> (leftquote and
632 rightquote respectively) whenever double-quotes are required in the
633 string passed to <strong>PAD</strong>.
634 <br>
635
636 <!---PAD_MARKER--->
637
638 <hr width="66%" align="left">
639 <a name="PAD_MARKER"><h3><u>Change/set the marker used with PAD</u></h3></a>
640 <br>
641 Macro: <strong>PAD_MARKER</strong> <var>&lt;character to use as the pad marker&gt;</var>
642
643 <p>
644 If you need to change <strong>mom</strong>'s default pad marker
645 (#), either because you want a literal # in the padded line,
646 or simply because you want to use another character instead, use
647 <strong>PAD_MARKER</strong>, whose argument is the new pad marker
648 character you want.
649 <p>
650 <pre>
651         .PAD_MARKER @
652 </pre>
653
654 changes the pad marker to @.
655 <p>
656 Once you've changed the pad marker, the new marker remains in
657 effect for every instance of
658 <a href="#PAD">PAD</a>
659 until you change it again (say, back to the pound sign).
660 <br>
661
662 <!---\*[LEADER]--->
663
664 <hr width="66%" align="left">
665 <a name="LEADER"><h3><u>Inline escape to add leaders to a line</u></h3></a>
666 <br>
667 Inline: <strong>\*[LEADER]</strong>
668
669 <p>
670 Whenever you want to fill a line or tab with
671 <a href="definitions.html#TERMS_LEADER">leaders</a>,
672 use the
673 <a href="definitions.html#TERMS_INLINES">inline escape</a>
674 <strong>\*[LEADER]</strong>.  The remainder of the line or tab will be
675 filled with the leader character.  <strong>Mom</strong>'s
676 default leader character is a period (dot), but you can change
677 it to any character you like with
678 <a href="#LEADER_CHARACTER">LEADER_CHARACTER</a>.
679 <p>
680 <strong>NOTE:</strong> <strong>\*[LEADER]</strong> fills lines
681 or tabs right to their end.  You cannot insert leaders into a
682 line or tab and have text following the leader on the same line
683 or in the same tab.  Should you wish to achieve such an effect
684 typographically, create tabs for each element of the line and
685 fill them appropriately with the text and leaders you need.
686 <a href="#STRING_TABS">String tabs</a> are perfect for this.  An
687 example follows.
688 <p>
689 <pre>
690         .LL 30P
691         .PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
692         .EL
693         .ST 1 J
694         .ST 2 J
695         .TAB 1
696         \*[LEADER]
697         .TN
698         \*[LEADER]
699         .TQ
700 </pre>
701
702 The <strong>PAD</strong> line sets the words Date and Signature,
703 and marks string tabs around the pad space inserted in the line.
704 The string tabs are then &quot;set&quot;, called, and filled
705 with leaders.  The result looks like this:
706 <p>
707 <pre>
708         Date.............Signature.....................................
709 </pre>
710
711 <!---LEADER_CHARACTER--->
712
713 <hr width="66%" align="left">
714 <a name="LEADER_CHARACTER"><h3><u>Change/set the leader character</u></h3></a>
715 <br>
716 Macro: <strong>LEADER_CHARACTER</strong> <var>&lt;character&gt;</var>
717
718 <p>
719 <strong>LEADER_CHARACTER</strong> takes one argument: a single
720 character you would like to be used for
721 <a href="definitions.html#TERMS_LEADER">leaders</a>.
722 (See
723 <a href="#LEADER">\*[LEADER]</a> for an explanation of how to
724 fill lines with leaders.)
725 <p>
726 For example, to change the leader character from <strong>mom</strong>'s
727 default (a period) to the underscore character, enter
728 <p>
729 <pre>
730         .LEADER_CHARACTER _
731 </pre>
732
733 <!---DROPCAP--->
734
735 <hr width="66%" align="left">
736 <a name="DROPCAP"><h3><u>Drop caps</u></h3></a>
737 <br>
738 Macro: <strong>DROPCAP</strong> <var>&lt;dropcap letter&gt; &lt;number of lines to drop&gt; [ COND &lt;percentage&gt; | EXT &lt;percentage&gt; ]</var>
739
740 <p>
741 The first two arguments to <strong>DROPCAP</strong> are the letter you
742 want to be the
743 <a href="definitions.html#TERMS_DROPCAP">drop cap</a>
744 and the number of lines you want it to drop.  By default,
745 <strong>mom</strong> uses the current family and font for the drop cap.
746 <p>
747 The optional argument (COND or EXT) indicates that you want the
748 drop cap condensed (narrower) or extended (wider).  If you use
749 <strong>COND</strong> or <strong>EXT</strong>, you must follow the
750 argument with the percentage of the letter's normal width you want
751 it condensed or extended.  No percent sign (%) is required.
752 <p>
753 <strong>Mom</strong> will do her very best to get the drop cap to
754 line up with the first line of text indented beside it, then set
755 the correct number of indented lines, and restore your left margin
756 when the number of drop cap lines has been reached.
757 <p>
758 Beginning a paragraph with a drop cap &quot;T&quot; looks
759 like this:
760 <p>
761 <pre>
762         .DROPCAP T 3 COND 90
763         he thousand injuries of Fortunato I had borne as best I
764         could, but when he ventured upon insult, I vowed revenge.
765         You who so well know the nature of my soul will not suppose,
766         however, that I gave utterance to a threat...
767 </pre>
768
769 The drop cap, slightly condensed but in the current family and font,
770 will be three lines tall, with whatever text fills those three
771 lines indented to the right of the letter.  The remainder of the
772 paragraph's text will revert to the left margin.
773 <p>
774 <strong>NOTE:</strong> When using the
775 <a href="docprocessing.html#DOCPROCESSING">document processing macro</a>
776 <a href="#PP">PP</a>,
777 <strong>DROPCAP</strong> only works
778 <br>
779 <ul>
780         <li>with initial paragraphs (i.e. at the start of the document,
781                 or after
782                 <a href="#HEAD">HEAD</a>),
783         <li>when <strong>DROPCAP</strong> comes immediately after <strong>PP</strong>,
784         <li>and when the
785                 <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE</a>
786                 is TYPESET.
787 </ul>
788 <br>
789 If these conditions aren't met, <strong>DROPCAP</strong> is silently ignored.
790 <p>
791 <strong>WARNING:</strong> <strong>DROPCAP</strong> puts a bit of
792 a strain on resource-challenged systems.  If you have such a
793 system and use drop caps extensively in a document, be prepared
794 for a wait while <strong>mom</strong> does her thing.
795
796 <h3><a name="DROPCAP_SUPPORT"><u>Support macros for DROPCAP</u></a></h3>
797 Drop caps are the bane of most typesetters' existence.  It's
798 very difficult to get the size of the drop cap right for the
799 number of drop lines, especially if the drop cap is in a
800 different family from the prevailing family of running text.
801 Not only that, but there's the gutter around the drop cap to
802 take into account, plus the fact that the letter may be too wide
803 or too narrow to look anything but odd or misplaced.
804 <p>
805 <strong>Mom</strong> solves the last of these problems with the
806 <strong>COND</strong> and <strong>EXT</strong> arguments.  The
807 rest she solves with macros that change the default behaviour of
808 <strong>DROPCAP</strong>, namely
809 <p>
810 <a href="#DROPCAP_FAMILY">DROPCAP_FAMILY</a>,
811 <br>
812 <a href="#DROPCAP_FONT">DROPCAP_FONT</a>,
813 <br>
814 <a href="#DROPCAP_ADJUST">DROPCAP_ADJUST</a>
815 <br>
816 and
817 <br>
818 <a href="#DROPCAP_GUTTER">DROPCAP_GUTTER</a>.
819 <p>
820 These macros must, of course, come before you invoke
821 <strong>DROPCAP</strong>.
822
823 <h3><a name="DROPCAP_FAMILY"><u>DROPCAP_FAMILY</u></a></h3>
824
825 Set the drop cap family by giving
826 <strong>DROPCAP_FAMILY</strong> the name of the family you want,
827 e.g.
828 <p>
829 <pre>
830         .DROPCAP_FAMILY H
831 </pre>
832
833 which will set the family to Helvetica for the drop cap only.
834
835 <h3><a name="DROPCAP_FONT"><u>DROPCAP_FONT</u></a></h3>
836
837 Set the drop cap font by giving
838 <strong>DROPCAP_FONT</strong> the name of the font you want,
839 e.g.
840 <p>
841 <pre>
842         .DROPCAP_FONT I
843 </pre>
844
845 which will set the font to italic for the drop cap only.
846
847 <h3><a name="DROPCAP_ADJUST"><u>DROPCAP_ADJUST</u></a></h3>
848
849 If the size <strong>mom</strong> calculates for the drop cap
850 isn't precisely what you want, you can increase or decrease it
851 with <strong>DROPCAP_ADJUST</strong>, like this:
852 e.g.
853 <p>
854 <pre>
855         .DROPCAP_ADJUST +1
856             or
857         .DROPCAP_ADJUST -.75
858 </pre>
859
860 <strong>DROPCAP_ADJUST</strong> only understands
861 <a href="definitions.html#TERMS_PICASPOINTS">points</a>,
862 therefore do not append any
863 <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>
864 to the argument.  And always be sure to preprend the plus or
865 minus sign, depending on whether you want the drop cap larger or
866 smaller.
867
868 <h3><a name="DROPCAP_GUTTER"><u>DROPCAP_GUTTER</u></a></h3>
869
870 By default, <strong>mom</strong> puts three points of space
871 between the drop cap and the text indented beside it.  If you
872 want another value, use <strong>DROPCAP_GUTTER</strong> (with a
873 unit of measure), like this:
874 <p>
875 <pre>
876         .DROPCAP_GUTTER 6p
877 </pre>
878
879 <!---\*[SUP]--->
880
881 <hr width="66%" align="left">
882 <a name="SUP"><h3><u>Superscript</u></h3></a>
883 <br>
884 Inlines: <strong>\*[SUP]...\*[SUPX]</strong>
885
886 <p>
887 Superscripts are accomplished
888 <a href="definitions.html#TERMS_INLINES">inline</a>.
889 Whenever you need one, typically for numerals, all you need to
890 do is surround the superscript with the inlines above.
891 <strong>\*[SUP]</strong> begins superscripting;
892 <strong>\*[SUPX]</strong> turns it off.
893 <a name="CONDSUP"></a>
894 <a name="EXTSUP"></a>
895 <p>
896 If your running type is
897 <a href="#COND_INLINE">pseudo-condensed</a>
898 or
899 <a href="#EXT_INLINE">pseudo-extended</a>
900 and you want your superscripts to be equivalently pseudo-condensed or
901 -extended, use <strong>\*[CONDSUP]...\*[CONDSUPX]</strong> or
902 <strong>\*[EXTSUP]...\*[EXTSUPX]</strong>.
903 <p>
904 The superscript inlines are primarily used by the
905 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
906 for automatic generation of numbered footnotes.  However, you may
907 find them useful for other purposes.
908 <p>
909 <strong>NOTE:</strong> <strong>Mom</strong> does a pretty fine job of
910 making superscripts look good in any font and at any size.  If you're
911 fussy, though (and I am), about precise vertical placement, kerning,
912 weight, size, and so on, you may want to roll your own solution.
913 And sorry, there's no <strong>mom</strong> equivalent for subscripts.
914 I'm neither a mathematician nor a chemist, so I don't need them.
915 Of course, anyone who wishes to contribute a subscript routine to
916 <strong>mom</strong> will receive eternal blessings not only in this
917 lifetime, but in all lifetimes to come.
918
919 <p>
920 <hr>
921 <a href="inlines.html#TOP">Next</a>&nbsp;&nbsp;
922 <a href="typesetting.html#TOP">Prev</a>&nbsp;&nbsp;
923 <a href="#TOP">Top</a>&nbsp;&nbsp;
924 <a href="toc.html">Back to Table of Contents</a>
925 </body>
926 </html>