Next Prev Back to Table of Contents

# DOCUMENT PROCESSING WITH MOM

Introduction to document processing
Some document defaults

* IMPORTANT NOTE on leading/spacing and bottom margins *

- DOCUMENT SETUP
  Tutorial -- Setting up a mom document
  - The Reference Macros
    - TITLE
    - SUBTITLE
    - AUTHOR
    - CHAPTER
    - DRAFT
    - REVISION
  - The Docstyle Macros
    - DOCTYPE
    - PRINTSTYLE
    - COPYSTYLE
  - Changing type/style parameters prior to START
    - Using typesetting macros prior to START
    - Adjusting document leading to fill pages -- DOC_LEAD_ADJUST
    - Managing the document header
      - DOCHEADER -- turning docheaders off
      - Docheader control
  - Setting documents in columns
    - COLUMNS
    - Breaking columns manually
      - COL_NEXT
      - COL_BREAK
  - Initiate document processing
    - START
  - Changing document-wide typesetting parameters after START
    - DOC_LEFT_MARGIN
    - DOC_RIGHT_MARGIN
    - DOC_LINE_LENGTH
    - DOC_FAMILY
    - DOC_PT_SIZE
    - DOC_LEAD
    - DOC_LEAD_ADJUST
    - DOC_QUAD
  - THE DOCUMENT ELEMENT MACROS (TAGS)
    - Introduction to the document element tags
      - Document element (tag) control macros
      - Arguments to the control macros
    - Epigraphs
      - EPIGRAPH
      - Epigrah control
    - Paragraphs
      - PP
      - Paragraph control
    - Main heads
      - HEAD
      - Head control
    - Subheads
      - SUBHEAD
      - Subhead control
    - Paragraph heads
      - PARAHEAD
      - Parahead control
    - Linebreaks (author linebreaks)
      - LINEBREAK
      - Linebreak control
    - Quotes (line for line poetic quotes)
      - QUOTE
      - Quote control
    - Blockquotes (cited material)
      - BLOCKQUOTE
      - Blockquote control
    - Footnotes
      - FOOTNOTE
      - Footnote control
    - Endnotes
      - ENDNOTE
      - Endnote control
    - Document termination
      - FINIS
      - Finis control
  - HEADERS and FOOTERS
    - Introduction to headers/footers
    - Managing headers/footers
      - HEADERS -- on or off
      - FOOTERS -- on or off
      - FOOTER_ON_FIRST_PAGE
    - Header/footer control
      - Header/footer strings
      - Header/footer style -- global and part-by-part
      - Header/footer placement and spacing
      - The header/footer separator rule
  - PAGINATION
    - PAGINATE -- on or off
    - PAGENUMBER -- user supplied page number
    - PAGENUM_STYLE -- digits, roman numerals, etc.
    - DRAFT_WITH_PAGENUMBER -- attach draft/revision information to page numbers
    - Pagination control
  - RECTO_VERSO PRINTING and COLLATING
    - Introduction to recto/verso
      - RECTO_VERSO
      - SWITCH_HEADERS (also FOOTERS)
    - Introduction to collating
      - COLLATE
  - CREATING A COVER PAGE
  - WRITING LETTERS
    - Introduction to writing letters
    - Tutorial on writing letters
    - Default style for letters
    - The letter macros

## Introduction to document processing

As explained in Document processing with mom, document processing uses markup tags to identify document elements like heads, paragraphs, and so on. The tags are, of course, macros, but with sensible, readable names that make them easy to grasp and easy to remember. (And don't forget: if you don't like the "official" name of a tag -- too long, cumbersome to type in, not "intuitive" enough -- you can change it with the ALIAS macro.)

In addition to the tags themselves, mom has an extensive array of macros that control how they look and behave.

Setting up a mom doc is a simple, four-part procedure. You begin by entering information about the document itself (title, subtitle, author, etc.). Next, you tell mom what kind of document you're creating (e.g. chapter, letter, abstract, etc...) and what kind of output you want (typeset, typewrittten, draft-style, etc). Thirdly, you make as many or as few changes to mom's default behaviour as you wish. Lastly, you invoke the START macro. Voilà! You're ready to write.

## Some document defaults

As is to be expected, mom has defaults for everything. If you want to know a particular default, read about it in the description of the pertinent tag.

I fear the following may not be adequately covered in the documentation. Just in case, here they are.

- the paper size is 8.5x11 inches
- the left and right margins are 1-inch
- the top and bottom margins for document text are plus/minus visually 1-inch
- pages are numbered; the number appears centered, at the bottom, surrounded by hyphens ( e.g. -6- )
- the first page of a document begins with a document header
- subsequent pages have page headers with a rule underneath

Another way to check up on document processing defaults is to have a look at the macro file (om.tmac). Each macro is preceded by a description that (generally) says what its default is (if it has one).

