1 \# Most mom users rely on mom's document processing macros to format
2 \# their work. The doc processing macros take care of all things
3 \# typographic and are simple, clear and easy to learn. The kind of
4 \# "by hand" typesetting this file shows off is really geared toward
5 \# professional typographers. Bear in mind, though, that the full
6 \# power of mom's typesetting capabilities can be brought to bear
7 \# on document processing as well.
11 .PAGE 8.5i 11i \" Printer sheet size
12 .L_MARGIN 1i \" Left margin 1 inch
13 .R_MARGIN 1i \" Right margin 1 inch (calculates the line length)
15 \# Basic type parameters
17 .FAMILY T \" Times Roman family
19 .PT_SIZE 12 \" Point size
20 .LS 14 \" Leading (line spacing)
21 .LEFT \" Set lines flush left, nofill mode
26 .KERN \" Automatic pairwise kerning
27 .LIGATURES \" Automatic ligature generation
28 .SMARTQUOTES \" Enable smartquotes
29 .SS 0 \" No extra space between sentences
31 .ALD 1i-1v \" Advance 1 inch from top of paper to first baseline
33 .ALD .25v \" Advance an extra 1/4 linespace
34 .UNDERSCORE 3.75p "T\*[BU 4]asting notes using padding, string tabs \
37 .SP \" Add an extra line space
39 .FAM H \" Helvetica family
43 \# The following uses a combination of padding, string tabs, and the
44 \# FWD escape to set up five tabs with 1-pica gutters stretched over
45 \# the full line length.
47 .SILENT \" Don't print the next line
48 .PAD "\*[ST1]VIN#\*[ST1X]\*[FWD 1P]\*[ST2]ROBE#\*[ST2X]\*[FWD 1P]\*[ST3]NEZ#\*[ST3X]\*[FWD 1P]\*[ST4]BOUCHE#\*[ST4X]\*[FWD 1P]\*[ST5]COMMENTAIRES\*[ST5X]"
49 .SILENT OFF \" Resume normal printing of text
51 \# Now that the string tabs have been marked off, we "set" them.
53 .ST 1 L \" First string tab flush left, nofill mode (no need for .BR's between input lines)
54 .ST 2 L QUAD \" Remaining tabs are flush left/rag right, fill mode
59 .TAB 1 \" Call first tab
61 .TN \" Move to next tab and stay on the same baseline
68 .UNDERSCORE "COMMENTAIRES"
71 .ALD 6p \" Advance an extra 6 points
72 .FT R \" Change font to roman (medium)
73 .MCO \" Turn multi-column mode on
75 .TAB 1 \" Notice that this tab gets set line-for-line
76 \*[IT]Peelee Island \" Set italic
77 \*[PREV]Gewürztraminer \" Revert to former font (roman)
80 .MCR \" Return to top of column
81 .TAB 2 \" Call tab 2; in multi-column mode, don't use .TN
84 .TB 3 \" Notice that from here on, we use the alias TB instead of TAB
85 Frais, fruité, ci\%tronné, arômes fortes de lichee et de fruits
89 Doux, fruité, bien équilibré avec une bonne acidité.
92 Bon apéro. Servir avec des plats
93 .RW .1 \" Reduce Whitespace between letters to tighten this line
95 .RW 0 \" Back to normal spacing between letters
97 Excellent rapport qualité/prix.
98 .MCX 8p \" Multi-column mode off; advance an extra 8 points
99 .MCO \" Re-invoke multi-columns for next wine description
107 Rubis foncé, vio\%lacée, presque opaque.
110 Belles arômes de fruits foncés (prunes, cerises noires, cassis).
111 Odeurs tertiares de cuir, cèdre, violets, eucalyptus, avec une trace
112 exotique de Band-Aid*\*[BU 12].
114 \# The \*[BU 12], above, pulls the period back so that it falls
115 \# underneath the asterisk. \*[BP<n>] could have been used instead
116 \# if you prefer to use points rather than kern units.
120 Très rond, tannins mûres et veloutés, avec un long finis fruité et
121 doucement alcoolique.
124 Superbe\|! Une aubaine à ne pas manquer. Prêt à boire maintenant.
125 .MCX 1v \" Multi-columns off; advance an extra linespace
127 \# Now, an example of a hanging indent. This is excessively fussy
128 \# from a typographic standpoint in that it hangs the asterisk outside
129 \# the current left margin so that the text following it lines up with
130 \# with the text in the tasting notes. Notice that in order to use a
131 \# hanging indent, you must first set a left indent.
133 .FT I \" Change font to italic
134 .PT_SIZE -.5 \" Reduce point size by 1/2 point
135 .LS -.5 \" Reduce leading by 1/2 point
136 .JUSTIFY \" Set text justified
138 \# Now, move the left margin back by the width of an asterisk plus 2 points...
140 .L_MARGIN -(\w'*'+2p)
142 \# ...and set a left indent equal to the width of an asterisk plus 2 points
146 \# Now, set the hanging indent equal to the left indent, effectively pulling
147 \# the first line of the following text back to the new left margin.
148 \# Subsequent output lines will be indented by the .IL amount.
149 \# Notice that when using the \w inline escape, there's no need to append
150 \# a unit of measure to it.
153 *\*[FWD 1p]The term "Band-Aid" means the slightly sweet, vaguely chemical
154 smell associated with medical-grade plastics. It is often found in
155 wines from terroirs in South America. Provided a wine has a sufficient
156 concentration of fruit
157 .RW .04 \" Kern the whole next line slightly, so "lipstick" doesn't hyphenate.
158 aromas and complex tertiary characteristics, Band-Aid is a Good Thing.
159 Otherwise, it smells like cheap lipstick.
160 .RW 0 \" Reset kerning to 0
162 \# Notice, above, that although the values for IL and HI are the width
163 \# of an asterisk plus 2 points, when setting the first line of text
164 \# (the one with the asterisk at the beginning), we put only 1 point of
165 \# space after the *. This is to compensate for the fact that in the
166 \# italic font, the letter T doesn't align visually with the rest of
167 \# the text. As already noted, this is an extremely fussy example. :)
169 .IQ CLEAR \" Cancel and clear stored indent values
170 .L_MARGIN 1i \" Reset left margin to its original value.
172 .ALD 2P \" Add 2-picas extra space before next example
182 .COMMENT \" COMMENT lets you enter comments without using \# or \"
183 In the next line, because the string to be underscored must be
184 enclosed in double-quotes, you can't use the double-quote character
185 itself around the word "Massaging". We circumvent this by using the
186 groff inline escapes \(lq and \(rq (leftquote and rightquote).
187 .COMMENT OFF \" Remember to turn COMMENT off!
189 .UNDERSCORE 3.75p "\(lqMassaging\(rq \*[BCK 1p]a passage of rag right text"
190 .SP \" Add an extra linespace
194 .PT_SIZE -1 \" Reduce point size by 1 point
195 Passage using groff spacing defaults
197 .ALD .5v \" Add an extra 1/2 line space
199 .PT_SIZE +1 \" Restore point size
200 .QUAD LEFT \" Set quad left, fill mode
201 .IB 3P \" Indent 3 picas from both the left and right margins
203 The thousand injuries of Fortunato I had borne as I best could;
204 but when he ventured upon insult, I vowed revenge. You, who so well
205 know the nature of my soul, will not suppose, however, that I gave
206 utterance to a threat. \*[IT]At length\*[PREV] I would be
207 avenged; this was a point definitively settled\(embut the very
208 definitiveness with which it was resolved, precluded the idea of
209 risk. I must not only punish, but punish with impunity. A
210 wrong is unredressed when retribution overtakes its redresser.
211 It is equally unredressed when the avenger fails to make himself
212 felt as such to him who has done the wrong.
215 \# The next line is set quad right, nofill mode, 1/2 point smaller
216 \# than the preceding text (using the \*[SIZE <n>] inline escape.
219 \*[SIZE -.5]\(emEdgar Allen Poe, \*[IT]The Cask of Amontillado\*[PREV]\*[SIZE +.5]
220 .SP \" Extra linespace
221 .IBQ \" Disable "indent both"
223 \# The passage above, while acceptable in a longer document, exhibits a
224 \# few typographic flaws. The shape of the right margin rag exhibits
225 \# a decidedly "rounded" appearance. The word "I" stands alone at the
226 \# end of the third line. The space between the 1st and 2nd sentences
227 \# ("...revenge. You...") is too large, owing to the letter "Y" that
228 \# begins the 2nd sentence. The spacing between "A wrong..." (line 6)
229 \# is equally too large because of the way "A" and "w" fit together.
230 \# The em-dash before Edgar isn't vertically centered with the letter "E".
231 \# And so on. The most important correction below is fixing the rag
232 \# so that longer and shorter lines alternate. This is accomplished by
233 \# manually breaking lines and then slightly lengthening and shortening
234 \# them until a pleasing rag is achieved. The remainder of the little
235 \# flaws are fixed with inline escapes.
240 The same passage, \*[BU 4]"massaged"
247 .HY OFF \" Turn automatic hyphenation off
248 .BR_AT_LINE_KERN \" Automatically insert a line break (.BR) with each invocation of .RW and .EW
249 .WS +1 \" Increase word space slightly
250 .IB \" Turn "indent both" back on; values are the same as before
252 The thousand injuries of Fortunato I had borne as I best could; but
253 when he ventured upon insult, I \*[BU 2]vowed revenge. \*[BU 4]Y\*[BU 6]ou,
254 \*[BU 4]who so \*[BU 2]well know the nature
256 of my soul, \*[BU 2]will not suppose, however, that I gave utterance to
259 length\*[PREV] I would be avenged; this was a point definitively
262 v\*[BU 1]ery definitiveness with which it was resolved, precluded the idea
265 I must not only punish, but punish with impunity. A \*[BCK 1p]wrong is
268 when retribution overtakes its redresser. It is equally unredressed
271 avenger fails to make himself felt as such to him \*[BU 2]who has done
273 .RW 0 \" Restore normal kerning
274 .WS +0 \" Restore normal wordspacing
278 \*[UP 1.5p]\(em\*[DOWN 1.5p]\*[BCK 1p]Edgar \*[BCK 1p]Allen Poe, \*[IT]The Cask of Amontillado\*[PREV]
279 .IQ CLEAR \" Cancel and clear stored values of all indents
282 .NEWPAGE \" Start a new page
283 .T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD 1i-1v above)
293 .UNDERSCORE 3.75p "A \*[BU 2]recipe for enumerated lists using indents"
294 .SP .5v \" Add an extra half line space
295 .FAM N \" New Century Schoolbook family
299 .HY \" Turn hyphenation back on
300 .JUSTIFY \" Justify text
301 This example demonstrates the use of left and hanging indents for
302 simple enumerated lists. Nested lists are possible, as the example
303 shows; however, the more complex the nesting, the wiser it becomes
304 to use (string) tabs, as seen in Example 4.
306 \*[BD]Please note: mom\*[PREV] has macros that allow you to set
307 enumerated lists automatically. These examples merely show hanging
308 indents and string tabs in use.
310 .JUSTIFY \" Justify text
311 .IL \w'\0.\0' \" Establish a left indent equal to the width of 2 figure spaces plus a period.
312 .HI \w'\0.\0' \" Establish a hanging indent equal to the size of the left indent.
316 1.\0This is the first item in the list. N\*[BU 2]otice how the first line
317 "hangs" back from the remaining text, which is otherwise
318 indented by the width of by two figure-spaces (digit-width
319 spaces) and a period.
321 .HI \" Notice that HI doesn't require an argument once the value's been set
323 2.\0This is the second item in the list. As with the above item,
324 notice the use of the \*[BU 8]\\0 escape sequence in the input text. It's
325 there to ensure that the space after the number/period combination
326 always remains the same (i.e. doesn't stretch when the line is
327 justified). That way, the text of each item always lines up perfectly.
330 Now we're going to set a bullet-point list, indented from the text
331 above by 1 pica. IL arguments are always added to whatever value
332 is in already effect for IL, hence all we have to do is tell mom to
333 indent (from the current left indent) 1 pica plus the width of the
334 bullet character ( \(bu ). \*[FWD 3p] puts three points of space after
335 the bullet so that the bullet and the text are visually separated.
339 .IL 1P+\w'\(bu\*[FWD 3p]'
341 \# Hanging indents are always relative to the current left indent.
342 \# The additional 1-pica indent, above, already having been taken
343 \# care of, we only want to hang the first lines of bullet list items
344 \# back by the width of the bullet character plus its 3 extra
348 .HI \w'\(bu\*[FWD 3p]'
349 \*[DOWN 1p]\(bu\*[UP 1p]\*[FWD 3p]This is the first line of a sublist with bullets.
350 N\*[BU 2]otice how the first line (the one with the bullet) is indented
351 exactly one pica from the text of the list item above it, while the
352 remaining lines align with the left indent we set above.
355 \*[DOWN 1p]\(bu\*[UP 1p]\*[FWD 3p]This is the second item of the sublist with bullets. \*[BU 4]We
356 could go on indefinitely, but let's go back to the top level (numbered)
359 \# The easiest way to return to a previous indent value is by subtraction.
360 \# The argument to IL, above, was 1P+\w'\(bu\*[FWD 3p]', so we just reverse
361 \# it by putting a minus sign in front. The parentheses are required
362 \# for groff to evaluate the expression properly.
364 .IL -(1P+\w'\(bu\*[FWD 3p]')
365 .HI \w'\0.\0' \" Reset hanging indent for use with numbered items.
367 3.\0...and here we are.
368 .HI \" Again, notice that once HI has been set, you don't have to keep passing it an argument.
370 4.\0In order not to make the example too long, we'll stop here.
371 .IQ CLEAR \" Don't forget to cancel and/or clear indents!
382 .UNDERSCORE 3.75p "A \*[BU 2]recipe for nested lists using string tabs"
389 Although setting up string tabs is a bit more complex than setting
390 up indents, it's \*[BU 3]well worth the effort, especially for nested lists.
394 The PAD line, below, sets up two string tabs. The first (ST1)
395 is exactly the length of two figure spaces and a period. The
396 second (ST2) is simply "the remainder of the line."
399 .SILENT \" Don't print any of this
400 .PAD "\*[ST1]\0.\0\*[ST1X]\*[ST2]#\*[ST2X]"
401 .ST 1 L \" String tabs must be "set" after being marked off in a line
402 .ST 2 J \" ST 1 will be set flush left, nofill; ST 2 will be justified.
403 .SILENT OFF \" Restore printing
407 .TN \" Use .TN here so text stays on the same baseline as the number in tab 1
408 This is the first item in the list. N\*[BU 2]otice how, just as in Example 3,
409 the first line hangs back from the remaining text, which is otherwise
415 This is the second item in the list. N\*[BU 2]otice that when setting "lists"
416 with tabs, there's no need to use the \*[BU 8]\\0 escape sequence after
417 the number/period combination in the input text.
421 Now, set up the indented bullet-point sublist. The PAD line
422 says: move forward 12 points (1 pica), then mark off a string
423 tab (ST3) that's the length of the bullet character; move foward
424 another three points, then make the next string tab (ST4) the
425 length of remainder of the line.
429 .PAD "\*[FWD 12p]\*[ST3]\(bu\*[ST3X]\*[FWD 3p]\*[ST4]#\*[ST4X]"
435 \*[DOWN 1p]\(bu\*[UP 1p]
437 This is the first line of a sublist with bullets. N\*[BU 2]otice how the
438 bullets and the text line up exactly the same as in Example 3.
441 \*[DOWN 1p]\(bu\*[UP 1p]
443 This is the second item of the sublist with bullets. For the fun of
446 en-dashed sub-sublist.
447 .BR \" We're in a fill mode right now, so you *must* terminate the line with BR
450 .PAD "\*[FWD 12p]\*[ST5]\(en\*[ST5X]\*[FWD 4p]\*[ST6]#\*[ST6X]"
456 \*[UP .75p]\(en\*[DOWN .75p]
458 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
459 nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
463 \*[UP .75p]\(en\*[DOWN .75p]
465 At \*[BU 3]vero eos et accusam et justo duo dolores et ea rebum. Stet clita
466 kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.
471 And here we are, back at the top-level numbered list with a minimum
477 Generally speaking, once you get the hang of string tabs and the
478 \*[BD]PAD\*[PREV] macro, you'll find setting up complex nested lists
479 (or anything similar to them) easier than with hanging indents.
491 .UNDERSCORE 3.75p "Word spacing"
493 .FAM P \" Palatino family
497 \# The "label" lines for the following are set in Helvetica bold, one
498 \# point smaller than the examples themselves. This demonstrates the
499 \# use of the groff inline escape \f[...] to change both family and
500 \# font inline. It also shows using the mom inline \*S[...], which is
501 \# an alternate form of the inline, \*[SIZE <n>]
503 \f[HB]\*S[-1]Normal word spacing\*S[+1]\*[PREV]
505 N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party.
507 \f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]\*[BU 1]2\*S[+1]\*[PREV]
510 N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party.
513 \f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]4\*S[+1]\*[PREV]
516 N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party.
519 \f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]6\*S[+1]\*[PREV]
522 N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party.
534 .UNDERSCORE 3.75p "Line kerning"
536 .FAM P \" Palatino family
541 \# Here, we set up some tabs so the examples can go into facing columns.
544 .TAB_SET 2 19.5P 19.5P L
546 .MCO \" Turn multi-columns on
548 \f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV]
550 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
552 \f[HB]\*S[-1]Line "tightened" \(en .RW .1\*S[+1]\*[PREV]
554 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
557 \# In the next line, notice that because it uses a different family
558 \# (Helvetica instead of Palatino), the RW macro doesn't affect it.
560 \f[HB]\*S[-1]Line "tightened" \(en .RW .2\*S[+1]\*[PREV]
562 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
564 \f[HB]\*S[-1]Line "tightened" \(en .RW .3\*S[+1]\*[PREV]
566 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
569 \f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV]
570 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
572 \f[HB]\*S[-1]Line "loosened" \(en .EW .1\*S[+1]\*[PREV]
574 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
576 \f[HB]\*S[-1]Line "loosened" \(en .EW .2\*S[+1]\*[PREV]
578 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
580 \f[HB]\*S[-1]Line "loosened" \(en .EW .3\*S[+1]\*[PREV]
582 "But this is \*[IT]important!\/"\*[PREV]she exclaimed.
593 .UNDERSCORE 3.75p "Cutaround using left\*[FU 2]/right indents, multi columns \
600 .BR_AT_LINE_KERN OFF \" In justified text, it's best to have this OFF
603 .TAB_SET 2 20.5P 18.5P J
607 \# The little picture of tux.
612 .XCOLOR red \" Initialize the X11 color, red
615 .DROPCAP L 3 COND 80 \" i.e. the letter L dropped 3 lines, condensed to 80% of its normal width
617 orem ipsum dolor sit amet, consetetur sa\%dip\%scing elitr, sed diam
618 nonumy eir\%mod tempor invidunt ut labore et dolore magna aliquyam erat,
622 At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
623 kasd gubergren, no sea taki-
624 .SPREAD \" Force justify preceding line before starting indent
626 kimata sanctus est lorem ipsum dolor sit amet.
627 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
628 nonumy eirmod tempor.
631 Invidunt ut labore et dolore magna ali\%qu\%yam erat, sed diam voluptua.
634 vero eos et accusam et justo duo dolores et ea rebum.
636 Stet clita kasd gubergren, no sea ta-
637 .SPREAD \" Force justify preceding line before quitting indent
639 kimata sanctus est lorem ipsum dolor sit amet. Lorem ipsum dolor
640 sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
641 in\%vi\%dunt ut labore et dolore magna aliquyam erat. Sed diam voluptua,
642 at vero eos et accusam et justo duo
645 dolores et ea rebum. Stet clita no kasd guber-
649 gren, no sea takimata sanctus est lorem ipsum
651 dolor sit amet. Consetetur sadipscing elitr, sed diam nonumy eirmod
652 tempor invidunt ut labore et dolore.
654 Magna aliquyam erat, sed diam voluptua, at vero eos et accusam.
655 Et justo duo dolores et ea
658 rebum, stet clita kasd gubergren. No sea
659 takimata sanctus est, lorem ipsum dolor sit amet.
661 Sit amet, consetetur sadipscing elitr, sed diam. Nonumy eirmod tempor
664 dunt ut labore et dolore magna. Ali-
666 quyam erat sed diam voluptua.
667 At vero eos et accusam et justo duo dolores et ea rebum stet.
670 Dolores et ea rebum stet clita kasd gubergren, no sea takimata
671 sanctus. Sadipscing elitr sed diam, nonumy eirmod tempor, invidunt
672 ut labore et dolore magna aliquyam erat. Sed diam voluptua, at vero
673 eos et accusam et justo duo dolores et ea rebum.