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