## IMPORTANT NOTE on leading/spacing and bottom margins

Mom takes evenly-aligned bottom margins in running text very seriously. Only under a very few (exceptional) circumstances will she allow a bottom margin to "hang" (i.e. to fall short).

In order to ensure even bottom margins, mom uses the "base" document leading in effect at the start of each page (i.e. the leading used in paragraphs) to calculate the spacing of every document element. Prior to invoking START, this is done with the typesetting macro LS, afterwards with the document control macro DOC_LEAD.

Because mom relies so heavily on the base document leading, any change to the leading or spacing on a page will almost certainly have undesirable consequences on that page's bottom margin unless the change is fully compensated for elsewhere on the page.

In other words, if you add a few points of space somewhere on a page, you must subtract the same number of points somewhere else on that same page, and vice versa.

If it's a question of adding or subtracting full line spaces between or within document elements, you can do so by using the "v" unit of measure with whatever spacing macro you choose -- ALD, RLD, SPACE -- and mom won't object. "v" means "the current leading", so she isn't confused by it. And since "v" accepts decimal fractions, you can add/subtract half linespaces and quarter linespaces with "v" as well, provided you compensate for the fractional linespace somewhere else on the page.

## Document setup

### Tutorial -- Setting up a mom document

There are four "parts" to setting up a mom doc (three, actually, with one optional). Before we proceed, though, be reassured that something as simple as

    	.TITLE     "By the Shores of Lake Attica"
    	.AUTHOR    "Rosemary Winspeare"
    	.PRINTSTYLE TYPESET
    	.START

produces a beautifully typeset 8.5x11 document, with a docheader at the top of page 1, page headers with the title and author on subsequent pages, and page numbers at the bottom of each page. In the course of the document, heads, subheads, citations, quotes, epigraphs, and so on, all come out looking neat, trim, and professional.

For the purposes of this tutorial, we're going to set up a short story -- My Pulitzer Winner by Joe Blow. Thankfully, we don't have to look at story itself, just the setup. Joe wants the document

- to be draft 7, revision 39;
- to use the "default" style of document formatting:
- to print as draft-style output (instead of "final" copy output);
- to be typeset, in Helvetica, 12 on 14, rag-right;
- to have footers instead of headers;
- to use a single asterisk for author linebreaks.

Joe Blow has no taste in typography. His draft won't look pretty, but this is, after all, a tutorial; we're after examples, not beauty.

### Step 1

The first step in setting up any document is giving mom some reference information. The reference macros are:

- TITLE
- SUBTITLE
- AUTHOR
- CHAPTER -- the chapter number
- DRAFT -- the draft number
- REVISION -- the revision number

You can use as many or as few as you wish, although at a minimum, you'll probably fill in TITLE (unless the document's a letter) and AUTHOR. Order doesn't matter. You can separate the arguments from the macros by any number of spaces. The following are what you'd need to start Joe Blow's story.

    	.TITLE    "My Pulitzer Winner"
    	.AUTHOR   "Joe Blow"
    	.DRAFT     7
    	.REVISION  39

### Step 2

Once you've given mom the reference information she needs, you tell her how you want your document formatted. What kind of document is it? Should it be typeset or typewritten? Is this a "final" copy (for the world to see) or just a draft? Mom calls the macros that answer these questions "the docstyle macros." They are:

- DOCTYPE -- the type of document (default, chapter, user-defined, letter)
- PRINTSTYLE -- typeset or typewritten
- COPYSTYLE -- draft or final copy

Mom has defaults for DOCTYPE and COPYSTYLE; if they're what you want, you don't need to include them here. However, PRINTSTYLE has no default and MUST be present in every formatted document. If you omit it, mom won't process the document AND she'll complain (both to stderr and as a single printed sheet with a warning). Moms -- they can be so annoying sometimes. <sigh>

Adding to what we already have, the next bit of setup for Joe Blow's story looks like this:

    	.TITLE    "My Pulitzer Winner"
    	.AUTHOR   "Joe Blow"
    	.DRAFT     7
    	.REVISION  39
    	\#
    	.DOCTYPE     DEFAULT \"Superfluous; mom uses DOCTYPE DEFAULT by default
    	.PRINTSTYLE  TYPESET
    	.COPYSTYLE   DRAFT

