| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!-- |
| 3 |
This file is part of groff, the GNU roff type-setting system. |
| 4 |
|
| 5 |
Copyright (C) 2004-2020 Free Software Foundation, Inc. |
| 6 |
Written by Peter Schaffter ([email protected]). |
| 7 |
|
| 8 |
Permission is granted to copy, distribute and/or modify this document |
| 9 |
under the terms of the GNU Free Documentation License, Version 1.3 or |
| 10 |
any later version published by the Free Software Foundation; with no |
| 11 |
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover |
| 12 |
Texts. |
| 13 |
|
| 14 |
A copy of the Free Documentation License is included as a file called |
| 15 |
FDL in the main directory of the groff source package. |
| 16 |
--> |
| 17 |
|
| 18 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 19 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 20 |
<head> |
| 21 |
<meta http-equiv="content-type" content="text/html;charset=utf-8"/> |
| 22 |
<title>Mom -- Inline escapes</title> |
| 23 |
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> |
| 24 |
</head> |
| 25 |
|
| 26 |
<body style="background-color: #f5faff;"> |
| 27 |
|
| 28 |
<!-- ==================================================================== --> |
| 29 |
|
| 30 |
<div id="top" class="page"> |
| 31 |
|
| 32 |
<!-- Navigation links --> |
| 33 |
<table style="width: 100%;"> |
| 34 |
<tr> |
| 35 |
<td><a href="toc.html">Back to Table of Contents</a></td> |
| 36 |
<td style="text-align: right;"><a href="color.html#top">Next: Coloured text</a></td> |
| 37 |
</tr> |
| 38 |
</table> |
| 39 |
|
| 40 |
<h1 id="inline-escapes" class="docs">Inline escapes</h1> |
| 41 |
|
| 42 |
<div style="text-align: center;"> |
| 43 |
<a href="#index-inlines">List of inline escapes</a> |
| 44 |
</div> |
| 45 |
|
| 46 |
<div class="rule-medium"><hr/></div> |
| 47 |
|
| 48 |
<h2 id="intro-inlines" class="docs">Introduction</h2> |
| 49 |
<p> |
| 50 |
Inline escapes, as described in the |
| 51 |
<a href="definitions.html#inlines">groff terms</a> |
| 52 |
section of this manual, are typesetting commands that appear in text |
| 53 |
<a href="definitions.html#inputline">input lines</a>, |
| 54 |
as opposed to macros and other |
| 55 |
<a href="definitions.html#controllines">control lines</a> |
| 56 |
that must appear on lines by themselves. |
| 57 |
</p> |
| 58 |
|
| 59 |
<p> |
| 60 |
Aside from altering type parameters within a line, inlines also tell |
| 61 |
groff about special characters—em-dashes, bullets, |
| 62 |
<a href="definitions.html#figurespace">figure/digit-width spaces</a>, |
| 63 |
and so on. It is beyond the scope of this manual to provide |
| 64 |
a complete list of groff’s inline functions and special |
| 65 |
characters. I recommend having a look at the |
| 66 |
<a href="intro.html#canonical">canonical reference materials</a> |
| 67 |
should you need more information than is contained herein. |
| 68 |
</p> |
| 69 |
|
| 70 |
<p> |
| 71 |
In groff, the escape character is the backslash (<kbd>\</kbd>). |
| 72 |
Groff interprets everything following the backslash as instructions, |
| 73 |
not literal text, until the escape sequence is complete. Should |
| 74 |
you need the actual backslash character as part of a line of text, |
| 75 |
simply enter it twice (<kbd>\\</kbd>). Groff understands that this |
| 76 |
means “please print a backslash character.” |
| 77 |
</p> |
| 78 |
|
| 79 |
<p> |
| 80 |
You can also use <kbd>\e</kbd> to print a literal backslash, or use |
| 81 |
<a href="goodies.html#esc-char">ESC_CHAR</a> to change the escape |
| 82 |
character to something other than the backslash, which lets you |
| 83 |
use a single backslash as a literal backslash. |
| 84 |
</p> |
| 85 |
|
| 86 |
<p> |
| 87 |
Groff has a number of ways of recognizing what constitutes a |
| 88 |
complete escape sequence. This is both a boon and a curse; some |
| 89 |
escape sequences have no terminating delimiter and consequently |
| 90 |
become difficult to distinguish from real input text. Others |
| 91 |
require the use of an opening parenthesis with no corresponding |
| 92 |
closing parenthesis. Still others need to be enclosed in square |
| 93 |
brackets. |
| 94 |
</p> |
| 95 |
|
| 96 |
<p> |
| 97 |
Mom recognizes that certain escapes get used more often than others. |
| 98 |
For these, she has a consistent input style that takes the form |
| 99 |
<kbd><span class="nobr">\*[...]</span></kbd>, which makes them stand out well |
| 100 |
from the text of your documents. These escapes are the ones listed |
| 101 |
under |
| 102 |
<a href="#inlines-mom">Mom’s personal inline escapes</a>. |
| 103 |
</p> |
| 104 |
|
| 105 |
<p> |
| 106 |
Despite mom’s best intentions, there are still |
| 107 |
a number of typesetting functions that can only be accomplished |
| 108 |
with groff’s native inline escapes. I’ve listed the |
| 109 |
ones that strike me as essential, but there are many others. If you |
| 110 |
want to know what they are, please read the |
| 111 |
<a href="intro.html#canonical">canonical reference materials</a> |
| 112 |
pertaining to groff. |
| 113 |
</p> |
| 114 |
|
| 115 |
<div class="box-tip"> |
| 116 |
<p class="tip"> |
| 117 |
<span class="tip">Helpful bit of information:</span> |
| 118 |
Inline escapes can be used in |
| 119 |
<a href="docprocessing.html#docprocessing">document processing macros</a> |
| 120 |
that take |
| 121 |
<a href="definitions.html#stringargument">string arguments</a>. |
| 122 |
</p> |
| 123 |
</div> |
| 124 |
|
| 125 |
<div class="macro-list-container"> |
| 126 |
<h3 id="index-inlines" class="macro-list">List of inline escapes</h3> |
| 127 |
|
| 128 |
<ul class="macro-list"> |
| 129 |
<li id="inlines-mom"><a href="#inlines-mom-top">Mom’s personal inline escapes</a> |
| 130 |
<ul class="no-enumerator" style="margin-left: -1.5em;"> |
| 131 |
<li><a href="#inline-fonts-mom">Changing fonts</a></li> |
| 132 |
<li><a href="#inline-size-mom">Changing point size</a></li> |
| 133 |
<li><a href="#uc-lc">Capitalise a section of type</a></li> |
| 134 |
<li><a href="#inline-kerning-mom">Pairwise kerning</a></li> |
| 135 |
<li><a href="#inline-horizontal-mom">Horizontal movement</a></li> |
| 136 |
<li><a href="#inline-vertical-mom">Vertical movement</a></li> |
| 137 |
<li><a href="#inline-b-mom">Terminate a line without advancing on the page</a></li> |
| 138 |
<li><a href="#tb-plus-mom">Call the next sequential tab without advancing on the page</a></li> |
| 139 |
<li><a href="#inline-rule-mom">Full measure rules</a> |
| 140 |
<ul class="sublist" style="font-size: 100%;"> |
| 141 |
<li><a href="#rule-weight">Macro to control the weight of rules</a></li> |
| 142 |
</ul></li> |
| 143 |
</ul></li> |
| 144 |
<li id="inlines-groff"><a href="#inlines-groff-top">Commonly-used groff inline escapes</a> |
| 145 |
<ul class="no-enumerator" style="margin-left: -1.5em;"> |
| 146 |
<li><kbd>\f</kbd> <a href="#inline-fonts-groff">Font control</a></li> |
| 147 |
<li><kbd>\h</kbd> <a href="#inline-horizontal-groff">Inline horizontal motions</a></li> |
| 148 |
<li><kbd>\v</kbd> <a href="#inline-vertical-groff">Inline vertical motions</a></li> |
| 149 |
<li><kbd>\w</kbd> <a href="#inline-stringwidth-groff">String width function</a></li> |
| 150 |
<li><kbd>\l</kbd> <a href="#inline-linedrawing-groff">Horizontal line drawing function</a></li> |
| 151 |
<li style="margin-left: 1.6em;"><a href="#inline-characters-groff">Special characters</a></li> |
| 152 |
</ul></li> |
| 153 |
</ul> |
| 154 |
</div> |
| 155 |
|
| 156 |
<div class="rule-medium"><hr/></div> |
| 157 |
|
| 158 |
<!-- -INLINE_FONTS_MOM- --> |
| 159 |
|
| 160 |
<h2 id="inlines-mom-top" class="macro-group">Mom’s personal inline escapes</h2> |
| 161 |
|
| 162 |
<h3 id="inline-fonts-mom" class="docs">Changing fonts</h3> |
| 163 |
|
| 164 |
<p> |
| 165 |
Mom provides five escapes for changing fonts inline: |
| 166 |
<br/> |
| 167 |
<span class="pre-in-pp"> |
| 168 |
\*[ROM] Change to the medium roman font |
| 169 |
\*[IT] Change to the medium italic font |
| 170 |
\*[BD] Change to the bold roman font |
| 171 |
\*[BDI] Change to the bold italic font |
| 172 |
\*[PREV] Revert to the previous font (once only)* |
| 173 |
</span> |
| 174 |
</p> |
| 175 |
|
| 176 |
<div class="box-tip"> |
| 177 |
<p class="tip"> |
| 178 |
<span class="note">*Note:</span> |
| 179 |
<kbd><span class="nobr">\*[PREV]</span></kbd> does not operate "stack |
| 180 |
style". It returns to the previous font once only, and |
| 181 |
afterwards has no effect. In other words, in the case of |
| 182 |
<kbd><span class="nobr">\*[PREV]\*[PREV]</span></kbd>, only the first |
| 183 |
<kbd><span class="nobr">\*[PREV]</span></kbd> is respected; the second one is silently |
| 184 |
ignored. |
| 185 |
</p> |
| 186 |
</div> |
| 187 |
|
| 188 |
<p> |
| 189 |
These escapes are provided for merely for convenience, legibility, |
| 190 |
and consistency when typesetting with mom. For more complete and |
| 191 |
flexible inline font control, please see |
| 192 |
<a href="#inline-fonts-groff">font control with <kbd>\f</kbd></a>. |
| 193 |
</p> |
| 194 |
|
| 195 |
<div class="box-notes"> |
| 196 |
<h3 id="inlines-docprocessing-fonts" class="docs notes">Notes concerning document processing</h3> |
| 197 |
<p style="margin-top: .5em;"> |
| 198 |
If you’re using the |
| 199 |
<a href="docprocessing.html#docprocessing">document processing macros</a>, |
| 200 |
inline font changes remain in effect only for the duration of the |
| 201 |
current document element tag. |
| 202 |
</p> |
| 203 |
|
| 204 |
<p class="tip-bottom"> |
| 205 |
Additionally, if you’re designing your own |
| 206 |
<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a> |
| 207 |
and want to use mom’s inline escapes for changing fonts as |
| 208 |
part of the left, centre and/or right strings, or in the strings |
| 209 |
for |
| 210 |
<a href="headfootpage.html#hdrftr-rectoverso">recto</a> |
| 211 |
and/or |
| 212 |
<a href="headfootpage.html#hdrftr-rectoverso">verso</a> |
| 213 |
HEADERS or FOOTERS, or in the strings passed to |
| 214 |
<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>, |
| 215 |
you must enter the inlines beginning with <kbd>\E*</kbd> |
| 216 |
rather than just <kbd><span class="nobr">\*</span></kbd>, e.g. |
| 217 |
<kbd><span class="nobr">\E*[BD]</span></kbd>. You may, in such cases, prefer to |
| 218 |
use the simpler groff inline escape |
| 219 |
<a href="#inline-fonts-groff"><kbd>\f</kbd></a>. |
| 220 |
</p> |
| 221 |
</div> |
| 222 |
|
| 223 |
<!-- -INLINE_SIZE_MOM- --> |
| 224 |
|
| 225 |
<h3 id="inline-size-mom" class="docs">Changing point size</h3> |
| 226 |
<p> |
| 227 |
Mom has two inline escapes for changing point size: |
| 228 |
<br/> |
| 229 |
<span class="pre-in-pp"> |
| 230 |
\*[SIZE <size>] |
| 231 |
</span> |
| 232 |
and |
| 233 |
<br/> |
| 234 |
<span class="pre-in-pp"> |
| 235 |
\*S[<size>] |
| 236 |
</span> |
| 237 |
where “size” is the new size you want. You can use |
| 238 |
either; they behave exactly the same way. For example, to change |
| 239 |
the point size of type inline to 12 points, you could enter either |
| 240 |
<br/> |
| 241 |
<span class="pre-in-pp"> |
| 242 |
\*[SIZE 12] |
| 243 |
</span> |
| 244 |
or |
| 245 |
<br/> |
| 246 |
<span class="pre-in-pp"> |
| 247 |
\*S[12] |
| 248 |
</span> |
| 249 |
Entering either <kbd><span class="nobr">\*[SIZE]</span></kbd> or |
| 250 |
<kbd><span class="nobr">\*S[]</span></kbd> with no argument reverts to the former |
| 251 |
point size. |
| 252 |
</p> |
| 253 |
|
| 254 |
<p> |
| 255 |
The advantage of the first form is that it’s easy to remember, |
| 256 |
and follows mom’s usual inline syntax. The advantage of the |
| 257 |
second is that it’s more concise. |
| 258 |
</p> |
| 259 |
|
| 260 |
<p> |
| 261 |
Notice that in both cases, the new size does not require a |
| 262 |
<a href="definitions.html#unitofmeasure">unit of measure</a>; |
| 263 |
<a href="definitions.html#picaspoints">points</a> |
| 264 |
is assumed. However, a unit of measure may be appended to the size |
| 265 |
if that’s what you wish. Fractional sizes are, of course, |
| 266 |
allowed. |
| 267 |
</p> |
| 268 |
|
| 269 |
<p> |
| 270 |
The size given to <kbd><span class="nobr">\*[SIZE <size>]</span></kbd> |
| 271 |
or <kbd><span class="nobr">\*S[<size>]</span></kbd> may be expressed in |
| 272 |
plus or minus terms, which can be very useful. In the following |
| 273 |
examples, the word “mom” will be output 2 points larger |
| 274 |
than the point size of the rest of the line. |
| 275 |
<br/> |
| 276 |
<span class="pre-in-pp"> |
| 277 |
While she isn't perfect, \*S[+2]mom\*S[-2] isn't half bad. |
| 278 |
While she isn't perfect, \*[SIZE +2]mom\*[SIZE -2] isn't half bad. |
| 279 |
</span> |
| 280 |
Please note that inline size changes do not update the leading if |
| 281 |
<a href="typesetting.html#autolead">AUTOLEAD</a> |
| 282 |
is enabled. |
| 283 |
</p> |
| 284 |
|
| 285 |
<div class="box-notes"> |
| 286 |
<h3 id="inline-docprocessing-ps" class="docs notes">NOTE CONCERNING DOCUMENT PROCESSING</h3> |
| 287 |
<p style="margin-top: .5em;"> |
| 288 |
If you’re using the |
| 289 |
<a href="docprocessing.html#docprocessing">document processing macros</a> |
| 290 |
and wish to design your own |
| 291 |
<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a> |
| 292 |
using mom’s inline escape for changing point size as part of |
| 293 |
the left, centre and/or right strings, or in the strings for |
| 294 |
<a href="headfootpage.html#hdrftr-rectoverso">recto</a> |
| 295 |
and/or |
| 296 |
<a href="headfootpage.html#hdrftr-rectoverso">verso</a> |
| 297 |
HEADERS or FOOTERS, or in the strings passed to |
| 298 |
<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>, |
| 299 |
you <i>must</i> use the form <kbd><span class="nobr">\*S[<n>]</span></kbd> |
| 300 |
and enter the inline beginning with <kbd>\E*</kbd>, like this: |
| 301 |
<kbd><span class="nobr">\E*S[<+|-><n>]</span></kbd>. |
| 302 |
</p> |
| 303 |
|
| 304 |
<p class="tip-bottom"> |
| 305 |
<span class="additional-note">Additional note:</span> |
| 306 |
If you’re accustomed to groff’s usual way of handling |
| 307 |
inline size requests <kbd>(\sN, \s±N, \s(NN, \s±(NN, \s[NNN], |
| 308 |
\s±[NNN]),</kbd> feel free to continue with your old habits. Mom |
| 309 |
doesn’t care. |
| 310 |
</p> |
| 311 |
</div> |
| 312 |
|
| 313 |
<!-- -CAPITALISATION- --> |
| 314 |
|
| 315 |
<h3 id="uc-lc" class="docs">Capitalise a section of type</h3> |
| 316 |
<p> |
| 317 |
If you need to capitalise a region of type inline, |
| 318 |
bracket the region of type with the inline escapes, |
| 319 |
<kbd><span class="nobr">\*[UC]</span></kbd> (Upper Case) and |
| 320 |
<kbd><span class="nobr">\*[LC]</span></kbd> (Lower Case), like this: |
| 321 |
<br/> |
| 322 |
<span class="pre-in-pp"> |
| 323 |
All work \*[UC]and\*[LC] no play makes Jack a dull boy. |
| 324 |
</span> |
| 325 |
The above produces, on output |
| 326 |
<br/> |
| 327 |
<span class="pre-in-pp"> |
| 328 |
All work AND no play makes Jack a dull boy. |
| 329 |
</span> |
| 330 |
</p> |
| 331 |
|
| 332 |
<div class="box-tip"> |
| 333 |
<p class="tip"> |
| 334 |
<span class="note">Note:</span> |
| 335 |
<kbd>\*[UC]</kbd> and <kbd>\*[LC]</kbd> must not be used inside the |
| 336 |
<a href="definitions.html#stringargument">string arguments</a> |
| 337 |
passed to the |
| 338 |
<a href="headfootpage.html#hdrftr-strings">HEADER_<POSITION></a> |
| 339 |
macro. Instead, use the control macro |
| 340 |
<a href="headfootpage.html#_caps">HEADER_<POSITION>_CAPS.</a> |
| 341 |
For |
| 342 |
<a href="headfootpage.html#hdrftr-rectoverso">HEADER_RECTO</a> |
| 343 |
(or _VERSO) or |
| 344 |
<a href="headfootpage.html#hdrftr-rectoverso">FOOTER_RECTO</a> |
| 345 |
(or _VERSO), supply the <kbd>CAPS</kbd> option to the appropriate |
| 346 |
macro. |
| 347 |
</p> |
| 348 |
</div> |
| 349 |
|
| 350 |
<!-- -INLINE_KERNING_MOM- --> |
| 351 |
|
| 352 |
<h3 id="inline-kerning-mom" class="docs">Pairwise kerning</h3> |
| 353 |
<p> |
| 354 |
Pairwise kerning means moving specific letter pairs closer |
| 355 |
together or further apart (see |
| 356 |
<a href="definitions.html#kern">Typesetting terms, kerning</a> |
| 357 |
for more details). |
| 358 |
</p> |
| 359 |
|
| 360 |
<p> |
| 361 |
Mom permits inline pairwise kerning through the use of the inline |
| 362 |
escapes |
| 363 |
<br/> |
| 364 |
<span class="pre-in-pp"> |
| 365 |
\*[BU <n>] Closes the space between letters (Back Units). |
| 366 |
\*[FU <n>] Opens the space between letters (Forward Units). |
| 367 |
</span> |
| 368 |
<b><n></b> is the number of |
| 369 |
<a href="definitions.html#kernunit">kern units</a> |
| 370 |
by which to close or open the space between letters. |
| 371 |
</p> |
| 372 |
|
| 373 |
<p> |
| 374 |
For example, |
| 375 |
<br/> |
| 376 |
<span class="pre-in-pp"> |
| 377 |
THE HUMAN COST OF COMMODIF\*[FU 1]YING FRESH W\*[BU 4]A\*[BU 5]TER |
| 378 |
</span> |
| 379 |
moves the letter Y in “COMMODIFYING” one kern unit away |
| 380 |
from the letter F, and the letter A in “WATER” four |
| 381 |
kern units closer to the letter W. Additionally, the letter T in |
| 382 |
“WATER” is moved five kern units closer to the letter A. |
| 383 |
</p> |
| 384 |
|
| 385 |
<p> |
| 386 |
For backward compatibility, the forms |
| 387 |
<br/> |
| 388 |
<span class="pre-in-pp"> |
| 389 |
\*[BU1]...\*[BU36] Move backward 1...36 <a href="definitions.html#kernunit">kern units</a> |
| 390 |
\*[FU1]...\*[FU36] Move forward 1...36 <a href="definitions.html#kernunit">kern units</a> |
| 391 |
</span> |
| 392 |
also exist (i.e. with no space before the number of kern units desired, |
| 393 |
up to a limit of 36). |
| 394 |
</p> |
| 395 |
|
| 396 |
<p id="kernunit"> |
| 397 |
The default size of a kern unit is 1/36 of the current point size; |
| 398 |
this may be changed by invoking the macro <kbd>.KERN_UNIT</kbd> |
| 399 |
with the desired value, which represents a fraction of the current |
| 400 |
point size. For example, to change the kern unit to 1/54 of the |
| 401 |
current point size, |
| 402 |
<br/> |
| 403 |
<span class="pre-in-pp"> |
| 404 |
.KERN_UNIT 54 |
| 405 |
</span> |
| 406 |
To restore the kern unit to its default, invoke |
| 407 |
<kbd>.KERN_UNIT</kbd> with an argument of <kbd>DEFAULT</kbd>. |
| 408 |
</p> |
| 409 |
|
| 410 |
|
| 411 |
<div class="box-notes"> |
| 412 |
<h3 id="inlines-docprocessing-kerning" class="docs notes">Notes concerning document processing</h3> |
| 413 |
<p style="margin-top: .5em;"> |
| 414 |
If you’re using the |
| 415 |
<a href="docprocessing.html#docprocessing">document processing macros</a> |
| 416 |
and wish to design your own |
| 417 |
<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a> |
| 418 |
using mom’s inline escapes for kerning as part of the left, |
| 419 |
centre and/or right strings, or in the strings for |
| 420 |
<a href="headfootpage.html#hdrftr-rectoverso">recto</a> |
| 421 |
and/or |
| 422 |
<a href="headfootpage.html#hdrftr-rectoverso">verso</a> |
| 423 |
HEADERS or FOOTERS, or in the strings passed to |
| 424 |
<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>, |
| 425 |
you <i>must</i> use the forms |
| 426 |
<kbd><span class="nobr">\E*[BU<n>]</span></kbd> and |
| 427 |
<kbd><span class="nobr">\E*[FU<n>]</span></kbd> (i.e. with no space), |
| 428 |
and enter the inline beginning with <kbd><span class="nobr">\E*</span></kbd> |
| 429 |
rather than just <kbd><span class="nobr">\*</span></kbd>, e.g. |
| 430 |
<kbd><span class="nobr">\E*[BU4]</span></kbd>. |
| 431 |
</p> |
| 432 |
|
| 433 |
<p class="tip-bottom"> |
| 434 |
<span class="additional-note">Additional note:</span> |
| 435 |
Using the <kbd>BU</kbd> or <kbd>FU</kbd> escapes between characters |
| 436 |
pairs that are already automatically kerned (see |
| 437 |
<a href="typesetting.html#kern">KERN</a>) |
| 438 |
disables the automatic kerning and uses the value you give to |
| 439 |
<kbd>BU</kbd> or <kbd>FU</kbd> instead. |
| 440 |
</p> |
| 441 |
</div> |
| 442 |
|
| 443 |
<!-- -INLINE_HORIZONTAL_MOM- --> |
| 444 |
|
| 445 |
<h3 id="inline-horizontal-mom" class="docs">Horizontal inline movement</h3> |
| 446 |
<p> |
| 447 |
Sometimes, you may need to insert a specified amount of white |
| 448 |
space into an |
| 449 |
<a href="definitions.html#outputline">output line</a>, |
| 450 |
or—occasionally—back up to a previous position on an |
| 451 |
<a href="definitions.html#inputline">output</a> |
| 452 |
line in order to create special typographic effects. |
| 453 |
</p> |
| 454 |
|
| 455 |
<p> |
| 456 |
Mom’s inline escapes for these horizontal movements are |
| 457 |
<br/> |
| 458 |
<span id="bck" class="pre-in-pp"> |
| 459 |
\*[BCK <n unit>] Move backward inline the specified number of |
| 460 |
<a href="definitions.html#unitofmeasure">units of measure</a>; decimal fractions are allowed. |
| 461 |
</span> |
| 462 |
and |
| 463 |
<span id="fwd" class="pre-in-pp"> |
| 464 |
\*[FWD <n unit>] Move forward inline the specified number of |
| 465 |
<a href="definitions.html#unitofmeasure">units of measure</a>; decimal fractions are allowed. |
| 466 |
</span> |
| 467 |
</p> |
| 468 |
|
| 469 |
<p> |
| 470 |
For example, |
| 471 |
<br/> |
| 472 |
<span class="pre-in-pp"> |
| 473 |
1.\*[FWD 12p]The Free Trade Play-Offs: WalMart 100, Mexico 0 |
| 474 |
</span> |
| 475 |
puts 12 points of space between <kbd>1.</kbd> and |
| 476 |
<kbd>The</kbd>. |
| 477 |
</p> |
| 478 |
|
| 479 |
<div class="box-tip"> |
| 480 |
<p class="tip"> |
| 481 |
<span class="note">Note:</span> |
| 482 |
For backward compatibility, the forms |
| 483 |
<br/> |
| 484 |
<span class="pre-in-pp"> |
| 485 |
\*[BP.25]...\*[BP12.75] Move backward .25...12.75 points |
| 486 |
\*[FP.25]...\*[FP12.75] Move forward .25...12.75 points |
| 487 |
</span> |
| 488 |
also exist (i.e. with no space before the digit and points being |
| 489 |
the unit of measure, hence no unit of measure required). Both |
| 490 |
accept quarter points, so it’s possible to do, |
| 491 |
for example, <kbd><span class="nobr">\*[FP.5]</span></kbd> or |
| 492 |
<kbd><span class="nobr">\*[BP1.25]</span></kbd> up to a limit of 12.75 points. |
| 493 |
</p> |
| 494 |
</div> |
| 495 |
|
| 496 |
<div class="box-notes"> |
| 497 |
<h3 id="inlines-docprocessing-horizontal" class="docs notes">Note concerning document processing</h3> |
| 498 |
<p style="margin-top: .5em; padding-bottom: .5em;"> |
| 499 |
If you’re using the |
| 500 |
<a href="docprocessing.html#docprocessing">document processing macros</a> |
| 501 |
and wish to design your own |
| 502 |
<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a> |
| 503 |
using mom’s inline escapes for horizontal movements as part of |
| 504 |
the left, centre and/or right strings, or in the strings for |
| 505 |
<a href="headfootpage.html#hdrftr-rectoverso">recto</a> |
| 506 |
and/or |
| 507 |
<a href="headfootpage.html#hdrftr-rectoverso">verso</a> |
| 508 |
HEADERS or FOOTERS, or in the strings passed to |
| 509 |
<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>, |
| 510 |
you <i>must</i> use the forms |
| 511 |
<kbd><span class="nobr">\E*[BP<n>]</span></kbd> and |
| 512 |
<kbd><span class="nobr">\E*[FP<n>]</span></kbd> (i.e. with no space), |
| 513 |
and enter the inline beginning with <kbd><span class="nobr">\E*</span></kbd> |
| 514 |
rather than just <kbd><span class="nobr">\*</span></kbd>, e.g. |
| 515 |
<kbd><span class="nobr">\E*[BP.75]</span></kbd>. You may, in such cases, prefer |
| 516 |
to use the native groff inline escape |
| 517 |
<a href="#inline-horizontal-groff"><kbd>\h</kbd></a>. |
| 518 |
</p> |
| 519 |
</div> |
| 520 |
|
| 521 |
<!-- -INLINE_VERTICAL_MOM- --> |
| 522 |
|
| 523 |
<h3 id="inline-vertical-mom" class="docs">Vertical inline movement</h3> |
| 524 |
<p> |
| 525 |
If you need to move portions of type up or down on a line, mom |
| 526 |
provides the following inline escapes: |
| 527 |
<br/> |
| 528 |
<span id="down" class="pre-in-pp"> |
| 529 |
\*[DOWN <n unit>] Move down inline the specified number of |
| 530 |
<a href="definitions.html#unitofmeasure">units of measure</a> |
| 531 |
|
| 532 |
<span id="up">\*[UP <n unit>] Move up inline the specified number of |
| 533 |
<a href="definitions.html#unitofmeasure">units of measure</a></span> |
| 534 |
</span> |
| 535 |
For example, |
| 536 |
<br/> |
| 537 |
<span class="pre-in-pp"> |
| 538 |
Tel: 905\*[UP 1p]-\*[DOWN 1p]4072 |
| 539 |
</span> |
| 540 |
moves the hyphen in the telephone number up by 1 point, then |
| 541 |
moves back down by the same amount. |
| 542 |
</p> |
| 543 |
|
| 544 |
<div class="box-tip"> |
| 545 |
<p class="tip"> |
| 546 |
<span class="note">Note:</span> |
| 547 |
<kbd><span class="nobr">\*[UP]</span></kbd> and |
| 548 |
<kbd><span class="nobr">\*[DOWN]</span></kbd> |
| 549 |
do not work in conjunction with the inline escape, |
| 550 |
<a href="#inline-rule-mom"><kbd><span class="nobr">\*[RULE]</span></kbd></a>. |
| 551 |
</p> |
| 552 |
|
| 553 |
<p> |
| 554 |
<span class="additional-note">Additional note:</span> |
| 555 |
For backward compatibility, the following are also available: |
| 556 |
<br/> |
| 557 |
<span class="pre-in-pp"> |
| 558 |
\*[ALD.25]...\*[ALD12.75] Advance lead .25...12.75 points (move downward) |
| 559 |
\*[RLD.25]...\*[RLD12.75] Reverse lead .25...12.75 points (move upward) |
| 560 |
</span> |
| 561 |
</p> |
| 562 |
|
| 563 |
<p class="tip-bottom"> |
| 564 |
Both <kbd><span class="nobr">\*[ALD]</span></kbd> and |
| 565 |
<kbd><span class="nobr">\*[RLD]</span></kbd> work in points, hence you |
| 566 |
mustn’t use a unit of measure. |
| 567 |
</p> |
| 568 |
</div> |
| 569 |
|
| 570 |
<div class="box-notes"> |
| 571 |
<h3 id="inline-docprocessing-vertical" class="docs notes">Note concerning document processing</h3> |
| 572 |
<p style="margin-top: .5em; padding-bottom: .5em;"> |
| 573 |
If you’re using the |
| 574 |
<a href="docprocessing.html#docprocessing">document processing macros</a> |
| 575 |
and wish to design your own |
| 576 |
<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a> |
| 577 |
using mom’s inline escapes for vertical movements as part of |
| 578 |
the left, centre and/or right strings, or in the strings for |
| 579 |
<a href="headfootpage.html#hdrftr-rectoverso">recto</a> |
| 580 |
and/or |
| 581 |
<a href="headfootpage.html#hdrftr-rectoverso">verso</a> |
| 582 |
HEADERS or FOOTERS, or in the strings passed to |
| 583 |
<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>, |
| 584 |
you <i>must</i> use the forms |
| 585 |
<kbd><span class="nobr">\E*[ALD<n>]</span></kbd> and |
| 586 |
<kbd>\E*[RLD<n>]</kbd> (i.e. with no space), and enter the |
| 587 |
inline beginning with <kbd><span class="nobr">\E*</span></kbd> rather than just |
| 588 |
<kbd><span class="nobr">\*</span></kbd>, |
| 589 |
e.g. <kbd><span class="nobr">\E*[ALD.5]</span></kbd>. |
| 590 |
You may, in such cases, prefer to use the native groff inline |
| 591 |
escape |
| 592 |
<a href="#inline-vertical-groff"><kbd>\v</kbd></a>. |
| 593 |
|
| 594 |
</p> |
| 595 |
</div> |
| 596 |
|
| 597 |
<!-- -INLINE_B_MOM- --> |
| 598 |
|
| 599 |
<h3 id="inline-b-mom" class="docs">Terminate a line without advancing on the page</h3> |
| 600 |
<p> |
| 601 |
Sometimes, you want mom to break a line but not advance on the page. |
| 602 |
This can be accomplished with the macro |
| 603 |
<a href="typesetting.html#el">EL</a> |
| 604 |
or with the escape <kbd><span class="nobr">\*[B]</span></kbd>. Simply attach |
| 605 |
<kbd><span class="nobr">\*[B]</span></kbd> to the end of any input line. Using |
| 606 |
the example given in the document entry for EL, you’d use |
| 607 |
<kbd><span class="nobr">\*[B]</span></kbd> like this: |
| 608 |
<br/> |
| 609 |
<span class="pre-in-pp"> |
| 610 |
.LEFT |
| 611 |
.LS 12.5 |
| 612 |
A line of text.\*[B] |
| 613 |
.ALD 24p |
| 614 |
The next line of text. |
| 615 |
</span> |
| 616 |
|
| 617 |
<kbd>\*[B]</kbd> works reliably regardless of the current |
| 618 |
<a href="definitions.html#filled">fill mode</a>. |
| 619 |
</p> |
| 620 |
|
| 621 |
<!-- -INLINE_TB+_MOM- --> |
| 622 |
|
| 623 |
<h3 id="tb-plus-mom" class="docs">Call the next sequential tab without advancing on the page</h3> |
| 624 |
<p> |
| 625 |
Sometimes, you want mom to move to the next tab in sequence (e.g. |
| 626 |
from TAB 1 to TAB 2, or TAB 8 to TAB 9) without mom advancing on the |
| 627 |
page. (See the NOTE |
| 628 |
<a href="typesetting.html#note-tn">here</a> |
| 629 |
if you’re not clear how mom manages tabs and linebreaks.) To |
| 630 |
do so, simply attach the escape <kbd><span class="nobr">\*[TB+]</span></kbd> to |
| 631 |
the end of the input line in previous tab, like this: |
| 632 |
<br/> |
| 633 |
<span class="pre-in-pp"> |
| 634 |
.TAB 1 |
| 635 |
Some text\*[TB+] \" In tab 1 |
| 636 |
Some more text \" In tab 2, same baseline. |
| 637 |
</span> |
| 638 |
|
| 639 |
<kbd><span class="nobr">\*[TB+]</span></kbd> works reliably regardless of the |
| 640 |
current |
| 641 |
<a href="definitions.html#filled">fill mode</a>. |
| 642 |
</p> |
| 643 |
|
| 644 |
<!-- -INLINE_RULE_MOM- --> |
| 645 |
|
| 646 |
<h3 id="inline-rule-mom" class="docs">Full measure rules</h3> |
| 647 |
<p> |
| 648 |
I find I often need rules drawn to the full measure of the |
| 649 |
current line or tab length. The official way to do this is |
| 650 |
<kbd><span class="nobr">\l'\n[.l]u'</span></kbd>, which is annoying to type, |
| 651 |
and doesn’t mean a whole heck of a lot if you’re new |
| 652 |
to groff. The inline, <kbd><span class="nobr">\*[RULE]</span></kbd>, is a |
| 653 |
simple replacement for <kbd><span class="nobr">\l'\n[.l]u'</span></kbd>. Use it |
| 654 |
whenever you need a rule drawn to the full measure of the current |
| 655 |
line or tab length, for example: |
| 656 |
<br/> |
| 657 |
<span class="pre-in-pp"> |
| 658 |
.LL 6P |
| 659 |
\*[RULE] |
| 660 |
</span> |
| 661 |
|
| 662 |
The above draws a rule the full measure of the 6-pica line length. |
| 663 |
For another way to draw full measure rules, see the macro |
| 664 |
<a href="graphical.html#drh">DRH</a>. |
| 665 |
</p> |
| 666 |
|
| 667 |
<p> |
| 668 |
<kbd>\*[RULE]</kbd> must appear on an |
| 669 |
<a href="definitions.html#inputline">input line</a> |
| 670 |
by itself, and always causes a break when entered after a normal |
| 671 |
input line of text. It does not, however, deposit a break when used |
| 672 |
immediately after a macro. |
| 673 |
</p> |
| 674 |
|
| 675 |
<p> |
| 676 |
The weight of the rule drawn with <kbd><span class="nobr">\*[RULE]</span></kbd> |
| 677 |
is controlled with the macro |
| 678 |
<a href="#rule-weight">RULE_WEIGHT</a>. |
| 679 |
Mom’s default is 1/2 point. |
| 680 |
</p> |
| 681 |
|
| 682 |
<div class="box-tip"> |
| 683 |
<p class="tip"> |
| 684 |
<span class="note">Note:</span> |
| 685 |
<kbd><span class="nobr">\*[RULE]</span></kbd> draws the rule to the full measure, |
| 686 |
hence it cannot be used to fill the remainder of a partial line with |
| 687 |
a rule in this way: |
| 688 |
<br/> |
| 689 |
<span class="pre-in-pp"> |
| 690 |
Signature__________________________________________ |
| 691 |
</span> |
| 692 |
If you wish to accomplish this effect, you have to use |
| 693 |
<kbd>\*[RULE]</kbd> in conjunction with the |
| 694 |
<a href="goodies.html#pad">PAD</a> |
| 695 |
macro and |
| 696 |
<a href="typesetting.html#string-tabs">string tabs</a>. |
| 697 |
(See the |
| 698 |
<a href="goodies.html#pad-example">example</a> |
| 699 |
provided with PAD.) |
| 700 |
<a name="RULE_EXCEPTION"></a> |
| 701 |
</p> |
| 702 |
|
| 703 |
<p> |
| 704 |
Please also note that the inline escapes |
| 705 |
<a href="#up"><kbd><span class="nobr">\*[UP]</span></kbd></a> |
| 706 |
and |
| 707 |
<a href="#down"><kbd>\*[DOWN]</kbd></a> |
| 708 |
cannot be used in conjunction with <kbd><span class="nobr">\*[RULE]</span></kbd>. |
| 709 |
</p> |
| 710 |
|
| 711 |
<p> |
| 712 |
This <i>doesn’t</i> work: |
| 713 |
<br/> |
| 714 |
<span class="pre-in-pp"> |
| 715 |
\*[DOWN 2p]\*[RULE]\*[UP 2p] |
| 716 |
</span> |
| 717 |
whereas this does: |
| 718 |
<br/> |
| 719 |
<span class="pre-in-pp"> |
| 720 |
.ALD 2p |
| 721 |
\*[RULE] |
| 722 |
.RLD 2p |
| 723 |
</span> |
| 724 |
</p> |
| 725 |
|
| 726 |
<p class="tip-bottom"> |
| 727 |
See groff’s |
| 728 |
<a href="#inline-linedrawing-groff">Horizontal line drawing function</a> |
| 729 |
for more information on drawing horizontal rules. |
| 730 |
</p> |
| 731 |
</div> |
| 732 |
|
| 733 |
<!-- -RULE_WEIGHT- --> |
| 734 |
|
| 735 |
<div id="rule-weight" class="box-macro-args"> |
| 736 |
Macro: <b>RULE_WEIGHT</b> <kbd><weight in points></kbd> |
| 737 |
</div> |
| 738 |
|
| 739 |
<p class="requires"> |
| 740 |
• Must <span class="normal">not</span> have a |
| 741 |
<a href="definitions.html#unitofmeasure">unit of measure</a> |
| 742 |
appended. |
| 743 |
<br/> |
| 744 |
Argument must be greater than 0 and less than 100; decimal |
| 745 |
fractions are allowed. |
| 746 |
</p> |
| 747 |
|
| 748 |
<p> |
| 749 |
RULE_WEIGHT allows you to tell mom how heavy (in other words, how |
| 750 |
“thick”) you want the rules drawn with the inline |
| 751 |
escape, |
| 752 |
<a href="#inline-rule-mom"><kbd><span class="nobr">\*[RULE]</span></kbd></a>. |
| 753 |
It takes a single argument: the weight of the rule in |
| 754 |
<a href="definitions.html#picaspoints">points</a> |
| 755 |
<i>but without the</i> |
| 756 |
<a href="definitions.html#unitofmeasure">unit of measure</a> |
| 757 |
<kbd>p</kbd> <i>attached</i>. Thus, to set the weight of rules |
| 758 |
drawn with <kbd><span class="nobr">\*[RULE]</span></kbd> to 1-1/4 points, |
| 759 |
you’d do |
| 760 |
<br/> |
| 761 |
<span class="pre-in-pp"> |
| 762 |
.RULE_WEIGHT 1.25 |
| 763 |
</span> |
| 764 |
</p> |
| 765 |
|
| 766 |
<p> |
| 767 |
RULE_WEIGHT also sets the weight of rules drawn |
| 768 |
with |
| 769 |
<a href="graphical.html#drh"><kbd>.DRH</kbd></a> |
| 770 |
when DRH is not given any arguments. |
| 771 |
</p> |
| 772 |
|
| 773 |
<div class="rule-medium"><hr/></div> |
| 774 |
|
| 775 |
<!-- -INLINE_FONT_GROFF- --> |
| 776 |
|
| 777 |
<h2 id="inlines-groff-top" class="macro-group">Commonly-used groff inline escapes</h2> |
| 778 |
|
| 779 |
<h3 id="inline-fonts-groff" class="docs">Font control (<kbd style="text-transform: none">\f</kbd>)</h3> |
| 780 |
|
| 781 |
<p> |
| 782 |
Groff’s basic mechanism for inline font control is the escape |
| 783 |
<kbd>\f[<font>]</kbd>. |
| 784 |
<br/> |
| 785 |
<span class="pre-in-pp"> |
| 786 |
\f[R] Change to the medium roman font (equivalent to mom's \*[ROM]) |
| 787 |
\f[I] Change to the medium italic font (equivalent to mom's \*[IT]) |
| 788 |
\f[B] Change to the bold roman font (equivalent to mom's \*[BD]) |
| 789 |
\f[BI] Change to the bold italic font (equivalent to mom's \*[BDI]) |
| 790 |
\f[P] Revert to the previous font (equivalent to mom's \*[PREV]) |
| 791 |
</span> |
| 792 |
</p> |
| 793 |
|
| 794 |
<p> |
| 795 |
<kbd>\f[<font>]</kbd> can be used with any valid |
| 796 |
<a href="definitions.html#font">font style</a> |
| 797 |
registered with groff. (See |
| 798 |
<a href="appendices.html#style-extensions">here</a> |
| 799 |
for a list of pre-registered font styles provided by mom). |
| 800 |
</p> |
| 801 |
|
| 802 |
<p> |
| 803 |
<kbd>\f[<family><font>]</kbd> can also take a complete valid |
| 804 |
family+font name combo. This is especially useful should you |
| 805 |
need to change both family and font inline. For example, if your |
| 806 |
prevailing family and font are Times Roman and you want a few words |
| 807 |
in Courier Bold Italic, you could do this: |
| 808 |
<br/> |
| 809 |
<span class="pre-in-pp"> |
| 810 |
.FAM T |
| 811 |
.FT R |
| 812 |
The command \f[CBI]ls -l\f[P] gives a "long" directory listing. |
| 813 |
</span> |
| 814 |
The Unix command <kbd>ls -l</kbd> will appear in Courier Bold Italic |
| 815 |
in a line that is otherwise in Times Roman. |
| 816 |
</p> |
| 817 |
|
| 818 |
<!-- -INLINE_HORIZONTAL_GROFF- --> |
| 819 |
|
| 820 |
<h3 id="inline-horizontal-groff" class="docs">Inline horizontal motions (<kbd style="text-transform: none;">\h</kbd>)</h3> |
| 821 |
|
| 822 |
<p> |
| 823 |
Whenever you need to move forward or backward on a line, use the |
| 824 |
inline |
| 825 |
<br/> |
| 826 |
<span class="pre-in-pp"> |
| 827 |
\h'<distance>' |
| 828 |
</span> |
| 829 |
In order to avoid unpleasant surprises, always append a |
| 830 |
<a href="definitions.html#unitofmeasure">unit of measure</a> |
| 831 |
to <kbd><distance></kbd>. For example, |
| 832 |
<br/> |
| 833 |
<span class="pre-in-pp"> |
| 834 |
\h'1.25i' |
| 835 |
</span> |
| 836 |
moves you 1.25 inches to the right (forward) of the horizontal |
| 837 |
position on the current |
| 838 |
<a href="definitions.html#outputline">output line</a>. |
| 839 |
</p> |
| 840 |
|
| 841 |
<div class="box-tip"> |
| 842 |
<p class="tip"> |
| 843 |
<span class="note">Note:</span> |
| 844 |
<kbd>\h'<distance>'</kbd> is exactly equivalent to a |
| 845 |
<a href="#fwd"><kbd><span class="nobr">\*[FWD n<unit>]</span></kbd></a>. |
| 846 |
</p> |
| 847 |
</div> |
| 848 |
|
| 849 |
<p> |
| 850 |
To move backwards by the same amount, do |
| 851 |
<br/> |
| 852 |
<span class="pre-in-pp"> |
| 853 |
\h'-1.25i' |
| 854 |
</span> |
| 855 |
</p> |
| 856 |
|
| 857 |
<div class="box-tip"> |
| 858 |
<p class="tip" style="margin-top: -1em;"> |
| 859 |
<span class="note">Note:</span> |
| 860 |
<kbd>\h'-<distance>'</kbd> is exactly equivalent to |
| 861 |
<a href="#bck"><kbd><span class="nobr">\*[BCK n<unit>]</span></kbd></a>. |
| 862 |
</p> |
| 863 |
</div> |
| 864 |
|
| 865 |
<!-- -INLINE_VERTICAL_GROFF- --> |
| 866 |
|
| 867 |
<h3 id="inline-vertical-groff" class="docs">Inline vertical motions (<kbd style="text-transform: none;">\v</kbd>)</h3> |
| 868 |
|
| 869 |
<p> |
| 870 |
If you need to raise or lower type on a line (say, for sub- or |
| 871 |
superscripts, or any other special effect), use |
| 872 |
<br/> |
| 873 |
<span class="pre-in-pp"> |
| 874 |
\v'<distance>' |
| 875 |
</span> |
| 876 |
In order to avoid unpleasant surprises, always append a |
| 877 |
<a href="definitions.html#unitofmeasure">unit of measure</a> |
| 878 |
to <kbd><distance></kbd>. For example, |
| 879 |
<br/> |
| 880 |
<span class="pre-in-pp"> |
| 881 |
\v'.6m' |
| 882 |
</span> |
| 883 |
moves you (approx.) 2/3 of an |
| 884 |
<a href="definitions.html#em">em</a> |
| 885 |
downward on the current |
| 886 |
<a href="definitions.html#outputline">output line</a>. |
| 887 |
</p> |
| 888 |
|
| 889 |
<div class="box-tip"> |
| 890 |
<p class="tip"> |
| 891 |
<span class="note">Note:</span> |
| 892 |
<kbd>\v'<distance>'</kbd> is exactly equivalent to |
| 893 |
<a href="#down"><kbd><span class="nobr">\*[DOWN n<unit>]</span></kbd></a>. |
| 894 |
</p> |
| 895 |
</div> |
| 896 |
|
| 897 |
<p style="margin-top: -.5em;"> |
| 898 |
To move upward an equivalent amount, do |
| 899 |
<br/> |
| 900 |
<span class="pre-in-pp"> |
| 901 |
\v'-.6m' |
| 902 |
</span> |
| 903 |
</p> |
| 904 |
|
| 905 |
<div class="box-tip" style="margin-top: -1em;"> |
| 906 |
<p class="tip"> |
| 907 |
<span class="note">Note:</span> |
| 908 |
<kbd>\v'<-distance>'</kbd> is exactly equivalent to |
| 909 |
<a href="#up"><kbd><span class="nobr">\*[UP n<unit>]</span></kbd></a>. |
| 910 |
</p> |
| 911 |
</div> |
| 912 |
|
| 913 |
<div class="box-important"> |
| 914 |
<p class="tip"> |
| 915 |
<span class="important">Important:</span> |
| 916 |
The vertical motion of <kbd>\v</kbd> only affects type on the |
| 917 |
current |
| 918 |
<a href="definitions.html#outputline">output line</a>. |
| 919 |
When groff breaks the output line, the effect of |
| 920 |
<kbd>\v</kbd> is cancelled; the baseline of the next output line |
| 921 |
is where it would be if you hadn’t used <kbd>\v</kbd>. |
| 922 |
</p> |
| 923 |
</div> |
| 924 |
|
| 925 |
<div class="box-tip"> |
| 926 |
<p class="tip"> |
| 927 |
<span class="tip">Tip:</span> |
| 928 |
When using <kbd>\v</kbd> for occasional effects in a line, |
| 929 |
don’t forget to reverse it when you’ve done what you |
| 930 |
want to do. Otherwise, the remaining type will be set too high (if |
| 931 |
you used <kbd>\v</kbd> with the minus sign) or too low (if you used |
| 932 |
<kbd>\v</kbd> without the minus sign). |
| 933 |
</p> |
| 934 |
</div> |
| 935 |
|
| 936 |
<!-- -INLINE_STRINGWIDTH_GROFF- --> |
| 937 |
|
| 938 |
<h3 id="inline-stringwidth-groff" class="docs">String width function (<kbd style="text-transform: none;">\w</kbd>)</h3> |
| 939 |
|
| 940 |
<p> |
| 941 |
In the context of mom, the string width inline |
| 942 |
<kbd>\w'<string>'</kbd> primarily serves to let you establish the |
| 943 |
horizontal measure of something (e.g. indents) based on the length |
| 944 |
of a bit of text. For example, if you want a left indent the length |
| 945 |
of the word “Examples:” plus a space, you can set it with |
| 946 |
the <kbd>\w</kbd> inline escape: |
| 947 |
<br/> |
| 948 |
<span class="pre-in-pp"> |
| 949 |
.IL "\w'Examples: '" |
| 950 |
</span> |
| 951 |
</p> |
| 952 |
|
| 953 |
<div class="box-tip" style="margin-top: -1em;"> |
| 954 |
<p class="tip"> |
| 955 |
<span class="note">Note:</span> |
| 956 |
Whenever you pass <kbd>\w'string'</kbd> |
| 957 |
to a macro that normally requires a |
| 958 |
<a href="definitions.html#unitofmeasure">unit of measure</a>, |
| 959 |
<i>do NOT add a unit of measure to the</i> |
| 960 |
<kbd>\w'string'</kbd> <i>argument.</i> |
| 961 |
</p> |
| 962 |
|
| 963 |
<p class="tip-bottom"> |
| 964 |
Furthermore, if the <kbd>\w</kbd> is used in place of a |
| 965 |
<a href="definitions.html#numericargument">numeric argument</a> |
| 966 |
to a macro and <kbd>string</kbd> is composed of several words |
| 967 |
separated by spaces, you must surround the whole escape with double |
| 968 |
quotes, as in the example above. |
| 969 |
</p> |
| 970 |
</div> |
| 971 |
|
| 972 |
<!-- -INLINE_LINEDRAWING_GROFF- --> |
| 973 |
|
| 974 |
<h3 id="inline-linedrawing-groff" class="docs">Horizontal line drawing function (<kbd style="text-transform: none;">\l</kbd>)</h3> |
| 975 |
|
| 976 |
<p> |
| 977 |
The <kbd>\l'distance'</kbd> inline allows you to draw a horizontal |
| 978 |
rule of the specified distance. You must supply a |
| 979 |
<a href="definitions.html#unitofmeasure">unit of measure</a>. |
| 980 |
Therefore, to set a 3-pica rule into a line of text, you’d do |
| 981 |
<br/> |
| 982 |
<span class="pre-in-pp"> |
| 983 |
A line of text with a superfluous \l'3P' 3-pica rule in it. |
| 984 |
</span> |
| 985 |
<kbd>\l'3P'</kbd>, above, not only draws the rule, but advances 3 |
| 986 |
picas horizontally as well, just as you’d expect. |
| 987 |
</p> |
| 988 |
|
| 989 |
<p> |
| 990 |
For an easy way of drawing rules to the full measure of the current |
| 991 |
line or tab length, see |
| 992 |
<a href="#inline-rule-mom">Full measure rules</a>. |
| 993 |
</p> |
| 994 |
|
| 995 |
<p> |
| 996 |
The weight (thickness) of rules varies according to the point |
| 997 |
size in effect when you invoke <kbd>\l</kbd>, but you can’t fix |
| 998 |
the weight with any real precision. A point size of 12 produces |
| 999 |
a tastefully moderate rule weight of between one-half and one |
| 1000 |
point (depending on your printer). |
| 1001 |
</p> |
| 1002 |
|
| 1003 |
<div class="box-tip"> |
| 1004 |
<p class="tip"> |
| 1005 |
<span class="note">Note:</span> |
| 1006 |
Besides <kbd>\l</kbd>, <b>groff</b> provides a number of more |
| 1007 |
sophisticated “drawing” escapes. It is well beyond |
| 1008 |
the scope of this documentation to demonstrate their usage; see |
| 1009 |
<br/> |
| 1010 |
<span class="pre-in-pp"> |
| 1011 |
info groff \\D |
| 1012 |
</span> |
| 1013 |
for directions concerning their use. The drawing escapes can be a |
| 1014 |
bit unwieldy, so mom provides “user-friendly” macros for |
| 1015 |
the |
| 1016 |
<a href="graphical.html#top">graphical objects</a> |
| 1017 |
most commonly encountered in typesetting: horizontal and vertical |
| 1018 |
rules, boxes, and circles (ellipses). |
| 1019 |
</p> |
| 1020 |
|
| 1021 |
<p class="tip-bottom"> |
| 1022 |
Additionally, groff comes with two “preprocessors” that |
| 1023 |
let you create ruled tables and vector diagrams (line drawings): |
| 1024 |
<b>tbl</b> and <b>pic</b>. The documentation for <b>tbl</b> can be |
| 1025 |
downloaded from |
| 1026 |
<br/> |
| 1027 |
<a style="display: inline-block; margin-left: 2em; margin-top: .5em; margin-bottom: .5em" href="http://cm.bell-labs.com/cm/cs/doc/76/tbl.ps.gz">http://cm.bell-labs.com/cm/cs/doc/76/tbl.ps.gz</a> |
| 1028 |
<br/> |
| 1029 |
and <b>pic</b> from |
| 1030 |
<br/> |
| 1031 |
<a style="display: inline-block; margin-left: 2em; margin-top: .5em; margin-bottom: .5em" href="http://www.kohala.com/start/troff/gpic.raymond.ps">http://www.kohala.com/start/troff/gpic.raymond.ps</a> |
| 1032 |
<br/> |
| 1033 |
Both are powerful tools, but they can be nasty to learn—at |
| 1034 |
first, anyway. You may prefer to use a vector drawing program |
| 1035 |
to create diagrams and tables; inserting the results into a |
| 1036 |
document is easy enough with |
| 1037 |
<a href="images.html#pdf-image">PDF_IMAGE</a> |
| 1038 |
or |
| 1039 |
<a href="images.html#pspic">PSPIC</a>. |
| 1040 |
</p> |
| 1041 |
</div> |
| 1042 |
|
| 1043 |
<!-- -INLINE_CHARACTERS_GROFF- --> |
| 1044 |
|
| 1045 |
<h3 id="inline-characters-groff" class="docs">Special characters and symbols</h3> |
| 1046 |
<p> |
| 1047 |
Here follows a short list of commonly-used special characters |
| 1048 |
available via inline escapes. If you’re not sure of the |
| 1049 |
meaning of some of these characters, consult the |
| 1050 |
<a href="definitions.html#top">Definitions of Terms</a>. |
| 1051 |
</p> |
| 1052 |
|
| 1053 |
<p> |
| 1054 |
For a complete list of special characters and glyphs (i.e. just |
| 1055 |
about anything you’d ever want to appear on the printed |
| 1056 |
page, including mathematical symbols, accented characters, unusual |
| 1057 |
ligatures and letters unique to various European languages), consult |
| 1058 |
<kbd>man groff_char</kbd>. |
| 1059 |
</p> |
| 1060 |
|
| 1061 |
<span class="pre"> |
| 1062 |
CHARACTER ESCAPE SEQUENCE |
| 1063 |
--------- --------------- |
| 1064 |
Comment line \# or .\" |
| 1065 |
Fixed-width space \<space> |
| 1066 |
Unbreakable space \~ |
| 1067 |
Digit-width (figure) space \0 |
| 1068 |
Zero-width character \& |
| 1069 |
Discretionary hyphen \% |
| 1070 |
Backslash \\ or \e |
| 1071 |
Plus/minus (arithmetic) \[+-] |
| 1072 |
Subtract (arithmetic) \[mi] |
| 1073 |
Multiply (arithmetic) \[mu] |
| 1074 |
Divide (arithmetic) \[di] |
| 1075 |
Em-dash \[em] |
| 1076 |
En-dash \[en] |
| 1077 |
Left double-quote \[lq] |
| 1078 |
Right double-quote \[rq] |
| 1079 |
Open (left) single-quote \[oq] |
| 1080 |
Close (right) single-quote \[cq] |
| 1081 |
Bullet \[bu] |
| 1082 |
Ballot box \[sq] |
| 1083 |
One-quarter \[14] |
| 1084 |
One-half \[12] |
| 1085 |
Three-quarters \[34] |
| 1086 |
Degree sign \[de] |
| 1087 |
Dagger \[dg] |
| 1088 |
Foot mark \[fm] |
| 1089 |
Cent sign \[ct] |
| 1090 |
Registered trademark \[rg] |
| 1091 |
Copyright \[co] |
| 1092 |
Section symbol \[sc] |
| 1093 |
</span> |
| 1094 |
<br/> |
| 1095 |
|
| 1096 |
<div class="rule-long"><hr/></div> |
| 1097 |
|
| 1098 |
<!-- Navigation links --> |
| 1099 |
<table style="width: 100%; margin-top: 12px;"> |
| 1100 |
<tr> |
| 1101 |
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td> |
| 1102 |
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td> |
| 1103 |
<td style="width: 33%; text-align: right;"><a href="color.html#top">Next: Coloured text</a></td> |
| 1104 |
</tr> |
| 1105 |
</table> |
| 1106 |
|
| 1107 |
</div> |
| 1108 |
|
| 1109 |
<div class="bottom-spacer"><br/></div> |
| 1110 |
|
| 1111 |
</body> |
| 1112 |
</html> |