inlines.html   [plain text]


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Mom -- Inline escapes</title>
</head>
<body bgcolor="#dfdfdf">

<!====================================================================>

<a href="color.html#TOP">Next</a>&nbsp;&nbsp;
<a href="goodies.html#TOP">Prev</a>&nbsp;&nbsp;
<a href="toc.html">Back to Table of Contents</a>

<a name="TOP"></a>
<h1 align="center">
    <a name="INLINE_ESCAPES"><u>Inline escapes</u></a>
</h1>
<p>
<a href="#INLINE_ESCAPES_INTRO">Introduction to inline escapes</a>
<br>
<a href="#INDEX_INLINES">Index of inline escapes</a>
<p>

<a name="INLINE_ESCAPES_INTRO">
	<h2><u>Introduction to inline escapes</u></h2>
</a>

<a name="INTRO_INLINE_ESCAPES">
Inline escapes, as described in the
<a href="definitions.html#TERMS_INLINES">groff terms</a>
section of this manual, are typesetting commands that appear in
text
<a href="definitions.html#TERMS_INPUTLINE">input lines</a>,
as opposed to macros and other
<a href="definitions.html#TERMS_CONTROLLINES">control lines</a>
that must appear on lines by themselves.
<p>
Aside from altering type parameters within a line, inlines also
tell groff about special characters -- em-dashes, bullets,
<a href="definitions.html#TERMS_FIGURESPACE">figure/digit-width spaces</a>,
and so on.  It is beyond the scope of this manual to provide a
complete list of groff's inline functions and special characters.
I recommend having a look at the
<a href="intro.html#CANONICAL">canonical reference materials</a>
should you need more information than is contained herein.
<p>
In groff, the escape character is the backslash ( \ ).  Groff interprets
everything following the backslash as instructions, not literal text,
until the escape sequence is complete.  Should you need the actual
backslash character as part of a line of text, simply enter it twice
( \\ ).  Groff understands that this means "please print a backslash
character."  (You can also use <strong>\e</strong> to print a literal
backslash.)
<p>
Groff has a number of ways of recognizing what constitutes a complete
escape sequence.  This is both a boon and a curse; some escape
sequences have no terminating delimiter and consequently become
difficult to distinguish from real input text.  Others require
the use of an opening parenthesis with no corresponding closing
parenthesis.  Still others need to be enclosed in square brackets.
<p>
<strong>Mom</strong> recognizes that certain escapes get used more
often than others.  For these, she has a consistent input style that
takes the form \*[...], which makes them stand out well from the text
of your documents.  These escapes are the ones listed under
<a href="#INLINES_MOM">Mom's personal inlines</a>.
<p>
Despite <strong>mom</strong>'s best intentions, there are still
a number of typesetting functions that can only be accomplished
with groff's native inline escapes.  I've listed the ones that
strike me as essential, but there are many others.  If you want
to know what they are, please read the
<a href="intro.html#CANONICAL">canonical reference materials</a>
pertaining to groff.
<p>
<strong>HELPFUL BIT OF INFORMATION:</strong> Inline escapes can be used
in
<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>
that take
<a href="definitions.html#TERMS_STRINGARGUMENT">string arguments</a>.
<p>
<a name="INDEX_INLINES"><h3><u>Inlines index</u></h3></a>
<ul>
	<li><a name="INLINES_MOM"><strong>Mom's personal inlines</strong></a>
	<ul>
		<li><a href="#INLINE_FONTS_MOM">Changing fonts</a>
		<li><a href="#INLINE_SIZE_MOM">Changing point size</a>
		<li><a href="#INLINE_KERNING_MOM">Pairwise kerning</a>
		<li><a href="#INLINE_HORIZONTAL_MOM">Horizontal movement</a>
		<li><a href="#INLINE_VERTICAL_MOM">Vertical movement</a>
		<li><a href="#B">Terminate a line without advancing on the page</a>
		<li><a href="#TB+">Call the next sequential tab without advancing on the page</a>
		<li><a href="#INLINE_RULE_MOM">Full measure rules</a>
	</ul>
	<li><a name="INLINES_GROFF"><strong>Groff inline escapes</strong></a>
	<ul>
		<li><a href="#INLINE_FONTS_GROFF">Font control</a> <strong>\f</strong>
		<li><a href="#INLINE_HORIZONTAL_GROFF">Inline horizontal motions</a> <strong>\h</strong>
		<li><a href="#INLINE_VERTICAL_GROFF">Inline vertical motions</a> <strong>\v</strong>
		<li><a href="#INLINE_STRINGWIDTH_GROFF">String width function</a> <strong>\w</strong>
		<li><a href="#INLINE_LINEDRAWING_GROFF">Horizontal line drawing function</a> <strong>\l</strong>
		<li><a href="#INLINE_CHARACTERS_GROFF">Special characters</a>
	</ul>