Notice the use of the comment line ( \# ), a handy way to keep groups of macros visually separated for easy reading in a text editor.

### Step 3

This step -- completely optional -- is where you, the user, take charge. Mom has defaults for everything, but who's ever satisfied with defaults? Use any of the typesetting macros here to change mom's document defaults (paper size, margins, family, point size, line space, rag, etc), or any of the document processing macros that set/change/control the appearance of document elements. Think of this as the "style-sheet " section of a document.

Joe Blow wants his story printed in Helvetica, 12 on 14, rag right, with page footers instead of page headers and a single asterisk for the linebreak character. None of these requirements conforms to mom's defaults for the chosen PRINTSTYLE (TYPESET), so we change them here. The setup for Joe Blow's story now looks like this:

    	.TITLE    "My Pulitzer Winner"
    	.AUTHOR   "Joe Blow"
    	.DRAFT     7
    	.REVISION  39
    	\#
    	.DOCTYPE     DEFAULT
    	.PRINTSTYLE  TYPESET
    	.COPYSTYLE   DRAFT
    	\#
    	.FAMILY  H
    	.PT_SIZE 12
    	.LS      14
    	.QUAD    LEFT    \"ie. rag right
    	.FOOTERS
    	.LINEBREAK_CHAR *

### Step 4

The final step in setting up a document is telling mom to start document processing. It's a no-brainer, just the single macro START. Other than PRINTSTYLE, it's the only macro required for document processing (although I can't guarantee you'll like the results of using just the two).

Here's the complete setup for My Pulitzer Winner:

    	.TITLE    "My Pulitzer Winner"
    	.AUTHOR   "Joe Blow"
    	.DRAFT     7
    	.REVISION  39
    	\#
    	.DOCTYPE     DEFAULT
    	.PRINTSTYLE  TYPESET
    	.COPYSTYLE   DRAFT
    	\#
    	.FAMILY   H
    	.PT_SIZE  12
    	.LS       14
    	.QUAD     LEFT    \"ie. rag right
    	.FOOTERS
    	.LINEBREAK_CHAR *
    	\#
    	.START

As pointed out earlier, Joe Blow is no typographer. Given that all he needs is a printed draft of his work, a simpler setup would have been:

    	.TITLE    "My Pulitzer Winner"
    	.AUTHOR   "Joe Blow"
    	.DRAFT     7
    	.REVISION  39
    	\#
    	.PRINTSTYLE  TYPEWRITE
    	.COPYSTYLE   DRAFT
    	\#
    	.START

`.PRINTSTYLE TYPEWRITE`, above, means that Joe's work will come out "typewritten, double-spaced", making the blue-pencilling he (or someone else) is sure to do much easier (which is why many publishers and agents still insist on typewritten, double-spaced copy).

When J. Blow stops re-writing and decides to print off a final, typeset copy of his work for the world to see, he need only make two changes to the (simplified) setup:

    	.TITLE    "My Pulitzer Winner"
    	.AUTHOR   "Joe Blow"
    	.DRAFT     7
    	.REVISION  39
    	\#
    	.PRINTSTYLE  TYPESET  \"first change
    	.COPYSTYLE   FINAL    \"second change
    	\#
    	.START

In the above, `.DRAFT 7, .REVISION 39,` and `.COPYSTYLE FINAL` are actually superfluous. The draft and revision numbers aren't used when COPYSTYLE is FINAL, and COPYSTYLE FINAL is mom's default unless you tell her otherwise. BUT... to judge from the number of drafts already, J. Blow may very well decide his "final" version still isn't up to snuff. Hence, he might as well leave in the superfluous macros. That way, when draft 7, rev. 62 becomes draft 8, rev. 1, he'll be ready to tackle his Pulitzer winner again.

## The Reference Macros

The reference macros give mom the information she needs to generate docheaders and page headers. They must go at the top of any file that uses mom's document processing macros.

### Reference macros list

- TITLE
- SUBTITLE
- AUTHOR
- CHAPTER
- DRAFT
- REVISION

Macro: TITLE "<title>"
*Argument must be enclosed in double-quotes

The title string can be caps or caps/lower-case; it's up to you. In PRINTSTYLE TYPESET, the title will appear in the docheader exactly as you typed it. However, mom converts the title to all caps in page headers unless you turn that feature off (see HEADER_<POSITION>_CAPS). In PRINTSTYLE TYPEWRITE, the title always gets converted to caps.

NOTE: If your DOCTYPE is CHAPTER, TITLE should be the title of the opus, not "CHAPTER whatever".

Macro: SUBTITLE "<subtitle>"
*Argument must be enclosed in double-quotes

The subtitle string can be caps or caps/lower-case. Since a document's subtitle appears only in the docheader, and the title is most likely in caps, I recommend caps/lower case.

Macro: AUTHOR "<author string>" [ "<author2 string>" "<author3 string>" ... ]
*Multiple arguments must be enclosed in double-quotes

Each author string can hold as many names as you like, e.g.

    	.AUTHOR "Joe Blow"
    	    or
    	.AUTHOR "Joe Blow, Jane Doe" "John Hancock"

Mom prints each string that's enclosed in double-quotes on a separate line in the docheader, however only the first string appears in page headers. If you want mom to put something else in the author part of page headers (say, just the last names of a document's two authors), redefine the appropriate part of the header (see header/footer control).

