Import of mom
[s-roff.git] / contrib / mom / momdoc / goodies.html
blob1e8551cbf99850c445d64c78ab7e9b25ec58f09c
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">
8 <!====================================================================>
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>
14 <a name="TOP"></a>
15 <a name="GOODIES">
16 <h2><u>Goodies</u></h2>
17 </a>
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.
23 <a name="INDEX_GOODIES">
24 <h3><u>Goodies list</u></h3>
25 </a>
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>
70 <!---ALIAS--->
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>
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
101 new__| |__official
102 name name
103 </pre>
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.
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>.
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
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>
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
132 <pre>
133 .so /home/&lt;username&gt;/Mom/mom_aliases
134 </pre>
136 at the top of your documents.
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.
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>
147 <!---SILENT--->
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>
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.
166 <strong>SILENT</strong> is a toggle. Invoking it without an argument
167 turns it on; any argument turns it off. E.g.,
169 <pre>
170 .SILENT
171 A line of text
172 .SILENT OFF
173 </pre>
175 The line &quot;A line of text&quot; will not appear in the
176 output copy.
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.
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>
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>
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>
200 <!---TRAP--->
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>
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.
214 Sometimes, traps get sprung when you don't want them, notably
215 when using the
216 <a href="#EL">EL</a>
218 <a href="#TN">TN</a>
219 macros. If this happens, surround just the offending macros and
220 input lines with
222 <pre>
223 .TRAP OFF
225 .TRAP
226 </pre>
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.
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>
237 <!---SMARTQUOTES--->
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>
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.
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?
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.
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).
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:
282 <pre>
283 "But she said, `I don't want to!'"
284 </pre>
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>
294 <!---CAPS--->
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>
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.
309 <pre>
310 .CAPS
311 All work and no play makes Jack a dull boy.
312 .CAPS OFF
313 </pre>
315 produces, on output
317 <pre>
318 ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
319 </pre>
321 <!---UNDERSCORE--->
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>
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:
336 <pre>
337 .UNDERSCORE "Unmonitored monopolies breed high prices and poor products."
338 </pre>
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).
344 <pre>
345 .UNDERSCORE 3p "Unmonitored monopolies breed high prices and poor products."
346 </pre>
348 The above places the underscore 3 points below the baseline.
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).
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.
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.
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>
388 <!---UNDERSCORE2--->
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>
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:
403 <pre>
404 .UNDERSCORE2 "Unmonitored monopolies breed high prices and poor products."
405 </pre>
407 The default distance between the two rules is 2 points.
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.,
413 <pre>
414 .UNDERSCORE2 3p "Unmonitored monopolies breed high prices and poor products."
415 </pre>
417 which places the double underscore 3 points below the baseline.
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.
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>
432 <!---UNDERLINE--->
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>
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.
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.
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>
458 <!---UL--->
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>
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.
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.
476 The macro
477 <a href="#UNDERLINE">UNDERLINE</a>
478 and the inline escape <strong>\*[UL]</strong> are functionally
479 identical, hence
481 <pre>
482 .FAM C
483 .FT R
484 .PS 12
485 .LS 24
486 .SS 0
487 .QUAD LEFT
488 Which should I heed?
489 .UNDERLINE
490 Just do it
491 .UNDERLINE OFF
493 .UNDERLINE
494 just say no?
495 .UNDERLINE OFF
496 </pre>
498 produces the same result as
500 <pre>
501 .FAM C
502 .FT R
503 .PS 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>
510 <!---PAD--->
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>
518 With <strong>PAD</strong>, you can insert unspecified amounts of
519 whitespace into a line.
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.
525 Take, for example, the following relatively common typesetting
526 situation, found at the bottom of legal agreements:
528 <pre>
529 Date Signature |
530 </pre>
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.)
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):
545 <pre>
546 .LL 30P
547 .PAD "Date#Signature###"
548 </pre>
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.
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>.
565 <pre>
566 .LL 30P
567 .PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
569 .ST 1 J
570 .ST 2 J
571 .TAB 1
572 \l'\n(.lu'
574 \l'\n(.lu'
576 </pre>
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>.
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
603 <br>
604 <li>Calls the second tab with
605 <a href="#TN">TN</a>
606 (which moves to tab 2 and stays on the same baseline)
607 then draws a rule to the full length of string tab 2
608 </ol>
609 <br>
610 Often, when setting up string tabs this way, you don't want the
611 padded line to print immediately. To accomplish this, use
612 <a href="#SILENT">SILENT</a>.
613 See the <a href="#STRING_TABS_TUT">quickie tutorial on string tabs</a>
614 for an example.
616 <strong>NOTE:</strong> Because the pound sign (#) is used as the pad
617 marker, you can't use it as a literal part of the pad string. If you
618 need the sign to appear in the text of a padded line, change the pad
619 marker with <a href="#PAD_MARKER">PAD_MARKER</a>. Also, be aware
620 that # as a pad marker only applies within the <strong>PAD</strong>
621 macro; at all other times it prints literally, just as you'd expect.
623 Another important consideration when using <strong>PAD</strong> is that
624 because the string must be enclosed in double-quotes, you can't use the
625 double-quote (&quot;) as part of the string. The way to circumvent
626 this is to use the groff
627 <a href="definitions.html#TERMS_INLINES">inline escapes</a>
628 <strong>\(lq</strong> and <strong>\(rq</strong> (leftquote and
629 rightquote respectively) whenever double-quotes are required in the
630 string passed to <strong>PAD</strong>.
631 <br>
633 <!---PAD_MARKER--->
635 <hr width="66%" align="left">
636 <a name="PAD_MARKER"><h3><u>Change/set the marker used with PAD</u></h3></a>
637 <br>
638 Macro: <strong>PAD_MARKER</strong> <var>&lt;character to use as the pad marker&gt;</var>
641 If you need to change <strong>mom</strong>'s default pad marker
642 (#), either because you want a literal # in the padded line,
643 or simply because you want to use another character instead, use
644 <strong>PAD_MARKER</strong>, whose argument is the new pad marker
645 character you want.
647 <pre>
648 .PAD_MARKER @
649 </pre>
651 changes the pad marker to @.
653 Once you've changed the pad marker, the new marker remains in
654 effect for every instance of
655 <a href="#PAD">PAD</a>
656 until you change it again (say, back to the pound sign).
657 <br>
659 <!---\*[LEADER]--->
661 <hr width="66%" align="left">
662 <a name="LEADER"><h3><u>Inline escape to add leaders to a line</u></h3></a>
663 <br>
664 Inline: <strong>\*[LEADER]</strong>
667 Whenever you want to fill a line or tab with
668 <a href="definitions.html#TERMS_LEADER">leaders</a>,
669 use the
670 <a href="definitions.html#TERMS_INLINES">inline escape</a>
671 <strong>\*[LEADER]</strong>. The remainder of the line or tab will be
672 filled with the leader character. <strong>Mom</strong>'s
673 default leader character is a period (dot), but you can change
674 it to any character you like with
675 <a href="#LEADER_CHARACTER">LEADER_CHARACTER</a>.
677 <strong>NOTE:</strong> <strong>\*[LEADER]</strong> fills lines
678 or tabs right to their end. You cannot insert leaders into a
679 line or tab and have text following the leader on the same line
680 or in the same tab. Should you wish to achieve such an effect
681 typographically, create tabs for each element of the line and
682 fill them appropriately with the text and leaders you need.
683 <a href="#STRING_TABS">String tabs</a> are perfect for this. An
684 example follows.
686 <pre>
687 .LL 30P
688 .PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
690 .ST 1 J
691 .ST 2 J
692 .TAB 1
693 \*[LEADER]
695 \*[LEADER]
697 </pre>
699 The <strong>PAD</strong> line sets the words Date and Signature,
700 and marks string tabs around the pad space inserted in the line.
701 The string tabs are then &quot;set&quot;, called, and filled
702 with leaders. The result looks like this:
704 <pre>
705 Date.............Signature.....................................
706 </pre>
708 <!---LEADER_CHARACTER--->
710 <hr width="66%" align="left">
711 <a name="LEADER_CHARACTER"><h3><u>Change/set the leader character</u></h3></a>
712 <br>
713 Macro: <strong>LEADER_CHARACTER</strong> <var>&lt;character&gt;</var>
716 <strong>LEADER_CHARACTER</strong> takes one argument: a single
717 character you would like to be used for
718 <a href="definitions.html#TERMS_LEADER">leaders</a>.
719 (See
720 <a href="#LEADER">\*[LEADER]</a> for an explanation of how to
721 fill lines with leaders.)
723 For example, to change the leader character from <strong>mom</strong>'s
724 default (a period) to the underscore character, enter
726 <pre>
727 .LEADER_CHARACTER _
728 </pre>
730 <!---DROPCAP--->
732 <hr width="66%" align="left">
733 <a name="DROPCAP"><h3><u>Drop caps</u></h3></a>
734 <br>
735 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>
738 The first two arguments to <strong>DROPCAP</strong> are the letter you
739 want to be the
740 <a href="definitions.html#TERMS_DROPCAP">drop cap</a>
741 and the number of lines you want it to drop. By default,
742 <strong>mom</strong> uses the current family and font for the drop cap.
744 The optional argument (COND or EXT) indicates that you want the
745 drop cap condensed (narrower) or extended (wider). If you use
746 <strong>COND</strong> or <strong>EXT</strong>, you must follow the
747 argument with the percentage of the letter's normal width you want
748 it condensed or extended. No percent sign (%) is required.
750 <strong>Mom</strong> will do her very best to get the drop cap to
751 line up with the first line of text indented beside it, then set
752 the correct number of indented lines, and restore your left margin
753 when the number of drop cap lines has been reached.
755 Beginning a paragraph with a drop cap &quot;T&quot; looks
756 like this:
758 <pre>
759 .DROPCAP T 3 COND 90
760 he thousand injuries of Fortunato I had borne as best I
761 could, but when he ventured upon insult, I vowed revenge.
762 You who so well know the nature of my soul will not suppose,
763 however, that I gave utterance to a threat...
764 </pre>
766 The drop cap, slightly condensed but in the current family and font,
767 will be three lines tall, with whatever text fills those three
768 lines indented to the right of the letter. The remainder of the
769 paragraph's text will revert to the left margin.
771 <strong>NOTE:</strong> When using the
772 <a href="docprocessing.html#DOCPROCESSING">document processing macro</a>
773 <a href="#PP">PP</a>,
774 <strong>DROPCAP</strong> only works
775 <br>
776 <ul>
777 <li>with initial paragraphs (i.e. at the start of the document,
778 or after
779 <a href="#HEAD">HEAD</a>),
780 <li>when <strong>DROPCAP</strong> comes immediately after <strong>PP</strong>,
781 <li>and when the
782 <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE</a>
783 is TYPESET.
784 </ul>
785 <br>
786 If these conditions aren't met, <strong>DROPCAP</strong> is silently ignored.
788 <strong>WARNING:</strong> <strong>DROPCAP</strong> puts a bit of
789 a strain on resource-challenged systems. If you have such a
790 system and use drop caps extensively in a document, be prepared
791 for a wait while <strong>mom</strong> does her thing.
793 <h3><a name="DROPCAP_SUPPORT"><u>Support macros for DROPCAP</u></a></h3>
794 Drop caps are the bane of most typesetters' existence. It's
795 very difficult to get the size of the drop cap right for the
796 number of drop lines, especially if the drop cap is in a
797 different family from the prevailing family of running text.
798 Not only that, but there's the gutter around the drop cap to
799 take into account, plus the fact that the letter may be too wide
800 or too narrow to look anything but odd or misplaced.
802 <strong>Mom</strong> solves the last of these problems with the
803 <strong>COND</strong> and <strong>EXT</strong> arguments. The
804 rest she solves with macros that change the default behaviour of
805 <strong>DROPCAP</strong>, namely
807 <a href="#DROPCAP_FAMILY">DROPCAP_FAMILY</a>,
808 <br>
809 <a href="#DROPCAP_FONT">DROPCAP_FONT</a>,
810 <br>
811 <a href="#DROPCAP_ADJUST">DROPCAP_ADJUST</a>
812 <br>
814 <br>
815 <a href="#DROPCAP_GUTTER">DROPCAP_GUTTER</a>.
817 These macros must, of course, come before you invoke
818 <strong>DROPCAP</strong>.
820 <h3><a name="DROPCAP_FAMILY"><u>DROPCAP_FAMILY</u></a></h3>
822 Set the drop cap family by giving
823 <strong>DROPCAP_FAMILY</strong> the name of the family you want,
824 e.g.
826 <pre>
827 .DROPCAP_FAMILY H
828 </pre>
830 which will set the family to Helvetica for the drop cap only.
832 <h3><a name="DROPCAP_FONT"><u>DROPCAP_FONT</u></a></h3>
834 Set the drop cap font by giving
835 <strong>DROPCAP_FONT</strong> the name of the font you want,
836 e.g.
838 <pre>
839 .DROPCAP_FONT I
840 </pre>
842 which will set the font to italic for the drop cap only.
844 <h3><a name="DROPCAP_ADJUST"><u>DROPCAP_ADJUST</u></a></h3>
846 If the size <strong>mom</strong> calculates for the drop cap
847 isn't precisely what you want, you can increase or decrease it
848 with <strong>DROPCAP_ADJUST</strong>, like this:
849 e.g.
851 <pre>
852 .DROPCAP_ADJUST +1
854 .DROPCAP_ADJUST -.75
855 </pre>
857 <strong>DROPCAP_ADJUST</strong> only understands
858 <a href="definitions.html#TERMS_PICASPOINTS">points</a>,
859 therefore do not append any
860 <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>
861 to the argument. And always be sure to preprend the plus or
862 minus sign, depending on whether you want the drop cap larger or
863 smaller.
865 <h3><a name="DROPCAP_GUTTER"><u>DROPCAP_GUTTER</u></a></h3>
867 By default, <strong>mom</strong> puts three points of space
868 between the drop cap and the text indented beside it. If you
869 want another value, use <strong>DROPCAP_GUTTER</strong> (with a
870 unit of measure), like this:
872 <pre>
873 .DROPCAP_GUTTER 6p
874 </pre>
876 <!---\*[SUP]--->
878 <hr width="66%" align="left">
879 <a name="SUP"><h3><u>Superscript</u></h3></a>
880 <br>
881 Inlines: <strong>\*[SUP]...\*[SUPX]</strong>
884 Superscripts are accomplished
885 <a href="definitions.html#TERMS_INLINES">inline</a>.
886 Whenever you need one, typically for numerals, all you need to
887 do is surround the superscript with the inlines above.
888 <strong>\*[SUP]</strong> begins superscripting;
889 <strong>\*[SUPX]</strong> turns it off.
890 <a name="CONDSUP"></a>
891 <a name="EXTSUP"></a>
893 If your running type is
894 <a href="#COND_INLINE">pseudo-condensed</a>
896 <a href="#EXT_INLINE">pseudo-extended</a>
897 and you want your superscripts to be equivalently pseudo-condensed or
898 -extended, use <strong>\*[CONDSUP]...\*[CONDSUPX]</strong> or
899 <strong>\*[EXTSUP]...\*[EXTSUPX]</strong>.
901 The superscript inlines are primarily used by the
902 <a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
903 for automatic generation of numbered footnotes. However, you may
904 find them useful for other purposes.
906 <strong>NOTE:</strong> <strong>Mom</strong> does a pretty fine job of
907 making superscripts look good in any font and at any size. If you're
908 fussy, though (and I am), about precise vertical placement, kerning,
909 weight, size, and so on, you may want to roll your own solution.
910 And sorry, there's no <strong>mom</strong> equivalent for subscripts.
911 I'm neither a mathematician nor a chemist, so I don't need them.
912 Of course, anyone who wishes to contribute a subscript routine to
913 <strong>mom</strong> will receive eternal blessings not only in this
914 lifetime, but in all lifetimes to come.
917 <hr>
918 <a href="inlines.html#TOP">Next</a>&nbsp;&nbsp;
919 <a href="typesetting.html#TOP">Prev</a>&nbsp;&nbsp;
920 <a href="#TOP">Top</a>&nbsp;&nbsp;
921 <a href="toc.html">Back to Table of Contents</a>
922 </body>
923 </html>