Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / groff / contrib / mom / momdoc / typemacdoc.html
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">
7
8 <!====================================================================>
9
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
14 <a name="TOP"></a>
15 <a name="TYPESETTING">
16         <h1 align="center"><u>USING TYPESETTING MACROS DURING DOCUMENT PROCESSING</u></h1>
17 </a>
18
19 During document processing, most of the
20 <a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a>
21 affect type in the document globally.  For example, if you turn kerning
22 off, pairwise kerning is disabled not only in paragraphs, but
23 also in headers, footers, quotes, and so on.
24 <p>
25 Typesetting macros that alter margins and line lengths affect
26 <a href="definitions.html#TERMS_RUNNING">running text</a>
27 globally (or at least try to), but leave headers/footers and footnotes
28 alone.  (To indent footnotes, see the full explanation of the
29 <a href="docelement.html#FOOTNOTE">FOOTNOTE</a>
30 macro.)
31 <p>
32 There are, however, some typesetting macros that, used during document
33 processing, behave in special ways.  These are the macros that deal
34 with the basic parameters of type style: horizontal and vertical margins,
35 line length,
36 <a href="definitions.html#TERMS_FAMILY">family</a>,
37 <a href="definitions.html#TERMS_FONT">font</a>,
38 point size,
39 <a href="definitions.html#TERMS_LEADING">leading</a>,
40 and
41 <a href="definitions.html#TERMS_QUAD">quad</a>.
42 <p>
43 <strong>NOTE:</strong> See the section on
44 <a href="#TB_MARGINS">Top and bottom margins in document processing</a>
45 for information on how <strong>mom</strong> interprets
46 <a href="typesetting.html#T_MARGIN">T_MARGIN</a>
47 and
48 <a href="typesetting.html#B_MARGIN">B_MARGIN</a>
49 in document processing.
50
51 <p>
52 <strong>Mom</strong> assumes that any changes to these parameters
53 stem from a temporary need to set type in a style different from that
54 provided by <strong>mom</strong>'s
55 <a href="docelement.html#INDEX_DOCELEMENT">document element tags</a>.
56 In other words, you need to do a bit of creative typesetting in the
57 middle of a document.
58 <p>
59 The following lists those typesetting macros whose behaviour during
60 document processing requires some explanation.
61 <p>
62 <pre>
63 MACRO           EFFECT DURING DOCUMENT PROCESSING
64 -----           ---------------------------------
65
66 L_MARGIN        *The left margin of all running text
67                  assumes the new value.
68
69                 *The line length remains unaltered.
70
71                 *The header and footer left margin
72                  remain at the current document default.
73
74                 (You won't use this often by itself.  Most
75                  likely, you'll use it in combination with
76                  R_MARGIN or LL.)
77
78 R_MARGIN        *The right margin of all running text
79                  assumes the new value.  In other words,
80                  the line length is altered.
81
82                 *The header and footer right margin
83                  remain at the current document default.
84
85 LL              *The line length of all running text
86                  is set to the new value.
87
88                 *The header and footer line length remain
89                  at the current document default.
90
91 FAMILY          *Changes family for the duration of the
92                  current tag only.  As soon as another document
93                  element tag is invoked, the family reverts to
94                  the current default for the new tag.
95
96 FT              *Changes font for the duration of the
97                  current tag only.  As soon as another document
98                  element tag is entered, the font reverts
99                  to the current default for the new tag.
100
101                  N.B. -- \*[SLANT] and \*[BOLDER] affect
102                  paragraph text, and remain in effect for all
103                  paragraphs until turned off.  If you want to
104                  use them in a macro that takes a string
105                  argument, include the escape in the string.
106                  \*[COND] and \*[EXT] behave similarly.
107
108 PT_SIZE         *Changes point size for the duration of the
109                  current tag only.  As soon as another document
110                  element tag is entered, the point size reverts
111                  to the current document default for the new
112                  tag.
113
114 LS              *Changes line space for the duration of the
115                  current tag only.  As soon as another document
116                  element tag is entered, the line space reverts to
117                  the current document default for the new
118                  tag.  Highly NOT recommended, since changes to
119                  a document's leading interfere with mom's
120                  ability to balance bottom margins.
121
122 QUAD            *Changes quad for the duration of the
123                  current tag only.  As soon as another document
124                  element tag is entered, the quad reverts to
125                  the current document default for the new
126                  tag.
127
128                  N.B. -- Line-for-line quadding macros
129                  (LEFT, CENTER, RIGHT) are also temporary,
130                  overridden by the QUAD value of any subsequent
131                  document element tag.
132 </pre>
133 <hr>
134
135 <!=====================================================================>
136
137 <a name="TB_MARGINS">
138         <h2><u>Top and bottom margins in document processing</u></h2>
139 </a>
140
141 Normally, <strong>mom</strong> establishes the top and bottom margins
142 of
143 <a href="definitions.html#TERMS_RUNNING">running text</a>
144 in documents from the values of <strong>HEADER_MARGIN +
145 HEADER_GAP</strong> and <strong>FOOTER_MARGIN + FOOTER_GAP</strong>
146 respectively.  However, if you invoke
147 <a href="typesetting.html#T_MARGIN">T_MARGIN</a>
148 or
149 <a href="typesetting.html#B_MARGIN">B_MARGIN</a>
150 either before or after
151 <a href="docelement.html#START">START</a>,
152 they set the top and bottom margins of running text irrespective
153 of <strong>HEADER_GAP</strong> and <strong>FOOTER_GAP</strong>.
154 <p>
155 Put another way, in document processing, <strong>T_MARGIN</strong>
156 and <strong>B_MARGIN</strong> set the top and bottom margins of
157 running text, but have no effect on the placement of
158 <a href="definitions.html#TERMS_HEADER">headers</a>,
159 <a href="definitions.html#TERMS_FOOTER">footers</a>,
160 or page numbers.
161
162 <p>
163 <hr>
164 <a href="appendices.html#TOP">Next</a>&nbsp;&nbsp;
165 <a href="letters.html#TOP">Prev</a>&nbsp;&nbsp;
166 <a href="#TOP">Top</a>&nbsp;&nbsp;
167 <a href="toc.html">Back to Table of Contents</a>
168 </body>
169 </html>