* tmac/doc-common (doc-volume-as-*): Use lowercase names.
[s-roff.git] / contrib / mom / momdoc / typemacdoc.html
blob5ded85174af0459ecf86a5e7f4f659ee9f952254
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
4 <title>Mom -- Typesetting macros in document processing</title>
5 </head>
6 <body bgcolor="#dfdfdf">
8 <!====================================================================>
10 <a href="appendices.html#TOP">Next</a>&nbsp;&nbsp;
11 <a href="letters.html#TOP">Prev</a>&nbsp;&nbsp;
12 <a href="toc.html">Back to Table of Contents</a>
13 <p>
15 <a name="TOP"></a>
16 <a name="TYPESETTING">
17 <h1 align="center"><u>USING TYPESETTING MACROS DURING DOCUMENT PROCESSING</u></h1>
18 </a>
20 During document processing, most of the
21 <a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a>
22 affect type in the document globally. For example, if you turn kerning
23 off, pairwise kerning is disabled not only in paragraphs, but
24 also in headers, footers, quotes, and so on.
25 <p>
26 Typesetting macros that alter margins and line lengths affect
27 <a href="definitions.html#TERMS_RUNNING">running text</a>
28 globally (or at least try to), but leave headers/footers and footnotes
29 alone. (To indent footnotes, see the full explanation of the
30 <a href="docelement.html#FOOTNOTE">FOOTNOTE</a>
31 macro.)
32 <p>
33 <strong>Mom</strong>'s tabs
34 (both
35 <a href="typesetting.html#TYPESETTING_TABS">typesetting tabs</a>
36 and
37 <a href="typesetting.html#STRING_TABS">string tabs</a>)
38 behave as expected in running text during document processing. Tab
39 structures that do not exceed the line length of running text are
40 preserved sensibly from page to page, and, if
41 <a href="docprocessing.html#COLUMNS">COLUMNS</a>
42 are enabled, from column to column.
43 <p>
44 Some typesetting macros, however, when used during document
45 processing, behave in special ways. These are the macros that deal
46 with the basic parameters of type style: horizontal and vertical
47 margins, line length,
48 <a href="definitions.html#TERMS_FAMILY">family</a>,
49 <a href="definitions.html#TERMS_FONT">font</a>,
50 <a href="definitions.html#TERMS_PS">point size</a>,
51 <a href="definitions.html#TERMS_LEADING">leading</a>,
52 and
53 <a href="definitions.html#TERMS_QUAD">quad</a>.
54 <p>
55 <strong>NOTE:</strong> See the section on
56 <a href="#TB_MARGINS">Top and bottom margins in document processing</a>
57 for information on how <strong>mom</strong> interprets
58 <a href="typesetting.html#T_MARGIN">T_MARGIN</a>
59 and
60 <a href="typesetting.html#B_MARGIN">B_MARGIN</a>
61 in document processing.
63 <p>
64 <strong>Mom</strong> assumes that any changes to these parameters
65 stem from a temporary need to set type in a style different from that
66 provided by <strong>mom</strong>'s
67 <a href="docelement.html#INDEX_DOCELEMENT">document element tags</a>.
68 In other words, you need to do a bit of creative typesetting in the
69 middle of a document.
70 <p>
71 The following lists those typesetting macros whose behaviour during
72 document processing requires some explanation.
73 <p>
74 <pre>
75 MACRO EFFECT DURING DOCUMENT PROCESSING
76 ----- ---------------------------------
78 L_MARGIN *The left margin of all running text
79 assumes the new value.
81 *The line length remains unaltered.
83 *The header and footer left margin
84 remain at the current document default.
86 (You won't use this often by itself. Most
87 likely, you'll use it in combination with
88 R_MARGIN or LL.)
90 R_MARGIN *The right margin of all running text
91 assumes the new value. In other words,
92 the line length is altered.
94 *The header and footer right margin
95 remain at the current document default.
97 LL *The line length of all running text
98 is set to the new value.
100 *The header and footer line length remain
101 at the current document default.
103 FAMILY *Changes family for the duration of the
104 current tag only. As soon as another document
105 element tag is invoked, the family reverts to
106 the current default for the new tag.
108 FT *Changes font for the duration of the
109 current tag only. As soon as another document
110 element tag is entered, the font reverts
111 to the current default for the new tag.
113 N.B. -- \*[SLANT] and \*[BOLDER] affect
114 paragraph text, and remain in effect for all
115 paragraphs until turned off. If you want to
116 use them in a macro that takes a string
117 argument, include the escape in the string.
118 \*[COND] and \*[EXT] behave similarly.
120 PT_SIZE *Changes point size for the duration of the
121 current tag only. As soon as another document
122 element tag is entered, the point size reverts
123 to the current document default for the new
124 tag.
126 LS *Changes line space for the duration of the
127 current tag only. As soon as another document
128 element tag is entered, the line space reverts to
129 the current document default for the new
130 tag.
132 Using LS to temporarily change leading within a
133 document will almost certainly result in a bottom
134 margin that doesn't align with the bottom margin
135 of subsequent pages. You'll need to use the SHIM
136 macro to get mom back on track when you're ready
137 to return to the document's default leading.
139 QUAD *Changes quad for the duration of the
140 current tag only. As soon as another document
141 element tag is entered, the quad reverts to
142 the current document default for the new
143 tag.
145 N.B. -- Line-for-line quadding macros
146 (LEFT, CENTER, RIGHT) are also temporary,
147 overridden by the QUAD value of any subsequent
148 document element tag.
149 </pre>
150 <hr>
152 <!=====================================================================>
154 <a name="TB_MARGINS">
155 <h2><u>Top and bottom margins in document processing</u></h2>
156 </a>
158 Normally, <strong>mom</strong> establishes the top and bottom margins
160 <a href="definitions.html#TERMS_RUNNING">running text</a>
161 in documents from the values of <strong>HEADER_MARGIN +
162 HEADER_GAP</strong> and <strong>FOOTER_MARGIN + FOOTER_GAP</strong>
163 respectively. However, if you invoke
164 <a href="typesetting.html#T_MARGIN">T_MARGIN</a>
166 <a href="typesetting.html#B_MARGIN">B_MARGIN</a>
167 either before or after
168 <a href="docelement.html#START">START</a>,
169 they set the top and bottom margins of running text irrespective
170 of <strong>HEADER_GAP</strong> and <strong>FOOTER_GAP</strong>.
172 Put another way, in document processing, <strong>T_MARGIN</strong>
173 and <strong>B_MARGIN</strong> set the top and bottom margins of
174 running text, but have no effect on the placement of
175 <a href="definitions.html#TERMS_HEADER">headers</a>,
176 <a href="definitions.html#TERMS_FOOTER">footers</a>,
177 or page numbers.
180 <hr>
181 <a href="appendices.html#TOP">Next</a>&nbsp;&nbsp;
182 <a href="letters.html#TOP">Prev</a>&nbsp;&nbsp;
183 <a href="#TOP">Top</a>&nbsp;&nbsp;
184 <a href="toc.html">Back to Table of Contents</a>
185 </body>
186 </html>