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 in document processing</title> 6</head> 7<body bgcolor="#dfdfdf"> 8 9<!====================================================================> 10 11<a href="docelement.html#TOP">Next</a> 12<a href="docprocessing.html#TOP">Prev</a> 13<a href="toc.html">Back to Table of Contents</a> 14<p> 15 16<a name="TOP"></a> 17<a name="TYPESETTING"> 18 <h1 align="center"><u>USING TYPESETTING MACROS DURING DOCUMENT PROCESSING</u></h1> 19</a> 20 21During document processing, most of the 22<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> 23affect type in the document globally. For example, if you turn kerning 24off, pairwise kerning is disabled not only in paragraphs, but 25also in headers, footers, quotes, and so on. 26<p> 27Typesetting macros that alter margins and line lengths affect 28<a href="definitions.html#TERMS_RUNNING">running text</a> 29globally (or at least try to), but leave headers/footers and footnotes 30alone. (To indent footnotes, see the full explanation of the 31<a href="docelement.html#FOOTNOTE">FOOTNOTE</a> 32macro.) 33<p> 34<strong>Mom</strong>'s tabs 35(both 36<a href="typesetting.html#TYPESETTING_TABS">typesetting tabs</a> 37and 38<a href="typesetting.html#STRING_TABS">string tabs</a>) 39behave as expected in running text during document processing. Tab 40structures that do not exceed the line length of running text are 41preserved sensibly from page to page, and, if 42<a href="docprocessing.html#COLUMNS">COLUMNS</a> 43are enabled, from column to column. 44<p> 45Some typesetting macros, however, when used during document 46processing, behave in special ways. These are the macros that deal 47with the basic parameters of type style: horizontal and vertical 48margins, line length, 49<a href="definitions.html#TERMS_FAMILY">family</a>, 50<a href="definitions.html#TERMS_FONT">font</a>, 51<a href="definitions.html#TERMS_PS">point size</a>, 52<a href="definitions.html#TERMS_LEADING">leading</a>, 53and 54<a href="definitions.html#TERMS_QUAD">quad</a>. 55 56<p> 57<strong>Mom</strong> assumes that any changes to these parameters 58stem from a temporary need to set type in a style different from that 59provided by <strong>mom</strong>'s 60<a href="docelement.html#INDEX_DOCELEMENT">document element tags</a>. 61In other words, you need to do a bit of creative typesetting in the 62middle of a document. 63<p> 64The following lists those typesetting macros whose behaviour during 65document processing requires some explanation. 66(Please refer to 67<a href="#TB_MARGINS">Top and bottom margins in document processing</a> 68for information on how <strong>mom</strong> interprets 69<a href="typesetting.html#T_MARGIN">T_MARGIN</a> 70and 71<a href="typesetting.html#B_MARGIN">B_MARGIN</a> 72in document processing. Additionally, see 73<a href="#ADD_SPACE">ADD_SPACE</a> 74if you encounter the problem of trying to get <strong>mom</strong> 75to put space at the tops of pages after the first.) 76 77<pre> 78MACRO EFFECT DURING DOCUMENT PROCESSING 79----- --------------------------------- 80 81L_MARGIN *The left margin of all running text 82 assumes the new value. 83 84 *The line length remains unaltered. 85 86 *The header and footer left margin 87 remain at the current document default. 88 89 (You won't use this often by itself. Most 90 likely, you'll use it in combination with 91 R_MARGIN or LL.) 92 93R_MARGIN *The right margin of all running text 94 assumes the new value. In other words, 95 the line length is altered. 96 97 *The header and footer right margin 98 remain at the current document default. 99 100LL *The line length of all running text 101 is set to the new value. 102 103 *The header and footer line length remain 104 at the current document default. 105 106FAMILY *Changes family for the duration of the 107 current tag only. As soon as another document 108 element tag is invoked, the family reverts to 109 the current default for the new tag. 110 111FT *Changes font for the duration of the 112 current tag only. As soon as another document 113 element tag is entered, the font reverts 114 to the current default for the new tag. 115 116 N.B. -- \*[SLANT] and \*[BOLDER] affect 117 paragraph text, and remain in effect for all 118 paragraphs until turned off. If you want to 119 use them in a macro that takes a string 120 argument, include the escape in the string. 121 \*[COND] and \*[EXT] behave similarly. 122 123PT_SIZE *Changes point size for the duration of the 124 current tag only. As soon as another document 125 element tag is entered, the point size reverts 126 to the current document default for the new 127 tag. 128 129LS *Changes line space for the duration of the 130 current tag only. As soon as another document 131 element tag is entered, the line space reverts to 132 the current document default for the new 133 tag. 134 135 Using LS to temporarily change leading within a 136 document will almost certainly result in a bottom 137 margin that doesn't align with the bottom margin 138 of subsequent pages. You'll need to use the SHIM 139 macro to get mom back on track when you're ready 140 to return to the document's default leading. 141 142QUAD *Changes quad for the duration of the 143 current tag only. As soon as another document 144 element tag is entered, the quad reverts to 145 the current document default for the new 146 tag. 147 148 N.B. -- Line-for-line quadding macros 149 (LEFT, CENTER, RIGHT) are also temporary, 150 overridden by the QUAD value of any subsequent 151 document element tag. 152</pre> 153<hr> 154 155<!=====================================================================> 156 157<a name="TB_MARGINS"> 158 <h2><u>Top and bottom margins in document processing</u></h2> 159</a> 160 161Normally, <strong>mom</strong> establishes the top and bottom margins 162of 163<a href="definitions.html#TERMS_RUNNING">running text</a> 164in documents from the values of <strong>HEADER_MARGIN + 165HEADER_GAP</strong> and <strong>FOOTER_MARGIN + FOOTER_GAP</strong> 166respectively. However, if you invoke 167<a href="typesetting.html#T_MARGIN">T_MARGIN</a> 168or 169<a href="typesetting.html#B_MARGIN">B_MARGIN</a> 170either before or after 171<a href="docelement.html#START">START</a>, 172they set the top and bottom margins of running text irrespective 173of <strong>HEADER_GAP</strong> and <strong>FOOTER_GAP</strong>. 174<p> 175Put another way, in document processing, <strong>T_MARGIN</strong> 176and <strong>B_MARGIN</strong> set the top and bottom margins of 177running text, but have no effect on the placement of 178<a href="definitions.html#TERMS_HEADER">headers</a>, 179<a href="definitions.html#TERMS_FOOTER">footers</a>, 180or page numbers. 181 182<a name="ADD_SPACE"> 183 <h2><u>ADD_SPACE</u></h2> 184</a> 185 186<p> 187Occasionally, you may want to insert space before the start of 188<a href="definitions.html#TERMS_RUNNING">running text</a> 189on pages after the first. 190<p> 191You might have tried using 192<a href="typesetting.html#ALD">ALD</a> 193or 194<a href="typesetting.html#SPACE">SPACE</a> 195and found it did nothing. This is because <strong>mom</strong> 196normally inhibits any extra space before the start of running text 197on pages after the first. 198<p> 199If you need the space, you must use the macro, 200<strong>ADD_SPACE</strong>, in conjuction with 201<a href="typesetting.html#NEWPAGE">NEWPAGE</a>. 202<strong>ADD_SPACE</strong> takes as its single argument the 203distance you want <strong>mom</strong> to advance from the normal 204baseline position at the top of the page. A 205<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> 206is required. 207 208<p> 209For example, say you wanted to insert 2 inches of space before the 210start of running text on a page other than the first. You'd 211accomplish it with 212 213<p> 214<pre> 215 .NEWPAGE 216 .ADD_SPACE 2i 217</pre> 218 219which would terminate your current page, break to a new page, 220print the header (assuming headers are on) and insert 2 inches of 221space before the start of running text. 222<p> 223Since adding space in this way is almost sure to disrupt 224<strong>mom</strong>'s ability to guarantee perfectly flush bottom 225margins, I highly recommend using the 226<a href="docprocessing.html#SHIM">SHIM</a> 227macro immediately after <strong>ADD_SPACE</strong>. 228<p> 229<hr> 230<a href="docelement.html#TOP">Next</a> 231<a href="docprocessing.html#TOP">Prev</a> 232<a href="#TOP">Top</a> 233<a href="toc.html">Back to Table of Contents</a> 234</body> 235</html> 236