Next   Prev   Back to Table of Contents

USING TYPESETTING MACROS DURING DOCUMENT PROCESSING

During document processing, most of the typesetting macros affect type in the document globally. For example, if you turn kerning off, pairwise kerning is disabled not only in paragraphs, but also in headers, footers, quotes, and so on.

Typesetting macros that alter margins and line lengths affect running text globally (or at least try to), but leave headers/footers and footnotes alone. (To indent footnotes, see the full explanation of the FOOTNOTE macro.)

Mom's tabs (both typesetting tabs and string tabs) behave as expected in running text during document processing. Tab structures that do not exceed the line length of running text are preserved sensibly from page to page, and, if COLUMNS are enabled, from column to column.

Some typesetting macros, however, when used during document processing, behave in special ways. These are the macros that deal with the basic parameters of type style: horizontal and vertical margins, line length, family, font, point size, leading, and quad.

Mom assumes that any changes to these parameters stem from a temporary need to set type in a style different from that provided by mom's document element tags. In other words, you need to do a bit of creative typesetting in the middle of a document.

The following lists those typesetting macros whose behaviour during document processing requires some explanation. (Please refer to Top and bottom margins in document processing for information on how mom interprets T_MARGIN and B_MARGIN in document processing. Additionally, see ADD_SPACE if you encounter the problem of trying to get mom to put space at the tops of pages after the first.)

MACRO           EFFECT DURING DOCUMENT PROCESSING
-----           ---------------------------------

L_MARGIN        *The left margin of all running text
                 assumes the new value.

                *The line length remains unaltered.

                *The header and footer left margin
                 remain at the current document default.

                (You won't use this often by itself.  Most
                 likely, you'll use it in combination with
                 R_MARGIN or LL.)

R_MARGIN        *The right margin of all running text
                 assumes the new value.  In other words,
                 the line length is altered.

                *The header and footer right margin
                 remain at the current document default.

LL              *The line length of all running text
                 is set to the new value.

                *The header and footer line length remain
                 at the current document default.

FAMILY          *Changes family for the duration of the
                 current tag only.  As soon as another document
                 element tag is invoked, the family reverts to
                 the current default for the new tag.

FT              *Changes font for the duration of the
                 current tag only.  As soon as another document
                 element tag is entered, the font reverts
                 to the current default for the new tag.

                 N.B. -- \*[SLANT] and \*[BOLDER] affect
                 paragraph text, and remain in effect for all
                 paragraphs until turned off.  If you want to
                 use them in a macro that takes a string
                 argument, include the escape in the string.
                 \*[COND] and \*[EXT] behave similarly.

PT_SIZE         *Changes point size for the duration of the
                 current tag only.  As soon as another document
                 element tag is entered, the point size reverts
                 to the current document default for the new
                 tag.

LS              *Changes line space for the duration of the
                 current tag only.  As soon as another document
                 element tag is entered, the line space reverts to
                 the current document default for the new
                 tag.

                 Using LS to temporarily change leading within a
                 document will almost certainly result in a bottom
                 margin that doesn't align with the bottom margin
                 of subsequent pages.  You'll need to use the SHIM
                 macro to get mom back on track when you're ready
                 to return to the document's default leading.

QUAD            *Changes quad for the duration of the
                 current tag only.  As soon as another document
                 element tag is entered, the quad reverts to
                 the current document default for the new
                 tag.

                 N.B. -- Line-for-line quadding macros
                 (LEFT, CENTER, RIGHT) are also temporary,
                 overridden by the QUAD value of any subsequent
                 document element tag.

Top and bottom margins in document processing

Normally, mom establishes the top and bottom margins of running text in documents from the values of HEADER_MARGIN + HEADER_GAP and FOOTER_MARGIN + FOOTER_GAP respectively. However, if you invoke T_MARGIN or B_MARGIN either before or after START, they set the top and bottom margins of running text irrespective of HEADER_GAP and FOOTER_GAP.

Put another way, in document processing, T_MARGIN and B_MARGIN set the top and bottom margins of running text, but have no effect on the placement of headers, footers, or page numbers.

ADD_SPACE

Occasionally, you may want to insert space before the start of running text on pages after the first.

You might have tried using ALD or SPACE and found it did nothing. This is because mom normally inhibits any extra space before the start of running text on pages after the first.

If you need the space, you must use the macro, ADD_SPACE, in conjuction with NEWPAGE. ADD_SPACE takes as its single argument the distance you want mom to advance from the normal baseline position at the top of the page. A unit of measure is required.

For example, say you wanted to insert 2 inches of space before the start of running text on a page other than the first. You'd accomplish it with

	.NEWPAGE
	.ADD_SPACE 2i
which would terminate your current page, break to a new page, print the header (assuming headers are on) and insert 2 inches of space before the start of running text.

Since adding space in this way is almost sure to disrupt mom's ability to guarantee perfectly flush bottom margins, I highly recommend using the SHIM macro immediately after ADD_SPACE.


Next   Prev   Top   Back to Table of Contents