/contrib/groff/contrib/mom/momdoc/inlines.html

https://bitbucket.org/freebsd/freebsd-head/ · HTML · 802 lines · 714 code · 74 blank · 14 comment · 0 complexity · 1ed3570b8590a20099670b4dbc518c89 MD5 · raw file

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