The strings can be caps or caps/lower-case. I recommend caps/lower case.

Macro: CHAPTER <chapter number>

The chapter number can be in any form you like -- a digit, a roman numeral, a word. If you choose DOCTYPE CHAPTER, mom prints whatever argument you pass CHAPTER beside the word "Chapter" as a single line docheader. She also puts the same thing in the middle of page headers.

If you're not using DOCTYPE CHAPTER, the macro serves no purpose and mom ignores it.

If you're not writing in English, you can ask mom to use the word for chapter in your own language by telling her what it is with the CHAPTER_STRING macro, like this:

    	.CHAPTER_STRING "Chapître"

You can also use CHAPTER_STRING if you want "CHAPTER" instead of "Chapter" in the doc- and page-headers. (See also the Special Note on CHAPTER.)

Macro: DRAFT <draft #>

DRAFT only gets used with COPYSTYLE DRAFT. If the COPYSTYLE is FINAL (the default), mom ignores DRAFT. DRAFT only accepts a numeric argument.

Mom prints the draft number beside the word "Draft" in the middle part of page headers. If you're not writing in English, you can ask mom to use the word for draft in your own language by telling her what it is with the DRAFT_STRING macro, like this:

    	.DRAFT_STRING "Ébauche"

Macro: REVISION <revision #>

REVISION only gets used with COPYSTYLE DRAFT. If the COPYSTYLE is FINAL (the default), mom ignores the REVISION macro. REVISION only accepts a numeric argument.

Mom prints the revision number beside the shortform "Rev." in the middle part of page headers. If you're not writing in English, you can ask mom to use the word for revision, or a shortform therof in your own language by telling her what it is with the REVISION_STRING macro, like this:

    	.REVISION_STRING "Rév."

## The Docstyle Macros

The docstyle macros tell mom what type of document you're writing, whether you want the output typeset or "typewritten", and whether you want a draft copy (with draft and revision information in the headers) or a final copy.

### Docstyle macros list

- DOCTYPE
- PRINTSTYLE
  - Defaults for PRINTSTYLE TYPESET
  - Defaults for PRINTSTYLE TYPEWRITE
    - TYPEWRITE control macros
- COPYSTYLE

Macro: DOCTYPE DEFAULT | CHAPTER | NAMED "<name>" | LETTER

The arguments DEFAULT, CHAPTER and NAMED tell mom what to put in the docheader and page headers. LETTER tells her that you want to write a lettter.

Mom's default DOCTYPE is DEFAULT. If that's what you want, you don't have to give a DOCTYPE command.

