1GROFF_MOM(7) Miscellaneous Information Manual GROFF_MOM(7)
2
3
4
6 groff_mom - groff `mom' macros, `mom' is a `roff' language, part of
7 `groff'
8
10 pdfmom [-Tps [pdfroff options]] [groff options] files ...
11
12 groff [-mom] files ...
13
14 groff [-m mom] files ...
15
17 mom is a macro set for groff, designed primarily to format documents
18 for PDF and PostScript output.
19
20 mom provides two categories of macros: macros for typesetting, and
21 macros for document processing. The typesetting macros provide access
22 to groff's typesetting capabilities in ways that are simpler to master
23 than groff's primitives. The document processing macros provide highly
24 customizable markup tags that allow the user to design and output pro‐
25 fessional-looking documents with a minimum of typesetting intervention.
26
27 Files processed with pdfmom(1) with or without the -Tps option, produce
28 PDF documents. The documents include a PDF outline that appears in the
29 ‘Contents’ panel of document viewers, and may contain clickable inter‐
30 nal and external links.
31
32 When -Tps is absent, groff's native PDF driver, gropdf, is used to gen‐
33 erate the output. When given, the output is still PDF, but processing
34 is passed over to pdfroff, which uses groff's PostScript driver, grops.
35 Not all PDF features are available when -Tps is given; its primary use
36 is to allow processing of files with embedded PostScript images.
37
38 Files processed with groff -mom (or -m mom) produce PostScript output
39 by default.
40
41 mom comes with her own very complete documentation in HTML format. A
42 separate PDF manual, Producing PDFs with groff and mom, covers full mom
43 or PDF usage.
44
46 om.tmac
47 – the main macro file
48 mom.tmac
49 – a wrapper file that calls om.tmac directly.
50
51 /usr/share/doc/groff/html/mom/toc.html
52 – entry point to the HTML documentation
53
54 /usr/share/doc/groff/pdf/mom-pdf.pdf
55 – the PDF manual, Producing PDFs with groff and mom
56
57 /usr/share/doc/groff/examples/mom/*.mom
58 – example files using mom
59
61 This part of the man-page contains information just as in groff(7), mom
62 macros and mom escape sequences in alphabetical order.
63
64 The logical order of mom macros and mom escape sequences is very well
65 documented in
66
67 /usr/share/doc/groff/html/mom/toc.html
68 – entry point to the HTML documentation
69
70 That document is quite good for beginners, but other users should be
71 happy to have some documentation in reference style.
72
73 So we restrict this part to the alphabetical order of macros and escape
74 sequences. But, so far, we took all documentation details from the
75 toc.html file, just in a more useful alphabetical order. So this part
76 of the man-page is nothing new, but only a logical arrangement.
77
79 Quick Reference of Inline Escape Sequences in alphabetical Order
80 \*[<colorname>]
81 begin using an initialized colour inline
82
83 \*[BCK n]
84 move backwards in a line
85
86 \*[BOLDER]
87 invoke pseudo bold inline (related to macro .SETBOLDER)
88
89 \*[BOLDERX]
90 off pseudo bold inline (related to macro .SETBOLDER)
91
92 \*[BU n]
93 move characters pairs closer together inline (related to macro
94 .KERN)
95
96 \*[COND]
97 invoke pseudo condensing inline (related to macro .CONDENSE)
98
99 \*[CONDX]
100 off pseudo condensing inline (related to macro .CONDENSE)
101
102 \*[CONDSUP]...\*[CONDSUPX]
103 pseudo-condensed superscript
104
105 \*[DOWN n]
106 temporarily move downwards in a line
107
108 \*[EN-MARK]
109 mark initial line of a range of line numbers (for use with line
110 numbered endnotes)
111
112 \*[EXT]
113 invoke pseudo extending inline (related to macro .EXTEND)
114
115 \*[EXTX]
116 off pseudo condensing inline (related to macro .EXTEND)
117
118 \*[EXTSUP]...\*[EXTSUPX]
119 pseudo extended superscript
120
121 \*[FU n]
122 move characters pairs further apart inline (related to macro
123 .KERN)
124
125 \*[FWD n]
126 move forward in a line
127
128 \*[LEADER]
129 insert leaders at the end of a line
130
131 \*[RULE]
132 draw a full measure rule
133
134 \*[SIZE n]
135 change the point size inline (related to macro .PT_SIZE)
136
137 \*[SLANT]
138 invoke pseudo italic inline (related to macro .SETSLANT)
139
140 \*[SLANTX]
141 off pseudo italic inline (related to macro .SETSLANT)
142
143 \*[ST<n>]...\*[ST<n>X]
144 string tabs (mark tab positions inline)
145
146 \*[SUP]...\*[SUPX]
147 superscript
148
149 \*[TB+]
150 inline escape for .TN (Tab Next)
151
152 \*[UL]...\*[ULX]
153 invoke underlining inline (fixed width fonts only)
154
155 \*[UP n]
156 temporarily move upwards in a line
157
158 Quick Reference of Macros in alphabetical Order
159 .AUTOLEAD
160 set the linespacing relative to the point size
161
162 .B_MARGIN
163 set a bottom margin
164
165 .BR break a justified line
166
167 .CENTER
168 set line-by-line quad centre
169
170 .CONDENSE
171 set the amount to pseudo condense
172
173 .EL break a line without advancing on the page
174
175 .EXTEND
176 set the amount to pseudo extend
177
178 .FALLBACK_FONT
179 establish a fallback font (for missing fonts)
180
181 .FAM alias to .FAMILY
182
183 .FAMILY <family>
184 set the family type
185
186 .FT set the font style (roman, italic, etc.)
187
188 .HI [ <measure> ]
189 hanging indent
190
191 .HY automatic hyphenation on/off
192
193 .HY_SET
194 set automatic hyphenation parameters
195
196 .IB [ <left measure> <right measure> ]
197 indent both
198
199 .IBX [ CLEAR ]
200 exit indent both
201
202 .IL [ <measure> ]
203 indent left
204
205 .ILX [ CLEAR ]
206 exit indent left
207
208 .IQ [ CLEAR ]
209 quit any/all indents
210
211 .IR [ <measure> ]
212 indent right
213
214 .IRX [ CLEAR ]
215 exit indent right
216
217 .JUSTIFY
218 justify text to both margins
219
220 .KERN automatic character pair kerning on/off
221
222 .L_MARGIN
223 set a left margin (page offset)
224
225 .LEFT set line-by-line quad left
226
227 .LL set a line length
228
229 .LS set a linespacing (leading)
230
231 .PAGE set explicit page dimensions and margins
232
233 .PAGEWIDTH
234 set a custom page width
235
236 .PAGELENGTH
237 set a custom page length
238
239 .PAPER <paper_type>
240 set common paper sizes (letter, A4, etc)
241
242 .PT_SIZE
243 set the point size
244
245 .QUAD "justify" text left, centre, or right
246
247 .R_MARGIN
248 set a right margin
249
250 .RIGHT set line-by-line quad right
251
252 .SETBOLDER
253 set the amount of emboldening
254
255 .SETSLANT
256 set the degree of slant
257
258 .SPREAD
259 force justify a line
260
261 .SS set the sentence space size
262
263 .T_MARGIN
264 set a top margin
265
266 .TI [ <measure> ]
267 temporary left indent
268
269 .WS set the minimum word space size
270
272 Details of Inline Escape Sequences in alphabetical Order
273 \*[<colorname>]
274 begin using an initialized colour inline
275
276 \*[BCK n]
277 move wards in a line
278
279 \*[BOLDER]
280 \*[BOLDERX]
281 Emboldening on/off
282
283 \*[BOLDER] begins emboldening type. \*[BOLDERX] turns the fea‐
284 ture off. Both are inline escapes, therefore they should not
285 appear as separate lines, but rather be embedded in text lines,
286 like this:
287 Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
288
289 Alternatively, if you wanted the whole line emboldened, you
290 should do
291 \*[BOLDER]Not everything is as it seems.\*[BOLDERX]
292 Once \*[BOLDER] is invoked, it remains in effect until turned
293 off.
294
295 Note: If you're using the document processing macros with
296 .PRINTSTYLE TYPEWRITE, mom ignores \*[BOLDER] requests.
297
298 \*[BU n]
299 move characters pairs closer together inline (related to macro
300 .KERN)
301
302 \*[COND]
303 \*[CONDX]
304 Pseudo-condensing on/off
305
306 \*[COND] begins pseudo-condensing type. \*[CONDX] turns the
307 feature off. Both are inline escapes, therefore they should not
308 appear as separate lines, but rather be embedded in text lines,
309 like this:
310 \*[COND]Not everything is as it seems.\*[CONDX]
311 \*[COND] remains in effect until you turn it off with \*[CONDX].
312
313 IMPORTANT: You must turn \*[COND] off before making any changes
314 to the point size of your type, either via the .PT_SIZE macro or
315 with the \s inline escape. If you wish the new point size to be
316 pseudo-condensed, simply reinvoke \*[COND] afterwards. Equally,
317 \*[COND] must be turned off before changing the condense per‐
318 centage with .CONDENSE.
319
320 Note: If you're using the document processing macros with
321 .PRINTSTYLE TYPEWRITE, mom ignores \*[COND] requests.
322
323 \*[CONDSUP]...\*[CONDSUPX]
324 pseudo-condensed superscript
325
326 \*[DOWN n]
327 temporarily move downwards in a line
328
329 \*[EN-MARK]
330 mark initial line of a range of line numbers (for use with line
331 numbered endnotes)
332
333 \*[EXT]
334 \*[EXTX]
335 Pseudo-extending on/off
336
337 \*[EXT] begins pseudo-extending type. \*[EXTX] turns the fea‐
338 ture off. Both are inline escapes, therefore they should not
339 appear as separate lines, but rather be embedded in text lines,
340 like this:
341 \*[EXT]Not everything is as it seems.\*[EXTX]
342 \*[EXT] remains in effect until you turn it off with \*[EXTX].
343
344 IMPORTANT: You must turn \*[EXT] off before making any changes
345 to the point size of your type, either via the .PT_SIZE macro or
346 with the \s inline escape. If you wish the new point size to be
347 pseudo-extended, simply reinvoke \*[EXT] afterwards. Equally,
348 \*[EXT] must be turned off before changing the extend percentage
349 with .EXTEND.
350
351 Note: If you are using the document processing macros with
352 .PRINTSTYLE TYPEWRITE, mom ignores \*[EXT] requests.
353
354 \*[EXTSUP]...\*[EXTSUPX]
355 pseudo extended superscript
356
357 \*[FU n]
358 move characters pairs further apart inline (related to macro
359 .KERN)
360
361 \*[FWD n]
362 move forward in a line
363
364 \*[LEADER]
365 insert leaders at the end of a line
366
367 \*[RULE]
368 draw a full measure rule
369
370 \*[SIZE n]
371 change the point size inline (related to macro .PT_SIZE)
372
373 \*[SLANT]
374 \*[SLANTX]
375 Pseudo italic on/off
376
377 \*[SLANT] begins pseudo-italicizing type. \*[SLANTX] turns the
378 feature off. Both are inline escapes, therefore they should not
379 appear as separate lines, but rather be embedded in text lines,
380 like this:
381 Not \*[SLANT]everything\*[SLANTX] is as it seems.
382
383 Alternatively, if you wanted the whole line pseudo-italicized,
384 you'd do
385 \*[SLANT]Not everything is as it seems.\*[SLANTX]
386
387 Once \*[SLANT] is invoked, it remains in effect until turned
388 off.
389
390 Note: If you're using the document processing macros with
391 .PRINTSTYLE TYPEWRITE, mom underlines pseudo-italics by default.
392 To change this behaviour, use the special macro
393 .SLANT_MEANS_SLANT.
394
395 \*[ST<number>]...\*[ST<number>X]
396 Mark positions of string tabs
397
398 The quad direction must be LEFT or JUSTIFY (see .QUAD and
399 .JUSTIFY) or the no-fill mode set to LEFT in order for these in‐
400 lines to function properly. Please see IMPORTANT, below.
401
402 String tabs need to be marked off with inline escapes before be‐
403 ing set up with the .ST macro. Any input line may contain
404 string tab markers. <number>, above, means the numeric identi‐
405 fier of the tab.
406
407 The following shows a sample input line with string tab markers.
408 \*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
409
410 String tab 1 begins at the start of the line and ends after the
411 word time. String tab 2 starts at good and ends after men.
412 Inline escapes (e.g. font or point size changes, or horizontal
413 movements, including padding) are taken into account when mom
414 determines the position and length of string tabs.
415
416 Up to nineteen string tabs may be marked (not necessarily all on
417 the same line, of course), and they must be numbered between 1
418 and 19.
419
420 Once string tabs have been marked in input lines, they have to
421 be set with .ST, after which they may be called, by number, with
422 .TAB.
423
424 Note: Lines with string tabs marked off in them are normal input
425 lines, i.e. they get printed, just like any input line. If you
426 want to set up string tabs without the line printing, use the
427 .SILENT macro.
428
429 IMPORTANT: Owing to the way groff processes input lines and
430 turns them into output lines, it is not possible for mom to
431 guess the correct starting position of string tabs marked off in
432 lines that are centered or set flush right.
433
434 Equally, she cannot guess the starting position if a line is
435 fully justified and broken with .SPREAD.
436
437 In other words, in order to use string tabs, LEFT must be
438 active, or, if .QUAD LEFT or JUSTIFY are active, the line on
439 which the string tabs are marked must be broken manually with
440 .BR (but not .SPREAD).
441
442 To circumvent this behaviour, I recommend using the PAD to set
443 up string tabs in centered or flush right lines. Say, for exam‐
444 ple, you want to use a string tab to underscore the text of a
445 centered line with a rule. Rather than this,
446 .CENTER
447 \*[ST1]A line of text\*[ST1X]\c
448 .EL
449 .ST 1
450 .TAB 1
451 .PT_SIZE 24
452 .ALD 3p
453 \*[RULE]
454 .RLD 3p
455 .TQ
456 you should do:
457 .QUAD CENTER
458 .PAD "#\*[ST1]A line of text\*[ST1X]#"
459 .EL
460 .ST 1
461 .TAB 1
462 .PT_SIZE 24
463 .ALD 3p
464 \*[RULE] \" Note that you can't use \*[UP] or \*[DOWN] with \*[RULE]
465 .RLD 3p
466 .TQ
467
468 \*[SUP]...\*[SUPX]
469 superscript
470
471 \*[TB+]
472 Inline escape for .TN (Tab Next)
473
474 \*[UL]...\*[ULX]
475 invoke underlining inline (fixed width fonts only)
476
477 \*[UP n]
478 temporarily move upwards in a line
479
480 Details of Macros in alphabetical Order
481 .AUTOLEAD
482 set the linespacing relative to the point size
483
484 .B_MARGIN <bottom margin>
485 Bottom Margin
486
487 Requires a unit of measure
488
489 .B_MARGIN sets a nominal position at the bottom of the page be‐
490 yond which you don't want your type to go. When the bottom mar‐
491 gin is reached, mom starts a new page. .B_MARGIN requires a
492 unit of measure. Decimal fractions are allowed. To set a nomi‐
493 nal bottom margin of 3/4 inch, enter
494 .B_MARGIN .75i
495
496 Obviously, if you haven't spaced the type on your pages so that
497 the last lines fall perfectly at the bottom margin, the margin
498 will vary from page to page. Usually, but not always, the last
499 line of type that fits on a page before the bottom margin causes
500 mom to start a new page.
501
502 Occasionally, owing to a peculiarity in groff, an extra line
503 will fall below the nominal bottom margin. If you're using the
504 document processing macros, this is unlikely to happen; the doc‐
505 ument processing macros are very hard-nosed about aligning bot‐
506 tom margins.
507
508 Note: The meaning of .B_MARGIN is slightly different when you're
509 using the document processing macros.
510
511 .FALLBACK_FONT <fallback font> [ ABORT | WARN ]
512 Fallback Font
513
514 In the event that you pass an invalid argument to .FAMILY (i.e.
515 a non-existent family), mom, by default, uses the fallback font,
516 Courier Medium Roman (CR), in order to continue processing your
517 file.
518
519 If you'd prefer another fallback font, pass .FALLBACK_FONT the
520 full family+font name of the font you'd like. For example, if
521 you'd rather the fallback font were Times Roman Medium Roman,
522 .FALLBACK_FONT TR
523 would do the trick.
524
525 Mom issues a warning whenever a font style set with .FT does not
526 exist, either because you haven't registered the style or
527 because the font style does not exist in the current family set
528 with .FAMILY. By default, mom then aborts, which allows you to
529 correct the problem.
530
531 If you'd prefer that mom not abort on non-existent fonts, but
532 rather continue processing using a fallback font, you can pass
533 .FALLBACK_FONT the argument WARN, either by itself, or in con‐
534 junction with your chosen fallback font.
535
536 Some examples of invoking .FALLBACK_FONT:
537
538 .FALLBACK_FONT WARN
539 mom will issue a warning whenever you try to access a
540 non-existent font but will continue processing your file
541 with the default fallback font, Courier Medium Roman.
542
543 .FALLBACK_FONT TR WARN
544 mom will issue a warning whenever you try to access a
545 non-existent font but will continue processing your file
546 with a fallback font of Times Roman Medium Roman; addi‐
547 tionally, TR will be the fallback font whenever you try
548 to access a family that does not exist.
549
550 .FALLBACK_FONT TR ABORT
551 mom will abort whenever you try to access a non-existent
552 font, and will use the fallback font TR whenever you try
553 to access a family that does not exist. If, for some
554 reason, you want to revert to ABORT, just enter
555 ".FALLBACK_FONT ABORT" and mom will once again abort on
556 font errors.
557
558 .FAM <family>
559 Type Family, alias of .FAMILY
560
561 .FAMILY <family>
562 Type Family, alias .FAM
563
564 .FAMILY takes one argument: the name of the family you want.
565 Groff comes with a small set of basic families, each identified
566 by a 1-, 2- or 3-letter mnemonic. The standard families are:
567 A = Avant Garde
568 BM = Bookman
569 H = Helvetica
570 HN = Helvetica Narrow
571 N = New Century Schoolbook
572 P = Palatino
573 T = Times Roman
574 ZCM = Zapf Chancery
575
576 The argument you pass to .FAMILY is the identifier at left,
577 above. For example, if you want Helvetica, enter
578 .FAMILY H
579
580 Note: The font macro (.FT) lets you specify both the type family
581 and the desired font with a single macro. While this saves a
582 few keystrokes, I recommend using .FAMILY for family, and .FT
583 for font, except where doing so is genuinely inconvenient. ZCM,
584 for example, only exists in one style: Italic (I).
585
586 Therefore,
587 .FT ZCMI
588 makes more sense than setting the family to ZCM, then setting
589 the font to I.
590
591 Additional note: If you are running a version of groff lower
592 than 1.19.2, you must follow all .FAMILY requests with a FT
593 request, otherwise mom will set all type up to the next .FT
594 request in the fallback font.
595
596 If you are running a version of groff greater than or equal to
597 1.19.2, when you invoke the .FAMILY macro, mom remembers the
598 font style (Roman, Italic, etc) currently in use (if the font
599 style exists in the new family) and will continue to use the
600 same font style in the new family. For example:
601 .FAMILY BM \" Bookman family
602 .FT I \" Medium Italic
603 <some text> \" Bookman Medium Italic
604 .FAMILY H \" Helvetica family
605 <more text> \" Helvetica Medium Italic
606
607 However, if the font style does not exist in the new family, mom
608 will set all subsequent type in the fallback font (by default,
609 Courier Medium Roman) until she encounters a .FT request that's
610 valid for the family.
611
612 For example, assuming you don't have the font Medium Condensed
613 Roman (mom extension CD) in the Helvetica family:
614 .FAMILY UN \" Univers family
615 .FT CD \" Medium Condensed
616 <some text> \" Univers Medium Condensed
617 .FAMILY H \" Helvetica family
618 <more text> \" Courier Medium Roman!
619
620 In the above example, you must follow .FAMILY H with a .FT
621 request that's valid for Helvetica.
622
623 Please see the Appendices, Adding fonts to groff, for informa‐
624 tion on adding fonts and families to groff, as well as to see a
625 list of the extensions mom provides to groff's basic R, I, B, BI
626 styles.
627
628 Suggestion: When adding families to groff, I recommend following
629 the established standard for the naming families and fonts. For
630 example, if you add the Garamond family, name the font files
631 GARAMONDR
632 GARAMONDI
633 GARAMONDB
634 GARAMONDBI
635 GARAMOND then becomes a valid family name you can pass to .FAM‐
636 ILY. (You could, of course, shorten GARAMOND to just G, or GD.)
637 R, I, B, and BI after GARAMOND are the roman, italic, bold and
638 bold-italic fonts respectively.
639
640 .FONT R | B | BI | <any other valid font style>
641 Alias to .FT
642
643 .FT R | B | BI | <any other valid font style>
644 Set font
645
646 By default, groff permits .FT to take one of four possible argu‐
647 ments specifying the desired font:
648 R = (Medium) Roman
649 I = (Medium) Italic
650 B = Bold (Roman)
651 BI = Bold Italic
652
653 For example, if your family is Helvetica, entering
654 .FT B
655 will give you the Helvetica bold font. If your family were
656 Palatino, you'd get the Palatino bold font.
657
658 Mom considerably extends the range of arguments you can pass to
659 .FT, making it more convenient to add and access fonts of dif‐
660 fering weights and shapes within the same family.
661
662 Have a look here for a list of the weight/style arguments mom
663 allows. Be aware, though, that you must have the fonts, cor‐
664 rectly installed and named, in order to use the arguments. (See
665 Adding fonts to groff for instructions and information.) Please
666 also read the ADDITIONAL NOTE found in the description of the
667 .FAMILY macro.
668
669 How mom reacts to an invalid argument to .FT depends on which
670 version of groff you're using. If your groff version is greater
671 than or equal to 1.19.2, mom will issue a warning and, depending
672 on how you've set up the fallback font, either continue process‐
673 ing using the fallback font, or abort (allowing you to correct
674 the problem). If your groff version is less than 1.19.2, mom
675 will silently continue processing, using either the fallback
676 font or the font that was in effect prior to the invalid .FT
677 call.
678
679 .FT will also accept, as an argument, a full family and font
680 name.
681
682 For example,
683 .FT HB
684 will set subsequent type in Helvetica Bold.
685
686 However, I strongly recommend keeping family and font separate
687 except where doing so is genuinely inconvenient.
688
689 For inline control of fonts, see Inline Escapes, font control.
690
691 .HI [ <measure> ]
692 Hanging indent — the optional argument requires a unit of mea‐
693 sure.
694
695 A hanging indent looks like this:
696 The thousand injuries of Fortunato I had borne as best I
697 could, but when he ventured upon insult, I vowed
698 revenge. You who so well know the nature of my soul
699 will not suppose, however, that I gave utterance to a
700 threat, at length I would be avenged...
701 The first line of text hangs outside the left margin.
702
703 In order to use hanging indents, you must first have a left
704 indent active (set with either .IL or .IB). Mom will not hang
705 text outside the left margin set with .L_MARGIN or outside the
706 left margin of a tab.
707
708 The first time you invoke .HI, you must give it a measure. If
709 you want the first line of a paragraph to hang by, say, 1 pica,
710 do
711 .IL 1P
712 .HI 1P
713 Subsequent invocations of .HI do not require you to supply a
714 measure; mom keeps track of the last measure you gave it.
715
716 Generally speaking, you should invoke .HI immediately prior to
717 the line you want hung (i.e. without any intervening control
718 lines). And because hanging indents affect only one line,
719 there's no need to turn them off.
720
721 IMPORTANT: Unlike IL, IR and IB, measures given to .HI are NOT
722 additive. Each time you pass a measure to .HI , the measure is
723 treated literally. Recipe: A numbered list using hanging
724 indents
725
726 Note: mom has macros for setting lists. This recipe exists to
727 demonstrate the use of hanging indents only.
728 .PAGE 8.5i 11i 1i 1i 1i 1i
729 .FAMILY T
730 .FT R
731 .PT_SIZE 12
732 .LS 14
733 .JUSTIFY
734 .KERN
735 .SS 0
736 .IL \w'\0\0.'
737 .HI \w'\0\0.'
738 1.\0The most important point to be considered is whether the
739 answer to the meaning of Life, the Universe, and Everything
740 really is 42. We have no-one's word on the subject except
741 Mr. Adams'.
742 .HI
743 2.\0If the answer to the meaning of Life, the Universe,
744 and Everything is indeed 42, what impact does this have on
745 the politics of representation? 42 is, after all not a
746 prime number. Are we to infer that prime numbers don't
747 deserve equal rights and equal access in the universe?
748 .HI
749 3.\0If 42 is deemed non-exclusionary, how do we present it
750 as the answer and, at the same time, forestall debate on its
751 exclusionary implications?
752
753 First, we invoke a left indent with a measure equal to the width
754 of 2 figures spaces plus a period (using the \w inline escape).
755 At this point, the left indent is active; text afterwards would
756 normally be indented. However, we invoke a hanging indent of
757 exactly the same width, which hangs the first line (and first
758 line only!) to the left of the indent by the same distance (in
759 this case, that means “out to the left margin”). Because we
760 begin the first line with a number, a period, and a figure
761 space, the actual text (The most important point...) starts at
762 exactly the same spot as the indented lines that follow.
763
764 Notice that subsequent invocations of .HI don't require a mea‐
765 sure to be given.
766
767 Paste the example above into a file and preview it with
768 pdfmom filename.mom | ps2pdf - filename.pdf
769 to see hanging indents in action.
770
771 .IB [ <left measure> <right measure> ]
772 Indent both — the optional argument requires a unit of measure
773
774 .IB allows you to set or invoke a left and a right indent at the
775 same time.
776
777 At its first invocation, you must supply a measure for both
778 indents; at subsequent invocations when you wish to supply a
779 measure, both must be given again. As with .IL and .IR, the
780 measures are added to the values previously passed to the macro.
781 Hence, if you wish to change just one of the values, you must
782 give an argument of zero to the other.
783
784 A word of advice: If you need to manipulate left and right
785 indents separately, use a combination of .IL and .IR instead of
786 .IB. You'll save yourself a lot of grief.
787
788 A minus sign may be prepended to the arguments to subtract from
789 their current values. The \w inline escape may be used to spec‐
790 ify text-dependent measures, in which case no unit of measure is
791 required. For example,
792 .IB \w'margarine' \w'jello'
793 left indents text by the width of the word margarine and right
794 indents by the width of jello.
795
796 Like .IL and .IR, .IB with no argument indents by its last
797 active values. See the brief explanation of how mom handles
798 indents for more details.
799
800 Note: Calling a tab (with .TAB <n>) automatically cancels any
801 active indents.
802
803 Additional note: Invoking .IB automatically turns off .IL and
804 .IR.
805
806 .IL [ <measure> ]
807 Indent left — the optional argument requires a unit of measure
808
809 .IL indents text from the left margin of the page, or if you're
810 in a tab, from the left edge of the tab Once IL is on, the left
811 indent is applied uniformly to every subsequent line of text,
812 even if you change the line length.
813
814 The first time you invoke .IL, you must give it a measure. Sub‐
815 sequent invocations with a measure add to the previous measure.
816 A minus sign may be prepended to the argument to subtract from
817 the current measure. The \w inline escape may be used to spec‐
818 ify a text-dependent measure, in which case no unit of measure
819 is required. For example,
820 .IL \w'margarine'
821 indents text by the width of the word margarine.
822
823 With no argument, .IL indents by its last active value. See the
824 brief explanation of how mom handles indents for more details.
825
826 Note: Calling a tab (with .TAB <n>) automatically cancels any
827 active indents.
828
829 Additional note: Invoking .IL automatically turns off IB.
830
831 .IQ [ <measure> ]
832 IQ — quit any/all indents
833
834 IMPORTANT NOTE: The original macro for quitting all indents was
835 .IX. This usage has been deprecated in favour of IQ. .IX will
836 continue to behave as before, but mom will issue a warning to
837 stderr indicating that you should update your documents.
838
839 As a consequence of this change, .ILX, .IRX and .IBX may now
840 also be invoked as .ILQ, .IRQ and .IBQ. Both forms are accept‐
841 able.
842
843 Without an argument, the macros to quit indents merely restore
844 your original margins and line length. The measures stored in
845 the indent macros themselves are saved so you can call them
846 again without having to supply a measure.
847
848 If you pass these macros the optional argument CLEAR, they not
849 only restore your original left margin and line length, but also
850 clear any values associated with a particular indent style. The
851 next time you need an indent of the same style, you have to sup‐
852 ply a measure again.
853
854 .IQ CLEAR, as you'd suspect, quits and clears the values for all
855 indent styles at once.
856
857 .IR [ <measure> ]
858 Indent right — the optional argument requires a unit of measure
859
860 .IR indents text from the right margin of the page, or if you're
861 in a tab, from the end of the tab.
862
863 The first time you invoke .IR, you must give it a measure. Sub‐
864 sequent invocations with a measure add to the previous indent
865 measure. A minus sign may be prepended to the argument to sub‐
866 tract from the current indent measure. The \w inline escape may
867 be used to specify a text-dependent measure, in which case no
868 unit of measure is required. For example,
869 .IR \w'jello'
870 indents text by the width of the word jello.
871
872 With no argument, .IR indents by its last active value. See the
873 brief explanation of how mom handles indents for more details.
874
875 Note: Calling a tab (with .TAB <n>) automatically cancels any
876 active indents.
877
878 Additional note: Invoking .IR automatically turns off IB.
879
880 .L_MARGIN <left margin>
881 Left Margin
882
883 L_MARGIN establishes the distance from the left edge of the
884 printer sheet at which you want your type to start. It may be
885 used any time, and remains in effect until you enter a new
886 value.
887
888 Left indents and tabs are calculated from the value you pass to
889 .L_MARGIN, hence it's always a good idea to invoke it before
890 starting any serious typesetting. A unit of measure is
891 required. Decimal fractions are allowed. Therefore, to set the
892 left margin at 3 picas (1/2 inch), you'd enter either
893 .L_MARGIN 3P
894 or
895 .L_MARGIN .5i
896
897 If you use the macros .PAGE, .PAGEWIDTH or .PAPER without invok‐
898 ing .L_MARGIN (either before or afterwards), mom automatically
899 sets .L_MARGIN to 1 inch.
900
901 Note: .L_MARGIN behaves in a special way when you're using the
902 document processing macros.
903
904 .MCO Begin multi-column setting.
905
906 .MCO (Multi-Column On) is the macro you use to begin multi-col‐
907 umn setting. It marks the current baseline as the top of your
908 columns, for use later with .MCR. See the introduction to col‐
909 umns for an explanation of multi-columns and some sample input.
910
911 Note: Do not confuse .MCO with the .COLUMNS macro in the docu‐
912 ment processing macros.
913
914 .MCR Once you've turned multi-columns on (with .MCO), .MCR, at any
915 time, returns you to the top of your columns.
916
917 .MCX [ <distance to advance below longest column> ]
918 Optional argument requires a unit of measure.
919
920 .MCX takes you out of any tab you were in (by silently invoking
921 .TQ) and advances to the bottom of the longest column.
922
923 Without an argument, .MCX advances 1 linespace below the longest
924 column.
925
926 Linespace, in this instance, is the leading in effect at the
927 moment .MCX is invoked.
928
929 If you pass the <distance> argument to .MCX, it advances 1 line‐
930 space below the longest column (see above) PLUS the distance
931 specified by the argument. The argument requires a unit of mea‐
932 sure; therefore, to advance an extra 6 points below where .MCX
933 would normally place you, you'd enter
934 .MCX 6p
935
936 Note: If you wish to advance a precise distance below the base‐
937 line of the longest column, use .MCX with an argument of 0
938 (zero; no unit of measure required) in conjunction with the .ALD
939 macro, like this:
940 .MCX 0
941 .ALD 24p
942 The above advances to precisely 24 points below the baseline of
943 the longest column.
944
945 .NEWPAGE
946
947 Whenever you want to start a new page, use .NEWPAGE, by itself
948 with no argument. Mom will finish up processing the current
949 page and move you to the top of a new one (subject to the top
950 margin set with .T_MARGIN).
951
952 .PAGE <width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ]
953
954 All arguments require a unit of measure
955
956 IMPORTANT: If you're using the document processing macros, .PAGE
957 must come after .START. Otherwise, it should go at the top of a
958 document, prior to any text. And remember, when you're using
959 the document processing macros, top margin and bottom margin
960 mean something slightly different than when you're using just
961 the typesetting macros (see Top and bottom margins in document
962 processing).
963
964 .PAGE lets you establish paper dimensions and page margins with
965 a single macro. The only required argument is page width. The
966 rest are optional, but they must appear in order and you can't
967 skip over any. <lm>, <rm>, <tm> and <bm> refer to the left,
968 right, top and bottom margins respectively.
969
970 Assuming your page dimensions are 11 inches by 17 inches, and
971 that's all you want to set, enter
972 .PAGE 11i 17i
973 If you want to set the left margin as well, say, at 1 inch, PAGE
974 would look like this:
975 .PAGE 11i 17i 1i
976
977 Now suppose you also want to set the top margin, say, at 1–1/2
978 inches. <tm> comes after <rm> in the optional arguments, but
979 you can't skip over any arguments, therefore to set the top mar‐
980 gin, you must also give a right margin. The .PAGE macro would
981 look like this:
982 .PAGE 11i 17i 1i 1i 1.5i
983 | |
984 required right---+ +---top margin
985 margin
986
987 Clearly, .PAGE is best used when you want a convenient way to
988 tell mom just the dimensions of your printer sheet (width and
989 length), or when you want to tell her everything about the page
990 (dimensions and all the margins), for example
991 .PAGE 8.5i 11i 45p 45p 45p 45p
992 This sets up an 8½ by 11 inch page with margins of 45 points
993 (5/8-inch) all around.
994
995 Additionally, if you invoke .PAGE with a top margin argument,
996 any macros you invoke after .PAGE will almost certainly move the
997 baseline of the first line of text down by one linespace. To
998 compensate, do
999 .RLD 1v
1000 immediately before entering any text, or, if it's feasible, make
1001 .PAGE the last macro you invoke prior to entering text.
1002
1003 Please read the Important note on page dimensions and papersize
1004 for information on ensuring groff respects your .PAGE dimensions
1005 and margins.
1006
1007 .PAGELENGTH <length of printer sheet>
1008 tells mom how long your printer sheet is. It works just like
1009 .PAGEWIDTH.
1010
1011 Therefore, to tell mom your printer sheet is 11 inches long, you
1012 enter
1013 .PAGELENGTH 11i
1014 Please read the important note on page dimensions and papersize
1015 for information on ensuring groff respects your PAGELENGTH.
1016
1017 .PAGEWIDTH <width of printer sheet>
1018
1019 The argument to .PAGEWIDTH is the width of your printer sheet.
1020
1021 .PAGEWIDTH requires a unit of measure. Decimal fractions are
1022 allowed. Hence, to tell mom that the width of your printer
1023 sheet is 8½ inches, you enter
1024 .PAGEWIDTH 8.5i
1025
1026 Please read the Important note on page dimensions and papersize
1027 for information on ensuring groff respects your PAGEWIDTH.
1028
1029 .PAPER <paper type>
1030 provides a convenient way to set the page dimensions for some
1031 common printer sheet sizes. The argument <paper type> can be
1032 one of: LETTER, LEGAL, STATEMENT, TABLOID, LEDGER, FOLIO,
1033 QUARTO, EXECUTIVE, 10x14, A3, A4, A5, B4, B5.
1034
1035 .PRINTSTYLE
1036
1037 .PT_SIZE <size of type in points>
1038 Point size of type, does not require a unit of measure.
1039
1040 .PT_SIZE (Point Size) takes one argument: the size of type in
1041 points. Unlike most other macros that establish the size or
1042 measure of something, .PT_SIZE does not require that you supply
1043 a unit of measure since it's a near universal convention that
1044 type size is measured in points. Therefore, to change the type
1045 size to, say, 11 points, enter
1046 .PT_SIZE 11
1047 Point sizes may be fractional (e.g. 10.25 or 12.5).
1048
1049 You can prepend a plus or a minus sign to the argument to
1050 .PT_SIZE, in which case the point size will be changed by + or -
1051 the original value. For example, if the point size is 12 , and
1052 you want 14 , you can do
1053 .PT_SIZE +2
1054 then later reset it to 12 with
1055 .PT_SIZE -2
1056 The size of type can also be changed inline.
1057
1058 Note: It is unfortunate that the pic preprocessor has already
1059 taken the name, PS, and thus mom's macro for setting point sizes
1060 can't use it. However, if you aren't using pic, you might want
1061 to alias .PT_SIZE as .PS, since there'd be no conflict. For
1062 example
1063 .ALIAS PS PT_SIZE
1064 would allow you to set point sizes with .PS.
1065
1066 .R_MARGIN <right margin>
1067 Right Margin
1068
1069 Requires a unit of measure.
1070
1071 IMPORTANT: .R_MARGIN, if used, must come after .PAPER,
1072 .PAGEWIDTH, .L_MARGIN, and/or .PAGE (if a right margin isn't
1073 given to PAGE). The reason is that .R_MARGIN calculates line
1074 length from the overall page dimensions and the left margin.
1075
1076 Obviously, it can't make the calculation if it doesn't know the
1077 page width and the left margin.
1078
1079 .R_MARGIN establishes the amount of space you want between the
1080 end of typeset lines and the right hand edge of the printer
1081 sheet. In other words, it sets the line length. .R_MARGIN
1082 requires a unit of measure. Decimal fractions are allowed.
1083
1084 The line length macro (LL) can be used in place of .R_MARGIN.
1085 In either case, the last one invoked sets the line length. The
1086 choice of which to use is up to you. In some instances, you may
1087 find it easier to think of a section of type as having a right
1088 margin. In others, giving a line length may make more sense.
1089
1090 For example, if you're setting a page of type you know should
1091 have 6-pica margins left and right, it makes sense to enter a
1092 left and right margin, like this:
1093 .L_MARGIN 6P
1094 .R_MARGIN 6P
1095
1096 That way, you don't have to worry about calculating the line
1097 length. On the other hand, if you know the line length for a
1098 patch of type should be 17 picas and 3 points, entering the line
1099 length with LL is much easier than calculating the right margin,
1100 e.g.
1101 .LL 17P+3p
1102
1103 If you use the macros .PAGE, .PAGEWIDTH or PAPER without invok‐
1104 ing .R_MARGIN afterwards, mom automatically sets .R_MARGIN to 1
1105 inch. If you set a line length after these macros (with .LL),
1106 the line length calculated by .R_MARGIN is, of course, overrid‐
1107 den.
1108
1109 Note: .R_MARGIN behaves in a special way when you're using the
1110 document processing macros.
1111
1112 .ST <tab number> L | R | C | J [ QUAD ]
1113
1114 After string tabs have been marked off on an input line (see
1115 \*[ST]...\*[STX]), you need to set them by giving them a direc‐
1116 tion and, optionally, the QUAD argument.
1117
1118 In this respect, .ST is like .TAB_SET except that you don't have
1119 to give .ST an indent or a line length (that's already taken
1120 care of, inline, by \*[ST]...\*[STX]).
1121
1122 If you want string tab 1 to be left, enter
1123 .ST 1 L
1124 If you want it to be left and filled, enter
1125 .ST 1 L QUAD
1126 If you want it to be justified, enter
1127 .ST 1 J
1128
1129 .TAB <tab number>
1130 After tabs have been defined (either with .TAB_SET or .ST), .TAB
1131 moves to whatever tab number you pass it as an argument.
1132
1133 For example,
1134 .TAB 3
1135 moves you to tab 3.
1136
1137 Note: .TAB breaks the line preceding it and advances 1 line‐
1138 space. Hence,
1139 .TAB 1
1140 A line of text in tab 1.
1141 .TAB 2
1142 A line of text in tab 2.
1143 produces, on output
1144 A line of text in tab 1.
1145 A line of text in tab 2.
1146
1147 If you want the tabs to line up, use .TN (Tab Next) or, more
1148 conveniently, the inline escape \*[TB+]:
1149 .TAB 1
1150 A line of text in tab 1.\*[TB+]
1151 A line of text in tab 2.
1152 which produces
1153 A line of text in tab 1. A line of text in tab 2.
1154
1155 If the text in your tabs runs to several lines, and you want the
1156 first lines of each tab to align, you must use the multi-column
1157 macros.
1158
1159 Additional note: Any indents in effect prior to calling a tab
1160 are automatically turned off by TAB. If you were happily zip‐
1161 ping down the page with a left indent of 2 picas turned on, and
1162 you call a tab whose indent from the left margin is 6 picas,
1163 your new distance from the left margin will be 6 picas, not I 6
1164 picas plus the 2 pica indent.
1165
1166 Tabs are not by nature columnar, which is to say that if the
1167 text inside a tab runs to several lines, calling another tab
1168 does not automatically move to the baseline of the first line in
1169 the previous tab. To demonstrate:
1170 TAB 1
1171 Carrots
1172 Potatoes
1173 Broccoli
1174 .TAB 2
1175 $1.99/5 lbs
1176 $0.25/lb
1177 $0.99/bunch
1178 produces, on output
1179 Carrots
1180 Potatoes
1181 Broccoli
1182 $1.99/5 lbs
1183 $0.25/lb
1184 $0.99/bunch
1185
1186 .TB <tab number>
1187 Alias to .TAB
1188
1189 .TI [ <measure> ]
1190 Temporary left indent — the optional argument requires a unit of
1191 measure
1192
1193 A temporary indent is one that applies only to the first line of
1194 text that comes after it. Its chief use is indenting the first
1195 line of paragraphs. (Mom's .PP macro, for example, uses a tem‐
1196 porary indent.)
1197
1198 The first time you invoke .TI, you must give it a measure. If
1199 you want to indent the first line of a paragraph by, say, 2 ems,
1200 do
1201 .TI 2m
1202
1203 Subsequent invocations of .TI do not require you to supply a
1204 measure; mom keeps track of the last measure you gave it.
1205
1206 Because temporary indents are temporary, there's no need to turn
1207 them off.
1208
1209 IMPORTANT: Unlike .IL, .IR and IB, measures given to .TI are NOT
1210 additive. In the following example, the second ".TI 2P" is
1211 exactly 2 picas.
1212 .TI 1P
1213 The beginning of a paragraph...
1214 .TI 2P
1215 The beginning of another paragraph...
1216
1217 .TN Tab Next
1218
1219 Inline escape \*[TB+]
1220
1221 TN moves over to the next tab in numeric sequence (tab n+1)
1222 without advancing on the page. See the NOTE in the description
1223 of the .TAB macro for an example of how TN works.
1224
1225 In tabs that aren't given the QUAD argument when they're set up
1226 with .TAB_SET or ST, you must terminate the line preceding .TN
1227 with the \c inline escape. Conversely, if you did give a QUAD
1228 argument to .TAB_SET or ST, the \c must not be used.
1229
1230 If you find remembering whether to put in the \c bothersome, you
1231 may prefer to use the inline escape alternative to .TN, \*[TB+],
1232 which works consistently regardless of the fill mode.
1233
1234 Note: You must put text in the input line immediately after .TN.
1235 Stacking of .TN's is not allowed. In other words, you cannot do
1236 .TAB 1
1237 Some text\c
1238 .TN
1239 Some more text\c
1240 .TN
1241 .TN
1242 Yet more text
1243 The above example, assuming tabs numbered from 1 to 4, should be
1244 entered
1245 .TAB 1
1246 Some text\c
1247 .TN
1248 Some more text\c
1249 .TN
1250 \&\c
1251 .TN
1252 Yet more text
1253 \& is a zero-width, non-printing character that groff recognizes
1254 as valid input, hence meets the requirement for input text fol‐
1255 lowing .TN.
1256
1257 .TQ TQ takes you out of whatever tab you were in, advances 1 line‐
1258 space, and restores the left margin, line length, quad direction
1259 and fill mode that were in effect prior to invoking any tabs.
1260
1261 .T_MARGIN <top margin>
1262 Top margin
1263
1264 Requires a unit of measure
1265
1266 .T_MARGIN establishes the distance from the top of the printer
1267 sheet at which you want your type to start. It requires a unit
1268 of measure, and decimal fractions are allowed. To set a top
1269 margin of 2½ centimetres, you'd enter
1270 .T_MARGIN 2.5c
1271 .T_MARGIN calculates the vertical position of the first line of
1272 type on a page by treating the top edge of the printer sheet as
1273 a baseline. Therefore,
1274 .T_MARGIN 1.5i
1275 puts the baseline of the first line of type 1½ inches beneath
1276 the top of the page.
1277
1278 Note: .T_MARGIN means something slightly different when you're
1279 using the document processing macros. See Top and bottom mar‐
1280 gins in document processing for an explanation.
1281
1282 IMPORTANT: .T_MARGIN does two things: it establishes the top
1283 margin for pages that come after it and it moves to that posi‐
1284 tion on the current page. Therefore, .T_MARGIN should only be
1285 used at the top of a file (prior to entering text) or after NEW‐
1286 PAGE, like this:
1287 .NEWPAGE
1288 .T_MARGIN 6P
1289 <text>
1290
1292 groff(1), groff_mom(7),
1293
1294 /usr/share/doc/groff/html/mom/toc.html
1295 – entry point to the HTML documentation
1296
1297 ⟨http://www.schaffter.ca/mom/momdoc/toc.html⟩
1298 – HTML documentation online
1299
1300 ⟨http://www.schaffter.ca/mom/⟩
1301 – the mom macros homepage
1302
1304 Please send bug reports to the groff-bug mailing list ⟨bug-
1305 groff@gnu.org⟩ or directly to the authors.
1306
1308 Copyright © 2002-2014 Free Software Foundation, Inc.
1309
1310 This file is part of groff, a free software project.
1311
1312 You can redistribute it and/or modify it under the terms of the GNU
1313 General Public License as published by the "Free Software Foundation",
1314 either version 3 of the License, or (at your option) any later version.
1315
1316 You should have received a copy of the GNU General Public License along
1317 with groff, see the files COPYING and LICENSE in the top directory of
1318 the groff Text source package.
1319
1320 Or read the manpage gpl(1). You can also visit
1321 <http://www.gnu.org/licenses/>.
1322
1324 mom was written by Peter Schaffter ⟨peter@schaffter.ca⟩ and revised by
1325 Werner Lemberg ⟨wl@gnu.org⟩.
1326
1327 PDF support was provided by Deri James ⟨deri@chuzzlewit.demon.co.uk⟩.
1328
1329 The alphabetical documentation of macros and escape seqauences in this
1330 man-page were written by the mom team.
1331
1332
1333
1334Groff Version 1.22.3 4 November 2014 GROFF_MOM(7)