/contrib/groff/contrib/mom/momdoc/typesetting.html
HTML | 4189 lines | 3745 code | 386 blank | 58 comment | 0 complexity | 31b388b97e5373c5259dc6a73c87a7ba MD5 | raw file
Large files files are truncated, but you can click here to view the full 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 -- Typesetting Macros</title> 6</head> 7<body bgcolor="#dfdfdf"> 8 9<!====================================================================> 10 11<a href="goodies.html#TOP">Next</a> 12<a href="definitions.html#TOP">Prev</a> 13<a href="toc.html">Back to Table of Contents</a> 14<p> 15<a name="TOP"></a> 16<a name="MACROS_TYPESETTING"> 17 <h1 align="center"><u>THE TYPESETTING MACROS</u></h1> 18</a> 19 20<a href="#INTRO_MACROS_TYPESETTING">Introduction to the typesetting macros</a> 21<br> 22<ul> 23 <li><strong>PAGE SETUP</strong> 24 <ul> 25 <li><a href="#INTRO_SETUP">Introduction to Page Setup</a> 26 <li><a href="#INDEX_SETUP">List of macros</a> 27 </ul> 28 <li><strong>BASIC TYPESETTING PARAMETERS</strong> 29 <ul> 30 <li><a href="#INTRO_BASIC_PARAMS">Introduction to Basic Parameters</a> 31 <li><a href="#INDEX_BASIC">List of macros</a> 32 </ul> 33 <li><strong>JUSTIFYING, QUADDING, FILLING, BREAKING and JOINING LINES</strong> 34 <ul> 35 <li><a href="#INTRO_JUST_QUAD_FILL">Introduction to justify, quad, fill, break</a> 36 <li><a href="#INDEX_JUST">List of macros</a> 37 </ul> 38 <li><strong>TYPOGRAPHIC REFINEMENTS</strong> 39 <ul> 40 <li><a href="#INTRO_REFINEMENTS">Introduction to typographic refinements</a> 41 <li><a href="#INDEX_REFINEMENTS">List of macros</a> 42 </ul> 43 <li><strong>TYPE MODIFICATIONS -- pseudo italic, bold, condense, extend</strong> 44 <ul> 45 <li><a href="#INTRO_MODIFICATIONS">Introduction to type modifications</a> 46 <li><a href="#INDEX_MODIFICATIONS">List of macros</a> 47 </ul> 48 <li><strong>VERTICAL MOVEMENTS</strong> 49 <ul> 50 <li><a href="#INTRO_ALDRLD">Introduction to vertical movements</a> 51 <li><a href="#INDEX_ALDRLD">List of macros</a> 52 </ul> 53 <li><strong>TABS</strong> 54 <ul> 55 <li><a href="#INTRO_TABS">Introduction to tabs</a> 56 <li><a href="#TYPESETTING_TABS">Typesetting tabs</a> 57 <ul> 58 <li><a href="#TYPESETTING_TABS_TUT">Quickie tutorial</a> 59 </ul> 60 <li><a href="#STRING_TABS">String tabs</a> 61 <ul> 62 <li><a href="#STRING_TABS_TUT">Quickie tutorial</a> 63 </ul> 64 <li><a href="#INDEX_TABS">List of macros</a> 65 </ul> 66 <li><strong>MULTI-COLUMNS</strong> 67 <ul> 68 <li><a href="#INTRO_MULTI_COLUMNS">Introduction to multi-columns</a> 69 <li><a href="#INDEX_MULTI_COLUMNS">List of macros</a> 70 </ul> 71 <li><strong>INDENTS</strong> 72 <ul> 73 <li><a href="#INTRO_INDENTS">Introduction to indents</a> 74 <li><a href="#INDEX_INDENTS">List of macros</a> 75 </ul> 76 <li><strong>GOODIES</strong> 77 <ul> 78 <li><a href="goodies.html#GOODIES">Introduction to goodies</a> 79 <li><a href="goodies.html#INDEX_GOODIES">List of macros</a> 80 </ul> 81 <li><strong>INLINE ESCAPES</strong> 82 <ul> 83 <li><a href="inlines.html#INLINE_ESCAPES_INTRO">Introduction to inline escapes</a> 84 <li><a href="inlines.html#INDEX_INLINES">List of inline escapes</a> 85 </ul> 86</ul> 87<p> 88<hr> 89 90<h2><a name="INTRO_MACROS_TYPESETTING"><u>Introduction to the typesetting macros</u></a></h2> 91 92<strong>Mom</strong>'s typesetting macros provide access to 93groff's typesetting capabilities. Aside from controlling basic 94type parameters (family, font, line length, point size, leading), 95<strong>mom</strong>'s macros fine-tune wordspacing, letterspacing, 96kerning, hyphenation, and so on. In addition, <strong>mom</strong> 97has true typesetting tabs, string tabs, multiple indent styles, 98line padding, and a batch of other goodies. 99<p> 100In some cases, <strong>mom</strong>'s typesetting macros merely imitate 101groff primitives. In others, they approach typesetting concerns in 102conceptually new ways (for groff, at least). This should present no 103problem for newcomers to groff who are learning <strong>mom</strong>. 104Old groff hands should be careful. Just because it looks like a 105duck and walks like a duck does not, in this instance, mean that it 106is a duck. When using <strong>mom</strong>, stay away from groff 107primitives if <strong>mom</strong> provides a macro that accomplishes 108the same thing. 109<p> 110<strong>Mom</strong>'s typesetting macros can be used as a standalone 111package, independent of the 112<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. 113With them, you can typeset on-the-fly. Book covers, your best 114friend's résumé, a poster for a lost dog--none of these requires 115structured document processing (page headers, paragraphs, heads, 116footnotes, etc). What they do demand is precise control over every 117element on the page. The typesetting macros give you that control. 118<p> 119<hr> 120 121<!====================================================================> 122 123<a name="INTRO_SETUP"></a> 124 125<a name="PAGE_MARGINS"> 126 <h2><u>Page setup: paper size and page margins</u></h2> 127</a> 128 129The page setup macros establish the physical dimensions of your 130page and the margins you want it to have. <strong>Groff</strong> 131has defaults for these, but I recommend setting them at the top 132of your files anyway unless you're using <strong>mom</strong>'s 133<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> 134and are content with her defaults. 135<p> 136The 137<a href="#PAPER">PAPER</a> 138macro provides a shortcut for setting the page to the correct dimensions 139for a number of well-known, established paper sizes. The 140<a href="#PAGE">PAGE</a> 141macro provides a convenient way of setting the page dimensions and 142some or all of the page margins with a single macro. 143<p> 144 145<a name="INDEX_SETUP"> 146 <h3><u>Page setup macros list</u></h3> 147</a> 148 149<ul> 150 <li><a href="#PAGEWIDTH">PAGEWIDTH</a> (page width) 151 <li><a href="#PAGELENGTH">PAGELENGTH</a> (page length) 152 <li><a href="#PAPER">PAPER</a> (common paper sizes) 153 <li><a href="#L_MARGIN">L_MARGIN</a> (left margin) 154 <li><a href="#R_MARGIN">R_MARGIN</a> (right margin) 155 <li><a href="#T_MARGIN">T_MARGIN</a> (top margin) 156 <li><a href="#B_MARGIN">B_MARGIN</a> (bottom margin) 157 <li><a href="#PAGE">PAGE</a> (page dimensions and margins all in one fell swoop) 158 <li><a href="#NEWPAGE">NEWPAGE</a> (start a new page) 159</ul> 160<p> 161 162<!---PAGEWIDTH---> 163 164<hr width="66%" align="left"> 165 <a name="PAGEWIDTH"><h3><u>Page width</u></h3></a> 166<br> 167<nobr>Macro: <strong>PAGEWIDTH</strong> <width of printer sheet></nobr> 168<br> 169<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 170 171<p> 172The argument to <strong>PAGEWIDTH</strong> is the width of your 173printer sheet. <strong>PAGEWIDTH</strong> requires a unit of measure. 174Decimal fractions are allowed. Hence, to tell <strong>mom</strong> 175the width of your printer sheet is 8-1/2 inches, you enter 176<p> 177<pre> 178 .PAGEWIDTH 8.5i 179</pre> 180 181<!---PAGELENGTH---> 182 183<hr width="66%" align="left"> 184 <a name="PAGELENGTH"><h3><u>Page length</u></h3></a> 185<br> 186<nobr>Macro: <strong>PAGELENGTH</strong> <length of printer sheet></nobr> 187<br> 188<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 189 190<p> 191<strong>PAGELENGTH</strong> tells <strong>mom</strong> how long your 192printer sheet is. It works just like 193<strong>PAGEWIDTH</strong>. Therefore, to tell 194<strong>mom</strong> your printer sheet is 11 inches long, you 195enter 196<p> 197<pre> 198 .PAGELENGTH 11i 199</pre> 200 201<!---PAPER---> 202 203<hr width="66%" align="left"> 204 <a name="PAPER"><h3><u>Paper</u></h3></a> 205<br> 206<nobr>Macro: <strong>PAPER</strong> <paper type></nobr> 207 208<p> 209<strong>PAPER</strong> provides a convenient way to set the page 210dimensions for some common printer sheet sizes. <nobr><paper 211type> can be one of:</nobr> 212<p> 213<pre> 214 LETTER 215 LEGAL 216 STATEMENT 217 TABLOID 218 LEDGER 219 FOLIO 220 QUARTO 221 10x14 222 EXECUTIVE 223 A3 224 A4 225 A5 226 B4 227 B5 228</pre> 229 230Say, for example, you have A4-sized sheets in your printer. 231It's shorter (and easier) to enter 232<p> 233<pre> 234 .PAPER A4 235</pre> 236 237than to remember the correct dimensions and enter 238<p> 239<pre> 240 .PAGEWIDTH 595p 241 .PAGELENGTH 842p 242</pre> 243 244<!---L_MARGIN---> 245 246<hr width="66%" align="left"> 247 <a name="L_MARGIN"><h3><u>Left margin</u></h3></a> 248<br> 249<nobr>Macro: <strong>L_MARGIN</strong> <left margin></nobr> 250<br> 251<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 252 253<p> 254<strong>L_MARGIN</strong> establishes the distance from the left edge 255of the printer sheet at which you want your type to start. It may 256be used any time, and remains in effect until you enter a new value. 257<p> 258<a href="#IL">Left indents</a> 259and 260<a href="#TABS">tabs</a> 261are calculated from the value you pass to <strong>L_MARGIN</strong>, 262hence it's always a good idea to invoke it before starting any serious 263typesetting. A unit of measure is required. Decimal fractions are 264allowed. Therefore, to set the left margin at 3 picas (1/2 inch), 265you'd enter either 266<p> 267<pre> 268 .L_MARGIN 3P 269 or 270 .L_MARGIN .5i 271</pre> 272 273If you use the macros 274<a href="#PAGE">PAGE</a>, 275<a href="#PAGEWIDTH">PAGEWIDTH</a> 276or 277<a href="#PAPER">PAPER</a> 278without invoking <strong>L_MARGIN</strong> (either before 279or afterwards), <strong>mom</strong> automatically sets 280</strong>L_MARGIN</strong> to 1 inch. 281<p> 282<strong>NOTE:</strong> L_MARGIN behaves in a special way when you're 283using the 284<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. 285See 286<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> 287for an explanation. 288<p> 289 290<!---R_MARGIN---> 291 292<hr width="66%" align="left"> 293 <a name="R_MARGIN"><h3><u>Right margin</u></h3></a> 294<br> 295<nobr>Macro: <strong>R_MARGIN</strong> <right margin></nobr> 296<br> 297<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 298 299<p> 300<strong>R_MARGIN</strong> establishes the amount of space you 301want between the end of typeset lines and the right hand edge 302of the printer sheet. In other words, it sets the line length. 303<strong>R_MARGIN</strong> requires a unit of measure. Decimal 304fractions are allowed. 305<p> 306The <a href="#LINELENGTH">line length macro</a> (<strong>LL</strong>) can 307be used in place of <strong>R_MARGIN</strong>. In either case, the 308last one invoked sets the line length. The choice of which to use is 309up to you. In some instances, you may find it easier to think of a 310section of type as having a right margin. In others, giving a line 311length may make more sense. 312<p> 313For example, if you're setting a page of type you know should have 3146-pica margins left and right, it makes sense to enter a left and 315right margin, like this: 316<p> 317<pre> 318 .L_MARGIN 6P 319 .R_MARGIN 6P 320</pre> 321 322That way, you don't have to worry about calculating the line 323length. On the other hand, if you know the line length for a 324patch of type should be 17 picas and 3 points, entering the line 325length with <strong>LL</strong> is much easier than calculating the 326right margin. 327<p> 328<pre> 329 .LL 17P+3p 330</pre> 331 332If you use the macros 333<a href="#PAGE">PAGE</a>, 334<a href="#PAGEWIDTH">PAGEWIDTH</a> 335or 336<a href="#PAPER">PAPER</a> 337without invoking <strong>R_MARGIN</strong> afterwards, 338<strong>mom</strong> automatically sets <strong>R_MARGIN</strong> 339to 1 inch. If you set a line length after these macros (with 340<a href="#LINELENGTH">LL</a>), 341the line length calculated by <strong>R_MARGIN</strong> is, of course, 342overridden. 343<p> 344<strong>IMPORTANT: R_MARGIN</strong>, if used, MUST come after 345<a href="#PAPER">PAPER</a>, 346<a href="#PAGEWIDTH">PAGEWIDTH</a>, 347<a href="#L_MARGIN">L_MARGIN</a> 348and/or 349<a href="#PAGE">PAGE</a> 350(if a right margin isn't given to <strong>PAGE</strong>). 351The reason is that <strong>R_MARGIN</strong> calculates line 352length from the overall page dimensions and the left margin. 353Obviously, it can't make the calculation if it doesn't know the page 354width and the left margin. 355<p> 356<strong>NOTE: R_MARGIN</strong> behaves in a special way 357when you're using the 358<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. 359See 360<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> 361for an explanation. 362<p> 363 364<!---T_MARGIN---> 365 366<hr width="66%" align="left"> 367 <a name="T_MARGIN"><h3><u>Top margin</u></h3></a> 368<br> 369<nobr>Macro: <strong>T_MARGIN</strong> <top margin></nobr> 370<br> 371<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 372 373<p> 374<strong>T_MARGIN</strong> establishes the distance from the top of 375the printer sheet at which you want your type to start. It requires 376a unit of measure, and decimal fractions are allowed. To set a top 377margin of 2-1/2 centimetres, you'd enter 378<p> 379<pre> 380 .T_MARGIN 2.5c 381</pre> 382 383<strong>T_MARGIN</strong> calculates the vertical position of the 384first line of type on a page by treating the top edge of the printer 385sheet as a <a href="definitions.html#TERMS_BASELINE">baseline</a>. Therefore, 386<p> 387<pre> 388 .T_MARGIN 1.5i 389</pre> 390 391puts the baseline of the first line of type 1-1/2 inches beneath 392the top of the page. 393<p> 394<strong>IMPORTANT:</strong> <strong>T_MARGIN</strong> does two 395things: it establishes the top margin for pages that come after 396it AND it moves to that position on the current page. Therefore, 397<strong>T_MARGIN</strong> should only be used at the top of a file 398(prior to entering text) or after 399<a href="#NEWPAGE">NEWPAGE</a>, 400like this: 401<p> 402<pre> 403 .NEWPAGE 404 .T_MARGIN 6P 405 <text> 406</pre> 407 408<strong>NOTE:</strong> <strong>T_MARGIN</strong> means something 409slightly different when you're using the 410<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. 411See 412<a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a> 413for an explanation. 414<p> 415 416<!---B_MARGIN---> 417 418<hr width="66%" align="left"> 419 <a name="B_MARGIN"><h3><u>Bottom margin</u></h3></a> 420<br> 421<nobr>Macro: <strong>B_MARGIN</strong> <bottom margin></nobr> 422<br> 423<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 424 425<p> 426<strong>B_MARGIN</strong> sets a nominal position at the bottom 427of the page beyond which you don't want your type to go. When the 428bottom margin is reached, <strong>mom</strong> starts a new page. 429<strong>B_MARGIN</strong> requires a unit of measure. Decimal 430fractions are allowed. To set a nominal bottom margin of 3/4 inch, 431enter 432<p> 433<pre> 434 .B_MARGIN .75i 435</pre> 436 437Obviously, if you haven't spaced the type on your pages so that 438the last lines fall perfectly at the bottom margin, the margin will 439vary from page to page. Usually, but not always, the last line of 440type that fits on a page <em>before</em> the bottom margin causes 441<strong>mom</strong> to start a new page. 442<p> 443Occasionally, owing to a peculiarity in <strong>groff</strong>, 444an extra line will fall below the nominal bottom margin. If you're 445using the 446<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>, 447this is unlikely to happen; the document processing macros are very 448hard-nosed about aligning bottom margins. 449<p> 450<strong>NOTE:</strong> The meaning of <strong>B_MARGIN</strong> is 451slightly different when you're using the document processing macros. 452See 453<a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a> 454for an explanation. 455<p> 456 457<!---PAGE---> 458 459<hr width="66%" align="left"> 460 <a name="PAGE"><h3><u>Page</u></h3></a> 461<br> 462Macro: <strong>PAGE</strong> 463<nobr><width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ]</nobr> 464<br> 465<em>*All arguments require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 466 467<p> 468<strong>PAGE</strong> lets you establish paper dimensions and page 469margins with a single macro. The only required argument is page width. 470The rest are optional, <strong>but they must appear in order and you can't 471skip over any.</strong> <nobr><lm>, <rm>, <tm></nobr> 472and <nobr><bm> refer to the left, right, top and bottom</nobr> 473margins respectively. 474<p> 475Assuming your page dimensions are 11 inches by 17 inches, and that's 476all you want to set, enter 477<p> 478<pre> 479 .PAGE 11i 17i 480</pre> 481 482If you want to set the left margin as well, say, at 1 inch, 483<strong>PAGE</strong> would look like this: 484<p> 485<pre> 486 .PAGE 11i 17i 1i 487</pre> 488 489Now suppose you also want to set the top margin, say, at 1-1/2 490inches. <nobr><tm> comes after <nobr><rm></nobr></nobr> 491in the optional arguments, but you can't skip over any arguments, 492therefore to set the top margin, you must also give a right margin. 493The <strong>PAGE</strong> macro would look like this: 494<p> 495<pre> 496 .PAGE 11i 17i 1i 1i 1.5i 497 | | 498 required right___| |___top margin 499 margin 500</pre> 501 502Clearly, <strong>PAGE</strong> is best used when you want a convenient 503way to tell <strong>mom</strong> just the dimensions of your printer 504sheet (width and length), or when you want to tell her everything 505about the page (dimensions and all the margins), for example 506<p> 507<pre> 508 .PAGE 8.5i 11i 45p 45p 45p 45p 509</pre> 510 511This sets up an 8-1/2 by 11 inch page with margins of 45 points 512(5/8-inch) all around. 513<p> 514<strong>NOTE:</strong> Only use <strong>PAGE</strong> at the 515start of a document, before entering any text. And remember, 516when you're using the 517<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>, 518top margin and bottom margin mean something slightly different than 519when you're using just the typesetting macros (see 520<a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a>). 521<p> 522Additionally, if you invoke <strong>PAGE</strong> with a top margin 523argument, any macros you invoke after <strong>PAGE</strong> will 524almost certainly move the 525<a href="definitions.html#TERMS_BASELINE">baseline</a> 526of the first line of text down by one linespace. To compensate, do 527<p> 528<pre> 529 .RLD 1v 530</pre> 531 532immediately before entering any text, or, if it's feasible, make 533<strong>PAGE</strong> the last macro you invoke prior to entering text. 534<p> 535 536<!---NEWPAGE---> 537 538<hr width="66%" align="left"> 539<a name="NEWPAGE"><h3><u>Start a new page</u></h3></a> 540<br> 541Macro: <strong>NEWPAGE</strong> 542 543<p> 544Whenever you want to start a new page, use <strong>NEWPAGE</strong>, by 545itself with no argument. <strong>Mom</strong> will finish up 546processing the current page and move you to the top of a new one 547(subject to the top margin set with 548<a href="#T_MARGIN">T_MARGIN</a>. 549<p> 550<strong>Experts:</strong> Prior to version 1.1.9, 551<strong>NEWPAGE</strong> was simply an alias of 552<strong>.bp</strong>. As of 1.1.9, <strong>NEWPAGE</strong>, 553is its own <strong>mom</strong> macro. While the new macro 554should be backwardly compatible with documents created using 555pre-1.1.9 <strong>mom</strong>s, I suggest that from this version 556onward, if you were in the habit of using <strong>.bp</strong> 557whenever you wanted to break to a new page, you now begin to use 558<strong>NEWPAGE</strong> instead. 559<p> 560<hr> 561 562<!====================================================================> 563 564<a name="INTRO_BASIC_PARAMS"></a> 565 566<a name="BASIC_PARAMS"> 567 <h2><u>Basic Typesetting Parameters</u></h2> 568</a> 569 570Basic parameter macros deal with the fundamental requirements 571for setting type: family, font, point size, leading and line length. 572<p> 573If you're using the typesetting macros only, the arguments passed 574to the basic parameter macros remain in effect until you change them. 575The document processing macros handle things differently. See 576<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> 577for an explanation. 578<p> 579 580<a name="INDEX_BASIC"><h3><u>Basic parameter macros list</u></h3></a> 581<ul> 582 <li><a href="#FAMILY">FAMILY</a> (type family) 583 <li><a href="#FONT">FONT</a> (font) 584 <li><a href="#FALLBACK_FONT">FALLBACK_FONT</a> (for invalid fonts) 585 <li><a href="#PS">PT_SIZE</a> (point size of type) 586 <li><a href="#LEADING">LS</a> (line spacing/leading) 587 <li><a href="#AUTOLEAD">AUTOLEAD</a> (automatic line spacing) 588 <li><a href="#LINELENGTH">LL</a> (line length) 589</ul> 590 591<!---FAMILY---> 592 593<hr width="66%" align="left"> 594<a name="FAMILY"><h3><u>Type family</u></h3></a> 595<br> 596<nobr>Macro: <strong>FAMILY</strong> <family></nobr> 597<br> 598Alias: <strong>FAM</strong> 599 600<p> 601<strong>FAMILY</strong> takes one argument: the name of the 602<a href="definitions.html#TERMS_FAMILY">family</a> 603you want. Groff comes with a number of PostScript families, each 604identified by a 1-, 2- or 3-letter mnemonic. The standard families 605are: 606<table valign="baseline" summary="family"> 607<tr><td width="15"><td><strong>A</strong><td>Avant Garde 608<tr><td><td><strong>BM</strong> <td>Bookman 609<tr><td><td><strong>H</strong><td>Helvetica 610<tr><td><td><strong>HN</strong><td>Helvetica Narrow 611<tr><td><td><strong>N</strong><td>New Century Schoolbook 612<tr><td><td><strong>P</strong><td>Palatino 613<tr><td><td><strong>T</strong><td>Times Roman</td></tr> 614<tr><td><td><strong>ZCM</strong><td>Zapf Chancery</td></tr> 615</table> 616<p> 617The argument you pass to <strong>FAMILY</strong> is the identifier at 618left, above. For example, if you want Helvetica, enter 619<p> 620<pre> 621 .FAMILY H 622</pre> 623 624<strong>NOTE:</strong> The 625<a href="#FONT">font macro</a> 626(<strong>FT</strong>) lets you specify both the type family 627and the desired font with a single macro. While this saves a few 628keystrokes, I recommend using <strong>FAMILY</strong> for family, 629and <strong>FT</strong> for font, except where doing so is genuinely 630inconvenient. <strong>ZCM</strong>, for example, only exists in one 631style: Italic (<strong>I</strong>). Therefore, <kbd>.FT ZCMI</kbd> 632makes more sense than setting the family to "ZCM", then 633setting the font to "I". 634<p> 635<a name="FAM_ADD_NOTE"></a> 636<strong>ADDITIONAL NOTE:</strong> As of <strong>mom, version 6371.1.9-a</strong>, if you are running a version of groff lower 638than 1.19.2, you <em>MUST</em> follow all <strong>FAMILY</strong> 639requests with a <strong>FT</strong> request, otherwise 640<strong>mom</strong> will set all type up to the next 641<strong>FT</strong> request in the 642<a href="#FALLBACK_FONT">fallback font</a>. 643<p> 644If you are running a version of groff greater than or equal 645to 1.19.2, when you invoke the <strong>FAMILY</strong> macro, 646<strong>mom</strong> "remembers" the font style (Roman, 647Italic, etc) currently in use (if the font style exists in the new 648family) and will continue to use the same font style in the new 649family. For example: 650<p> 651<pre> 652 .FAMILY BM \" Bookman family 653 .FT I \" Medium Italic 654 <some text> \" Bookman Medium Italic 655 .FAMILY H \" Helvetica family 656 <more text> \" Helvetica Medium Italic 657</pre> 658 659However, if the font style does not exist in the new family, 660<strong>mom</strong> will set all subsequent type in the 661<a href="#FALLBACK_FONT">fallback font</a> 662(by default, Courier Medium Roman) until she encounters a 663<a href="#FONT">.FT</a> 664request that's valid for the family. For example, assuming 665you don't have the font "Medium Condensed Roman" 666(<strong>mom</strong> extension "<strong>CD</strong>") 667in the Helvetica family: 668<p> 669<pre> 670 .FAMILY UN \" Univers family 671 .FT CD \" Medium Condensed 672 <some text> \" Univers Medium Condensed 673 .FAMILY H \" Helvetica family 674 <more text> \" Courier Medium Roman! 675</pre> 676 677In the above example, you must follow <kbd>.FAMILY H</kbd> with a 678<strong>FT</strong> request that's valid for Helvetica. 679<p> 680<strong>Experts:</strong> 681<br> 682If you add other PostScript families to groff's /font/devps directory, 683I recommend following the groff standard for naming families and fonts. 684For example, if you add the Garamond family, name the font files 685<p> 686<pre> 687 GARAMONDR 688 GARAMONDI 689 GARAMONDB 690 GARAMONDBI 691</pre> 692 693GARAMOND then becomes a legal family name you can pass to 694<strong>FAMILY</strong>. (You could, of course, shorten GARAMOND to just 695G, or GD.) R, I, B, and BI after GARAMOND are the roman, italic, 696bold and bold-italic fonts respectively. 697<p> 698Please see the Appendices, 699<a href="appendices.html#FONTS">Adding PostScript fonts to groff</a>, 700for information on adding fonts and families to groff, as well as 701to see a list of the extensions <strong>mom</strong> provides to 702groff's basic <strong>R, I, B, BI</strong> styles. 703<p> 704 705<!---FT---> 706 707<hr width="66%" align="left"> 708<a name="FONT"><h3><u>Font</u></h3></a> 709<br> 710<nobr>Macro: <strong>FT</strong> R | I | B | BI | <any other valid font style></nobr> 711 712<p> 713By default, groff permits <strong>FT</strong> to take one of four 714possible arguments specifying the desired font: 715<table valign="baseline" summary="font"> 716<tr><td width="15"><td><strong>R</strong><td> = <td>(Medium) Roman 717<tr><td><td><strong>I</strong><td> = <td>(Medium) Italic 718<tr><td><td><strong>B</strong><td> = <td>Bold (Roman) 719<tr><td><td><strong>BI</strong><td> = <td>Bold Italic</td></tr> 720</table> 721<p> 722For example, if your 723<a href="definitions.html#TERMS_FAMILY">family</a> 724is Helvetica, entering 725<p> 726<pre> 727 .FT B 728</pre> 729 730will give you the Helvetica bold 731<a href="definitions.html#TERMS_FONT">font</a>. 732If your family were Palatino, you'd get the Palatino bold font. 733<p> 734(As of <strong>mom, version 1.1.9-a,</strong> the range of arguments 735that can be passed to <strong>FT</strong> has been considerably 736extended, allowing access to a greater variety of font 737<a href="definitions.html#TERMS_WEIGHT">weights</a> 738and 739<a href="definitions.html#TERMS_SHAPE">shapes</a>. 740Please see the 741<a href="#FONT_NOTE">NOTE</a>, 742below.) 743<p> 744How <strong>mom</strong> reacts to an invalid argument to 745<strong>FT</strong> depends on which version of groff you're using. 746If your groff version is greater than or equal to 1.19.2, 747<strong>mom</strong> will issue a warning and, depending on how 748you've set up the 749<a href="#FALLBACK_FONT">fallback font</a>, 750either continue processing using the fallback font, or abort 751(allowing you to correct the problem). If your groff version is less 752than 1.19.2, <strong>mom</strong> will silently continue processing, 753using either the fallback font or the font that was in effect prior 754to the invalid <strong>FT</strong> call. 755<p> 756<strong>FT</strong> will also accept, as an argument, a full 757family+font name. For example, 758<p> 759<pre> 760 .FT HB 761</pre> 762 763will set subsequent type in Helvetica Bold. However, I strongly 764recommend keeping family and font separate except where doing so is 765genuinely inconvenient. 766<p> 767For inline control of fonts, see 768<a href="inlines.html#INLINE_FONTS_MOM">Inline Escapes, font control</a>. 769<p> 770<a name="FONT_NOTE"></a> 771<strong>NOTE: mom, versions 1.1.9-a</strong> and higher, 772considerably extends the range of arguments you can pass to 773<strong>FT</strong>, making it more convenient to add and access 774fonts of differing 775<a href="definitions.html#TERMS_WEIGHT">weights</a> 776and 777<a href="definitions.html#TERMS_SHAPE">shapes</a> 778within the same family. Have a look 779<a href="appendices.html#STYLE_EXTENSIONS">here</a> 780for a list of the weight/style arguments <strong>mom</strong> 781allows. 782<p> 783Be aware, though, that you must have the fonts, correctly 784installed and named, in order to use the arguments. (See 785<a href="appendices.html#HOWTO">How to create a PostScript font for use with groff</a> 786for how to add fonts to groff.) Please also read the 787<a href="#FAM_ADD_NOTE">ADDITIONAL NOTE</a> 788found in the description of the <strong>FAMILY</strong> macro. 789<p> 790 791<!---FALLBACK_FONT---> 792 793<hr width="66%" align="left"> 794<a name="FALLBACK_FONT"><h3><u>Fallback font</u></h3></a> 795<br> 796<nobr>Macro: <strong>FALLBACK_FONT</strong> <fallback font> [ ABORT | WARN ] | ABORT | WARN</nobr> 797 798<p> 799In the event that you pass an invalid argument to 800<a href="#FONT">.FAMILY</a> 801(i.e. a non-existent family), <strong>mom</strong>, by default, uses 802the fallback font, Courier Medium Roman (CR), in order to continue 803processing your file. 804<p> 805If you'd prefer another fallback font, pass 806<strong>FALLBACK_FONT</strong> the <strong>full family+font name 807of the font you'd like</strong>. For example, if you'd rather the 808fallback font were Times Roman Medium Roman, 809 810<pre> 811 .FALLBACK_FONT TR 812</pre> 813<p> 814would do the trick. 815<p> 816Additionally, if your version of groff accepts accepts "if 817F" and "if S" (see 818<a href="#FAM_ADD_NOTE">above</a>), 819<strong>mom</strong> issues a warning whenever a 820<strong>font style</strong> set with 821<a href="#FONT">.FT</a> 822does not exist, either because you haven't registered the style 823(see 824<a href="appendices.html#REGISTER_STYLE">here</a> 825for instructions on registering styles), or because the font style 826does not exist in the current family set with 827<a href="#FAMILY">.FAMILY</a>. 828By default, <strong>mom</strong> then aborts, which allows you to 829correct the problem. 830<p> 831If you'd prefer that <strong>mom</strong> not abort on non-existent 832fonts, but rather continue processing using a fallback font, 833you can pass <strong>FALLBACK_FONT</strong> the argument 834<strong>WARN</strong>, either by itself, or in conjunction with your 835chosen fallback font. 836<p> 837<strong>Some examples of invoking FALLBACK_FONT:</strong> 838<br> 839<ul> 840 <li><kbd>.FALLBACK_FONT WARN</kbd> 841 <br> 842 <strong>mom</strong> will issue a warning whenever you try 843 to access a non-existent font but will continue processing 844 your file with the default fallback font, Courier Medium Roman. 845 <li><kbd>.FALLBACK_FONT TR WARN</kbd> 846 <br> 847 <strong>mom</strong> will issue a warning whenever you try 848 to access a non-existent font but will continue processing 849 your file with a fallback font of Times Roman Medium Roman; 850 additionally, "TR" will be the fallback font whenever 851 you try to access a <strong>family</strong> that does not exist. 852 <li><kbd>.FALLBACK_FONT TR ABORT</kbd> 853 <br> 854 <strong>mom</strong> will abort whenever you try to access a 855 non-existent font, and will use the fallback font 856 "TR" whenever you try to access a <strong>family</strong> 857 that does not exist. 858</ul> 859<p> 860If, for some reason, you want to revert to ABORT, just enter 861<kbd>.FALLBACK_FONT ABORT</kbd> and <strong>mom</strong> will once 862again abort on font errors. 863<p> 864 865<!---PT_SIZE---> 866 867<hr width="66%" align="left"> 868<a name="PS"><h3><u>Point size of type</u></h3></a> 869<br> 870<nobr>Macro: <strong>PT_SIZE</strong> <size of type in points></nobr> 871<br> 872<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 873 874<p> 875<strong>PT_SIZE</strong> (Point Size) takes one argument: the size of type 876in points. Unlike most other macros that establish the size or measure 877of something, <strong>PT_SIZE</strong> does not require that you supply a 878unit of measure since it's a near universal convention that type size 879is measured in points. Therefore, to change the type size to, say, 88011 points, enter 881<p> 882<pre> 883 .PT_SIZE 11 884</pre> 885 886Point sizes may be fractional (e.g. 10.25 or 12.5). 887<p> 888You can prepend a plus or a minus sign to the argument to 889<strong>PT_SIZE</strong>, in which case the point size will be changed by + 890or - the original value. For example, if the point size is 12, 891and you want 14, you can do 892<p> 893<pre> 894 .PT_SIZE +2 895</pre> 896 897then later reset it to 12 with 898<p> 899<pre> 900 .PT_SIZE -2 901</pre> 902 903The size of type can also be changed inline. See 904<a href="inlines.html#INLINE_SIZE_MOM">Inline Escapes, changing point size</a>. 905<p> 906<strong>NOTE:</strong> It is unfortunate that the <kbd>pic</kbd> 907pre-processor uses <strong>PS</strong>, and thus 908<strong>mom</strong>'s macro for setting point sizes can't use it. 909However, if you aren't using <kbd>pic</kbd>, you might want to 910alias <strong>PT_SIZE</strong> as <strong>PS</strong>, since 911there'd be no conflict. 912<p> 913<pre> 914 .ALIAS PS PT_SIZE 915</pre> 916 917would allow you to set point sizes with <kbd>.PS</kbd>. 918<p> 919 920<!---LS---> 921 922<hr width="66%" align="left"> 923<a name="LEADING"><h3><u>Line spacing/leading</u></h3></a> 924<br> 925<nobr>Macro: <strong>LS</strong> <distance between lines></nobr> 926<br> 927<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 928 929<p> 930<strong>LS</strong> (Line Space) takes one argument: the distance you want, typically 931in points, from baseline to baseline of type. The argument may 932be fractional (e.g. 12.25 or 14.5). Like <strong>PT_SIZE</strong>, 933<strong>LS</strong> does not require a unit of measure, since 934<a href="definitions.html#TERMS_LEADING">leading</a> 935is most often given in points. Therefore, to set the linespace to 93614 points, you would enter 937<p> 938<pre> 939 .LS 14 940</pre> 941 942However, if you wish, you may specify a unit of measure by appending 943it directly to the argument passed to <strong>LS</strong>. For example, 944if you want a linespace of 1/4 of an inch, enter 945<p> 946<pre> 947 .LS .25i 948</pre> 949 950You can prepend a plus or a minus sign to the argument to 951<strong>LS</strong>, in which case the line spacing will be changed 952by + or - the original value. For example, if the line spacing is 95314 points, and you want 17 points, you can do 954<p> 955<pre> 956 .LS +3 957</pre> 958 959then later reset it to 14 points with 960<p> 961<pre> 962 .LS -3 963</pre> 964 965<strong>Experts:</strong> 966<br> 967<strong>LS</strong> should not be confused with the groff primitive 968<strong>ls</strong>. <strong>LS</strong> acts like <strong>vs</strong>. 969<strong>mom</strong> does not provide a macro analogous to 970<strong>ls</strong>. 971<p> 972 973<!---AUTOLEAD---> 974 975<hr width="66%" align="left"> 976<a name="AUTOLEAD"><h3><u>Automatic line spacing</u></h3></a> 977<br> 978<nobr>Macro: <strong>AUTOLEAD</strong> <amount of automatic leading> [FACTOR]</nobr> 979<br> 980<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 981 982<p> 983Without the <strong>FACTOR</strong> argument, <strong>AUTOLEAD</strong> 984calculates the linespace for you by adding its argument to the 985current point size of type. All subsequent <strong>PT_SIZE</strong> 986requests automatically update the linespacing by the autolead amount. 987<p> 988Used in this way, <strong>AUTOLEAD</strong> does not require a unit 989of measure; points is assumed. However, you may use an alternate 990unit of measure by appending it to the argument. The argument may 991be a decimal fraction (e.g. .5 or 2.75). 992<p> 993As an example, if your current point size of type is 12, entering 994<p> 995<pre> 996 .AUTOLEAD 2 997</pre> 998 999changes the linespace to 14 points, regardless any linespacing 1000already in effect. From here on, every change to the size of type 1001(with <strong>PT_SIZE</strong>, not 1002<a href="definitions.html#TERMS_INLINES">inline</a>) 1003changes the linespace as well. If you decrease the type size to 9 1004points, the leading decreases to 11 points. If you increase the type 1005size to 16 points, the leading increases to 18 points. 1006<p> 1007Automatic updating of the linespacing continues until you enter a 1008"manual" line space value with <strong>LS</strong>. 1009<p> 1010If you give <strong>AUTOLEAD</strong> the optional 1011<strong>FACTOR</strong> argument, <strong>AUTOLEAD</strong> 1012calculates the line space as a factor of the 1013<a href="definitions.html#TERMS_NUMERICARGUMENT">numeric argument</a> 1014you gave <strong>AUTOLEAD</strong>. For example, if your point 1015size is 12, 1016<p> 1017<pre> 1018 .AUTOLEAD 1.125 FACTOR 1019</pre> 1020sets the leading at 13.5 points. If you change the point size 1021to 14, the leading automatically changes to 15.75 (14 x 1.125). 1022<p> 1023<strong>NOTE:</strong> There's no need to prepend a plus sign (+) 1024to <strong>AUTOLEAD</strong>'s argument, although you may do so if you 1025wish. 1026<p> 1027 1028<!---LL---> 1029 1030<hr width="66%" align="left"> 1031<a name="LINELENGTH"><h3><u>Line length</u></h3></a> 1032<br> 1033<nobr>Macro: <strong>LL</strong> <line length></nobr> 1034<br> 1035<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> 1036 1037<p> 1038<strong>LL</strong> (Line Length) takes one argument: the distance from the 1039left margin of the page to the maximum allowable point on the 1040right at which groff should place type. The line length, in 1041other words, as the macro suggests. 1042<p> 1043<strong>LL</strong> requires a unit of measure. Therefore, to set the line 1044length to 39 picas, you would enter 1045<p> 1046<pre> 1047 .LL 39P 1048</pre> 1049 1050As with other macros that require a unit of measure, the argument to 1051<strong>LL</strong> may be fractional. For example, 1052<p> 1053<pre> 1054 .LL 4.5i 1055</pre> 1056 1057sets the line length to 4-1/2 inches. 1058 1059<p> 1060Additionally, you may express a new line length relative to the 1061current line length by prepending a plus or minus sign to the 1062argument. Thus, if you wanted to increase the line length by 3 1063<a href="definitions.html#TERMS_PICASPOINTS">points</a>, you could 1064do 1065<p> 1066<pre> 1067 .LL +3p 1068</pre> 1069 1070This is especially handy when you want to "hang" 1071punctuation outside the right margin since you can pass groff's 1072<a href="inlines.html#INLINE_STRINGWIDTH_GROFF"><strong>\w</strong></a> 1073escape as the argument to <strong>LL</strong>, like this: 1074<p> 1075<pre> 1076 .LL +\w'.'u 1077</pre> 1078 1079The above example increases the current line length by the width of 1080a period. Notice that you must append the 1081<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>, 1082<strong>u</strong>, to the escape since .LL requires a unit of 1083measure. 1084 1085<p> 1086<strong>NOTE:</strong> The <a href="#R_MARGIN">right margin 1087macro</a> (<strong>R_MARGIN</strong>) can also be used to set line 1088length. 1089<p> 1090<hr> 1091 1092<!====================================================================> 1093 1094<a name="INTRO_JUST_QUAD_FILL"></a> 1095 1096<a name="JUST_QUAD_FILL"> 1097 <h2><u>Justifying, quadding, filling and breaking lines</u></h2> 1098</a> 1099 1100The justification and quadding macros deal with how type aligns along 1101the left and right margins. In a nutshell, type either aligns at the 1102left margin, at the right margin, at both margins, or at neither margin 1103(centred). 1104<p> 1105These macros also determine whether or not 1106<a href="definitions.html#TERMS_INPUTLINE">input lines</a> 1107are joined and 1108<a href="definitions.html#TERMS_FILLED">filled</a> 1109during output. 1110<p> 1111Additionally, macros that deal with how to break 1112<a href="definitions.html#TERMS_OUTPUTLINE">output lines</a> 1113are covered in this section, as is the 1114<a href="definitions.html#TERMS_INLINES">inline escape</a> 1115for joining input lines. 1116<p> 1117You may encounter some words here that are unfamiliar. Refer to 1118<a href="definitions.html#TERMS_TYPESETTING">Typesetting terms</a> 1119and 1120<a href="definitions.html#TERMS_GROFF">Groff terms</a> 1121for an explanation. 1122 1123<a name="INDEX_JUST"><h3><u>Justification, quad, fill, and break macro list</u></h3></a> 1124<p> 1125<ul> 1126 <li><strong>Fill modes</strong> 1127 <ul> 1128 <li><a href="#JUSTIFY">JUSTIFY</a> (set lines justified) 1129 <li><a href="#QUAD">QUAD</a> (set filled lines flush left, right or centred) 1130 </ul> 1131 <li><strong>Nofill modes</strong> 1132 <ul> 1133 <li><a href="#LRC">LEFT</a> (set non-filled lines flush left) 1134 <li><a href="#LRC">RIGHT</a> (set non-filled lines flush right) 1135 <li><a href="#LRC">CENTER</a> (set non-filled lines centred) 1136 </ul> 1137 <li><strong>Breaking lines</strong> 1138 <ul> 1139 <li><a href="#BR">BR</a> (manually break an output line) 1140 <li><a href="#EL">EL</a> (break a line without advancing to the next output line) 1141 <li><a href="#SPACE">SPACE</a> (break a line and add space before the next output line) 1142 <li><a href="#SPREAD">SPREAD</a> (break and force-justify an output line) 1143 </ul> 1144 <li><strong>Joining input lines in 1145 <a href="definitions.html#TERMS_NOFILL">nofill mode</a></strong> 1146 <ul> 1147 <li><a href="#JOIN">\c</a> inline escape 1148 </ul> 1149</ul> 1150 1151<!---JUSTIFY---> 1152 1153<hr width="66%" align="left"> 1154<a name="JUSTIFY"><h3><u>Justify lines</u></h3></a> 1155<br> 1156Macro: <strong>JUSTIFY</strong> 1157<br> 1158<a href="definitions.html#TERMS_FILLED"><em>Fill mode</em></a> 1159 1160<p> 1161<strong>JUSTIFY</strong> doesn't take an argument. 1162<a href="definitions.html#TERMS_INPUTLINE">Input lines</a> 1163after <strong>JUSTIFY</strong> are 1164<a href="definitions.html#TERMS_FILLED">filled</a> and 1165<a href="definitions.html#TERMS_JUST">justified</a> 1166upon output. 1167<p> 1168To break lines and prevent them from being filled and justified, 1169use the 1170<a href="#BR">BR</a> macro. 1171<p> 1172 1173<!---QUAD---> 1174 1175<hr width="66%" align="left"> 1176<a name="QUAD"><h3><u>Quad lines left, right, or centre</u></h3></a> 1177<br> 1178<nobr>Macro: <strong>QUAD</strong> L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY</nobr> 1179<br> 1180Alias: <strong>FILL</strong> 1181<br> 1182<a href="definitions.html#TERMS_FILLED"><em>Fill mode</em></a> 1183 1184<p> 1185<strong>QUAD</strong> takes one argument: the direction in which lines 1186should be 1187<a href="definitions.html#TERMS_QUAD">quadded</a>. 1188<a href="definitions.html#TERMS_INPUTLINE">Input lines</a> 1189after <strong>QUAD</strong> are 1190<a href="definitions.html#TERMS_FILLED">filled</a> 1191upon output. 1192<p> 1193If <strong>L</strong> or <strong>LEFT</strong>, type is set flush 1194along the left margin. 1195<p> 1196If <strong>R</strong> or <strong>RIGHT</strong>, type is 1197set flush along the right margin. 1198<p> 1199If <strong>C</strong> or <strong>CENTER</strong> type is set centred 1200on the current line length. 1201<p> 1202<strong>J</strong> and <strong>JUSTIFY</strong> justify text, 1203and are included as a convenience only. Obviously, if text is 1204justified, it isn't quadded. <strong>QUAD J</strong> and 1205<strong>QUAD JUSTIFY</strong> have exactly the same effect as <a 1206href="#JUSTIFY">JUSTIFY</a>. 1207<p> 1208To break lines and prevent them from being filled, use the 1209<a href="#BR">BR</a> macro. 1210<p> 1211 1212<!---LEFT, RIGHT, CENTER---> 1213 1214<hr width="66%" align="left"> 1215<a name="LRC"><h3><u>Set non-filled lines flush left, right, or centred</u></h3></a> 1216<br> 1217Macro: <strong>LEFT</strong> 1218 Macro: <strong>RIGHT</strong> 1219 Macro: <strong>CENTER</strong> 1220 (alias <strong>CENTRE</strong>) 1221<br> 1222<a href="definitions.html#TERMS_NOFILL"><em>Nofill mode</em></a> 1223 1224<p> 1225<strong>LEFT</strong>, <strong>RIGHT</strong> and 1226<strong>CENTER</strong> let you enter text on a line for line basis 1227without having to use the 1228<a href="#BR">BR</a> macro after each line. 1229Consider the following: 1230<p> 1231<pre> 1232 .QUAD LEFT 1233 So runs my dream, but what am I? 1234 .BR 1235 An infant crying in the night 1236 .BR 1237 An infant crying for the light 1238 .BR 1239 And with no language but a cry. 1240 .BR 1241</pre> 1242 1243Because text after <strong>QUAD</strong> is 1244<a href="definitions.html#TERMS_FILLED">filled</a>, you have to use the 1245<a href="#BR">BR</a> 1246macro to prevent the lines from running together. Not only is this 1247annoying to type, it's awkward to read in a text editor. Much better 1248to do 1249<p> 1250<pre> 1251 .LEFT 1252 So runs my dream, but what am I? 1253 An infant crying in the night 1254 An infant crying for the light 1255 And with no language but a cry. 1256</pre> 1257 1258<strong>IMPORTANT:</strong> Because <strong>LEFT</strong>, 1259<strong>RIGHT</strong> and <strong>CENTER</strong> are nofill 1260modes, groff does not always respect the current line length. 1261<a href="definitions.html#TERMS_INPUTLINE">Input lines</a> 1262that run long may exceed it, or get broken in undesirable ways. 1263Therefore, when using these three macros, you should preview your 1264work to ensure that all lines fit as expected. 1265<p> 1266 1267<!---BR---> 1268 1269<hr width="66%" align="left"> 1270<a name="BR"><h3><u>Manually break lines</u></h3></a> 1271<br> 1272Macro: <strong>BR</strong> 1273 1274<p> 1275When using <strong>JUSTIFY</strong> or <strong>QUAD</strong>, 1276<strong>BR</strong> tells <strong>mom</strong> about partial lines 1277that you want broken (as opposed to 1278<a href="definitions.html#TERMS_FILLED">filled</a>). 1279Any partial 1280<a href="definitions.html#TERMS_OUTPUTLINE">output line</a> 1281that immediately precedes <strong>BR</strong> will be 1282<a href="definitions.html#TERMS_QUAD">quadded</a> 1283in the direction of the current quad, or set flush left if text is 1284<a href="definitions.html#TERMS_JUST">justified</a>. 1285 1286<p> 1287Most of the time, you won't need the <strong>BR</strong> macro. 1288In fill modes, <strong>mom</strong> tries to be sensible about 1289where breaks are needed. If the nature of a macro is such that under 1290most circumstances you'd expect a break, <strong>mom</strong> puts 1291it in herself. Equally, in macros where a break isn't normally 1292desirable, no break occurs. This means text files don't get cluttered 1293with annoying <strong>BR</strong>'s. 1294<p> 1295<strong>NOTE:</strong> Lines of text in 1296<a href="definitions.html#TERMS_NOFILL">nofill mode</a> 1297never require a <strong>BR</strong>. Furthermore, in nofill mode, 1298ALL macros cause a break. If a break is not desired, use the 1299<a href="#JOIN">\c</a> 1300<a href="definitions.html#TERMS_INLINES">inline escape</a>. 1301 1302<p> 1303<strong>Experts: BR</strong> is an alias for <strong>br</strong>. 1304You can use either, or mix 'n' match with impunity. 1305<p> 1306 1307<!---EL---> 1308 1309<hr width="66%" align="left"> 1310<a name="EL"><h3><u>Manually break a line without advancing on the page</u></h3></a> 1311<br> 1312Macro: <strong>EL</strong> 1313<br> 1314<em>*In nofill modes (LEFT, RIGHT, CENTER), you must terminate the 1315line input preceding EL with the </em><kbd>\c</kbd><em> inline 1316escape. See 1317<a href="#EL_NOTES">NOTES</a>, 1318below. 1319<br> 1320*If you find remembering whether to put in the <kbd>\c</kbd> 1321bothersome, you may prefer to use the 1322<a href="definitions.html#TERMS_INLINES">inline escape</a> 1323alternative to 1324<kbd>.EL</kbd>, 1325<a href="inlines.html#B">\*[B]</a>, 1326which works consistently regardless of the fill mode. 1327<br> 1328*EL does not work after the PAD macro. 1329See 1330<a href="goodies.html#PAD">PAD</a> 1331for the way around this</em>. 1332<p> 1333The mnemonic "EL" is borrowed from old Compugraphic typesetting 1334systems, where it stood for "End Line." Conceptually, 1335<strong>EL</strong> is equivalent to the notion of a carriage return 1336with no linefeed. 1337 1338<p> 1339<em>Note to groff jocks:</em> <strong>EL</strong> is 1340unrelated to groff's <strong>.el</strong>. If you find the 1341similarity confusing, you may want to alias <strong>EL</strong> as 1342something else (but don't use <strong>EOL</strong>; it's already 1343taken.) 1344 1345<p> 1346<strong>EL</strong>'s function is simple: it breaks a line without 1347advancing on the page. 1348<a name="EL_EXAMPLE">As</a> 1349an example of where you might use it, 1350imagine that you're working from marked-up copy. The markup 1351indicates 24 points of space between two given lines, but the 1352prevailing line spacing is 12.5 points. You may find it more 1353convenient to break the first line with <strong>EL</strong> and 1354instruct <strong>mom</strong> to advance 24 points to the next line 1355instead of calculating the lead that needs to be added to 12.5 to 1356get 24. To demonstrate: 1357<p> 1358<pre> 1359 .LEFT 1360 .LS 12.5 1361 A line of text.\c 1362 .EL 1363 .ALD 24p 1364 The next line of text. 1365</pre> 1366 1367may be more intuitive than 1368<p> 1369<pre> 1370 .LEFT 1371 .LS 12.5 1372 A line of text. 1373 .ALD 11.5p 1374 The next line of text. 1375</pre> 1376 1377The first example has the further advantage that should you wish 1378to change the prevailing line space but keep the 24 points lead, 1379you don't have to recalculate the extra space. 1380<p> 1381"ALD" in the above examples stands for "<strong>A</strong>dvance 1382<strong>L</strong>ea<strong>D</strong>" (another mnemonic borrowed 1383from Compugraphic), which is covered in the section 1384<a href="#ALDRLD">Vertical movement</a>. 1385<p> 1386<a name="EL_NOTES"><strong>NOTES:</strong></a> 1387<p> 1388In versions of mom prior to 1.1.9, <strong>EL</strong> did not 1389always work as advertised on the last 1390<a name="TERMS_OUTPUTLINE">output line</a> 1391of pages that contained a footer trap (e.g. one set with 1392<a href="#B_MARGIN">B_MARGIN</a> 1393or in documents formatted using the 1394<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>). 1395<p> 1396<strong>EL</strong> has been re-written so that this should no longer be the 1397case. However, in order for it to work in the 1398<a href="definitions.html#TERMS_NOFILL">nofill</a> 1399modes 1400(<a href="#LRC">LEFT</a>, 1401<a href="#LRC">RIGHT</a> 1402or 1403<a href="#LRC">CENTER</a>), 1404you must always "join" <strong>.EL</strong> to the line 1405before it using the 1406<a href="#JOIN">\c</a> 1407<a href="definitions.html#TERMS_INLINES">inline escape</a>, 1408like this: 1409<p> 1410<pre> 1411 .LEFT 1412 A line I don't want to advance\c 1413 .EL 1414</pre> 1415 1416Conversely, in 1417<a href="definitions.html#TERMS_FILLED">fill modes</a> 1418(<a href="#QUAD">QUAD LEFT</a>, 1419<a href="#QUAD">QUAD RIGHT</a>, 1420<a href="#QUAD">QUAD CENTER</a> 1421or 1422<a href="#JUSTIFY">JUSTIFY</a>), 1423the <strong>\c</strong> must not be used. 1424<p> 1425If <strong>EL</strong> is used after most macros or groff 1426<a href="definitions.html#TERMS_PRIMITIVES">primitives</a> 1427(see the exception, below), you don't have to worry about this, 1428regardless of the fill mode. Just type <kbd>.EL</kbd> 1429<br> 1430 1431<!---SP---> 1432 1433<hr width="66%" align="left"> 1434<a name="SPACE"><h3><u>Break lines and add space between</u></h3></a> 1435<br> 1436<nobr>Macro: <strong>SPACE</strong> <space to add between lines></nobr> 1437<br> 1438Alias: <strong>SP</strong> 1439 1440<p> 1441<strong>SPACE</strong> breaks a line, just like 1442<strong>BR</strong>, then adds space after the line. With no 1443argument, it adds an extra line space of a value equal to the 1444current 1445<a href="definitions.html#TERMS_LEADING">leading</a>. 1446If you pass it a numeric argument without supplying a 1447<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>, 1448it advances that number of extra line spaces. For example: 1449<p> 1450<pre> 1451 .SPACE 1452</pre> 1453 1454breaks the line then adds an extra linespace, whereas 1455<p> 1456<pre> 1457 .SPACE 2 1458</pre> 1459 1460breaks the line and adds two extra linespaces. 1461 1462<p> 1463If you supply a unit of measure, <strong>SPACE</strong> breaks the 1464line then advances one linespace (at the current 1465<a href="definitions.html#TERMS_LEADING">leading</a>) 1466PLUS the specified amount of extra space given to 1467<strong>SPACE</strong>, 1468as in 1469<p> 1470<pre> 1471 .SPACE 6p 1472</pre> 1473 1474which breaks the line and advances one full linespace plus six 1475points. 1476 1477<p> 1478<strong>SUGGESTION: SPACE</strong> and 1479<a href="#ALD">ALD</a> 1480can be used interchangeably (<code>.SPACE 6p</code> and 1481<code>.ALD 6p</code> are equivalent). However, 1482<strong>ALD</strong> without an argument does nothing, whereas 1483<strong>SPACE</strong> without an argument adds an extra line 1484space. I recommend using <strong>SPACE</strong> when you 1485want an extra line space (or multiple thereof), and 1486<strong>ALD</strong> whenever you want some other value of space 1487after a line. 1488 1489<p> 1490<strong>Experts: SPACE</strong> is an alias of <strong>sp</strong>. 1491You can use either, or mix 'n' match with impunity. 1492<p> 1493 1494<!---SPREAD---> 1495 1496<hr width="66%" align="left"> 1497<a name="SPREAD"><h3><u>Break and force justify (spread) lines</u></h3></a> 1498<br> 1499Macro: <strong>SPREAD</strong> 1500 1501<p> 1502Sometimes, you need to break a line of 1503<a href="definitions.html#TERMS_JUST">justified</a> 1504text and have it come out fully justified, not 1505<a href="definitions.html#TERMS_QUAD">quadded</a> 1506left the way it would be with the <strong>BR</strong> macro. 1507An example of where you'd do this would be when you want to prevent a 1508word at the end of a li…
Large files files are truncated, but you can click here to view the full file