</ul>
<p>
<hr>

<!---INLINE_FONTS_MOM--->

<h2><u>Mom's personal inlines</u></h2>

<a name="INLINE_FONTS_MOM"><h3><u>Changing fonts</u></h3></a>

<p>
<strong>Mom</strong> provides five escapes for changing fonts
inline:
<p>
<table valign="baseline" cellpadding="10" summary="inlinefonts">
<tr>
	<td><strong>\*[ROM]</strong></td>
	<td>Change font to medium roman</td>
</tr>
<tr>
	<td><strong>\*[IT]</strong></td>
	<td>Change font to medium italic</td>
</tr>
<tr>
	<td><strong>\*[BD]</strong></td>
	<td>Change font to bold roman</td>
</tr>
<tr>
	<td><strong>\*[BDI]</strong></td>
	<td>Change font to bold italic</td>
</tr>
<tr>
	<td><strong>\*[PREV]</strong></td>
	<td>Revert to previous font</td>
</tr>
</table>
<p>
These escapes are provided for merely for convenience, legibility,
and consistency when typesetting with <strong>mom</strong>.  For
more complete and flexible inline font control, please see
<a href="#INLINE_FONTS_GROFF">font control with \f</a>.

<p>
<strong>NOTE:</strong> If you're using the
<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>,
inline font changes remain in effect only for the duration of the
current document element tag.
<p>

<!---INLINE_SIZE_MOM--->

<hr width="66%" align="left">
<a name="INLINE_SIZE_MOM"><h3><u>Changing point size</u></h3></a>

<p>
<strong>Mom</strong> has two inline escapes for changing point
size:
<p>
<pre>
	\*[SIZE &lt;size&gt;]
</pre>

and
<p>
<pre>
	\*[S&lt;size&gt;]
</pre>

where &quot;size&quot; is the new size you want.  You can use
either; they behave exactly the same way.  For example, to change
the point size of type inline to 12 points, you could enter either
<p>
<pre>
	\*[SIZE 12]
</pre>

or
<p>
<pre>
	\*S[12]
</pre>

The advantage of the first form is that it's easy to remember, and
follows <strong>mom</strong>'s usual inline syntax.  The advantage
of the second is that it's more concise.
<p>
Notice that in both cases, the new size does not require a
<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>;
<a href="definitions.html#TERMS_PICASPOINTS">points</a>
is assumed.  However, a unit of measure may be appended to the size
if that's what you wish.  Fractional sizes are, of course, allowed.
<p>
The size given to <strong>\*[SIZE&nbsp;&lt;size&gt;]</strong> or
<strong>\*S[&lt;size&gt;]</strong> may be expressed in plus or minus
terms, which can be very useful.  In the following examples, the word
&quot;mom&quot; will be output 2 points larger than the point size
of the rest of the line.
<p>
<pre>
	While she isn't perfect, \*S[+2]mom\*S[-2] isn't half bad.
	While she isn't perfect, \*[SIZE +2]mom\*[SIZE -2] isn't half bad.
</pre>

