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