DEFAULT prints a docheader containing the title, subtitle and author information given to the reference macros, and page headers with the author and title. (See Default specs for headers for how mom's outputs each part of the page header.)

CHAPTER prints "Chapter #" in place of a docheader (# is what you gave to CHAPTER), or, if you omit the CHAPTER macro and give the chapter a title with CHAPTER_STRING, mom prints the chapter title. Page headers contain the author, the title of the book (which you gave with TITLE), and "Chapter #" (or the chapter title). See Default Specs for Headers for mom's default type parameters for each part of the page header.

*See the Special Note on CHAPTER below for how you can make DOCTYPE CHAPTER print something other than "Chapter #" as its docheader.

NAMED takes an additional argument: a name for this particular kind of document (e.g. outline, synopsis, abstract, memorandum), enclosed in double-quotes. NAMED is identical to DEFAULT except that mom prints the argument to NAMED beneath the docheader, as well as in page headers. (See Default specs for headers for how mom's outputs each part of the page header.)

LETTER tells mom you're writing a letter. See the section Writing Letters for instructions on using mom to format letters.

### Special Note on CHAPTER

In novels, new chapters are generally (but not always) introduced by "Chapter #". Other types of documents (reports and so on) often require specific titles for chapters. If your document is of this latter type, use DOCTYPE CHAPTER in the following way:

1. Omit the reference macro CHAPTER
2. Invoke .CHAPTER_STRING with the title you'd like the chapter to have (enclosed in double-quotes, of course).

Here's a recipe for setting up a chapter entitled "The DMCA Nazis".

    	.AUTHOR "Outraged Hacker"
    	.TITLE  "Limiting Copyright"
    	\#
    	.DOCTYPE    CHAPTER
    	.PRINTSTYLE TYPESET
    	\#
    	.CHAPTER_STRING "The DMCA Nazis"

Macro: PRINTSTYLE TYPESET | TYPEWRITE [ SINGLESPACE ]
*Required for document processing.

PRINTSTYLE tells mom whether to typeset a document, or to print it out "typewritten, doubled-spaced".

THIS MACRO MAY NOT BE OMITTED. In order for document processing to take place, mom requires a PRINTSTYLE. If you don't give one, mom will warn you on stderr and print a single page with a nasty message.

TYPESET, as the argument implies, typesets documents (by default in Times Roman; see TYPESET defaults). You have full access to all the typesetting macros as well as the style control macros of document processing.

With TYPEWRITE, mom does her best to reproduce the look and feel of typewritten, double-spaced copy (see TYPEWRITE defaults). Control macros and typesetting macros that alter family, font, point size, and leading are (mostly) ignored. An important exception is HEADER_SIZE (and, by extension, FOOTER_SIZE), which allows you to reduce the point size of headers/footers should they become too crowded. Most of mom's inlines affecting the appearance of type are also ignored (\*S is an exception; there may be a few others).

In short, TYPEWRITE never produces effects other than those available on a typewriter. Don't be fooled by how brainless this sounds; mom is remarkably sophisticated when it comes to conveying the typographic sense of a document within the confines of TYPEWRITE.

The primary uses of TYPEWRITE are: outputting hard copy drafts of your work (for editing), and producing documents for submission to publishers and agents who (wisely) insist on typewritten, double-spaced copy. To get a nicely typeset version of work that's in the submission phase of its life (say, to show fellow writers for critiquing), simply change TYPEWRITE to TYPESET and print out a copy.

If, for some reason, you would prefer the output of TYPEWRITE single-spaced, pass PRINTSTYLE TYPEWRITE the optional argument, SINGLESPACE.

If you absolutely must have a leading other than typewriter double- or singlespaced, the only way to get it is with the DOC_LEAD macro, and then ONLY if DOC_LEAD is set before you invoke the START macro.

### TYPESET defaults

    	Family            = Times Roman
    	Point size        = 12.5
    	Paragraph leading = 16 points, adjusted
    	Fill mode         = justified
    	Hyphenation       = enabled
    	                    max. lines = 2
    	                    margin = 36 points
    	                    interword adjustment = 1 point
    	Kerning           = enabled
    	Ligatures         = enabled
    	Smartquotes       = enabled
    	Word space        = groff default
    	Sentence space    = 0

### TYPEWRITE defaults

    	Family            = Courier
    	Italics           = underlined
    	Point size        = 12
    	Paragraph leading = 24 points, adjusted; 12 points for SINGLESPACE
    	Fill mode         = left
    	Hyphenation       = disabled
    	Kerning           = disabled
    	Ligatures         = disabled
    	Smartquotes       = disabled
    	Word space        = groff default
    	Sentence space    = groff default
    	Columns           = ignored

### PRINTSTYLE TYPEWRITE control macros

In PRINTSTYLE TYPEWRITE, mom, by default, underlines anything that looks like italics. This includes the \*[SLANT] inline escape for pseudo-italics.

If you'd prefer that mom were less bloody-minded about pretending to be a typewriter (i.e. you'd like italics and pseudo-italics to come out as italics), use the control macros .ITALIC_MEANS_ITALIC and .SLANT_MEANS_SLANT. Neither requires an argument.

Although it's unlikely, should you wish to reverse the sense of these macros in the midst of a document, .UNDERLINE_ITALIC and .UNDERLINE_SLANT restore underlining of italics and pseudo-italics.

Additionally, by default, mom underlines quotes (but not blockquotes) in PRINTSTYLE TYPEWRITE. If you don't like this behaviour, turn it off with

    	.UNDERLINE_QUOTES OFF

To turn underlining of quotes back on, use UNDERLINE_QUOTES without an argument.

While most of the control macros have no effect on PRINTSTYLE TYPEWRITE, there is an important exception: HEADER_SIZE (and by extension, FOOTER_SIZE). This is particularly useful for reducing the point size of headers/footers should they become crowded (quite likely to happen if the title of your document is long and your COPYSTYLE is DRAFT).

Macro: COPYSTYLE DRAFT | FINAL

Mom's default COPYSTYLE is FINAL, so you don't have to use this macro unless you want to.

COPYSTYLE DRAFT exhibits the following behaviour:

1. documents start on page 1, whether or not you request a different starting page number with PAGENUMBER
2. page numbers are set in lower case roman numerals
3. the draft number supplied by DRAFT and a revision number, if supplied with REVISION (see reference macros), appear in the center part of page headers (or footers, depending on which you'ves selected) along with any other information that normally appears there.

IMPORTANT: If you define your own center part for page headers with HEADER_CENTER, no draft and/or revision number will appear there. If you want draft and revision information in this circumstance, use DRAFT_WITH_PAGENUMBER.

COPYSTYLE FINAL differs from DRAFT in that:

1. it respects the starting page number you give the document
2. page numbers are set in normal (arabic) digits
3. no draft or revision number appears in the page headers

NOTE: The center part of page headers can get crowded, especially with DOCTYPE CHAPTER and DOCTYPE NAMED, when the COPYSTYLE is DRAFT. Three mechanisms are available to overcome this problem. One is to reduce the overall size of headers (with HEADER_SIZE). Another, which only works with PRINTSTYLE TYPESET, is to reduce the size of the header's centre part only (with HEADER_CENTER_SIZE). And finally, you can elect to have the draft/revsion information attached to page numbers instead of having it appear in the center of page headers (see DRAFT_WITH_PAGENUMBER).

## Changing type/style parameters prior to START

In the third (optional) part of setting up a document (see Tutorial -- setting up a mom document), you can use the typesetting macros to change mom's document-wide defaults for margins, line length, family, base point size, leading, and justification style.

Two additional style concerns have to be addressed here (i.e. in macros before START): changes to the docheader, and whether you want you want the document's nominal leading adjusted to fill pages fully to the bottom margin.

- Using typesetting macros prior to START

- DOC_LEAD_ADJUST -- adjusting linespacing for equal, accurate bottom margins
- DOCHEADER -- turning the docheader off
  - Docheader control

## Using typesetting macros prior to START

When used before the START macro, the following typesetting macros have these meanings:

    	L_MARGIN         Left margin of pages, including headers/footers
    	R_MARGIN         Right margin of pages, including headers/footers
    	T_MARGIN         The point at which running text (i.e. not
    	                 headers/footers or page numbers) starts on each page
    	B_MARGIN         The point at which running text (i.e. not
    	                 headers/footers or page numbers) ends on each page

    	(PAGE            If you use PAGE, its first four arguments have the
    	                 same meaning as L_ R_ T_ and B_MARGIN above.)

    	LL               The line length for everything on the page;
    	                 equivalent to setting the right margin with R_MARGIN
    	FAMILY           The family of all type in the document
    	PT_SIZE          The point size of type in paragraphs; mom uses this
    	                 calculate automatic point size changes (eg. for heads,
    	                 footnotes, quotes, headers, etc)
    	*LS or AUTOLEAD  The leading used in paragraphs; all leading and spacing
    	                 of running text is calculated from this
    	QUAD             Affects paragraphs only

    ------
    *See DOC_LEAD_ADJUST

Other macros that deal with type style, or refinements thereof (KERN, LIGATURES, HY, WS, SS, etc.), behave normally. It is not recommended that you set up tabs or indents prior to START.

If you want to change any of the basic parameters above after START and have them affect a document globally (as if you'd entered them before START), you must use the macros listed in Changing document-wide style parameters after START.

### Adjusting document leading to fill pages

Macro: DOC_LEAD_ADJUST toggle
*Must come after LS or AUTOLEAD and before START

DOC_LEAD_ADJUST is a special macro to adjust document leading so that bottom margins fall precisely where you expect.

If you invoke DOC_LEAD_ADJUST, mom takes the number of lines that fit on the page at your requested leading, then incrementally adds machine units to the leading until the maximum number of lines at the new leading matches the bottom margin. In most instances, the difference between the requested lead and the adjusted lead is unnoticeable.

Mom uses DOC_LEAD_ADJUST with her default document settings, but if you invoke LS or AUTOLEAD prior to START, you have to do

    	.DOC_LEAD_ADJUST

in order to enable it.

If you don't like the idea of mom playing around with the leading by default, you can turn adjusting off with

    	.DOC_LEAD_ADJUST OFF

In this scenario, the maximum number of lines that fit on a page at the current document leading determine where mom ends a page. The effect will be that last lines usually fall (slightly) short of your expected bottom margin.

NOTE: DOC_LEAD_ADJUST, if used, must be invoked after LS or AUTOLEAD and before START

### Managing the docheader

Macro: DOCHEADER <toggle> [ distance to advance from top of page ]
*Must come before START; distance requires a unit of measure

By default, mom prints a docheader on the first page of any document (see below for a description of the docheader). If you don't want a docheader, turn it off with

    	.DOCHEADER OFF

DOCHEADER is a toggle macro, so the argument doesn't have to be OFF; it can be anything you like.

If you turn the docheader off, mom, by default, starts your document in the same place she would if the docheader were there. If you'd like her to start at a different vertical position, give her the distance you'd like as a second argument.

    	.DOCHEADER OFF 1.5i

This starts the document 1.5 inches from the top of the page. The distance you give is measured from the top edge of the paper to the baseline of the first line of type.

TIP: Since no document processing happens until you invoke START -- including anything to do with docheaders -- you can typeset your own docheader prior to START (if you don't like the way mom does things) and use DOCHEADER OFF with its optional distance argument to ensure that the body of your document starts where you want. You can even insert a PostScript file (with .PSPIC; see the grops man page for usage).

### How to change the look of docheaders: docheader control macros

With PRINTSTYLE TYPEWRITE, the look of docheaders is carved in stone. In PRINTSTYLE TYPESET, however, you can make a lot of changes. Macros that alter docheaders MUST come before START.

A typeset docheader has the following characteristics. Note that title, subtitle, author, and document type are what you supply with the reference macros. Any you leave out will not appear; mom will compensate:

    	    TITLE         bold, 3.5 points larger than running text (not necessarily caps)
    	   Subtitle       medium, same size as running text
    	      by          medium italic, same size as running text
    	   Author(s)      medium italic, same size as running text

    	(Document type)   bold italic, underscored, 3 points larger than running text

The family is the prevailing family of the whole document.

### The docheader macros to:

1. Change the starting position
2. Adjust the leading
3. Change the family of docheader elements
4. Change the font of docheader elements
5. Adjust the size of docheader elements
6. Change the attribution string ("by")

### 1. Change the starting position

By default, a docheader starts on the same baseline as running text. If you'd like it to start somewhere else, use the macro `.DOCHEADER_ADVANCE` and give it the distance you want (measured from the top edge of the paper to the first baseline of the docheader), like this:

    	.DOCHEADER_ADVANCE 4P

A unit of measure is required.

NOTE: If HEADERS are OFF, mom's normal top margin for running text (7.5 picas) changes to 6 picas (visually approx. 1 inch). Since the first baseline of the docheader falls on the same baseline as the first line of running text (on pages after page 1), you might find the docheaders a bit high when headers are off. Use DOCHEADER_ADVANCE to place them where you want.

### 2. Adjust the leading

The leading of docheaders is the same as running text. If you'd like a different leading, say, 2 points more than the lead of running text, use:

    	.DOCHEADER_LEAD +2p

Since the leading of docheaders is calculated from the lead of running text, a + or - sign is required before the argument (how much to add or subtract from the lead of running text). The unit of measure is also required.

### 3. Change the family of docheader elements

The following macros let you change the family of each docheader element separately:

- TITLE_FAMILY <family>
- SUBTITLE_FAMILY <family>
- AUTHOR_FAMILY <family>
- DOCTYPE_FAMILY <family> (if DOCTYPE is NAMED)

Simply pass the appropriate macro the family you want.

### 4. Change the font of docheader elements

The following macros let you change the font of each docheader element separately:

- TITLE_FONT R | B | I | BI
- SUBTITLE_FONT R | B | I | BI
- AUTHOR_FONT R | B | I | BI
- DOCTYPE_FONT R | B | I | BI (if DOCTYPE is NAMED)

Simply pass the appropriate macro the font you want. R, B, I and BI have the same meaning as they do for FT.

### 5. Adjust the size of docheader elements

The following macros let you adjust the point size of each docheader element separately.

Mom calculates the point size of docheader elements from the point size of paragraphs, so you must prepend a + or - sign to the argument. Points is assumed as the unit of measure, so there's no need to append a unit to the argument. Fractional point sizes are allowed.

- TITLE_SIZE <+/-points>
  default = +3.5 (+4 if docheader title is "Chapter #")
- SUBTITLE_SIZE <+/-points>
  default = +0
- AUTHOR_SIZE <+/-points>
  default = +0
- DOCTYPE_SIZE <+/-points> (if DOCTYPE is NAMED)
  default = +3

Simply pass the appropriate macro the size adjustment you want.

### 6. Change the attribution string ("by")

If you're not writing in English, you can change what mom prints where "by" appears in docheaders. For example,

    	.ATTRIBUTE_STRING "par"

changes "by" to "par". If you don't want an attribution string at all, simply pass ATTRIBUTE_STRING an empty argument, like this:

    	.ATTRIBUTE_STRING ""

Mom will deposit a blank line where the attribution string normally appears.

NOTE: The type specs for the attribution line in docheaders are the same as for the author line. Although it's highly unlikely you'll want the attribution line in a different family, font, or point size, you can do so by using inline escapes in the argument to ATTRIBUTE_STRING. For example,

    	.ATTRIBUTE_STRING "\f[HBI]\*S[-2p] by \*S[+2p]\*[PREV]"

would set "by" in Helvetica bold italic, 2 points smaller than normal.

## Setting documents in columns

Setting documents in columns is easy with mom. (Of course she'd say that, but it's true!) All you have to do is is say how many columns you want and how much space you want between them (the gutters). That's it. Mom takes care of everything else, from soup to nuts.

SOME WORDS OF ADVICE:

If you want your type to achieve a pleasing justification or rag in columns, reduce the point size of type (and probably the leading as well). Mom's default document point size is 12.5, which works well across her default 39 pica full page line length, but with even just two columns on a page, the default point size is awkward to work with.

Furthermore, you'll absolutely need to reduce the indents for epigraphs, quotes, and blockquotes (and probably the paragraph first-line indent as well).

### COLUMNS

Macro: COLUMNS <number of columns> <width of gutters>
*Should be the last macro before START
The second argument requires a unit of measure

COLUMNS takes two arguments: the number of columns you want on document pages, and the width of the gutter between them. For example, to set up a page with two columns separated by an 18 point gutter, you'd do

    	.COLUMNS 2 18p

Nothing to it, really. However, as noted above, COLUMNS should always be the last document setup macro prior to START.

NOTE: Mom ignores columns completely when the PRINTSTYLE is TYPEWRITE. The notion of typewriter-style output in columns is just too ghastly for her to bear.

### Breaking columns manually

Mom takes care of breaking columns when they reach the bottom margin of a page. However, there may be times you want to break the columns yourself. There are two macros for breaking columns manually: COL_NEXT and COL_BREAK.

`.COL_NEXT` breaks the line just before it, quads it left (assuming the type is justified or quad left), and moves over to the top of the next column. If the column happens to be the last (rightmost) one on the page, mom starts a new page at the "column 1" position. This is the macro to use when you want to start a new column after the end of a paragraph.

`.COL_BREAK` is almost the same, except that instead of breaking and quadding the line preceding it, she breaks and spreads it (see SPREAD). Use this macro whenever you need to start a new column in the middle of a paragraph.

If you need COL_BREAK in the middle of a blockquote or (god help us) an epigraph, you must do the following in order for COL_BREAK to work:

    	.SPREAD
    	\!.COL_BREAK

## Initiate document processing

In order to use mom's document element macros (tags), you have to tell her you want them. The macro to do this is START.

START collects the information you gave mom in the setup section at the top of your file (see Tutorial -- setting up a mom document), merges it with her defaults, sets up headers and page numbering, and prepares mom to process your document using the document element tags. No document processing takes place until you invoke START.

Macro: START
*Required for document processing.

START takes no arguments. It simply instructs mom to begin document processing. If you don't want document processing (i.e. you only want the typesetting macros), don't use START.

At a barest minimum before START, you must enter a PRINTSTYLE command.

## Changing document-wide style parameters after START

In the normal course of things, you change the basic type parameters of a document before START, using typesetting macros (L_MARGIN, FAMILY, PT_SIZE, LS, etc). After START, you must use the following macros to make global changes to the basic type parameters of a document.

### Macro list

- DOC_LEFT_MARGIN
- DOC_RIGHT_MARGIN
- DOC_LINE_LENGTH
- DOC_FAMILY
- DOC_PT_SIZE
- DOC_LEAD
- DOC_LEAD_ADJUST
- DOC_QUAD

Macro: DOC_LEFT_MARGIN <left margin>
*Requires a unit of measure

- the argument is the same as for L_MARGIN
- changes all left margins to the new value
- the line length remains the same (i.e. the right margin shifts when you change the left margin)

Macro: DOC_RIGHT_MARGIN <right margin>
*Requires a unit of measure

- the argument is the same as for R_MARGIN
- changes all right margins to the new value
- all mom commands that include a right indent calculate the indent from the new value

Macro: DOC_LINE_LENGTH <length>
*Requires a unit of measure

- the argument is the same as for LL
- equivalent to changing the right margin with DOC_RIGHT_MARGIN

Macro: DOC_FAMILY <family>

- the argument is the same as for FAMILY
- globally changes the type family
- if you wish the header and/or page number families to remain at their old values, you must reset them with HEADER_FAMILY and PAGENUM_FAMILY

Macro: DOC_PT_SIZE <point size>
*Does not require a unit of measure; points is assumed

- the argument is the same as for PT_SIZE, and refers to the point size of type in paragraphs
- all automatic point size changes (heads, quotes, footnotes, headers, etc.) are affected by the new size; anything you do not want affected must be reset to its former value (see the Control Macros section of the pertinent document element for instructions on how to do this)

Macro: DOC_LEAD <points> [ ADJUST ]
*Does not require a unit of measure; points is assumed

- the argument is the same as for LS, and refers to the leading of paragraphs
- because paragraphs will have a new leading, the leading and spacing of most running text is influenced by the new value
- epigraphs and footnotes remain unaffected; if you wish to change their leading, use EPIGRAPH_AUTOLEAD and FOOTNOTE_AUTOLEAD.
- the optional argument ADJUST performs leading adjustment as explained in DOC_LEAD_ADJUST

IMPORTANT: Do not use DOC_LEAD in the middle of a page! It should always and only be invoked immediately prior to a new page, like this:

    	.DOC_LEAD <new value>
    	.NEWPAGE

Macro: DOC_QUAD L | R | C | J

- the arguments are the same as for QUAD
- affects paragraphs, epigraphs and footnotes; does not affect blockquotes

Next Prev Top Back to Table of Contents