<strong>NOTE:</strong> If you're accustomed to groff's usual way
of handling inline size requests (<kbd>\sN, \s±N, \s(NN, \s±(NN,
\s[NNN], \s±[NNN]</kbd>), feel free to continue with your old habits.
<strong>Mom</strong> doesn't care.
<p>

<!---INLINE_KERNING_MOM--->

<hr width="66%" align="left">
<a name="INLINE_KERNING_MOM"><h3><u>Pairwise kerning</u></h3></a>

<p>
Pairwise kerning means moving specific letter pairs closer
together or further apart (see
<a href="definitions.html#TERMS_KERN">Typesetting terms, kerning</a>
for more details).
<p>
<strong>Mom</strong> permits inline pairwise
kerning through the use of the inline escapes
<table valign="baseline" cellpadding="10" summary="inlinekerning">
<tr>
	<td><pre>\*[BU n]</pre></td>
	<td>Closes the space between letters (<strong>B</strong>ack <strong>U</strong>nits).</td>
</tr>
<tr>
	<td><pre>\*[FU n]</pre></td>
	<td>Opens the space between letters (<strong>F</strong>orward <strong>U</strong>nits).</td>
</tr>
</table>
<br>
&quot;<strong>n</strong>&quot; is the number of
<a href="definitions.html#TERMS_KERNUNIT">kern units</a>
by which to close or open the space between letters.
<p>
For example,
<p>
<pre>
	THE HUMAN COST OF COMMODIF\*[FU 1]YING FRESH W\*[BU 4]A\*[BU 5]TER
</pre>

moves the letter Y in &quot;COMMODIFYING&quot; 1 kern unit away from
the letter F, and the letter A in &quot;WATER&quot; 4 kern units closer
to the letter W.  Additionally, the letter T in "WATER" is moved 5 kern
units closer to the letter A.
<p>
For backward compatibility, the forms
<table valign="baseline" cellpadding="10" summary="inlinekerningold">
<tr>
	<td><pre>\*[BU1]...\*[BU36]</pre></td>
	<td>Move back 1...36 <a href="definitions.html#TERMS_KERNUNIT">kern units</a></td>
</tr>
<tr>
	<td><pre>\*[FU1]...\*[FU36]</pre></td>
	<td>Move forward 1...36 <a href="definitions.html#TERMS_KERNUNIT">kern units</a></td>
</tr>
</table>
<br>
also exist (i.e. with no space before the number of kern units desired,
up to a limit of 36).
<p>
<strong>NOTE:</strong> Using <strong>BU</strong> or <strong>FU</strong>
between characters pairs that are already automatically kerned
disables the automatic kerning and uses the value you give to
<strong>BU</strong> or <strong>FU</strong> instead.
<p>

<!---INLINE_HORIZONTAL_MOM--->

<hr width="66%" align="left">
<a name="INLINE_HORIZONTAL_MOM"><h3><u>Horizontal inline movement</u></h3></a>

<p>
Sometimes, you may need to insert a specified amount amount of white
space into an
<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>,
or -- occasionally  -- back up to a
previous position on an
<a href="definitions.html#TERMS_INPUTLINE">output</a>
line in order to create special typographic effects.
<p>
<strong>Mom</strong>'s inline escapes for these horizontal movements are
<p>
<table align="left" valign="baseline" cellpadding="10" summary="inlinehorizontal">
<tr>
<a name="FWD"></a>
	<td><pre>\*[FWD n&lt;unit&gt;]</pre></td>
	<td width="80%">Move forward inline the specified number of
		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a>;
		decimal fractions are allowed.</td>
</tr>
<tr>
<a name="BCK"></a>
	<td><pre>\*[BCK n&lt;unit&gt;]</pre></td>
	<td width="80%">Move backward inline the specified number of
		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a>;
		decimal fractions are allowed.</td>
</tr>
</table>
<p>
For example,
<p>
<pre>
	1.\*[FWD 12p]The Free Trade Play-Offs: WalMart 100, Mexico 0
</pre>
puts 12 points of space between &quot;1.&quot; and
&quot;The&quot;.
<p>
<strong>NOTE:</strong> For backward compatibility, the forms
<p>
<table valign="baseline" cellpadding="10" summary="inlinehorizontalold">
<tr>
	<td><pre>\*[BP.25]...\*[BP12.75]</pre></td>
	<td>Move back .25...12.75 points</td>
</tr>
<tr>
	<td><pre>\*[FP.25]...\*[FP12.75]</pre></td>
	<td>Move forward .25...12.75 points</td>
</tr>
</table>
<br>
also exist (i.e. with no space before the digit and points being
the unit of measure, hence no unit of measure required).  Both
accept quarter points, so it's possible to do, for example,
<strong>\*[FP.5]</strong> or <strong>\*[BP1.25]</strong> up to a limit
of 12.75 points.
<p>

<!---INLINE_VERTICAL_MOM--->

<hr width="66%" align="left">
<a name="INLINE_VERTICAL_MOM"><h3><u>Vertical inline movement</u></h3></a>

<p>
If you need to move portions of type up or down on a line,
<strong>mom</strong> provides the following inline escapes:
<p>
<table width="80%" valign="baseline" cellpadding="10" summary="inlinevertical">
<tr>
<a name="UP"></a>
	<td><pre>\*[UP n&lt;unit&gt;]</pre></td>
	<td>Move up inline the specified number of
		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a></td>
</tr>
<tr>
<a name="DOWN"></a>
	<td><pre>\*[DOWN n&lt;unit&gt;]</pre></td>
	<td>Move down inline the specified number of
		<a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a></td>
</tr>
</table>
<br>
For example,
<p>
<pre>
	Tel: 905\*[UP 1p]-\*[DOWN 1p]4072
</pre>

moves the hyphen in the telephone number up by 1 point, then
moves back down by the same amount.
<p>
<strong>NOTE: \*[UP]</strong> and <strong>\*[DOWN]</strong> do not
work with the inline escape,
<a href="#INLINE_RULE_MOM">\*[RULE]</a>.
See
<a href="#RULE_EXCEPTION">here</a>
for details.
<p>
<strong>ADDITIONAL NOTE:</strong> For backward compatibility, the
following are also available:
<p>
<table valign="baseline" cellpadding="10" summary="inlinevertical">
<tr>
	<td><pre>\*[ALD.25]...\*[ALD12.75]</pre>
	<td>Advance lead .25...12.75 points (move downward)
</tr>
<tr>
	<td><pre>\*[RLD.25]...\*[RLD12.75]</pre></td>
	<td>Reverse lead .5...12.75 points (move upward)</td>
</tr>
</table>
<p>
<p>
Both <strong>\*[ALD]</strong> and <strong>\*[RLD]</strong> work in
points, hence you mustn't use a unit of measure.
<p>

<!---INLINE_B_MOM--->

<hr width="66%" align="left">
<a name="B"><h3><u>Terminate a line without advancing on the page</u></h3></a>

<p>
Sometimes, you want <strong>mom</strong> to break a line but not
advance on the page.  See
<a href="typesetting.html#EL_EXAMPLE">here</a>
for an example of when you might want to do this.
<p>
In versions of <strong>mom</strong> prior to 1.2-f, this was
accomplished through the use of
<a href="typesetting.html#EL">EL</a>.
As of 1.2-f, you can, if you prefer, accomplish the same thing
by using the inline escape, <strong>\*[B]</strong>.  Simply
attach the escape to the end of any line.  Using the example
given in the document entry for <strong>EL</strong>, you'd use
<strong>\*[B]</strong> like this:

<p>
<pre>
	.LEFT
	.LS 12.5
	A line of text.\*[B]
	.ALD 24p
	The next line of text.
</pre>

<strong>\*[B]</strong> works reliably regardless of the current
<a href="definitions.html#TERMS_FILLED">fill mode</a>.
<p>

<!---INLINE_TB+_MOM--->

<hr width="66%" align="left">
<a name="TB+"><h3><u>Call the next sequential tab without advancing on the page</u></h3></a>

<p>
Sometimes, you want <strong>mom</strong> to move to the next tab in
sequence (e.g. from TAB 1 to TAB 2, or TAB 8 to TAB 9) without
<strong>mom</strong> advancing on the page.  (See the example in
<a href="typesetting.html#NOTE_TN">here</a>
if you're not clear how <strong>mom</strong> manages tabs and
linebreaks.)
<p>
In versions of <strong>mom</strong> prior to 1.2-f, this was
accomplished through the use of
<a href="typesetting.html#TN">TN</a>.
As of 1.2-f, you can, if you prefer, accomplish the same thing
by using the inline escape, <strong>\*[TB+]</strong>.  Simply
attach the escape to the end of any line in a tab, like this:

<p>
<pre>
	.TAB 1
	Some text\*[TB+]    \" This line is in tab 1
	Some more text      \" This line is in tab 2, on the same baseline as tab 1
</pre>

<strong>\*[TB+]</strong> works reliably regardless of the current
<a href="definitions.html#TERMS_FILLED">fill mode</a>.
<p>

<!---INLINE_RULE_MOM--->

<hr width="66%" align="left">
<a name="INLINE_RULE_MOM"><h3><u>Full measure rules</u></h3></a>

<p>
I find I often need rules drawn to the full measure of the current line
or tab length.  The official way to do this is <kbd>\l'\n(.lu'</kbd>,
which is annoying to type, and doesn't mean a whole heck of a lot if
you're new to groff.  The inline, <strong>\*[RULE]</strong>, is a simple
replacement for <strong>\l'\n(.lu'</strong>.  Use it whenever you need
a rule drawn to the full measure of the current line or tab length, for
example:
<p>
<pre>
	.LL 6P
	\*[RULE]
</pre>

The above draws a rule the full measure of the 6-pica line length.
<p>
<strong>\*[RULE]</strong> should appear on a line by itself.  In
<a href="definitions.html#TERMS_FILLED">fill modes</a>,
(i.e.
<a href="typesetting.html#QUAD">QUAD</a>
or
<a href="typesetting.html#JUSTIFY">JUSTIFY</a>),
it requires a
<a href="typesetting.html#BR">.BR</a>
on the line immediately before it; otherwise, the rule will be drawn
on the same baseline occupied by any type preceding it.  In
<a href="definitions.html#TERMS_NOFILL">nofill modes</a>
(i.e
<a href="typesetting.html#LRC">LEFT</a>,
<a href="typesetting.html#LRC">RIGHT</a>
or
<a href="typesetting.html#LRC">CENTER</a>),
the <strong>.BR</strong> is not required.
<p>
Please note that <strong>\*[RULE]</strong> draws the rule to the
full measure, hence it <em>cannot</em> be used to fill the remainder
of a partial line with a rule in this way:
<p>
<pre>
	Signature__________________________________________
</pre>

If you wish to accomplish this effect, you have to use
<strong>\*[RULE]</strong> in conjunction with the
<a href="goodies.html#PAD"><strong>PAD</strong></a>
macro and
<a href="typesetting.html#STRING_TABS">string tabs</a>.
(See the
<a href="goodies.html#PAD_EXAMPLE">example</a>
provided with <strong>PAD</strong>.)
<a name="RULE_EXCEPTION"></a>
<p>
Please also note that the inline escapes
<a href="#UP">\*[UP]</a>
and
<a href="#DOWN">\*[DOWN]</a>
cannot be used in conjunction with <strong>\*[RULE]</strong>.  This
doesn't work:
<p>
<pre>
	\*[DOWN 2p]\*[RULE]\*[UP 2p]
</pre>

This does:
<p>
<pre>
	.ALD 2p
	\*[RULE]
	.RLD 2p
</pre>

See groff's
<a href="#INLINE_LINEDRAWING_GROFF">Horizontal line drawing function</a>
for more information on drawing horizontal rules.
<p>
<hr>

<!---INLINE_FONT_GROFF--->

<h2><u>Groff inline escapes</u></h2>

<a name="INLINE_FONTS_GROFF"><h3><u>Font control with \f</u></h3></a>

<p>
Groff's basic mechanism for inline font control is the escape
<strong>\f[&lt;</strong>font&gt;<strong>]</strong>. 
<p>
<table valign="baseline" cellpadding="10" summary="inlinefontsgroff">
<tr>
	<td><strong>\f[R]</strong></td>
	<td>Change font to medium roman (equivalent to mom's <strong>\*[ROM]</strong>)</td>
</tr>
<tr>
	<td><strong>\f[I]</strong></td>
	<td>Change font to medium italic (equivalent to mom's <strong>\*[IT]</strong>)</td>
</tr>
<tr>
	<td><strong>\f[B]</strong></td>
	<td>Change font to bold roman (equivalent to mom's <strong>\*[BD]</strong>)</td>
</tr>
<tr>
	<td><strong>\f[BI]</strong></td>
	<td>Change font to bold italic (equivalent to mom's <strong>\*[BDI]</strong>)</td>
</tr>
<tr>
	<td><strong>\f[P]</strong></td>
	<td>Revert to previous font (equivalent to mom's <strong>\*[PREV]</strong>)</td>
</tr>
</table>
<p>
<strong>\f[&lt;</strong>font&gt;<strong>]</strong> can be used with
any legal font style registered with groff.  (See
<a href="appendices.html#STYLE_EXTENSIONS">here</a>
for a list of pre-registered font styles provided by
<strong>mom</strong>).
<p>
<strong>\f[&lt;</strong>font&gt;<strong>]</strong> can also take a
complete legal family+font name combo.  This is especially useful
should you need to change both family and font inline.  For example,
if your prevailing family and font are Times Roman and you want a
few words in Courier Bold Italic, you could do this:
<p>
<pre>
	.FAM T
	.FT  R
	The command \f[CBI]ls -l\f[P] gives a &quot;long&quot; directory listing.
</pre>

The Unix command &quot;ls -l&quot; will appear in Courier Bold Italic
in a line that is otherwise in Times Roman.
<p>

<!---INLINE_HORIZONTAL_GROFF--->

<hr width="66%" align="left">
<a name="INLINE_HORIZONTAL_GROFF"><h3><u>Inline horizontal motions with \h</u></h3></a>

<p>
Whenever you need to move forward or backward on a line, use the inline
<strong>\h'&lt;distance&gt;'</strong>.  In order to avoid unpleasant surprises,
always append a
<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>
to &quot;distance&quot;.
<p>
<pre>
	\h'1.25i'
</pre>

moves you 1.25 inches to the right (forwards) of the horizontal
position on the current
<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>.
<strong>\h'&lt;distance&gt;'</strong> is exactly equivalent to
<a href="#FWD"><strong>\*[FWD n&lt;unit&gt;]</strong></a>.
<p>
<pre>
	\h'-1.25i'
</pre>

moves you 1.25 inches to the left (backwards).
<strong>\h'-&lt;distance&gt;'</strong> is exactly equivalent to
<a href="#BCK"><strong>\*[BCK n&lt;unit&gt;]</strong></a>.
<p>

<!---INLINE_VERTICAL_GROFF--->

<hr width="66%" align="left">
<a name="INLINE_VERTICAL_GROFF"><h3><u>Inline vertical motions with \v</u></h3></a>

<p>
If you need to raise or lower type on a line (say, for sub- or
superscripts, or any other special effect), use
<strong>\v'&lt;distance&gt;'</strong>.  In order to avoid unpleasant
surprises, always append a
<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>
to &quot;distance&quot;.
<p>
<pre>
	\v'.6m'
</pre>

moves you (approx.) 2/3 of an
<a href="definitions.html#TERMS_EM">em</a>
downward on the current
<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>.
<strong>\v'&lt;distance&gt;'</strong> is exactly equivalent to
<a href="#DOWN"><strong>\*[DOWN n&lt;unit&gt;]</strong></a>.
<p>
<pre>
	\v'-.6m'
</pre>

moves you (approx.) 2/3 of an em upward.
<strong>\v'&lt;-distance&gt;'</strong> is exactly equivalent to <a
href="#UP"><strong>\*[UP n&lt;unit&gt;]</strong></a>.
<p>
<strong>IMPORTANT:</strong> The vertical motion of <strong>\v</strong>
affects ONLY type on the current
<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>.
When groff breaks the output line, the effect of
<strong>\v</strong> is cancelled; the baseline of the next output line
is where it would be if you hadn't used <strong>\v</strong>.
<p>
<strong>TIP:</strong> When using <strong>\v</strong> for
occasional effects on a line, don't forget to reverse it when
you've done what you want to do.  Otherwise, the remaining type
will be set too high (if you used <strong>\v</strong> with the
minus sign) or too low (if you used <strong>\v</strong> without
the minus sign).
<p>

<!---INLINE_STRINGWIDTHL_GROFF--->

<hr width="66%" align="left">
<a name="INLINE_STRINGWIDTH_GROFF"><h3><u>String width function \w</u></h3></a>

<p>
In the context of <strong>mom</strong>, the string width inline
<strong>\w'string'</strong> primarily serves to let you
establish the horizontal measure of something (e.g. indents) based
on the length of a bit of text.  For example, if you want a left
indent the length of the word &quot;Examples:&quot; plus a
space, you can set it with the <strong>\w</strong> inline escape:
<p>
<pre>
	.IL "\w'Examples: '"
</pre>

<strong>NOTE:</strong> Whenever you pass <strong>\w'string'</strong>
to a macro that normally requires a
<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>,
<em>do <strong>NOT</strong> add a unit of measure to the \w'string'
argument.</em>
<p>
Furthermore, if the string is composed of several words separated
by spaces, you MUST surround the whole escape with double quotes,
as in the example above.
<p>

<!---INLINE_LINEDRAWING_GROFF--->

<hr width="66%" align="left">
<a name="INLINE_LINEDRAWING_GROFF"><h3><u>Horizontal line drawing function \l</u></h3></a>

<p>
The <strong>\l'distance'</strong> inline allows you to draw a
horizontal rule of the specified distance.  You must supply a
<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>.
Therefore, to set a 3-pica rule into a line of text, you'd do
<p>
<pre>
	A line of text with a superfluous \l'3P' 3-pica rule in it.
</pre>

<strong>\l'3P'</strong> above not only draws the rule, but
advances 3 picas horizontally as well, just as you'd expect.
<p>
For an easy way of drawing rules to the full measure of the current
line or tab length, see 
<a href="#INLINE_RULE_MOM">Full measure rules</a>.
<p>
The weight (thickness) of rules varies according to the point size
in effect when you invoke <strong>\l</strong>, but you can't fix
the weight with any real precision.  A point size of 12 produces
a tastefully moderate rule weight of between one-half and one
point (depending on your printer), and is the point size used by
<strong>mom</strong> for all macros and routines that create rules.
<p>
<strong>NOTE:</strong> There are, in addition to <strong>\l</strong>,
a number of other line-drawing escapes, but frankly, using them for
typographically precise drawing is a bit like hammering in a nail
with a screwdriver -- doable, but not recommended.
<p>
Groff comes with a number of &quot;preprocessors&quot; designed
to ease creating rules, boxes, splines, and so on (tbl, pic,
and friends), but I tend not to use them.  A firm believer
in the &quot;right tool for the job,&quot; I prefer a vector
drawing program when I need to combine type with graphic elements
(say, a complex ruled form).  Inserting the results into a
document is easy enough with <strong>.PSPIC</strong> (consult
the <strong>groff_tmac</strong> man page for information on this
indispensable and easy-to-use macro).
<p>

<!---INLINE_CHARACTERS_GROFF--->

<hr width="66%" align="left">
<a name="INLINE_CHARACTERS_GROFF"><h3><u>Special characters and symbols</u></h3></a>

<p>
Here follows a short list of commonly-used special characters available
via inline escapes.  If you're not sure of the meaning of some of
these characters, consult the
<a href="definitions.html#TERMS">Definitions of Terms</a>.
<p>
For a complete list of special characters and glyphs (i.e. just
about anything you'd ever want to appear on the printed page,
including mathematical symbols, accented characters, unusual
ligatures and letters unique to various European languages), consult
<kbd>man groff_char</kbd>.
<p>
<pre>
    CHARACTER                   ESCAPE SEQUENCE
    ---------                   ---------------

    Comment line                \#
    Fixed-width space           \&lt;space&gt;  i.e. backslash followed by a space
    Unbreakable space           \~
    Digit-width (figure) space  \0
    Zero-width character        \&amp;
    Discretionary hyphen        \%
    Backslash                   \\ or \e
    Plus/minus (arithmetic)     \(+-
    Subtract (arithmetic)       \(mi
    Multiply (arithmetic)       \(mu
    Divide (arithmetic)         \(di
    Em-dash                     \(em
    En-dash                     \(en
    Left double-quote           \(lq
    Right double-quote          \(rq
    Bullet                      \(bu
    Ballot box                  \(sq
    One-quarter                 \(14
    One-half                    \(12
    Three-quarters              \(34
    Degree sign                 \(de
    Dagger                      \(dg
    Foot mark                   \(fm
    Cent sign                   \(ct
    Registered trademark        \(rg
    Copyright                   \(co
    Section symbol              \(se
</pre>

<hr>
<a href="color.html#TOP">Next</a>&nbsp;&nbsp;
<a href="goodies.html#TOP">Prev</a>&nbsp;&nbsp;
<a href="#TOP">Top</a>&nbsp;&nbsp;
<a href="toc.html">Back to Table of Contents</a>
</body>
</html>