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 -- Inline escapes</title>
6</head>
7<body bgcolor="#dfdfdf">
8
9<!====================================================================>
10
11<a href="color.html#TOP">Next</a>&nbsp;&nbsp;
12<a href="goodies.html#TOP">Prev</a>&nbsp;&nbsp;
13<a href="toc.html">Back to Table of Contents</a>
14
15<a name="TOP"></a>
16<h1 align="center">
17    <a name="INLINE_ESCAPES"><u>Inline escapes</u></a>
18</h1>
19<p>
20<a href="#INLINE_ESCAPES_INTRO">Introduction to inline escapes</a>
21<br>
22<a href="#INDEX_INLINES">Index of inline escapes</a>
23<p>
24
25<a name="INLINE_ESCAPES_INTRO">
26	<h2><u>Introduction to inline escapes</u></h2>
27</a>
28
29<a name="INTRO_INLINE_ESCAPES">
30Inline escapes, as described in the
31<a href="definitions.html#TERMS_INLINES">groff terms</a>
32section of this manual, are typesetting commands that appear in
33text
34<a href="definitions.html#TERMS_INPUTLINE">input lines</a>,
35as opposed to macros and other
36<a href="definitions.html#TERMS_CONTROLLINES">control lines</a>
37that must appear on lines by themselves.
38<p>
39Aside from altering type parameters within a line, inlines also
40tell groff about special characters -- em-dashes, bullets,
41<a href="definitions.html#TERMS_FIGURESPACE">figure/digit-width spaces</a>,
42and so on.  It is beyond the scope of this manual to provide a
43complete list of groff's inline functions and special characters.
44I recommend having a look at the
45<a href="intro.html#CANONICAL">canonical reference materials</a>
46should you need more information than is contained herein.
47<p>
48In groff, the escape character is the backslash ( \ ).  Groff interprets
49everything following the backslash as instructions, not literal text,
50until the escape sequence is complete.  Should you need the actual
51backslash character as part of a line of text, simply enter it twice
52( \\ ).  Groff understands that this means "please print a backslash
53character."  (You can also use <strong>\e</strong> to print a literal
54backslash.)
55<p>
56Groff has a number of ways of recognizing what constitutes a complete
57escape sequence.  This is both a boon and a curse; some escape
58sequences have no terminating delimiter and consequently become
59difficult to distinguish from real input text.  Others require
60the use of an opening parenthesis with no corresponding closing
61parenthesis.  Still others need to be enclosed in square brackets.
62<p>
63<strong>Mom</strong> recognizes that certain escapes get used more
64often than others.  For these, she has a consistent input style that
65takes the form \*[...], which makes them stand out well from the text
66of your documents.  These escapes are the ones listed under
67<a href="#INLINES_MOM">Mom's personal inlines</a>.
68<p>
69Despite <strong>mom</strong>'s best intentions, there are still
70a number of typesetting functions that can only be accomplished
71with groff's native inline escapes.  I've listed the ones that
72strike me as essential, but there are many others.  If you want
73to know what they are, please read the
74<a href="intro.html#CANONICAL">canonical reference materials</a>
75pertaining to groff.
76<p>
77<strong>HELPFUL BIT OF INFORMATION:</strong> Inline escapes can be used
78in
79<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
80that take
81<a href="definitions.html#TERMS_STRINGARGUMENT">string arguments</a>.
82<p>
83<a name="INDEX_INLINES"><h3><u>Inlines index</u></h3></a>
84<ul>
85	<li><a name="INLINES_MOM"><strong>Mom's personal inlines</strong></a>
86	<ul>
87		<li><a href="#INLINE_FONTS_MOM">Changing fonts</a>
88		<li><a href="#INLINE_SIZE_MOM">Changing point size</a>
89		<li><a href="#INLINE_KERNING_MOM">Pairwise kerning</a>
90		<li><a href="#INLINE_HORIZONTAL_MOM">Horizontal movement</a>
91		<li><a href="#INLINE_VERTICAL_MOM">Vertical movement</a>
92		<li><a href="#B">Terminate a line without advancing on the page</a>
93		<li><a href="#TB+">Call the next sequential tab without advancing on the page</a>
94		<li><a href="#INLINE_RULE_MOM">Full measure rules</a>
95	</ul>
96	<li><a name="INLINES_GROFF"><strong>Groff inline escapes</strong></a>
97	<ul>
98		<li><a href="#INLINE_FONTS_GROFF">Font control</a> <strong>\f</strong>
99		<li><a href="#INLINE_HORIZONTAL_GROFF">Inline horizontal motions</a> <strong>\h</strong>
100		<li><a href="#INLINE_VERTICAL_GROFF">Inline vertical motions</a> <strong>\v</strong>
101		<li><a href="#INLINE_STRINGWIDTH_GROFF">String width function</a> <strong>\w</strong>
102		<li><a href="#INLINE_LINEDRAWING_GROFF">Horizontal line drawing function</a> <strong>\l</strong>
103		<li><a href="#INLINE_CHARACTERS_GROFF">Special characters</a>
104	</ul>
105</ul>
106<p>
107<hr>
108
109<!---INLINE_FONTS_MOM--->
110
111<h2><u>Mom's personal inlines</u></h2>
112
113<a name="INLINE_FONTS_MOM"><h3><u>Changing fonts</u></h3></a>
114
115<p>
116<strong>Mom</strong> provides five escapes for changing fonts
117inline:
118<p>
119<table valign="baseline" cellpadding="10" summary="inlinefonts">
120<tr>
121	<td><strong>\*[ROM]</strong></td>
122	<td>Change font to medium roman</td>
123</tr>
124<tr>
125	<td><strong>\*[IT]</strong></td>
126	<td>Change font to medium italic</td>
127</tr>
128<tr>
129	<td><strong>\*[BD]</strong></td>
130	<td>Change font to bold roman</td>
131</tr>
132<tr>
133	<td><strong>\*[BDI]</strong></td>
134	<td>Change font to bold italic</td>
135</tr>
136<tr>
137	<td><strong>\*[PREV]</strong></td>
138	<td>Revert to previous font</td>
139</tr>
140</table>
141<p>
142These escapes are provided for merely for convenience, legibility,
143and consistency when typesetting with <strong>mom</strong>.  For
144more complete and flexible inline font control, please see
145<a href="#INLINE_FONTS_GROFF">font control with \f</a>.
146
147<p>
148<strong>NOTE:</strong> If you're using the
149<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>,
150inline font changes remain in effect only for the duration of the
151current document element tag.
152<p>
153
154<!---INLINE_SIZE_MOM--->
155
156<hr width="66%" align="left">
157<a name="INLINE_SIZE_MOM"><h3><u>Changing point size</u></h3></a>
158
159<p>
160<strong>Mom</strong> has two inline escapes for changing point
161size:
162<p>
163<pre>
164	\*[SIZE &lt;size&gt;]
165</pre>
166
167and
168<p>
169<pre>
170	\*[S&lt;size&gt;]
171</pre>
172
173where &quot;size&quot; is the new size you want.  You can use
174either; they behave exactly the same way.  For example, to change
175the point size of type inline to 12 points, you could enter either
176<p>
177<pre>
178	\*[SIZE 12]
179</pre>
180
181or
182<p>
183<pre>
184	\*S[12]
185</pre>
186
187The advantage of the first form is that it's easy to remember, and
188follows <strong>mom</strong>'s usual inline syntax.  The advantage
189of the second is that it's more concise.
190<p>
191Notice that in both cases, the new size does not require a
192<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>;
193<a href="definitions.html#TERMS_PICASPOINTS">points</a>
194is assumed.  However, a unit of measure may be appended to the size
195if that's what you wish.  Fractional sizes are, of course, allowed.
196<p>
197The size given to <strong>\*[SIZE&nbsp;&lt;size&gt;]</strong> or
198<strong>\*S[&lt;size&gt;]</strong> may be expressed in plus or minus
199terms, which can be very useful.  In the following examples, the word
200&quot;mom&quot; will be output 2 points larger than the point size
201of the rest of the line.
202<p>
203<pre>
204	While she isn't perfect, \*S[+2]mom\*S[-2] isn't half bad.
205	While she isn't perfect, \*[SIZE +2]mom\*[SIZE -2] isn't half bad.
206</pre>
207
208<strong>NOTE:</strong> If you're accustomed to groff's usual way
209of handling inline size requests (<kbd>\sN, \s�N, \s(NN, \s�(NN,
210\s[NNN], \s�[NNN]</kbd>), feel free to continue with your old habits.
211<strong>Mom</strong> doesn't care.
212<p>
213
214<!---INLINE_KERNING_MOM--->
215
216<hr width="66%" align="left">
217<a name="INLINE_KERNING_MOM"><h3><u>Pairwise kerning</u></h3></a>
218
219<p>
220Pairwise kerning means moving specific letter pairs closer
221together or further apart (see
222<a href="definitions.html#TERMS_KERN">Typesetting terms, kerning</a>
223for more details).
224<p>
225<strong>Mom</strong> permits inline pairwise
226kerning through the use of the inline escapes
227<table valign="baseline" cellpadding="10" summary="inlinekerning">
228<tr>
229	<td><pre>\*[BU n]</pre></td>
230	<td>Closes the space between letters (<strong>B</strong>ack <strong>U</strong>nits).</td>
231</tr>
232<tr>
233	<td><pre>\*[FU n]</pre></td>
234	<td>Opens the space between letters (<strong>F</strong>orward <strong>U</strong>nits).</td>
235</tr>
236</table>
237<br>
238&quot;<strong>n</strong>&quot; is the number of
239<a href="definitions.html#TERMS_KERNUNIT">kern units</a>
240by which to close or open the space between letters.
241<p>
242For example,
243<p>
244<pre>
245	THE HUMAN COST OF COMMODIF\*[FU 1]YING FRESH W\*[BU 4]A\*[BU 5]TER
246</pre>
247
248moves the letter Y in &quot;COMMODIFYING&quot; 1 kern unit away from
249the letter F, and the letter A in &quot;WATER&quot; 4 kern units closer
250to the letter W.  Additionally, the letter T in "WATER" is moved 5 kern
251units closer to the letter A.
252<p>
253For backward compatibility, the forms
254<table valign="baseline" cellpadding="10" summary="inlinekerningold">
255<tr>
256	<td><pre>\*[BU1]...\*[BU36]</pre></td>
257	<td>Move back 1...36 <a href="definitions.html#TERMS_KERNUNIT">kern units</a></td>
258</tr>
259<tr>
260	<td><pre>\*[FU1]...\*[FU36]</pre></td>
261	<td>Move forward 1...36 <a href="definitions.html#TERMS_KERNUNIT">kern units</a></td>
262</tr>
263</table>
264<br>
265also exist (i.e. with no space before the number of kern units desired,
266up to a limit of 36).
267<p>
268<strong>NOTE:</strong> Using <strong>BU</strong> or <strong>FU</strong>
269between characters pairs that are already automatically kerned
270disables the automatic kerning and uses the value you give to
271<strong>BU</strong> or <strong>FU</strong> instead.
272<p>
273
274<!---INLINE_HORIZONTAL_MOM--->
275
276<hr width="66%" align="left">
277<a name="INLINE_HORIZONTAL_MOM"><h3><u>Horizontal inline movement</u></h3></a>
278
279<p>
280Sometimes, you may need to insert a specified amount amount of white
281space into an
282<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>,
283or -- occasionally  -- back up to a
284previous position on an
285<a href="definitions.html#TERMS_INPUTLINE">output</a>
286line in order to create special typographic effects.
287<p>
288<strong>Mom</strong>'s inline escapes for these horizontal movements are
289<p>
290<table align="left" valign="baseline" cellpadding="10" summary="inlinehorizontal">
291<tr>
292<a name="FWD"></a>
293	<td><pre>\*[FWD n&lt;unit&gt;]</pre></td>
294	<td width="80%">Move forward inline the specified number of
295		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a>;
296		decimal fractions are allowed.</td>
297</tr>
298<tr>
299<a name="BCK"></a>
300	<td><pre>\*[BCK n&lt;unit&gt;]</pre></td>
301	<td width="80%">Move backward inline the specified number of
302		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a>;
303		decimal fractions are allowed.</td>
304</tr>
305</table>
306<p>
307For example,
308<p>
309<pre>
310	1.\*[FWD 12p]The Free Trade Play-Offs: WalMart 100, Mexico 0
311</pre>
312puts 12 points of space between &quot;1.&quot; and
313&quot;The&quot;.
314<p>
315<strong>NOTE:</strong> For backward compatibility, the forms
316<p>
317<table valign="baseline" cellpadding="10" summary="inlinehorizontalold">
318<tr>
319	<td><pre>\*[BP.25]...\*[BP12.75]</pre></td>
320	<td>Move back .25...12.75 points</td>
321</tr>
322<tr>
323	<td><pre>\*[FP.25]...\*[FP12.75]</pre></td>
324	<td>Move forward .25...12.75 points</td>
325</tr>
326</table>
327<br>
328also exist (i.e. with no space before the digit and points being
329the unit of measure, hence no unit of measure required).  Both
330accept quarter points, so it's possible to do, for example,
331<strong>\*[FP.5]</strong> or <strong>\*[BP1.25]</strong> up to a limit
332of 12.75 points.
333<p>
334
335<!---INLINE_VERTICAL_MOM--->
336
337<hr width="66%" align="left">
338<a name="INLINE_VERTICAL_MOM"><h3><u>Vertical inline movement</u></h3></a>
339
340<p>
341If you need to move portions of type up or down on a line,
342<strong>mom</strong> provides the following inline escapes:
343<p>
344<table width="80%" valign="baseline" cellpadding="10" summary="inlinevertical">
345<tr>
346<a name="UP"></a>
347	<td><pre>\*[UP n&lt;unit&gt;]</pre></td>
348	<td>Move up inline the specified number of
349		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a></td>
350</tr>
351<tr>
352<a name="DOWN"></a>
353	<td><pre>\*[DOWN n&lt;unit&gt;]</pre></td>
354	<td>Move down inline the specified number of
355		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a></td>
356</tr>
357</table>
358<br>
359For example,
360<p>
361<pre>
362	Tel: 905\*[UP 1p]-\*[DOWN 1p]4072
363</pre>
364
365moves the hyphen in the telephone number up by 1 point, then
366moves back down by the same amount.
367<p>
368<strong>NOTE: \*[UP]</strong> and <strong>\*[DOWN]</strong> do not
369work with the inline escape,
370<a href="#INLINE_RULE_MOM">\*[RULE]</a>.
371See
372<a href="#RULE_EXCEPTION">here</a>
373for details.
374<p>
375<strong>ADDITIONAL NOTE:</strong> For backward compatibility, the
376following are also available:
377<p>
378<table valign="baseline" cellpadding="10" summary="inlinevertical">
379<tr>
380	<td><pre>\*[ALD.25]...\*[ALD12.75]</pre>
381	<td>Advance lead .25...12.75 points (move downward)
382</tr>
383<tr>
384	<td><pre>\*[RLD.25]...\*[RLD12.75]</pre></td>
385	<td>Reverse lead .5...12.75 points (move upward)</td>
386</tr>
387</table>
388<p>
389<p>
390Both <strong>\*[ALD]</strong> and <strong>\*[RLD]</strong> work in
391points, hence you mustn't use a unit of measure.
392<p>
393
394<!---INLINE_B_MOM--->
395
396<hr width="66%" align="left">
397<a name="B"><h3><u>Terminate a line without advancing on the page</u></h3></a>
398
399<p>
400Sometimes, you want <strong>mom</strong> to break a line but not
401advance on the page.  See
402<a href="typesetting.html#EL_EXAMPLE">here</a>
403for an example of when you might want to do this.
404<p>
405In versions of <strong>mom</strong> prior to 1.2-f, this was
406accomplished through the use of
407<a href="typesetting.html#EL">EL</a>.
408As of 1.2-f, you can, if you prefer, accomplish the same thing
409by using the inline escape, <strong>\*[B]</strong>.  Simply
410attach the escape to the end of any line.  Using the example
411given in the document entry for <strong>EL</strong>, you'd use
412<strong>\*[B]</strong> like this:
413
414<p>
415<pre>
416	.LEFT
417	.LS 12.5
418	A line of text.\*[B]
419	.ALD 24p
420	The next line of text.
421</pre>
422
423<strong>\*[B]</strong> works reliably regardless of the current
424<a href="definitions.html#TERMS_FILLED">fill mode</a>.
425<p>
426
427<!---INLINE_TB+_MOM--->
428
429<hr width="66%" align="left">
430<a name="TB+"><h3><u>Call the next sequential tab without advancing on the page</u></h3></a>
431
432<p>
433Sometimes, you want <strong>mom</strong> to move to the next tab in
434sequence (e.g. from TAB 1 to TAB 2, or TAB 8 to TAB 9) without
435<strong>mom</strong> advancing on the page.  (See the example in
436<a href="typesetting.html#NOTE_TN">here</a>
437if you're not clear how <strong>mom</strong> manages tabs and
438linebreaks.)
439<p>
440In versions of <strong>mom</strong> prior to 1.2-f, this was
441accomplished through the use of
442<a href="typesetting.html#TN">TN</a>.
443As of 1.2-f, you can, if you prefer, accomplish the same thing
444by using the inline escape, <strong>\*[TB+]</strong>.  Simply
445attach the escape to the end of any line in a tab, like this:
446
447<p>
448<pre>
449	.TAB 1
450	Some text\*[TB+]    \" This line is in tab 1
451	Some more text      \" This line is in tab 2, on the same baseline as tab 1
452</pre>
453
454<strong>\*[TB+]</strong> works reliably regardless of the current
455<a href="definitions.html#TERMS_FILLED">fill mode</a>.
456<p>
457
458<!---INLINE_RULE_MOM--->
459
460<hr width="66%" align="left">
461<a name="INLINE_RULE_MOM"><h3><u>Full measure rules</u></h3></a>
462
463<p>
464I find I often need rules drawn to the full measure of the current line
465or tab length.  The official way to do this is <kbd>\l'\n(.lu'</kbd>,
466which is annoying to type, and doesn't mean a whole heck of a lot if
467you're new to groff.  The inline, <strong>\*[RULE]</strong>, is a simple
468replacement for <strong>\l'\n(.lu'</strong>.  Use it whenever you need
469a rule drawn to the full measure of the current line or tab length, for
470example:
471<p>
472<pre>
473	.LL 6P
474	\*[RULE]
475</pre>
476
477The above draws a rule the full measure of the 6-pica line length.
478<p>
479<strong>\*[RULE]</strong> should appear on a line by itself.  In
480<a href="definitions.html#TERMS_FILLED">fill modes</a>,
481(i.e.
482<a href="typesetting.html#QUAD">QUAD</a>
483or
484<a href="typesetting.html#JUSTIFY">JUSTIFY</a>),
485it requires a
486<a href="typesetting.html#BR">.BR</a>
487on the line immediately before it; otherwise, the rule will be drawn
488on the same baseline occupied by any type preceding it.  In
489<a href="definitions.html#TERMS_NOFILL">nofill modes</a>
490(i.e
491<a href="typesetting.html#LRC">LEFT</a>,
492<a href="typesetting.html#LRC">RIGHT</a>
493or
494<a href="typesetting.html#LRC">CENTER</a>),
495the <strong>.BR</strong> is not required.
496<p>
497Please note that <strong>\*[RULE]</strong> draws the rule to the
498full measure, hence it <em>cannot</em> be used to fill the remainder
499of a partial line with a rule in this way:
500<p>
501<pre>
502	Signature__________________________________________
503</pre>
504
505If you wish to accomplish this effect, you have to use
506<strong>\*[RULE]</strong> in conjunction with the
507<a href="goodies.html#PAD"><strong>PAD</strong></a>
508macro and
509<a href="typesetting.html#STRING_TABS">string tabs</a>.
510(See the
511<a href="goodies.html#PAD_EXAMPLE">example</a>
512provided with <strong>PAD</strong>.)
513<a name="RULE_EXCEPTION"></a>
514<p>
515Please also note that the inline escapes
516<a href="#UP">\*[UP]</a>
517and
518<a href="#DOWN">\*[DOWN]</a>
519cannot be used in conjunction with <strong>\*[RULE]</strong>.  This
520doesn't work:
521<p>
522<pre>
523	\*[DOWN 2p]\*[RULE]\*[UP 2p]
524</pre>
525
526This does:
527<p>
528<pre>
529	.ALD 2p
530	\*[RULE]
531	.RLD 2p
532</pre>
533
534See groff's
535<a href="#INLINE_LINEDRAWING_GROFF">Horizontal line drawing function</a>
536for more information on drawing horizontal rules.
537<p>
538<hr>
539
540<!---INLINE_FONT_GROFF--->
541
542<h2><u>Groff inline escapes</u></h2>
543
544<a name="INLINE_FONTS_GROFF"><h3><u>Font control with \f</u></h3></a>
545
546<p>
547Groff's basic mechanism for inline font control is the escape
548<strong>\f[&lt;</strong>font&gt;<strong>]</strong>. 
549<p>
550<table valign="baseline" cellpadding="10" summary="inlinefontsgroff">
551<tr>
552	<td><strong>\f[R]</strong></td>
553	<td>Change font to medium roman (equivalent to mom's <strong>\*[ROM]</strong>)</td>
554</tr>
555<tr>
556	<td><strong>\f[I]</strong></td>
557	<td>Change font to medium italic (equivalent to mom's <strong>\*[IT]</strong>)</td>
558</tr>
559<tr>
560	<td><strong>\f[B]</strong></td>
561	<td>Change font to bold roman (equivalent to mom's <strong>\*[BD]</strong>)</td>
562</tr>
563<tr>
564	<td><strong>\f[BI]</strong></td>
565	<td>Change font to bold italic (equivalent to mom's <strong>\*[BDI]</strong>)</td>
566</tr>
567<tr>
568	<td><strong>\f[P]</strong></td>
569	<td>Revert to previous font (equivalent to mom's <strong>\*[PREV]</strong>)</td>
570</tr>
571</table>
572<p>
573<strong>\f[&lt;</strong>font&gt;<strong>]</strong> can be used with
574any legal font style registered with groff.  (See
575<a href="appendices.html#STYLE_EXTENSIONS">here</a>
576for a list of pre-registered font styles provided by
577<strong>mom</strong>).
578<p>
579<strong>\f[&lt;</strong>font&gt;<strong>]</strong> can also take a
580complete legal family+font name combo.  This is especially useful
581should you need to change both family and font inline.  For example,
582if your prevailing family and font are Times Roman and you want a
583few words in Courier Bold Italic, you could do this:
584<p>
585<pre>
586	.FAM T
587	.FT  R
588	The command \f[CBI]ls -l\f[P] gives a &quot;long&quot; directory listing.
589</pre>
590
591The Unix command &quot;ls -l&quot; will appear in Courier Bold Italic
592in a line that is otherwise in Times Roman.
593<p>
594
595<!---INLINE_HORIZONTAL_GROFF--->
596
597<hr width="66%" align="left">
598<a name="INLINE_HORIZONTAL_GROFF"><h3><u>Inline horizontal motions with \h</u></h3></a>
599
600<p>
601Whenever you need to move forward or backward on a line, use the inline
602<strong>\h'&lt;distance&gt;'</strong>.  In order to avoid unpleasant surprises,
603always append a
604<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>
605to &quot;distance&quot;.
606<p>
607<pre>
608	\h'1.25i'
609</pre>
610
611moves you 1.25 inches to the right (forwards) of the horizontal
612position on the current
613<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>.
614<strong>\h'&lt;distance&gt;'</strong> is exactly equivalent to
615<a href="#FWD"><strong>\*[FWD n&lt;unit&gt;]</strong></a>.
616<p>
617<pre>
618	\h'-1.25i'
619</pre>
620
621moves you 1.25 inches to the left (backwards).
622<strong>\h'-&lt;distance&gt;'</strong> is exactly equivalent to
623<a href="#BCK"><strong>\*[BCK n&lt;unit&gt;]</strong></a>.
624<p>
625
626<!---INLINE_VERTICAL_GROFF--->
627
628<hr width="66%" align="left">
629<a name="INLINE_VERTICAL_GROFF"><h3><u>Inline vertical motions with \v</u></h3></a>
630
631<p>
632If you need to raise or lower type on a line (say, for sub- or
633superscripts, or any other special effect), use
634<strong>\v'&lt;distance&gt;'</strong>.  In order to avoid unpleasant
635surprises, always append a
636<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>
637to &quot;distance&quot;.
638<p>
639<pre>
640	\v'.6m'
641</pre>
642
643moves you (approx.) 2/3 of an
644<a href="definitions.html#TERMS_EM">em</a>
645downward on the current
646<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>.
647<strong>\v'&lt;distance&gt;'</strong> is exactly equivalent to
648<a href="#DOWN"><strong>\*[DOWN n&lt;unit&gt;]</strong></a>.
649<p>
650<pre>
651	\v'-.6m'
652</pre>
653
654moves you (approx.) 2/3 of an em upward.
655<strong>\v'&lt;-distance&gt;'</strong> is exactly equivalent to <a
656href="#UP"><strong>\*[UP n&lt;unit&gt;]</strong></a>.
657<p>
658<strong>IMPORTANT:</strong> The vertical motion of <strong>\v</strong>
659affects ONLY type on the current
660<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>.
661When groff breaks the output line, the effect of
662<strong>\v</strong> is cancelled; the baseline of the next output line
663is where it would be if you hadn't used <strong>\v</strong>.
664<p>
665<strong>TIP:</strong> When using <strong>\v</strong> for
666occasional effects on a line, don't forget to reverse it when
667you've done what you want to do.  Otherwise, the remaining type
668will be set too high (if you used <strong>\v</strong> with the
669minus sign) or too low (if you used <strong>\v</strong> without
670the minus sign).
671<p>
672
673<!---INLINE_STRINGWIDTHL_GROFF--->
674
675<hr width="66%" align="left">
676<a name="INLINE_STRINGWIDTH_GROFF"><h3><u>String width function \w</u></h3></a>
677
678<p>
679In the context of <strong>mom</strong>, the string width inline
680<strong>\w'string'</strong> primarily serves to let you
681establish the horizontal measure of something (e.g. indents) based
682on the length of a bit of text.  For example, if you want a left
683indent the length of the word &quot;Examples:&quot; plus a
684space, you can set it with the <strong>\w</strong> inline escape:
685<p>
686<pre>
687	.IL "\w'Examples: '"
688</pre>
689
690<strong>NOTE:</strong> Whenever you pass <strong>\w'string'</strong>
691to a macro that normally requires a
692<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>,
693<em>do <strong>NOT</strong> add a unit of measure to the \w'string'
694argument.</em>
695<p>
696Furthermore, if the string is composed of several words separated
697by spaces, you MUST surround the whole escape with double quotes,
698as in the example above.
699<p>
700
701<!---INLINE_LINEDRAWING_GROFF--->
702
703<hr width="66%" align="left">
704<a name="INLINE_LINEDRAWING_GROFF"><h3><u>Horizontal line drawing function \l</u></h3></a>
705
706<p>
707The <strong>\l'distance'</strong> inline allows you to draw a
708horizontal rule of the specified distance.  You must supply a
709<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>.
710Therefore, to set a 3-pica rule into a line of text, you'd do
711<p>
712<pre>
713	A line of text with a superfluous \l'3P' 3-pica rule in it.
714</pre>
715
716<strong>\l'3P'</strong> above not only draws the rule, but
717advances 3 picas horizontally as well, just as you'd expect.
718<p>
719For an easy way of drawing rules to the full measure of the current
720line or tab length, see 
721<a href="#INLINE_RULE_MOM">Full measure rules</a>.
722<p>
723The weight (thickness) of rules varies according to the point size
724in effect when you invoke <strong>\l</strong>, but you can't fix
725the weight with any real precision.  A point size of 12 produces
726a tastefully moderate rule weight of between one-half and one
727point (depending on your printer), and is the point size used by
728<strong>mom</strong> for all macros and routines that create rules.
729<p>
730<strong>NOTE:</strong> There are, in addition to <strong>\l</strong>,
731a number of other line-drawing escapes, but frankly, using them for
732typographically precise drawing is a bit like hammering in a nail
733with a screwdriver -- doable, but not recommended.
734<p>
735Groff comes with a number of &quot;preprocessors&quot; designed
736to ease creating rules, boxes, splines, and so on (tbl, pic,
737and friends), but I tend not to use them.  A firm believer
738in the &quot;right tool for the job,&quot; I prefer a vector
739drawing program when I need to combine type with graphic elements
740(say, a complex ruled form).  Inserting the results into a
741document is easy enough with <strong>.PSPIC</strong> (consult
742the <strong>groff_tmac</strong> man page for information on this
743indispensable and easy-to-use macro).
744<p>
745
746<!---INLINE_CHARACTERS_GROFF--->
747
748<hr width="66%" align="left">
749<a name="INLINE_CHARACTERS_GROFF"><h3><u>Special characters and symbols</u></h3></a>
750
751<p>
752Here follows a short list of commonly-used special characters available
753via inline escapes.  If you're not sure of the meaning of some of
754these characters, consult the
755<a href="definitions.html#TERMS">Definitions of Terms</a>.
756<p>
757For a complete list of special characters and glyphs (i.e. just
758about anything you'd ever want to appear on the printed page,
759including mathematical symbols, accented characters, unusual
760ligatures and letters unique to various European languages), consult
761<kbd>man groff_char</kbd>.
762<p>
763<pre>
764    CHARACTER                   ESCAPE SEQUENCE
765    ---------                   ---------------
766
767    Comment line                \#
768    Fixed-width space           \&lt;space&gt;  i.e. backslash followed by a space
769    Unbreakable space           \~
770    Digit-width (figure) space  \0
771    Zero-width character        \&amp;
772    Discretionary hyphen        \%
773    Backslash                   \\ or \e
774    Plus/minus (arithmetic)     \(+-
775    Subtract (arithmetic)       \(mi
776    Multiply (arithmetic)       \(mu
777    Divide (arithmetic)         \(di
778    Em-dash                     \(em
779    En-dash                     \(en
780    Left double-quote           \(lq
781    Right double-quote          \(rq
782    Bullet                      \(bu
783    Ballot box                  \(sq
784    One-quarter                 \(14
785    One-half                    \(12
786    Three-quarters              \(34
787    Degree sign                 \(de
788    Dagger                      \(dg
789    Foot mark                   \(fm
790    Cent sign                   \(ct
791    Registered trademark        \(rg
792    Copyright                   \(co
793    Section symbol              \(se
794</pre>
795
796<hr>
797<a href="color.html#TOP">Next</a>&nbsp;&nbsp;
798<a href="goodies.html#TOP">Prev</a>&nbsp;&nbsp;
799<a href="#TOP">Top</a>&nbsp;&nbsp;
800<a href="toc.html">Back to Table of Contents</a>
801</body>
802</html>
803