Next   Prev   Back to Table of Contents

THE DOCUMENT ELEMENT TAGS

Introduction to the document element tags

Once you've completed the setup for a document (see Setting up a mom document), formatting it is a snap. Simply invoke the appropriate tag for each document element as you need it. The tags are macros that tell mom, "This is a paragraph, this is a subhead, this is a footnote," and so on.

The list of tags is actually quite small -- ideal for the users mom brought herself into being for (see Who mom is meant for). However, the list of macros that control the appearance of the tags upon output is extensive. Generally, for each tag, there are control macros for the tag's family, font and point size. Where appropriate, there are macros to control leading, indents, quad and special features as well.

Mom has tasteful defaults for all the tags, hence you only use the control macros when you want to change the way she does things. This is usually done prior to START, but can, in fact, be done at any time in the course of a document. Any change to a tag's style affects all subsequent invocations of the tag.

Control macros -- changing defaults

The control macros for document processing tags let you "design" the look of all the parts of your documents -- should you wish. At a bare minimum, all tags have macros to change mom's defaults for family, font, point size and colour. Where appropriate, there are macros to control leading, indents and quad as well.

In addition, many tags have special macros to control features that are pertinent to those tags alone. Have a look at the section dealing with any particular tag to find out what macros control the tag, and what mom's defaults for the tag are.

The control macros may be used at any time during the course of a document (i.e. before or after START). The changes you make alter all subsequent invocations of the affected tag until you make another change, either by passing new arguments to the tag's control macro, or toggling a particular feature of the tag on or off.

And don't forget: the typesetting macros can be used at any time, including inside toggle tags (affecting only that particular invocation of the tag). Equally, inline escapes can be used in tags that take string arguments.

IMPORTANT NOTE: The family, font, point size, colour and leading control macros have no effect in PRINTSTYLE TYPEWRITE, which sets EVERYTHING in Courier roman, 12/24 (i.e. 12-point type on a linespace of 24 points).

Please also note that the defaults listed with the control macros apply only to PRINTSTYLE TYPESET unless a default for TYPEWRITE is also given.

A WORD OF ADVICE: Get familiar with mom at her default settings before exploring the control macros. Put her through her paces. See how she behaves. Get to know what she feels like and how she looks, both in your text editor and on the printed page. Then, if you don't like something, use this documentation to find the precise macro you need to change it. There are tons of control macros. Reading up on them and trying to remember them all might lead you to think that mom is complex and unwieldy, which is not only untrue, but would offend her mightily.

Arguments to the control macros

Family and font

The arguments to the control macros that end in _FAMILY or _FONT are the same as for FAMILY and FT.

Point size

Control macros that end in _SIZE always take the form +digit or -digit where digit is the number of points larger (+) or smaller (-) than the point size of paragraphs you want the document element to be. For example, to change subheads to 1-1/2 points larger than the type in paragraphs, do

	.SUBHEAD_SIZE +1.5
There's no need for a unit of measure with the _SIZE control macros; points is assumed.

Colour

Control macros that end in _COLOR take as their argument a colour name pre-defined (or "initialized") with NEWCOLOR or XCOLOR. For example, if you want your heads to be red, once you've defined or initialized the color, red,

	.HEAD_COLOR red
will turn your heads red.

Lead/linespacing

Control macros that end in _AUTOLEAD take the same argument as AUTOLEAD, viz. a digit that represents the number of points to add to the tag's point size to arrive at its lead. For example, to set footnotes solid, do

	.FOOTNOTE_AUTOLEAD 0
To set footnotes with a 1-point lead (i.e. with the line spacing one point greater than the footnote's point size), do

	.FOOTNOTE_AUTOLEAD 1

Indents

Except for PARA_INDENT, the argument to the control macros that end in _INDENT is always a single digit (whole numbers only; no decimal fractions) with no unit of measure appended to it. The digit represents by how much you want the size of the paragraph first-line indent multiplied to achieve the correct indent for a particular tag.

Quad/justification style

Control macros that end in _QUAD take the same arguments as QUAD.


Document element tags list


Epigraphs

Epigraphs colour, flavour, or comment on the document they precede. Typically, they are centred at the top of a document's first page (underneath the title) and set in a smaller point size than that of paragraph text.

By default, mom sets epigraphs centred and unfilled; this lets you input them on a line for line basis. This behaviour can be changed to accomodate filled epigraph "blocks."


Macro: EPIGRAPH <toggle> | [ BLOCK ]

EPIGRAPH is a toggle, used like this:

	.EPIGRAPH
	<text of epigraph>
	.EPIGRAPH OFF
OFF, above, could be anything -- say, Q or X -- since any argument other than BLOCK turns it off.

If given the argument BLOCK, EPIGRAPH sets epigraphs filled, justified or quadded in the same direction as paragraphs, indented equally from both the left and right margins.

If a block-style epigraph runs to more than one paragraph (unlikely, but conceivable), you MUST introduce every paragraph -- INCLUDING THE FIRST!!! -- with the PP tag.

NOTE: EPIGRAPH should only be used at the top of a document (i.e. just after START) or after heads. The latter is not especially recommended, but it does work. In all other places where you want quotes or cited text, use QUOTE or BLOCKQUOTE.

Epigraph control macros

See Arguments to the control macros.

.EPIGRAPH_FAMILY    default = prevailing document family; default is Times Roman
.EPIGRAPH_FONT      default = roman
.EPIGRAPH_SIZE      default = -1.5 (points)
.EPIGRAPH_COLOR     default = black
.EPIGRAPH_AUTOLEAD  default = 2 points

(The next two apply to "block" style epigraphs only)

.EPIGRAPH_QUAD      default = same as paragraphs
.EPIGRAPH_INDENT*   default = para indent x 3 (for typeset), x 2 (for typewrite)

*Indent here refers to the indent from both the left and right margins
 that centres the block style epigraph on the page.

Paragraphs

The paragraph macro is the one you use most often. Consequently, it's one of most powerful, yet simplest to use -- just the letters PP. No arguments, nothing. Just .PP on a line by itself any time, in any document element, tells mom you want to start a new paragraph. The spacing and indent appropriate to where you are in your document are taken care of automatically.

By default, mom does not indent the first paragraph of a document, nor paragraphs that fall immediately after heads or subheads. The first paragraphs of blockquotes and block-style epigraphs are also not indented. This behaviour can be changed with the control macro INDENT_FIRST_PARAS.

In contrast to some other macro packages, mom does not deposit a blank line between paragraphs. If you want her to do so, use the control macro PARA_SPACE. (I don't recommend using this macro with PRINTSTYLE TYPEWRITE.)

Note that mom does not provide "orphan control" for paragraphs (i.e. even if only one line of a paragraph fits at the bottom of a page, she will set it on that page). The reason for this is that writers of fiction often have single-line paragraphs (e.g. in dialogue). Groff's simplistic orphan control will break these one-liners -- if they fall at the bottom of the page -- to a new page, which is not what you want.

TIP: The last thing you want while you're writing and editing drafts of a document (particularly stories and chapters) is a text file cluttered up with PP's. The visual interruption in the flow of text is a serious obstacle to creativity and critiquing.

I use the tab key on my keyboard to indent paragraphs when I'm writing, producing a text file that looks pretty much like what you see on a printed page. When it comes time to format and print the file, I run it through a sed script that (amongst other things) converts the character generated by the tab key (^I) into .PP (plus a new line), and pipe the output to groff for processing and printing.

Another solution is to insert a blank line between paragraphs. The blank lines can then be sedded out at print time as above, or, more conveniently, you can use the .blm primitive (blank line macro) to instruct groff (and mom) that blank lines should be interpreted as PP's.

	.blm PP
tells groff that all blank lines are really the macro PP.


Macro: PP

PP (on a line by itself, of course) tells mom to start a new paragraph. See above for more details. In addition to regular text paragraphs, you can use PP in epigraphs, blockquotes and footnotes.

Paragraph control macros

The PP being so important, and representing, as it were, the basis of everything that goes on in a document, its control is managed in a manner somewhat different from other document element tags.

  1. Family control
  2. Font control
  3. Paragraph colour
  4. Leading/linespacing control
  5. Justification/quad control
  6. First-line indent control
  7. Initial paragraphs indent control
  8. Paragraph spacing control

1. Family

The paragraph family is set with FAMILY prior to START, or DOC_FAMILY afterwards. Please note that both globally affect the family of every element in the document.

If you wish to change the family for regular text paragraphs only, invoke FAMILY immediately after PP in EVERY paragraph whose family you wish to differ from the prevailing document family.

Mom's default paragraph (and document) family is Times Roman.

2. Font -- PP_FONT

To change the font used in regular text paragraphs, use .PP_FONT, which takes the same argument as FT. PP_FONT may be used before or after START. Only regular text paragraphs are affected; paragraphs in epigraphs, blockquotes and footnotes remain at their default setting (medium roman) unless you change them with the appropriate control macros.

Mom's default paragraph font is medium roman.

3. Paragraph colour

Mom has no special control macro for colourizing paragraphs. If you wish a colourized paragraph, you must use the macro, COLOR, or the inline escape, \*[<colorname>], after .PP. The colour must be one pre-defined (or "initialized") with NEWCOLOR or XCOLOR.

Please note that unless you change the colour back to it's default (usually black) at the end of the paragraph, all subsequent paragraphs will be set in the new colour, although most other elements of your document will continue to be set in the default colour (usually black).

For example, assuming you have defined the colour, blue,

	.PP
	.COLOR blue
	<first paragraph>
	.HEAD "Monty Python"
	.SUBHEAD "The Origins of Spam"
	.PP
	<second paragraph>
the first paragraph will be blue, the head and subhead will be in the document's default colour (usually black), and the second paragraph will be in blue.

The one document element that is affected by changing the colour of paragraphs are paraheads, since they are attached directly to the body of paragraphs. In other words, if you change the colour of a paragraph and do not reset the paragraph colour back to its default, subsequent paraheads will appear in the same colour as your paragraphs unless you have explicitly told mom you want a pre-defined (or "initialized") color (usually black) for your paraheads.

See the footnote to .PARAHEAD_COLOR.

4. Leading

The paragraph leading is set with LS prior to START, or DOC_LEAD afterwards. Please note that either method globally affects the leading and spacing of every document element (except headers and footers).

If you wish to change the leading of regular text paragraphs only, invoke LS immediately after PP in EVERY paragraph whose leading you wish to change.

HYPER-IMPORTANT NOTE: It is extremely unwise to change paragraph leading with LS, as it will, in all cases, screw up mom's ability to balance the bottom margin of pages. Should you absolutely need to change paragraph leading with LS, and subsequently want mom to get back on the right leading track, use the SHIM macro.

Mom's default paragraph leading (document leading) is 16 points, adjusted to fill the page.

5. Justification/quad

The justification/quad-direction of regular text paragraphs (i.e. justified, or filled and quadded left/right/centre) is set with JUSTIFY or QUAD prior to START, and with DOC_QUAD afterwards.

Please note that either method of setting the paragraph justification/quad-direction also affects epigraphs and footnotes, but not blockquotes (whose default is QUAD LEFT unless you change it with BLOCKQUOTE_QUAD). The justification/quad-direction of epigraphs and footnotes may be changed with their own control macros.

If you wish to change the justification/quad-direction of individual paragraphs, use JUSTIFY or QUAD immediately after PP. Only the paragraph in question gets justified or quadded differently; subsequent paragraphs remain unaffected.

Mom's default justification/quad-direction for paragraphs is

6. First-line indent -- PARA_INDENT

The first-line indent of paragraphs is controlled by PARA_INDENT, which takes one argument: the size of the indent. PARA_INDENT may be used before or after START. A unit of measure is required; fractional sizes are allowed. Thus, to set the paragraph indent to 4-1/2 ems, do

	.PARA_INDENT 4.5m
In addition to establishing the basic first line-indent of paragraphs, PARA_INDENT also affects epigraphs, quotes and blockquotes, whose overall indenting from the left and (where applicable) right margins is relative to PARA_INDENT. Furthermore, the first-line indent of paragraphs within these document elements (as well as footnotes) is also relative to PARA_INDENT (always 1/2 of PARA_INDENT)), hence they are also affected.

Mom's default PARA_INDENT is 2 ems for PRINTSTYLE_TYPESET and 3 picas (1/2 inch) for PRINTSTYLE_TYPEWRITE.

7. Indenting initial paragraphs -- INDENT_FIRST_PARAS

By default, mom does not indent the first paragraph of a document, nor the first paragraph after a head or subhead, nor the first paragraphs of epigraphs, blockquotes or footnotes that run to more than one paragraph.

If you wish to have first paragraphs indented, invoke the macro .INDENT_FIRST_PARAS with no argument, either before or after START. INDENT_FIRST_PARAS is a toggle macro, therefore passing it any argument (OFF, QUIT, Q, X...) cancels its effect, meaning that first paragraphs will once again NOT be indented.

8. Spacing paragraphs -- PARA_SPACE

By default, mom does not insert a blank line between paragraphs. If you would like her to do so, invoke the macro .PARA_SPACE with no argument, either before or after START. PARA_SPACE is a toggle macro, therefore passing it any argument (OFF, QUIT, Q, X...) cancels its effect, meaning that paragraphs will once again NOT be separated by a blank line.

NOTE: If PARA_SPACE is on, mom spaces only those paragraphs that come after an "initial" paragraph. Initial paragraphs are those that come immediately after the docheader, epigraphs, heads, subheads and linebreaks. (The first paragraph after these document elements requires no blank line to separate it from other paragraphs.)

Sometimes, you can be fairly deep into a document before using .PP for the first time, and when you do, because mom is still waiting for that "initial" paragraph, she doesn't space it with a blank line, even though you expect her to. The simple workaround for this is to invoke .PP twice (in succession) at the point you expect the blank line to appear.


Main heads

Main heads -- or, in this documentation, just "heads" -- should be used any place you want titles to introduce major sections of a document. If you wish, mom can number your heads for you. Head numbers can also be included hierarchically in numbered subheads and paraheads.

By default, heads are centred on the page, underlined, all in caps. A double linespace precedes each head. In PRINTSTYLE TYPESET, heads are bold, slightly larger than paragraph text.

If these defaults don't suit you, you can change them with the head control macros.


Macro: HEAD "<text of head>" [ "<2nd line>" [ "<3rd line>" ... ] ]

The argument to HEAD is the text of the head, surrounded by double-quotes. If you need additional lines for a head, simply surround each line with double-quotes.

NOTE: If a head falls near the bottom of an output page and mom is unable to fit the head plus at least one line of text underneath it, she will set the head at the top of the next page.

ADDITIONAL NOTE: If an input line in a head (i.e. one of the lines surrounded by double-quotes) has to be broken by mom in order to fit the current line-length (say, a narrow column measure), the head underline (underscore) will not behave. You'll recognize the problem as soon as you preview your document. If you encounter a head that misbehaves with respect to underlining, the solution is to supply each line as you want it as a separate argument (surrounded by double-quotes) to the HEAD macro.

For example, if mom breaks

	.HEAD "This is a very, very, very long head"
into
	This is a very, very, very
	        long head        
you'll see the misbehaving underscore and should change the argument to HEAD to
	.HEAD "This is a very, very very" "long head"

Head control macros

There are, in addition to the usual family/font/size/quad control macros, a number of macros to manage head numbering, spacing, underlining, and so on. Check them out if you're unhappy with mom's defaults.

  1. Family/font/size/colour/quad
  2. Caps
  3. Pre-head space
  4. Underlining
  5. Numbering
  6. Reset head numbering
  7. Vertical inline escapes inside heads

1. Family/font/size/colour/quad

See Arguments to the control macros.

.HEAD_FAMILY default = prevailing document family; default is Times Roman
.HEAD_FONT   default = bold
.HEAD_SIZE   default = +1 (point)
.HEAD_COLOR  default = black
.HEAD_QUAD   default = CENTER

2. Capitalizing heads -- HEAD_CAPS

By default, mom sets heads in caps, regardless of the string(s) you give to HEAD. To change this behaviour, do

	.HEAD_CAPS OFF
HEAD_CAPS is a toggle macro, therefore you can use any argument you like instead of OFF (END, QUIT, Q, X...). To turn HEAD_CAPS back on, simply invoke it without an argument.

3. Space before heads -- HEAD_SPACE

By default, mom deposits 2 blank lines prior to every head. If you'd prefer just a single blank line, do

	.HEAD_SPACE OFF
HEAD_SPACE is a toggle macro, therefore you can use any argument you like instead of OFF (END, QUIT, Q, X...). To restore the space before heads to 2 blank lines, invoke HEAD_SPACE without an argument.

4. Underlining heads -- HEAD_UNDERLINE

By default, mom underlines heads. To change this behaviour, do

	.HEAD_UNDERLINE OFF
HEAD_UNDERLINE is a toggle macro, therefore you can use any argument you like instead of OFF (END, QUIT, Q, X...). To restore underlining of heads, invoke HEAD_UNDERLINE without an argument.

5. Number heads -- NUMBER_HEADS

If you'd like your heads numbered, simply invoke NUMBER_HEADS with no argument. Mom will number all subsequent heads automatically (in ascending order, naturally).

If, in addition to numbering heads, you also request that subheads and/or paraheads be numbered, the head number will be included in their numbers (each number separated by a period [dot]).

Should you wish to stop head numbering, invoke NUMBER_HEADS with any argument (OFF, QUIT, END, X...). Head numbering will cease, and the head number will not be included in the numbering of subheads and/or paraheads.

6. Reset head numbering -- RESET_HEAD_NUMBER

Should you wish to reset the head number to "1", invoke RESET_HEAD_NUMBER with no argument. If, for some reason, you want mom to use a head number that is not the next in ascending order (i.e. the last head number + 1), invoke RESET_HEAD_NUMBER with the number you want, e.g.

	.RESET_HEAD_NUMBER 6
Your next head will be numbered "6" and subsequent heads will be numbered in ascending order from "6".

7. Vertical inline escapes inside heads

If you need to adjust the baseline position of a head (e.g. the head falls at the top of a column and you want its ascenders to line up with the ascenders of running text in other columns), you can embed a vertical motion inline escape (either mom's or groff's in the string(s) you pass to HEAD

For example,

	.HEAD "\[ALD3]Text of head"
	    or
	.HEAD "\[DOWN 3p]Text of head"
will lower the baseline of the head by three points. Note that there's no need to reverse the sense of the inline escape.

In the case of heads that run to more than one line, you must embed the escape in the string for each line, like this:

	.HEAD "\[ALD3]First line" "\[ALD3]Next line" 
	    or
	.HEAD "\[DOWN 3p]First line" "\[DOWN 3p]Next line" 

Subheads

Subheads should be used any place you want titles to introduce sections of a document below heads. If you wish, mom can number subheads for you. Subhead numbers can also be included hierarchically in numbered paraheads.

By default, subheads are flush left. In PRINTSTYLE TYPESET, they are set bold, slightly larger than paragraph text. In PRINTSTYLE TYPEWRITE, they are underlined. A single linespace precedes them in both printstyles, and a tiny space adjustment raises them slightly above text that comes afterwards for greater clarity in document structuring.

If these defaults don't suit you, you can change them with the subhead control macros.


Macro: SUBHEAD "<text of subhead>" [ "<2nd line>" [ "<3rd line>" ... ] ]

The argument to SUBHEAD is the text of the subhead, surrounded by double-quotes. If you need additional lines for a subhead, simply surround each line with double-quotes.

NOTE: If a subhead falls near the bottom of an output page and mom is unable to fit the head plus at least one line of text underneath it, she will set the subhead at the top of the next page.

Subhead control macros

In addition to the usual family/font/size/quad control macros, there are macros to manage subhead numbering.

  1. Family/font/size/colour/quad
  2. Numbering
  3. Reset subhead numbering
  4. Vertical inline escapes inside subheads

1. Family/font/size/quad

See Arguments to the control macros.

.SUBHEAD_FAMILY default = prevailing document family; default is Times Roman
.SUBHEAD_FONT   default = bold
.SUBHEAD_SIZE   default = +.5 (point)
.SUBHEAD_COLOR  default = black
.SUBHEAD_QUAD   default = LEFT

2. Number subheads -- NUMBER_SUBHEADS

If you'd like your subheads numbered, simply invoke .NUMBER_SUBHEADS with no argument. Mom will number all subsequent subheads automatically (in ascending order, naturally).

If, in addition to numbering subheads, you also request that heads be numbered, the head number will be included in the subhead number (separated by a period [dot]).

Should you wish to stop subhead numbering, invoke NUMBER_SUBHEADS with any argument (OFF, QUIT, END, X...). Subhead numbering will cease, and the subhead number will not be included in the numbering of paraheads.

3. Reset head numbering -- RESET_SUBHEAD_NUMBER

Should you wish to reset the subhead number to "1", invoke RESET_SUBHEAD_NUMBER with no argument. If, for some reason, you want mom to use a subhead number that is not the next in ascending order (i.e. the last subhead number + 1), invoke RESET_SUBHEAD_NUMBER with the number you want, e.g.

	.RESET_SUBHEAD_NUMBER 4
Your next subhead will be numbered "4" and subsequent subheads will be numbered in ascending order from "4".

Vertical inline escapes inside subheads

See Vertical inline escapes inside heads. The information there applies equally to subheads.


Paragraph heads

Paragraph heads (paraheads) should be used any place you want titles to introduce paragraphs below heads or subheads. If you wish, mom can number paraheads for you.

By default, paraheads are joined to the body of a paragraph, slightly indented (provided the paragraph is not a "first" paragraph as defined in Indenting initial paragraphs). In PRINTSTYLE TYPESET, they are set bold italic, slightly larger than paragraph text. In PRINTSTYLE TYPEWRITE, they are underlined.

If these defaults don't suit you, you can change them with the parahead control macros.


Macro: PARAHEAD "<text of parahead>"

PARAHEAD must come AFTER PP or it will not work!

The argument is the text of the parahead, surrounded by double-quotes. Because paraheads are joined to the body of a paragraph, they accept only one argument (see HEAD and SUBHEAD).

Parahead control macros

In addition to the family/font/size/colour/indent control macros, there are macros to manage parahead numbering.

  1. Family/font/size/color
  2. Indent
  3. Numbering
  4. Reset parahead numbering

1. Family/font/size/colour

See Arguments to the control macros.

.PARAHEAD_FAMILY default = prevailing document family; default is Times Roman
.PARAHEAD_FONT   default = bold italic
.PARAHEAD_SIZE   default = +.5 (point)
.PARAHEAD_COLOR  default = black*

*If you colourize paragraph text, paraheads will appear in the same
colour as the text unless you explicitly tell mom to colour them
otherwise by invoking .PARAHEAD_COLOR.  If you do want paraheads
that are coloured the same as paragraph text, it's generally a good
idea to invoke .PARAHEAD_COLOR anyway (with the same colour used
for paragraph text), just to let mom know.

2. Indent

Unlike other control macros that end in _INDENT, the argument to the macro that controls indenting of paragraph heads (PARAHEAD_INDENT) is NOT relative to the first-line indent of normal paragraphs. In other words, it takes an absolute value, and requires a unit of measure. For example, to set the paragraph head indent to 2-1/2 picas, you do:

	.PARAHEAD_INDENT 2.5P
Mom's default indent for paragraph heads is 1/2 the first-line indent of normal paragraphs (both printstyles). However, as stated above, if you choose to change the indent, you must give an absolute value (unless you're a groff expert and want to manipulate the number register \n[#PP_INDENT]u arithmetically as the argument to PARAHEAD_INDENT for an indent that's relative to PP_INDENT.)

NOTE: Paragraph heads in "first paragraphs", as defined in Indenting initial paragraphs, are not indented unless you turn INDENT_FIRST_PARAS on.

3. Number paraheads -- NUMBER_PARAHEADS

If you'd like your paraheads numbered, simply invoke .NUMBER_PARAHEADS with no argument. Mom will number all subsequent paraheads automatically (in ascending order, naturally).

If, in addition to numbering paraheads, you also request that heads and subheads be numbered, the head and/or subhead number will be included in the parahead number (separated by a period [dot]).

Should you wish to stop parahead numbering, invoke NUMBER_PARAHEADS with any argument (OFF, QUIT, END, X...). Parahead numbering will cease.

4. Reset head numbering -- RESET_PARAHEAD_NUMBER

Should you wish to reset the parahead number to "1", invoke RESET_PARAHEAD_NUMBER with no argument. If, for some reason, you want mom to use a parahead number that is not the next in ascending order (i.e. the last parahead number + 1), invoke RESET_PARAHEAD_NUMBER with the number you want, e.g.

	.RESET_PARAHEAD_NUMBER 7
Your next parahead will be numbered "7" and subsequent paraheads will be numbered in ascending order from "7".


Author linebreaks

By default, mom marks author linebreaks with three centred asterisks. You can change this behaviour with the linebreak character control macro.


Macro: LINEBREAK
Alias: SECTION

LINEBREAK takes no arguments. Simply invoke it (on a line by itself, of course) whenever you want to insert an author linebreak. The appearance of the linebreak is controlled by the LINEBREAK_CHAR macro.

Linebreak character control macro

Macro: LINEBREAK_CHAR [ <character> ] [ <iterations> [ <vertical adjustment> ] ]
Alias: SECTION_CHAR
*The third optional argument requires a unit of measure.

LINEBREAK_CHAR determines what mom prints when LINEBREAK is invoked. It takes 3 optional arguments: the character you want deposited at the line break, the number of times you want the character repeated, and a vertical adjustment factor.

The first argument is any legal groff character (e.g. * [an asterisk], \(dg [a dagger], \f(ZD\N'141\fP [an arbitrary character from Zapf Dingbats], \l'4P' [a 4-pica long rule]). Mom sets the character centred on the current line length. (See "man groff_char" for a list of all legal groff characters.)

The second argument is the number of times to repeat the character.

The third argument is a +|- value by which to raise (+) or lower (-) the character in order to make it appear visually centred between sections of text. This lets you make vertical adjustments to characters that don't sit on the baseline (such as asterisks). The argument must be preceded by a plus or minus sign, and must include a unit of measure.

If you enter LINEBREAK_CHAR with no arguments, sections of text will be separated by two blank lines when you invoke LINEBREAK.

Mom's default for LINEBREAK_CHAR is

	.LINEBREAK_CHAR * 3 -3p
i.e. three asterisks, lowered 3 points from their normal vertical position (for PRINTSTYLE TYPESET; the vertical adjustment is -2 points for PRINTSTYLE TYPEWRITE).

Linebreak colour control macro

Macro: LINEBREAK_COLOR <color name>

To change the colour of the linebreak character(s), simply invoke LINBREAK_COLOR with the name of a pre-defined (or "initialized") colour.


Quotes (line for line)

Quotes are always set in nofill mode, flush left. This permits entering quotes on a line for line basis in your text editor and have them come out the same way on output copy. (See Blockquotes for how quotes, in the present sense, differ from longer passages of cited text.)

Since mom originally came into being to serve the needs of creative writers (i.e. novelists, short story writers, etc. -- not to cast aspersions on the creativity of mathematicians and programmers), she sets quotes in italics (PRINTSTYLE TYPESET) or underlined (PRINTSTYLE TYPEWRITE), indented from the left margin. Obviously, she's thinking "quotes from poetry or song lyrics", but with the quote control macros you can change her defaults so QUOTE serves other needs, e.g. entering verbatim snippets of programming code, command line instructions, and so on. (See the tip below for suggestions about including programming code snippets in documents.)

Besides indenting quotes, mom further sets them off from running text with a small amount of vertical whitespace top and bottom. In PRINTSTYLE TYPEWRITE, this is always one full linespace. In PRINTSTYLE TYPESET, it's 1/2 of the prevailing leading if the quote fits fully on the page (i.e. with running text above and below it), otherwise it's a full linespace either above or below as is necessary to balance the page to the bottom margin. This behaviour can be changed with the control macro ALWAYS_FULLSPACE_QUOTES.

NOTE: ALWAYS_FULLSPACE_QUOTES applies to both QUOTE and BLOCKQUOTE, as does the control macro QUOTE_INDENT.

Version 1.3: mom's handling of the vertical whitespace around quotes has changed slightly. In versions prior to 1.3, it was not possible to alter the leading of quotes and blockquotes (which was the same as the document leading), ensuring that the vertical whitespace remained consistent, as described above. In 1.3 and later, it is possible to change the leading of quotes and blockquote via the QUOTE_AUTOLEAD and BLOCKQUOTE_AUTOLEADmacro. Now, if your quote (or blockquote) leading differs from the document leading, mom attempts to observe the same rules for vertical whitespace outlined above; however, she will also insert a small, flexible amount of extra whitespace around the quotes to make sure the whitespace is equal, top and bottom. Since she does this on a quote by quote basis, rather than by figuring out how much extra whitespace is needed to adjust all quotes on a page, the spacing around multiple quotes on the same page will differ slightly, although each will be balanced between lines of normal running text, top and bottom. (The inability to scan an entire page and insert equalized whitespace at marked places is a limitation of groff, which, by and large, works in a linear, line by line fashion.) If you don't provide mom with a QUOTE_AUTOLEAD, quotes are leaded at the default for normal running text, meaning that multiple quotes on the same page are all spaced identically.

TIP: If you want to include snippets of programming code in mom documents, you may come acropper of the fact that groff (and mom's) escape character is the backslash. In order for mom not to interpret backslashes that occur in code snippets as escapes, you have to tell mom that the backslash character is (temporarily) no longer the escape character. The easiest way to do this is to set the escape character to something else for the duration of the code snippet. You accomplish this with ESC_CHAR, like this:

	.ESC_CHAR c
where "c", above, is the alternate escape character (which should be a character that does not appear in the code). To set the escape character back to the backslash, simply invoke .ESC_CHAR by itself (i.e. with no argument).

Because mom, by default, sets the text after .QUOTE in italic (for PRINTSTYLE TYPESET) or underlined (for PRINTSTYLE TYPEWRITE), you'll want to change that behaviour as well. Therefore, a recipe for setting verbatim code snippets using QUOTE could be (assuming you want a fixed width font like Courier):

	\# You only need the first two lines before the first invocation
	\# of QUOTE.  They stay in effect for all subsequent invocations.
	\#
	.QUOTE_FONT       CR    \" Set quote font to Courier roman
	.UNDERLINE_QUOTES OFF   \" Don't underline quotes in TYPEWRITE
	.QUOTE
	.ESC_CHAR ^             \" Change escape character to ^
	<code snippet>
	.ESC_CHAR               \" Restore escape character to \
	.QUOTE OFF


Macro: QUOTE toggle

QUOTE is a toggle macro. To begin a section of quoted text, invoke it with no argument, then type in your quote. When you're finished, invoke QUOTE with any argument (e.g. OFF, END, X, Q...) to turn it off. Example:

	.QUOTE
	Nymphomaniacal Jill
	Used a dynamite stick for a thrill
	They found her vagina
	In North Carolina
	And bits of her tits in Brazil.
	.QUOTE END

Quote control macros

  1. Family/font/size/leading/colour/indent
  2. Spacing above and below (typeset only)
  3. Underline quotes (typewrite only)
  4. Manually break a footnoted quote that crosses pages/columns

1. Family/font/size/colour/indent

See Arguments to the control macros.

.QUOTE_FAMILY   default = prevailing document family; default is Times Roman
.QUOTE_FONT     default = italic; underlined in TYPEWRITE
.QUOTE_SIZE     default = +0 (i.e. same size as paragraph text)
.QUOTE_AUTOLEAD default = none; leading of quotes is the same as paragraphs
.QUOTE_COLOR    default = black
.QUOTE_INDENT   default = paragraph indent x 3 (typeset); x 2 (typewrite)
               (note that this macro also sets the indents (left and right)
                for blockquotes)

2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)

If you'd like mom always to put a full linespace above and below quotes, invoke .ALWAYS_FULLSPACE_QUOTES with no argument. If you wish to restore mom's default behaviour regarding the spacing of quotes (see above), invoke the macro with any argument (OFF, QUIT, END, X...)

NOTE: This macro also sets mom's spacing policy for blockquotes.

3. Underlining -- UNDERLINE_QUOTES (typewrite only)

By default in PRINTSTYLE TYPEWRITE, mom underlines quotes. If you'd rather she didn't, invoke .UNDERLINE_QUOTES with any argument (OFF, QUIT, END, X...) to disable the feature. Invoke it without an argument to restore mom's default underlining of quotes.

If you not only wish that mom not underline quotes, but also that she set them in italic, you must follow each instance of QUOTE with the typesetting macro FT I. Furthermore, since mom underlines all instances of italics by default in PRINTSTYLE TYPEWRITE, you must also make sure that ITALIC_MEANS_ITALIC is enabled (see PRINTSTYLE TYPEWRITE control macros).

4. Manually break a footnoted quote -- BREAK_QUOTE

NOTE: As of version 1.1.9, the macro BREAK_QUOTE has become obsolete (or, at least, should have become obsolete.) It remains here for backward compatibility with documents created prior to 1.1.9, and just in case, despite my efforts to make it obsolete, you still encounter the problem it's supposed to fix. Should you find yourself having to use BREAK_QUOTE while running mom 1.1.9 or higher, please notify me immediately.

Exceptionally, a quote or blockquote containing a footnote may cross a page or column. When this happens, the footnote marker may not be correct for its position relative to other footnotes on the page, and the footnote itself may appear on the wrong page or at the bottom of the wrong column. When this happens, study your output to determine the precise point at which the quote breaks (or at which you want it to break), and add .BREAK_QUOTE on a line by itself afterwards. No other intervention is required, and the footnote(s) will be marked correctly and appear on the correct page.

BREAK_QUOTE may be used with both quotes and blockquotes, and hence is aliased as BREAK_BLOCKQUOTE, BREAK_CITATION and BREAK_CITE.


Blockquotes (cited passages)

BLOCKQUOTES are used to cite passages from another author's work. So that they stand out well from running text, mom indents them from both the left and right margins and sets them in a different point size (PRINTSTYLE TYPESET only). Output lines are filled, and, by default, quadded left.

Besides indenting blockquotes, mom further sets them off from running text with a small amount of vertical whitespace top and bottom. (See above for a complete explanation of how this is managed, and how to control it. Be sure to read the section Version 1.3.)


Macro: BLOCKQUOTE toggle
Aliases: CITE, CITATION

BLOCKQUOTE is a toggle macro. To begin a cited passage, invoke the tag with no argument, then type in your quote. When you're finished, invoke BLOCKQUOTE with any argument (e.g. OFF, END, X, Q...) to turn it off. Example:

	.BLOCKQUOTE
	Redefining the role of the United States from enablers to keep
	the peace to enablers to keep the peace from peacekeepers is
	going to be an assignment.
	.RIGHT
	\(emGeorge W. Bush
	.BLOCKQUOTE END
If the cited passage runs to more than one paragraph, you MUST introduce each paragraph -- including the first! -- with PP.

NOTE: The aliases CITE and CITATION may be used in place of the BLOCKQUOTE tag, as well as in any of the control macros that begin with BLOCKQUOTE_ or end with _BLOCKQUOTE.

Blockquote control macros

  1. Family/font/size/leading/colour/quad/indent
  2. Spacing above and below (typeset only)
  3. Manually break a footnoted blockquote that crosses pages/columns

1. Family/font/size/colour/quad/indent

See Arguments to the control macros.

.BLOCKQUOTE_FAMILY   default = prevailing document family; default is Times Roman
.BLOCKQUOTE_FONT     default = roman
.BLOCKQUOTE_SIZE     default = -1 (point)
.BLOCKQUOTE_AUTOLEAD default = none; leading of blockquotes is the same as paragraphs
.BLOCKQUOTE_COLOR    default = black
.BLOCKQUOTE_QUAD     default = left
.BLOCKQUOTE_INDENT   default = paragraph indent x 3 (typeset); x 2 (typewrite)
                    (note that this macro also sets the left indent for quotes)

2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)

If you'd like mom always to put a full linespace above and below blockquotes, invoke .ALWAYS_FULLSPACE_QUOTES with no argument. If you wish to restore mom's default behaviour regarding the spacing of blockquotes (see above), invoke the macro with any argument (OFF, QUIT, END, X...).

NOTE: This macro also sets mom's spacing policy for quotes.


Nested lists

Lists are points or items of interest or importance that are separated from running text by enumerators. Some typical enumerators are en-dashes, bullets, digits and letters.

Setting lists with mom is easy. First, you initialize a list with the LIST macro. Then, for every item in the list, you invoke the macro, ITEM, followed by the text of the item. When a list is finished, you exit the list with LIST OFF (or QUIT, END, BACK, etc.)

By default mom starts each list with the enumerator flush with the left margin of running text that comes before it, like this:

	My daily schedule needs organizing.  I can't
	seem to get everything done I want.
	o an hour's worth of exercise
	o time to prepare at least one healthy
	  meal per day
	o reading time
	o work on mom
	o writing
	  - changes from publisher
	  - current novel
	o a couple of hours at the piano
In other words, mom does not, by default, indent entire lists. Indenting a list is controlled by the macro, SHIFT_LIST. (This is a design decision; there are too many instances where a default indent is not desirable.) Equally, mom does not add any extra space above or below lists.

Lists can be nested (as in the example above). In other words, you can set lists within lists, each with an enumerator (and possibly, indent) of your choosing. In nested lists, each invocation of LIST OFF (you may prefer to use LIST BACK) takes you back to the previous depth (or level) of list, with that list's enumerator and indent intact. The final LIST OFF exits lists completely and returns you to the left margin of running text.

Finally, lists can be used in documents created with either the document processing macros or just the typesetting macros.


Macro: LIST [ BULLET | DASH | DIGIT | ALPHA | alpha | ROMAN<n> | roman<n> | USER <string>] [ <separator> | <user-defined enumerator> ] [ <prefix> ] [ <off> ]

Invoked by itself (i.e. with no argument), LIST initializes a list (with bullets as the default enumerator). Afterwards, each block of input text preceded by .ITEM, on a line by itself, is treated as a list item.

NOTE: Every time you invoke LIST to start a list (as opposed to exiting one), you must supply an enumerator (and optionally, a separator) for the list, unless you want mom's default enumerator, which is a bullet. Within nested lists, mom stores the enumerator, separator and indent for any list you return backwards to (i.e. with LIST OFF), but does not store any information for lists you move forward to.

The first argument--enumerator style

The optional arguments BULLET, DASH, DIGIT (for Arabic numerals), ALPHA (for uppercase letters), alpha (for lowercase letters), ROMAN<n> (for uppercase roman numerals), roman<n> (for lowercase roman numerals) tell mom what kind of enumerator to use for a given list.

The arguments, ROMAN<n> and roman<n>, are special. You must append to them a digit (arabic, e.g. "1" or "9" or "17") saying how many items a particular roman-numeralled LIST is going to have. Mom requires this information in order to align roman numerals sensibly, and will abort--with a message--if you don't provide it.

A roman-numeralled list containing, say, five items, would be set up like this:

	.LIST roman5        producing        i)   Item 1.
	.ITEM                                ii)  Item 2.
	Item 1.                              iii) Item 3.
	.ITEM                                iv)  Item 4.
	Item 2.                              v)   Item 5.
	.ITEM
	Item 3
	.ITEM
	Item 4
	.ITEM
	Item 5

The argument, USER, lets you make up your own enumerator, and must be followed by a second argument: what you'd like the enumerator to look like. For example, if you want a list enumerated with =>,

	.LIST USER =>
	.ITEM
	A list item
will produce

	=> A list item
Please note: if the argument to USER contains spaces, you must enclose the argument in double quotes.

The second argument--separator style

If you choose DIGIT, ALPHA, alpha, ROMAN<n>, or roman<n>, you may enter the optional argument, separator, to say what kind of separator you want after the enumerator. The separator can be anything you like. The default for DIGIT is a period (dot), like this:

	1. A list item
The default separator for ALPHA, alpha, ROMAN<n> and roman<n> is a right parenthesis, like this:

	a) An alpha-ed list item
	b) A second alpha-ed list item

	   or

	i)  A roman-ed list item
	ii) A second roman-ed item
If you'd prefer, say, digits with right-parenthesis separators instead of the default period, you'd do

	.LIST DIGIT )
	.ITEM
	A numberd list item
which would produce

	1) A numbered list item
Please note: BULLET, DASH and USER do not take a separator.

The third argument--prefix style

Additionally, you may give a prefix (i.e. a character that comes before the enumerator) when your enumerator style for a particular list is DIGIT, ALPHA, alpha, ROMAN<n> or roman<n>. In the arguments to LIST, the prefix comes after the separator, which may seem counter-intuitive, so please be careful.

A prefix can be anything you like. Most likely, you'll want some kind of open-bracket, such as a left parenthesis. If, for example, you want a DIGIT list with the numbers enclosed in parentheses, you'd enter

	.LIST DIGIT ) (
	.ITEM
	The first item on the list.
	.ITEM
	The second item on the list.
which would produce

	(1) The first item on the list.
	(2) The second item on the list.
Please note: BULLET, DASH and USER do not take a prefix.

Exiting lists--.LIST OFF/BACK or .QUIT_LISTS

Any single argument to LIST other than BULLET, DASH, DIGIT, ALPHA, alpha, ROMAN<n>, roman<n> or USER (e.g. LIST OFF or LIST BACK) takes you out of the current list.

If you are at the first list-level (or "list-depth"), mom returns you to the left margin of running text. Any indents that were in effect prior to setting the list are fully restored.

If you are in a nested list, mom moves you back one list-level (i.e. does not take you out of the list structure) and restores the enumerator, separator and indent appropriate to that level.

Each invocation of LIST should be be matched by a corresponding LIST OFF in order to fully exit lists. For example,

	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.
	o List item in level 1
	o List item in level 1
	  - List item in level 2
	  - List item in level 2
	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.
is created like this:

	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.
	.LIST BULLET
	.ITEM
	List item in level 1
	.ITEM
	List item in level 1
	.LIST DASH
	.ITEM
	List item in level 2
	.ITEM
	List item in level 2
	.LIST OFF    \" Turn level 2 list off
	.LIST OFF    \" Turn level 1 list off
	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.
Alternatively, you may use the single-purpose macro, QUIT_LISTS, to get yourself out of a list structure. In the example above, the two .LIST OFF lines could be replaced with a single .QUIT_LISTS.


Macro: ITEM

After you've initialized a list with LIST, precede each item you want in the list with ITEM. Mom takes care of everything else with respect to setting the item appropriate to the list you're in.

In document processing, it is legal to have list items that contain multiple paragraphs. Simply issue a PP request for each paragraph following the first item. I.e., don't do this:

	.ITEM
	.PP
	Some text...
	.PP
	A second paragraph of text
but rather

	.ITEM
	Some text...
	.PP
	A second paragraph of text

List control macros

  1. Indenting lists (SHIFT_LIST)
  2. Resetting an initialized list's enumerator (RESET_LIST)
  3. Padding digit enumerators (PAD_LIST_DIGITS)

1. Indenting lists -- SHIFT_LIST

If you want a list to be indented to the right of running text, or indented to the right of a current list, use the macro SHIFT_LIST immediately after LIST. SHIFT_LIST takes just one argument: the amount by which you want the list shifted to the right. The argument requires a unit of measure,

SHIFT_LIST applies only to the list you just initialized with LIST. It does not carry over from one invocation of LIST to the next. However, the indent remains in effect when you return to a list level in a nested list.

For example, if you want a 2-level list, with each list indented to the right by 18 points,

	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.
	.LIST           \" List 1
	.SHIFT_LIST 18p \" Indent 18 points right of running text
	.ITEM
	List 1 item
	.ITEM
	List 1 item
	.LIST DASH      \" List 2
	.SHIFT_LIST 18p \" Indent 18 points right of list 1
	.ITEM
	List 2 item
	.ITEM
	List 2 item
	.LIST OFF       \" Move back to list 1
	.ITEM
	List 1 item
	.ITEM
	List 1 item
	.LIST OFF       \" Exit lists
	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.
produces (approximately)

	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.
	    o List 1 item
	    o List 1 item
	        - List 2 item
	        - List 2 item
	    o List 1 item
	    o List 1 item
	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore.

2. Resetting an initialized list's enumerator -- RESET_LIST

In nested lists, if your choice of list enumerator for a given level of list is DIGIT, ALPHA, alpha, ROMAN or roman, you may sometimes want to reset the list's enumerator when you return to that list. Consider the following:

	Things to do religiously each and every day:
	1. Take care of the dog
	   a) walk every day
	   b) brush once a week
	      - trim around the eyes every fourth brushing
	      - don't forget to check nails
	2. Feed the cat
	   a) soft food on Mon., Wed. and Fri.
	   b) dry food on Tues., Thurs. and Sat.
	   c) canned tuna on Sunday
Normally, within a nested list, when you return to an incrementally-enumerated list, the enumerator continues incrementing from where it left off. That means, in the example above, the normal state of affairs for the alpha'ed list under "2. Feed the cat" would be c), d) and e). The solution, in such a case, is simply to reset the enumerator --before ITEM!-- with the macro, RESET_LIST.

By default, with no argument, RESET_LIST resets the enumerator to 1, A, a, I or i depending on the style of enumerator. You may, if you wish, pass RESET_LISTS a numeric argument representing the starting enumerator for the reset (if different from "1"), although I can't at present think of a use for this feature.

3. Padding digit enumerators (PAD_LIST_DIGITS)

Arabic digits

When your choice of enumerators is DIGIT AND the number of items in the list exceeds nine (9), you have to make a design decision: should mom leave room for the extra numeral in two-numeral digits to the right or the left of the single-numeral digits?

If you want the extra space to the right, invoke the macro, .PAD_LIST_DIGITS (with no argument), after LIST and before ITEM. This will produce something like

	8.  List item
	9.  List item
	10. List item
If you want the extra space to the left, invoke PAD_LIST_DIGITS with the single argument, LEFT, which will produce

	 8. List item
	 9. List item
	10. List item
Of course, if the number of items in the list is less than ten (10), there's no need for PAD_LIST_DIGITS.

Roman numerals

By default, mom sets roman numerals in lists flush left. The <n> argument appended to ROMAN<n> or roman<n> allows her to calculate how much space to put after each numeral in order to ensure that the text of items lines up properly.

If you'd like the roman numerals to line up flush right (i.e. be padded "left"), simply invoke PAD_LIST_DIGITS LEFT after LIST ROMAN<n> or LIST roman<n> amd before ITEM.


Line numbering

Mom's line-numbering capabilities are not as flexible as most of her other document processing macros. The reason is that groff's underlying line-numbering primitive, .nm, is, well...primtive. It is not possible, for example, to select a particular family or font for use exclusively with line numbers. Nor is it possible to set the gutter using any unit of measure other than the figure space.

That said, when you turn line-numbering on, mom, by default

Line numbering may be enabled and disabled for QUOTE and/or BLOCKQUOTE in one of three styles. See Line numbering control macros for quotes and blockquotes.

The first time you invoke NUMBER_LINES you must, at a minimum, tell it what line number you want the next output line to have. Optional arguments allow you to state which lines should be numbered (e.g. every five or every ten lines), and the gutter to place between line numbers and running text.

Subsequently, you can turn line-numbering off, either permanently, or resume it later at a place of your choosing. When you resume line-numbering, the line numbers pick up where you left off.


Macro: NUMBER_LINES <start number> [ <which lines to number> [ <gutter> ] ]
Macro: NUMBER_LINES <anything> | RESUME

NUMBER_LINES does what it says: prints line numbers, to the left of output lines of paragraph text. One of the chief reasons for wanting numbered lines is in order to identify footnotes or endnotes by line number instead of by a marker in the text. (See .FOOTNOTE_MARKER_STYLE LINE for instructions on line-numbered footnotes, and .ENDNOTE_MARKER_STYLE for instructions on line-numbered endnotes.)

Every time you invoke NUMBER_LINES, unless you are using the arguments OFF (QUIT, END, X, etc.) or RESUME you must, at a minimum, pass it one argument, namely the number (digit) you want the next output line to have. For example,

	.NUMBER_LINES 3
will prepend the number, 3, to the next output line.

Normally, of course, you will number lines of text starting at 1. All you have to do in that case is ensure that

	.NUMBER_LINES 1
precedes your first line of input text, which will also be the first line of output text.

You can alter mom's default line numbering behaviour (see above) with the optional arguments <which lines to number> and <gutter>.

<which lines to number> instructs NUMBER_LINES to number only certain lines, e.g. every two lines or every five lines. If you want, say, only every five lines to have a prepended number, you'd do

	.NUMBER_LINES 1 5
GOTCHA! The argument to <which lines to number> only numbers those lines that are multiples of the argument. Hence, in the above example, line number "1" will not be numbered, since "1" is not a multiple of "5".

If you wanted line number "1" to be numbered, you'd have to invoke .NUMBER_LINES 1 1 before the first output line, then study your output copy and determine where best to insert the following in your input copy:

	.NUMBER_LINES \n(ln 5
(The escape, \n(ln, ensures that NUMBER_LINES automatically supplies the correct value for the first argument, <start number>.)

Following this recipe, line number 1 will be numbered; subsequently, only line numbers that are multiples of 5 will be numbered. A little experimentation may be required to determine the best place for it.

The optional argument, <gutter>, tells mom how much space to put between the line numbers and the running text.

Note: when giving a value for <gutter>, you cannot skip the <which lines to number> argument. Either fill in the desired value, or use two double-quotes ("") to have mom use the value formerly in effect.

<gutter> does not require (or even accept) a unit of measure. The argument you pass to it is the number of figure spaces you want between line numbers and running text. Mom's default gutter is two figure spaces. If you'd like a wider gutter, say, four figures spaces, you'd do

	.NUMBER_LINES 1 1 4
	                |
	                +-- Notice you *must* supply a value
	                    for the 2nd argument in order to supply
	                    a value for the 3rd.

After you've set up line-numbering, NUMBER_LINES can be used to control line numbering.

Line-numbering control

NUMBER_LINES OFF (or END, QUIT, X, etc.) turns line-numbering off.

Sometimes, you merely want to suspend line-numbering. In that case, turn line numbering off with NUMBER_LINES OFF. Later, when you want it to resume, enter

	.NUMBER_LINES RESUME
Line numbering will resume exactly where it left off. If this is not what you want--say you want to reset the line number to "1"--simply invoke NUMBER_LINES with whatever arguments are needed for the desired result.

Extra Notes:

  1. In document processing, you may invoke NUMBER_LINES either before or after START. Mom doesn't care.
  2. If you're collating documents with COLLATE, you should re-invoke, at a minimum, .NUMBER_LINES 1 for each collated document, in order to ensure that each begins with the number "1" prepended to the first line (unless, of course, that is not what you want).
  3. Occasionally, you may want to change the current gutter between line numbers and running text without knowing what the next output line number should be. Since NUMBER_LINES requires this number as its first argument, in such instances, pass NUMBER_LINES as its first argument the escape \n(ln.

    For example, if you were numbering every 5 lines with a gutter of 2 (figure spaces) and you needed to change the gutter to 4 (figures spaces),

        .NUMBER_LINES \n(ln 5 4

    would do the trick.

  4. If you're using margin notes in a document, be sure to set the gutter for margin notes wide enough to allow room for the line numbers.
  5. Mom (groff, actually), only numbers lines to the left of text. For aesthetic reason, therefore, the use of line numbering when setting a document in columns is discouraged. However, should you wish to number lines when setting in columns, make sure the gutter(s) between columns is wide enough to leave room for the numbers.

Line numbering control macros for QUOTE and BLOCKQUOTE

  1. NUMBER_QUOTE_LINES
  2. NUMBER_BLOCKQUOTE_LINES
  3. Setting up line numbering in quotes and blockquotes on a case by case basis

1. NUMBER_QUOTE_LINES

If you'd like mom to number lines of output text in a QUOTE as part of the same order and sequence as paragraph text, simply invoke NUMBER_QUOTE_LINES by itself.

There is a catch with numbering quotes, though. Owing to groff's restriction of accepting only the figure space as the line number gutter's unit of measure, it is not possible for line numbers in quotes to hang outside a document's overall left margin and be reliably flush with the line numbers of paragraph text. Conseqently, line numbers in quotes hang to the left of the quote, separated from the quote by the <gutter> argument.

If you'd like to change the gutter for quotes line-numbered in this way, invoke NUMBER_QUOTE_LINES with a digit representing the number of figure spaces you'd like between the line numbers and the quoted text, like this:

	.NUMBER_QUOTE_LINES 1
With the above, line numbers in quotes (and only quotes) will have a gutter of 1 figure space.

If you are using "line numbering style" for footnotes (FOOTNOTE_MARKER_STYLE LINE), you may not wish to have quotes visibly line-numbered, but still want to embed footnotes inside quotes. In order to do that, mom allows you to say NUMBER_QUOTE_LINES SILENT.

When you invoke NUMBER_QUOTE_LINES SILENT, mom continues to increment line numbers while quotes are being output, but they won't appear in the output copy. (Compare this with mom's default behaviour of suspending incrementing of line numbers during the output of quotes.) This allows you to embed line-numbered footnotes inside quotes and have the line number "label" in the footnote come out sensibly.

Once having turned NUMBER_QUOTE_LINES on, you may disable it with NUMBER_QUOTE_LINES OFF (or QUIT, END, X, etc).

2. NUMBER_BLOCKQUOTE_LINES

If you'd like mom to number lines of output text in a BLOCKQUOTE as part of the same order and sequence as paragraph text, simply invoke NUMBER_BLOCKQUOTE_LINES by itself.

There is a catch with numbering blockquotes, though. Owing to groff's restriction of accepting only the figure space as the line number gutter's unit of measure, it is not possible for line numbers in blockquotes to hang outside a document's overall left margin and be reliably flush with the line numbers of paragraph text. Conseqently, line numbers in blockquotes hang to the left of the blockquote, separated from the blockquote by the <gutter> argument.

If you'd like to change the gutter for blockquotes line-numbered in this way, invoke NUMBER_BLOCKQUOTE_LINES with a digit representing the number of figure spaces you'd like between the line numbers and the blockquoted text, like this:

	.NUMBER_BLOCKQUOTE_LINES 1
With the above, line numbers in blockquotes (and only blockquotes) will have a gutter of 1 figure space.

If you are using "line numbering style" for footnotes (FOOTNOTE_MARKER_STYLE LINE), you may not wish to have blockquotes visibly line-numbered, but still want to embed footnotes inside blockquotes. In order to do that, mom allows you to say NUMBER_BLOCKQUOTE_LINES SILENT.

When you invoke NUMBER_BLOCKQUOTE_LINES SILENT, mom continues to increment line numbers while blockquotes are being output, but they won't appear in the output copy. (Compare this with mom's default behaviour of suspending incrementing of line numbers during the output of blockquotes.) This allows you to embed line-numbered footnotes inside blockquotes and have the line number "label" in the footnote come out sensibly.

Once having turned NUMBER_BLOCKQUOTE_LINES on, you may disable it with NUMBER_BLOCKQUOTE_LINES OFF (or QUIT, END, X, etc).

3. Setting up line numbering in quotes and blockquotes on a case by case basis

Sometimes, you may want quotes or blockquotes to have a different line numbering scheme from the one used in the rest of the document. Or, you may want line numbering enabled only inside a particular quote or blockquote. A common reason for this would be if you were using the QUOTE macro to insert lines of programming code into a document. (See here for suggestions about including programming code snippets in documents.)

To enable line numbering within quotes or blockquotes on a case by case basis, simply invoke NUMBER_LINES, with the arguments you need, immediately after entering QUOTE or BLOCKQUOTE. (NUMBER_QUOTE_LINES and/or NUMBER_BLOCKQUOTE_LINES should be turned off if you're doing this.) The quote or blockquote will then be line-numbered according to your specifications: the starting line number of the quote or blockquote will be the one you give as a first argument to NUMBER_LINES; which lines to number will be the value you pass to <which lines to number> (defaults to "1"); line numbers will hang to the left of the quote or blockquote, separated from the quote or blockquote by <gutter> (defaults to "2").

As soon as QUOTE or BLOCKQUOTE is turned off, line numbering ceases, not only with respect to subsequent paragraph text (if they are not being line-numbered), but also for any subsequent invocation of QUOTE or BLOCKQUOTE. In other words, you must re-enable quote or blockquote line-numbering inside every instance of QUOTE or BLOCKQUOTE when line-numbering either of them on a case by case basis.


Footnotes

For something so complex behind the scenes, footnotes are easy to use. You just type, for example

	...the doctrines of Identity as urged by Schelling\c
	.FOOTNOTE
	<footnote about who the hell is Schelling>
	.FOOTNOTE OFF
	 were generally the points of discussion presenting the most
	of beauty to the imaginative Morella.
and be done with it.

(Note the obligatory use of the \c inline escape. It is required when your FOOTNOTE_MARKER_STYLE is either STAR [star/dagger footnotes] or NUMBER [superscript numbers]; it is NOT to be used when the FOOTNOTE_MARKER_STYLE is LINE, or when footnote markers have been disabled with .FOOTNOTE_MARKERS OFF.)

***Version 1.3 change***

As of version 1.3, the manner of entering the line after .FOOTNOTE OFF has changed to accommodate users' differing wishes with respect to the order of punctuation and footnote markers. The correct way to enter the line after .FOOTNOTE OFF--ONLY if your FOOTNOTE_MARKER_STYLE is STAR or NUMBER--is to input it as if it's literally a continuation of the line before .FOOTNOTE, and therefore begins with either a space or a punctuation mark, as in the two following examples.

	   Example 1					  Example 2
	   ---------                      ---------

	A line of text,\c				A line of text\c
	.FOOTNOTE						.FOOTNOTE
	A footnote line.				A footnote line.
	.FOOTNOTE OFF					.FOOTNOTE OFF
	 broken up with a comma.		, broken up with a comma.

	(last line begins with			(last line begins with
	 a literal space)				 the comma and a space)
If your FOOTNOTE_MARKER_STYLE is line, none of this is a concern.

***End of version 1.3 change***

After you invoke FOOTNOTE, mom takes care of everything: putting footnote markers in the body of the document, keeping track of how many footnotes are on the page, identifying the footnotes themselves appropriately, balancing them properly with the bottom margin, deferring footnotes that don't fit on the page... Even if you're using COLUMNS, mom knows what to do, and Does The Right Thing.

Footnotes can be sly little beasts, though. If you're writing a document that's footnote-heavy, you might want to read the following.

Footnote behaviour

By default, mom marks footnotes with alternating stars (asterisks), daggers, and double-daggers. The first footnote gets a star, the second a dagger, the third a double-dagger, the fourth two stars, the fifth two daggers, etc. If you prefer numbered footnotes, rest assured mom is happy to oblige.

A small amount of vertical whitespace and a short horizontal rule separate footnotes from the document body. The amount of whitespace varies slightly from page to page depending on the number of lines in the footnotes. Mom tries for a nice balance between too little whitespace and too much, but when push comes to shove, she'll usually opt for ample over cramped. The last lines of footnotes are always flush with the document's bottom margin.

If mom sees that a portion of a footnote cannot be fit on its page, she carries that portion over to the next page. If an entire footnote can't be fit on its page (i.e. FOOTNOTE has been called too close to the bottom), she defers the footnote to the next page, but sets it with the appropriate marker from the previous page.

When footnotes occur within cited text, for example a QUOTE or a BLOCKQUOTE, mom will usually opt for deferring the footnote over to the next page if it allows her to complete the cited text on one page.

In the unfortunate happenstance that a deferred footnote is the only footnote on its page (i.e. it's marked in the document body with a star) and the page it's deferred to has its own footnotes, mom separates the deferred footnote from the page's proper footnote(s) with a blank line. This avoids the confusion that might result from readers seeing two footnote entries on the same page identified by a single star (or the number 1 if you've requested numbered footnotes that begin at 1 on every page). The blank line makes it clear that the first footnote entry belongs to the previous page.

In the circumstance where a deferred footnote is not the only one on its page, and is consequently marked by something other than a single star, there's no confusion and mom doesn't bother with the blank line. (By convention, the first footnote on a page is always marked with a single star, so if readers see, say, a dagger or double-dagger marking the first footnote entry, they'll know the entry belongs to the previous page).

Very exceptionally, two footnotes may have to be deferred (e.g. one occurs on the second to last line of a page, and another on the last line). In such a circumstance, mom does not add a blank after the second deferred footnote. If you'd like a blank line separating both deferred footnotes from any footnotes proper to the page the deferred ones were moved to, add the space manually by putting a .SPACE command at the end of the footnote text, before FOOTNOTE OFF (or FOOTNOTE X, QUIT, EXIT, etc...).

Obviously, deferred footnotes aren't an issue if you request numbered footnotes that increase incrementally throughout the whole document -- yet another convenience mom has thought of.

While mom's handling of footnotes is sophisticated, and tries to take nearly every imaginable situation under which they might occur into account, some situations are simply impossible from a typographic standpoint. For example, if you have a HEAD near the bottom of the page AND that page has some footnotes on it, mom may simply not have room to set any text under the head (normally, she insists on having room for at least one line of text beneath a head). In such an instance, mom will either set the head, with nothing under it but footnotes, or transfer the head to the next page. Either way, you'll have a gaping hole at the bottom of the page. It's a sort of typographic Catch-22, and can only be resolved by you, the writer or formatter of the document, adjusting the type on the offending page so as to circumvent the problem.

NOTE: Exceptionally, you may encounter problems with footnotes inside quotes and blockquotes that cross a page or column. See BREAK_QUOTE for a solution.

Footnote markers and punctuation in the running text

As of version 1.3, the manner of entering the line after .FOOTNOTE OFF has changed. The correct way to enter the line after .FOOTNOTE OFF now is to input it as if it's literally a continuation of the line before .FOOTNOTE, and therefore begins with either a space or a punctuation mark, as in the two following examples.

	   Example 1					  Example 2
	   ---------                      ---------

	A line of text,\c				A line of text\c
	.FOOTNOTE						.FOOTNOTE
	A footnote line.				A footnote line.
	.FOOTNOTE OFF					.FOOTNOTE OFF
	 broken up with a comma.		, broken up with a comma.

	(last line begins with			(last line begins with
	 a literal space)				 the comma and a space)
Care must be taken, though, if the punctuation mark that begins the line after FOOTNOTE OFF is a period (dot). You must begin such lines with \&., like this:

	end of a sentence\c
	.FOOTNOTE
	A footnote line.
	.FOOTNOTE OFF
	\&.  A new sentence...
If you omit the \&., the line will vanish!


Tag: FOOTNOTE <toggle> | INDENT LEFT | RIGHT | BOTH <indent value>
*See
HYPER-IMPORTANT NOTE!!!
<indent value> requires a unit of measure

FOOTNOTE is a toggle macro, therefore invoking it on a line by itself allows you to enter a footnote in the body of a document. Invoking it with any argument other than INDENT (i.e. OFF, QUIT, END, X...) tells mom you're finished.

Footnotes are the only element of running text that are not affected by the typesetting indent macros. In the unlikely event that you want a page's footnotes to line up with a running indent, invoke FOOTNOTE with the INDENT argument and pass it an indent direction and indent value. L, R, and B may be used in place of LEFT, RIGHT, and BOTH. FOOTNOTE must be invoked with INDENT for every footnote you want indented; mom does not save any footnote indent information from invocation to invocation.

NOTE: If a footnote runs to more than one paragraph(!), DO NOT begin the footnote with the PP tag. Use PP only to introduce subsequent paragraphs.

HYPER-IMPORTANT NOTE: The final word on the input line that comes immediately before FOOTNOTE MUST terminate with a \c inline escape if your FOOTNOTE_MARKER_STYLE is either STAR or NUMBER. See the footnote example above.

Additionally, the line after a FOOTNOTE OFF should be entered as if there were no interruption in the input text, i.e. the line should begin with a literal space or punctuation mark. See above.

Do NOT use the \c inline escape if your FOOTNOTE_MARKER_STYLE is LINE, or if you have disabled footnote markers with .FOOTNOTE_MARKERS OFF. As well, the line after FOOTNOTE OFF should be entered normally.

Footnote control macros

  1. Family/font/size/colour/lead/quad
  2. Footnote markers -- on or off
  3. Footnote marker style -- star+dagger, numbered or by line number
  4. Reset footnote number -- set footnote marker number to 1
  5. Inter-footnote spacing
  6. Footnote rule -- on or off
  7. Footnote rule length -- length of footnote separator rule
  8. Adjust vertical position of footnote separator rule

1. Family/font/size/colour/lead/quad

See Arguments to the control macros.

.FOOTNOTE_FAMILY    default = prevailing document family; default is Times Roman
.FOOTNOTE_FONT      default = roman
.FOOTNOTE_SIZE      default = -2 (points)
.FOOTNOTE_COLOR     default = black
.FOOTNOTE_AUTOLEAD  default = 2 points (typeset); single-spaced (typewrite)
.FOOTNOTE_QUAD      default = same as paragraphs

2. Footnote markers -- FOOTNOTE_MARKERS

If you don't want footnote markers, in either the body of the document or beside footnote entries themselves, toggle them off with .FOOTNOTE_MARKERS OFF (or END, QUIT, X...). This means, of course, that you'll have to roll your own. If you want them back on, invoke .FOOTNOTE_MARKERS with no argument. Footnote markers are on by default.

If FOOTNOTE_MARKERS are disabled, do NOT use the \c inline escape to terminate the line before .FOOTNOTE.

3. Footnote marker style -- FOOTNOTE_MARKER_STYLE

Mom gives you two choices of footnote marker style: star+dagger (see footnote behaviour above), or numbered.

.FOOTNOTE_MARKER_STYLE STAR gives you star+dagger (the default). There is a limit of 10 footnotes per page with this style.

.FOOTNOTE_MARKER_STYLE NUMBER gives you superscript numbers, both in the document body and in the footnote entries themselves. By default, footnote numbers increase incrementally (prev. footnote number + 1) throughout the whole document. You can ask mom to start each page's footnote numbers at 1 with .RESET_FOOTNOTE_NUMBER (see below.)

.FOOTNOTE_MARKER_STYLE LINE lets you have footnotes which are identified by line number, rather than by a marker in the text. (Note that NUMBER_LINES must be enabled in order to use this marker style.)

With FOOTNOTE_MARKER_STYLE LINE, mom will identify footnotes either by single line numbers, or line ranges. If what you want is a single line number, you need only invoke .FOOTNOTE, without terminating the text line before it with \c, at the appropriate place in running text.

If you want a range of line numbers (e.g. [5-11] ), insert, directly into the first line of the range you want, the inline escape, \*[FN-MARK]. For the terminating line number of the range, you need only invoke .FOOTNOTE, (again, without attaching \c to the text line before it). Mom is smart enough to figure out that where FOOTNOTE was invoked represents the terminating line number. Range-numbered footnotes are always output on the page where FOOTNOTE was invoked, not the page where \*[FN-MARK] appears (subject, of course, to the rules for footnotes that fall too close to the bottom of a page, as outlined here).

Mom, by default, puts footnote line numbers inside square brackets. The style of the brackets may be changed with the macro, FOOTNOTE_LINENUMBER_BRACKETS, which takes one of three possible arguments: PARENS ("round" brackets), SQUARE (the default) or BRACES (curly braces). If you prefer a shortform, the arguments, (, [ or { may be used instead.

If you don't want the numbers enclosed in brackets, you may tell mom to use a "separator" instead. A common separator would be the colon, but it can be anything you like. The macro to do this is FOOTNOTE_LINENUMBER_SEPARATOR, which takes, as its single argument, the separator you want. For safety and consistency's sake, ALWAYS enclose the argument in double-quotes.

The separator can be composed of any legal groff character, or any combination of characters. A word of caution: when using a separator, mom doesn't insert a space after the separator. Hence, if you want the space (you probably do), you must make the space part of the argument you pass to FOOTNOTE_LINENUMBER_SEPARATOR. For example, to get a colon separator with a space after it, you'd do

	.FOOTNOTE_LINENUMBER_SEPARATOR ": "
RUN-ON FOOTNOTES

Finally, if your footnote marker style is LINE, you may instruct mom to do "run-on style" footnotes. Run-on footnotes do not treat footnotes as discrete entities, i.e. on a line by themselves. Rather, each footnote is separated from the footnote before it by a space, so that the footnotes on any given page form a continuous block, like lines in a paragraph. The macro to get mom to run footnotes on is .FOOTNOTES_RUN_ON. Invoked by itself, it turns the feature on. Invoked with any other argument (OFF, NO, etc.), it turns the feature off. It is generally NOT a good idea to turn the feature on and off during the course of a single document. If you do, mom will issue a warning if there's going to be a problem. However, it is always perfectly safe to enable/disable the feature after COLLATE.

The usual reason for wanting run-on footnotes is that you're using them to hold many, short references. (See here for instructions on using the groff program, refer, to set up references.)

4. Reset footnote number -- RESET_FOOTNOTE_NUMBER

.RESET_FOOTNOTE_NUMBER, by itself, resets footnote numbering so that the next footnote you enter is numbered 1.

.RESET_FOOTNOTE_NUMBER PAGE tells mom to start every page's footnote numbering at 1.

5. Inter-footnote spacing -- FOOTNOTE_SPACE

If you'd like a little extra space between footnotes, you can have mom put it in for you by invoking .FOOTNOTE_SPACE with an argument representing the amount of extra space you'd like. The argument to FOOTNOTE_SPACE requires a unit of measure.

In the following example, footnotes will be separated from each other by 3 points.

	.FOOTNOTE_SPACE 3p

6. Footnote rule -- FOOTNOTE_RULE

If you don't want a footnote separator rule, toggle it off with .FOOTNOTE_RULE OFF (or END, QUIT, X...). Toggle it back on by invoking .FOOTNOTE_RULE with no argument. The default is to print the rule.

7. Footnote rule length -- FOOTNOTE_RULE_LENGTH

If you want to change the length of the footnote separator rule, invoke .FOOTNOTE_RULE_LENGTH with a length, like this,

	.FOOTNOTE_RULE_LENGTH 1i
which sets the length to 1 inch. Note that a unit of measure is required. The default is 4 picas for both PRINTSTYLES.

8. Adjust vertical position of footnote separator rule -- FOOTNOTE_RULE_ADJ

The footnote separator rule is actually a baseline rule that falls on the baseline of the first line of a page's footnotes. By default, mom raises the rule 3 points from the baseline so that the separator and the footnotes don't look jammed together. If you'd prefer a different vertical adjustment, invoke .FOOTNOTE_RULE_ADJ with the amount you'd like. For example

	.FOOTNOTE_RULE_ADJ 4.25p
raises the rule by 4-1/4 points. Note that you can only raise the rule, not lower it. A unit of measure is required.

Tip: If your document leading is 2 points or less (e.g your point size is 10 and your linespacing is 10, 11, or 12, lowering mom's default footnote rule adjustment will almost certainly give you nicer looking results than leaving the adjustment at the default. Furthermore, you can invoke FOOTNOTE_RULE_ADJ on any page in which footnotes appear, or in any column, so that the placement of the footnote rule can be changed on-the-fly, should you wish to do so.


Endnotes

Embedding endnotes into mom documents is accomplished the same way as embedding footnotes. The example below is identical to the one shown in the introduction to footnotes, except that .FOOTNOTE has been replaced with .ENDNOTE.

	...the doctrines of Identity as urged by Schelling\c
	.ENDNOTE
	<endnote about who the hell is Schelling>
	.ENDNOTE OFF
	 were generally the points of discussion presenting the most
	of beauty to the imaginative Morella.
As with footnotes, note the obligatory use of the \c inline escape when your ENDNOTE_MARKER_STYLE is NUMBER (which marks endnotes references in running text with superscript numbers). When the marker style is LINE, you must not use the \c escape.

***Version 1.3 change***

As of version 1.3, the manner of entering the line after .ENDNOTE OFF has changed to accommodate users' differing wishes with respect to the order of punctuation and endnote markers. The correct way to enter the line after .ENDNOTE OFF--but NOT if your ENDNOTE_MARKER_STYLE is LINE--is to input it as if it's literally a continuation of the line before .ENDNOTE, and therefore begins with either a space or a punctuation mark, as in the two following examples.

	   Example 1					  Example 2
	   ---------                      ---------

	A line of text,\c				A line of text\c
	.ENDNOTE						.ENDNOTE
	A footnote line.				A footnote line.
	.ENDNOTE OFF					.ENDNOTE OFF
	 broken up with a comma.		, broken up with a comma.

	(last line begins with			(last line begins with
	 a literal space)				 the comma and a space)
***End version 1.3 change***

Endnotes differ from footnotes in two ways (other than the fact that endnotes come at the end of a document whereas footnotes appear in the body of the document):

  1. When your ENDNOTE_MARKER_STYLE is NUMBER, endnotes are always numbered incrementally, starting at "1".
  2. Endnotes MUST be output explicitly; mom does not output them for you. In collated documents, this allows you to choose whether you want the endnotes to appear at the end of each chapter or article in a document, or grouped together at the very end of the document.

Within endnotes, you may use the document element tags PP, QUOTE and BLOCKQUOTE. This provides the flexibility to create endnotes that run to several paragraphs, as well as to embed cited text within endnotes.

Should you wish to change the appearance of quotes or blockquotes that appear within endnotes, you may do so with the quote control macros or blockquote control macros. HOWEVER... you must make the changes within each endnote, prior to invoking QUOTE or BLOCKQUOTE, and undo them prior to terminating the endnote (i.e. before ENDNOTE OFF), otherwise the changes will affect subsequent quotes and blockquotes that appear in the document body as well.

Endnote behaviour


When you output endnotes (with ENDNOTES), mom finishes processing the last page of your document, then breaks to a new page for printing the endnotes. If the document type is CHAPTER, the centre part of the header (or footer), which, by default, contains a chapter number or title, is removed.

By default, mom starts the endnotes page with a bold, centred, double-underscored head, "ENDNOTES". Underneath--flush left, bold, and underscored--she prints the document title (or, in the case of chapters, the chapter number or title). She then prints the endnotes. Each endnote is identified by its appropriate number, in bold, right aligned to two placeholders. The text of the endnotes themselves is indented to the right of the numbers.

If the endnotes are grouped together at the end of a collated document, each section of the document that contains endnotes is identified by its own unique title (or chapter number or title), bold, flush left, and underscored.

Of course, all the defaults, as well as the overall style of the endnotes page, can be changed with the endnote control macros. The attentive will notice that endnotes have an awful lot of control macros. This is because endnotes are like a mini-document unto themselves, and therefore need not be bound by the style parameters of the body of the document.

A Note on Endnote Spacing


On the endnotes page(s), each new endnote is separated from the previous endnote by a full line space. This can result in a bottom margin that hangs, and is the one instance, other than the use of PARA_SPACE, where mom allows unequal bottom alignment of pages. Should you wish to correct this, by adding or subtracting small amounts of space between endnotes that appear together on an endnotes page, make the adjustment (with ALD, RLD or SPACE) at the end of each endnote (i.e. just before invoking ENDNOTE OFF) rather than at the top.

Endnotes and columnar documents


Formerly (pre 1.1.6), there was no way to set a document in columns (see COLUMNS) and then turn off column mode for endnotes. As of version 1.1.6, you may now do so. See ENDNOTES_NO_COLUMNS.


Macro: ENDNOTE <toggle>
*See
HYPER-IMPORTANT NOTE!!!

ENDNOTE is a toggle macro, therefore invoking it on a line by itself allows you to enter an endnote in the body of a document. Invoking it with any other argument (i.e. OFF, QUIT, END, X...) tells mom that you've finished the endnote.

NOTE: If an endnote runs to more than one paragraph, DO NOT begin the endnote with the PP tag. Use PP only to introduce subsequent paragraphs.

HYPER-IMPORTANT NOTE: If your ENDNOTE_MARKER_STYLE is NUMBER (mom's default), the final word on the input line that comes immediately before ENDNOTE MUST terminate with a \c inline escape. See the endnote example above.

Additionally, the line after .ENDNOTE OFF should be entered as if there were no interruption in the input text, i.e. the line should begin with a literal space or punctuation mark. See the two examples, above.

If your ENDNOTE_MARKER_STYLE is LINE, do NOT use the \c escape, and enter the line after .ENDNOTE OFF normally.


Tag: ENDNOTES

Unlike footnotes, which mom automatically outputs at the bottom of pages, endnotes must be explicitly output by you, the user. ENDNOTES, by itself (i.e. without any argument), is the macro to do this.

Typically, you'll use ENDNOTES at the end of a document. If it's a single (i.e. not collated) document, mom will print the endnotes pertaining to it. If it's a collated document, mom will print all the endnotes contained within all sections of the document (typically chapters), appropriately identified and numbered.

Should you wish to output the endnotes for each section of a collated document at the ends of the sections (instead of at the very end of the document), simply invoke ENDNOTES immediately prior to COLLATE. Mom will print the endnotes, identified and numbered appropriately, on a separate page prior to starting the next section of the document. Each subsequent invocation of ENDNOTES outputs only those endnotes that mom collected after the previous invocation.


Endnote control macros

VERY IMPORTANT NOTE!
Endnote control macros must always be invoked prior to the first instance of ENDNOTE/ENDNOTE OFF.

When you embed endnotes in the body of a document, mom collects and processes them for later outputting (when you invoke ENDNOTES). By the time you do invoke ENDNOTES, it's much too late to change your mind about how you want them to look.

My advice? If you're planning to change the default appearance of endnotes pages, set them up prior to START.

  1. General endnotes-pages style control
  2. Endnotes-page header/footer control
  3. Endnotes-page head (i.e. the title at the top) control
  4. Endnote document-identification title
  5. Endnotes-pages endnote numbering style

1. General endnotes page style control

*Endnote family/font/quad

See Arguments to the control macros.

.ENDNOTE_FAMILY    default = prevailing document family; default is Times Roman
.ENDNOTE_FONT      default = roman
.ENDNOTE_QUAD*     default = justified

*Note: ENDNOTE_QUAD must be set to either L or J

*Endnote point size

Macro: ENDNOTE_PT_SIZE <base type size of endnotes>

Unlike most other control macros that deal with size of document elements, ENDNOTE_PT_SIZE takes as its argument an absolute value, relative to nothing. Therefore, the argument represents the size of endnote type in points, unless you append an alternative unit of measure. For example,

	.ENDNOTE_PT_SIZE 12
sets the base point size of type on the endnotes page to 12 points, whereas

	.ENDNOTE_PT_SIZE .6i
sets the base point size of type on the endnotes page to 1/6 of an inch.

The type size set with ENDNOTE_PT_SIZE is the size of type used for the text of the endnotes, and forms the basis from which the point size of other endnote page elements is calculated.

The default for PRINTSTYLE TYPESET is 12.5 points (the same default size used in the body of the document).

*Endnote lead

Macro: ENDNOTE_LEAD <base leading of endnotes> [ ADJUST ]
*Does not require a unit of measure; points is assumed

Unlike most other control macros that deal with leading of document elements, ENDNOTE_LEAD takes as its argument an absolute value, relative to nothing. Therefore, the argument represents the leading of endnotes in points unless you append an alternative unit of measure. For example,

	.ENDNOTE_LEAD 14
sets the base leading of type on the endnotes page to 14 points, whereas

	.ENDNOTE_LEAD .5i
sets the base leading of type on the endnotes page to 1/2 inch.

If you want the leading of endnotes adjusted to fill the page, pass ENDNOTE_LEAD the optional argument ADJUST. (See DOC_LEAD_ADJUST for an explanation of leading adjustment.)

The default for PRINTSTYLE TYPESET is 14 points, adjusted.

NOTE: Even if you give mom a DOC_LEAD_ADJUST OFF command, she will still, by default, adjust endnote leading. You MUST enter ENDNOTE_LEAD <lead> with no ADJUST argument to disable this default behaviour.

*Singlespace endnotes (TYPEWRITE only)

Macro: SINGLESPACE_ENDNOTES <toggle>

If your PRINTSTYLE is TYPEWRITE and you use TYPEWRITE's default double-spacing, endnotes are double-spaced. If your document is single-spaced, endnotes are single-spaced.

If, for some reason, you'd prefer that endnotes be single-spaced in an otherwise double-spaced document (including double-spaced collated documents), invoke SINGLESPACE_ENDNOTES with no argument. And if, god help you, you want to change endnote single-spacing back to double-spacing for different spacing of endnotes output at the ends of separate documents in a collated document, invoke SINGLESPACE_ENDNOTES with any argument (OFF, QUIT, Q, X...).

*Endnote paragraph indenting

Macro: ENDNOTE_PARA_INDENT <amount to indent first line of paragraphs in endnotes>
*Requires a unit of measure

ENDNOTE_PARA_INDENT works exactly the same way as PARA_INDENT, except that the indent given is the amount by which to indent the first lines of endnote paragraphs, not document body paragraphs.

The default is 1.5 ems for PRINTSTYLE TYPESET; 1/2 inch for PRINTSTYLE TYPEWRITE.

NOTE: The first line of the first paragraph of endnotes (the one attached immediately to the identifying endnote number) is never indented. Only subsequent paragraphs are affected by ENDNOTE_PARA_INDENT.

*Endnote paragraph spacing

Macro: ENDNOTE_PARA_SPACE <toggle>

ENDNOTE_PARA_SPACE works exactly the same way as PARA_SPACE, except that it inserts a blank line between endnote paragraphs, not document body paragraphs.

The default is not to insert a blank line between paragraphs in endnotes.

NOTE: Each endnote itself is always separated from any previous endnote by a line space. ENDNOTE_PARA_SPACE refers only to paragraphs that appear within each discrete endnote.

*Turning off column mode during endnotes output

Macro: ENDNOTES_NO_COLUMNS <toggle>

By default, if your document is set in columns, mom sets the endnotes in columns, too. However, if your document is set in columns and you'd like the endnotes not to be, just invoke ENDNOTES_NO_COLUMNS with no argument. The endnotes pages will be set to the full page measure of your document.

If you output endnotes at the end of each document in a collated document set in columns, column mode will automatically be reinstated for each document, even with ENDNOTES_NO_COLUMNS turned on.

*Endnotes-pages page numbering style

Macro: ENDNOTES_PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha

Use this macro to set the page numbering style of endnotes pages. The arguments are identical to those for PAGENUM_STYLE. The default is digit. You may want to change it to, say, alpha, which you would do with

	.ENDNOTES_PAGENUM_STYLE alpha

*Setting the first page number of endnotes pages

Macro: ENDNOTES_FIRST_PAGENUMBER <page # that appears on page 1 of endnotes>

Use this macro with caution. If all endnotes for several collated documents are to be output at once, i.e. not at the end of each separate doc, ENDNOTES_FIRST_PAGENUMBER tells mom what page number to put on the first page of the endnotes.

If you set ENDNOTES_FIRST_PAGENUMBER in collated documents where the endnotes are output after each separate doc, you have to reset every separate document's first page number after COLLATE and before START.

*Omitting a page number on the first page of endnotes

Macro: ENDNOTES_NO_FIRST_PAGENUM <toggle>

This macro is for use only if FOOTERS are on. It tells ENDNOTES not to print a page number on the first endnotes page. Mom's default is to print the page number.

*Suspending pagination of endnotes pages

Macro: SUSPEND_PAGINATION
Macro: RESTORE_PAGINATION

SUSPEND_PAGINATION doesn't take an argument. Invoked immediately prior to ENDNOTES, it turns off endnotes pages pagination. Mom continues, however to increment page numbers silently.

To restore normal document pagination after endnotes, invoke RESTORE_PAGINATION (again, with no argument) immediately after ENDNOTES.

2. Endnotes-page header/footer control

If you wish to modify what appears in the header/footer that appears on endnotes page(s), make the changes before you invoke ENDNOTES, not afterwards.

Except in the case of DOCTYPE CHAPTER, mom prints the same header or footer used throughout the document on the endnotes page(s). Chapters get treated differently in that, by default, mom does not print the header/footer centre string (normally the chapter number or chapter title.) In most cases, this is what you want. However, should you not want mom to remove the centre string from the endnotes page(s) headers/footers, invoke ENDNOTES_HEADER_CENTER with no argument.

An important change you may want to make is to put the word "Endnotes" in the header/footer centre position. To do so, do

	.HEADER_CENTER "Endnotes"
	           or
	.FOOTER_CENTER "Endnotes"
prior to invoking .ENDNOTES. If your DOCTYPE is CHAPTER, you must also invoke ENDNOTES_HEADER_CENTER for the HEADER_CENTER to appear.

*Endnotes page(s) header/footer centre string

Macro: ENDNOTES_HEADER_CENTER toggle

If your DOCTYPE is CHAPTER and you want mom to include a centre string in the headers/footers that appear on endnotes pages, invoke ENDNOTES_HEADER_CENTER (or ENDNOTES_FOOTER_CENTER) with no argument. Mom's default is NOT to print the centre string.

If, for some reason, having enabled the header/footer centre string on endnotes pages, you wish to disable it, invoke the same macro with any argument (OFF, QUIT, Q, X...).

*Allow headers on endnotes-pages

Macro: ENDNOTES_ALLOWS_HEADERS <none> | ALL

By default, if HEADERS are on, mom prints page headers on all endnotes pages except the first. If you don't want her to print headers on endnotes pages, do

	.ENDNOTES_ALLOWS_HEADERS OFF
If you want headers on every page including the first, do

	.ENDNOTES_ALLOWS_HEADERS ALL
NOTE: If FOOTERS are on, mom prints footers on every endnotes page. This is a style convention. In mom, there is no such beast as ENDNOTES_ALLOWS_FOOTERS OFF.

3. Endnotes-page first page head (title) control

*Endnotes-page first page head (title) string

Macro: ENDNOTE_STRING "<head to print at the top of endnotes>"

By default, mom prints the word "ENDNOTES" as a head at the top of the first page of endnotes. If you want her to print something else, invoke ENDNOTE_STRING with the endnotes-page head you want, surrounded by double-quotes. If you don't want a head at the top of the first endnotes-page, invoke ENDNOTE_STRING with a blank argument (either two double-quotes side by side -- "" -- or no argument at all).

*Endnotes-page first page head (title) control

See Arguments to the control macros.

.ENDNOTE_STRING_FAMILY    default = prevailing document family; default is Times Roman
.ENDNOTE_STRING_FONT      default = bold
.ENDNOTE_STRING_SIZE*     default = +1
.ENDNOTE_STRING_QUAD      default = centred

*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)

*Endnotes-page head (title) underscoring

Macro: ENDNOTE_STRING_UNDERSCORE toggle | 2

Invoked by itself, ENDNOTE_STRING_UNDERSCORE will underscore the endnotes-page head. Invoked with the argument 2 (i.e. the digit 2), ENDNOTE_STRING_UNDERSCORE will double-underscore the head. Invoked with any other argument, the macro disables underscoring of the head.

Mom's default is to double-underscore the head, therefore if you want no underscoring, you must insert .ENDNOTE_STRING_UNDERSCORE OFF (or QUIT, X, NO, NONE, etc.) into your document prior to outputting endnotes with ENDNOTES.

*Endnotes-page head (title) automatic capitalization

Macro: ENDNOTE_STRING_CAPS toggle

Invoked by itself, ENDNOTE_STRING_CAPS will automatically capitalize the endnotes-page head. Invoked with any other argument, the macro disables automatic capitalization of the head.

If you're generating a table of contents, you may want the endnotes-pages head string in caps, but the toc entry in caps/lower case. If the argument to ENDNOTE_STRING is in caps/lower case and ENDNOTE_STRING_CAPS is on, this is exactly what will happen.

Mom's default is to capitalize the endnotes-pages head string.

4. Endnote document-identification title

*Endnote document-identification title string

Macro: ENDNOTE_TITLE "<title to identify a document in endnotes>"

By default, mom identifies the document(s) to which endnotes belong by the document title(s) given to the TITLE macro. If you'd want her to identify the document(s) another way, just invoke ENDNOTE_TITLE with the identifying title you want, surrounded by double-quotes.

If you don't want any identifying title, invoke ENDNOTE_TITLE with a blank argument (either two double-quotes side by side -- "" -- or no argument at all). This is particularly useful if you have a single (i.e. non-collated) document and find having the document's title included in the endnotes redundant.

*Endnote document-identification title control

See Arguments to the control macros.

.ENDNOTE_TITLE_FAMILY    default = prevailing document family; default is Times Roman
.ENDNOTE_TITLE_FONT      default = bold
.ENDNOTE_TITLE_SIZE*     default = 0
.ENDNOTE_TITLE_QUAD      default = left

*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)

*Endnote document-identification title underscoring

Macro: ENDNOTE_TITLE_UNDERSCORE toggle

Invoked by itself, ENDNOTE_TITLE_UNDERSCORE will underscore the endnote document-identification title(s). Invoked with any other argument, the macro disables underscoring of the title(s).

Mom's default is to underscore the document-identification title, therefore if you want no underscoring, you must insert .ENDNOTE_TITLE_UNDERSCORE OFF (or QUIT, X, NO, NONE, etc.) into your document prior to outputting endnotes with ENDNOTES.

5. Endnotes-pages endnote numbering style

*Endnote marker style

The macro to control how endnotes are referenced is ENDNOTE_MARKER_STYLE.

By default, mom places superscript numbers in running text to identify endnotes. However, if you have line-numbering turned on, you may instruct mom not to put superscript numbers in the running text, but rather to reference endnotes by line number. The command to do this is

	.ENDNOTE_MARKER_STYLE LINE
With ENDNOTE_MARKER_STYLE LINE, mom will identify endnotes either by single line numbers, or line ranges. If what you want is a single line number, you need only invoke .ENDNOTE, without terminating the text line before it with \c, at the appropriate place in running text. (Should you wish to revert to mom's default behaviour of placing a superscript number in the text to identify an endnote, you can invoke ENDNOTE_MARKER_STYLE with the argument, NUMBER. It is not advisable to switch marker styles within a single document, for aesthetic reasons, but there is nothing to prevent you from doing so.)

If you want a range of line numbers (e.g. [5-11] ), insert, directly into the first line of the range you want, the inline escape, \*[EN-MARK]. For the terminating line number of the range, you need only invoke .ENDNOTE, (again, without attaching \c to the text line before it). Mom is smart enough to figure out that where ENDNOTE was invoked represents the terminating line number.

Given the impossibility of knowing, in advance, the "string length" of all the line numbers or ranges of line numbers that will be used in endnotes (the string length of 12 is two; the string length of 12-15 is 5), mom cannot "hang" line numbers and guarantee that they, and the endnote text, will align in a visually pleasing manner. Consequently, mom sets the entirety of line-numbered endnotes completely flush left, including the line numbers themselves. The line numbers (by default, enclosed in square brackets) are separated from the beginning of each endnote by a gap, so that a line-numbered endnote looks approximately like this:

	[1-2]   Notwithstanding, Frye later asserts that Christianity
	is "a ghost  with the chains of a foul historical record of
	cruelty clanking behind it."
The default gap for PRINTSTYLE TYPESET and PRINSTYLE TYPEWRITE is 1.5 ems. You can change the size of the gap with the macro, ENDNOTE_LINENUMBER_GAP, which takes, as its single argument, the size of the gap. The argument requires a unit of measure, so, for example, to change the gap to 2 picas, you'd do

	.ENDNOTE_LINENUMBER_GAP 2P
By default, mom puts endnote line numbers inside square brackets. The style of the brackets may be changed with the macro, ENDNOTE_LINENUMBER_BRACKETS, which takes one of three possible arguments: PARENS ("round" brackets), SQUARE (the default) or BRACES (curly braces). If you prefer a shortform, the arguments, (, [ or { may be used instead.

If you don't want the numbers enclosed in brackets, you may tell mom to use a "separator" instead. A common separator would be the colon, but it can be anything you like. The macro to do this is ENDNOTE_LINENUMBER_SEPARATOR, which takes, as its single argument, the separator you want. (If the argument contains spaces, don't forget to enclose the argument in double-quotes.) The separator can be composed of any legal groff character, or any combination of characters. For example, to get a colon separator after the line number in line-numbered endnotes, you'd do

	.ENDNOTE_LINENUMBER_SEPARATOR :

*Endnote numbering style control

See Arguments to the control macros.

Please note that the control macros for endnote numbering affect only the numbers that appear on the endnotes pages themselves, not the endnote numbers that appear in the body of the document(s).

.ENDNOTE_NUMBER_FAMILY    default = prevailing document family; default is Times Roman
.ENDNOTE_NUMBER_FONT      default = bold
.ENDNOTE_NUMBER_SIZE*     default = 0

*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)

*Endnote numbering alignment

By default, mom hangs the numbers on endnotes pages, aligned right to two placeholders, producing this:

	 9. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	    sed diam nonumy eirmod tempor invidunt ut labore et
	    dolore magna aliquyam erat, sed diam voluptua.

	10. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	    sed diam nonumy eirmod tempor invidunt ut labore et
	    dolore magna aliquyam erat, sed diam voluptua.
The macros to alter this behaviour are


Macro: ENDNOTE_NUMBERS_ALIGN_RIGHT <number of placeholders>

ENDNOTE_NUMBERS_ALIGN_RIGHT takes one (non-optional) argument: the number of placeholders to reserve for right alignment of endnote numbers.

For example, if you have fewer than ten endnotes, you might want to do

	.ENDNOTE_NUMBERS_ALIGN_RIGHT 1
which would ensure that the endnote numbers hang, but are all flush with the page's left margin. If, god help you, you have over a hundred endnotes, you'd want to do

	.ENDNOTE_NUMBERS_ALIGN_RIGHT 3
to ensure that the numbers hang and are properly right-aligned.


Macro: ENDNOTE_NUMBERS_ALIGN_LEFT

If you don't want the endnote numbers to hang and right-align, invoke ENDNOTE_NUMBERS_ALIGN_LEFT, which doesn't require any argument. This disables hanging and right-alignment of endnote numbers, so that the example above comes out like this:

	9. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore et
	dolore magna aliquyam erat, sed diam voluptua.

	10. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
	sed diam nonumy eirmod tempor invidunt ut labore et
	dolore magna aliquyam erat, sed diam voluptua.

Margin notes

Margin notes are short annotations that appear in either the left or right margin of a document. Sometimes they comment on the text. Sometimes they assist in following the "flow" of a document by summarizing the subject of a portion of text. Sometimes they're comments to yourself in a draft copy.

The margin notes macros and routines in om.tmac (mom) are "mommified" versions of the margin notes macros and routines written by Werner Lemberg and patched by Gaius Mulley.

Margin notes behaviour

First things first: before you enter your first margin note, you must "initialize" margin notes with MN_INIT. MN_INIT sets up the style parameters for margin notes, including things like font, family and leading.

After initializing margin notes, you create margin notes with the MN macro. Based on the argument you pass MN, your margin note will go in either the left or the right margin.

Margin notes are tricky from a typographic standpoint with respect to vertical placement. Since the leading of margin notes may differ from that of running text, it's impossible for mom to guess whether to align the first lines of margin notes with a document baseline, whether to align the last lines of margin notes with a document baseline, or whether to center them, vertically, so that neither first nor last line aligns with anything!

Given this difficulty, mom always aligns the first line of any margin note with a document baseline. If you want a different behaviour, you must adjust the position(s) of margin notes yourself, on a note by note basis. (See Adjusting the vertical position of margin notes.)

Generally speaking, mom tries to place margin notes at the point where you invoke the tag, MN. However, in the event that a margin note runs deep, she may not be able to place a subsequent margin note exactly where you want. In such an instance, mom will "shift" the margin note down on the page, placing it one (margin note) linespace beneath the previous margin note (plus whatever vertical space is required to get the first line to line up with a baseline of running text). A warning will be issued, letting you know this has happened, and where.

Sometimes, if a margin note has to be shifted down, there simply isn't enough room to start the margin note on the page on which MN is invoked. In that case, mom ignores the margin note entirely and issues a warning, letting you know what she's done, and where.

In the event that a margin note, sucessfully begun on a page, runs past your bottom margin (or the last line before footnotes begin), the margin note will "flow" onto the next page. If it is a "left" margin note, it will continue in the left margin. If it is a "right" margin note, it will continue in the right margin.

If your document is being set in two columns, mom will sensibly and automatically set all margin notes pertaining to the left column in the left margin, and all margin notes pertaining to the right column in the right margin, regardless of the "direction" argument you give the MN tag. If you try to use MN in documents of more than two columns, mom will ignore all margin notes, and issue warning for each.

Adjusting the vertical position of margin notes

When the leading of margin notes differs from the leading used throughout a document, you may want to adjust the vertical position of individual margin notes. This is most often going to be the case with margin notes that end near the bottom of the page, where you want the last line of the margin note to line up with the last line of text on the page.

Adjustments to the vertical position of margin notes must be done inside the margin note (i.e. after MN), at the top, before entering text. The commands to use are \!.ALD (to lower the margin note), and \!.RLD (to raise it). The \! must precede the macros, or they won't have any effect.


Macro: MN_INIT [ ragged | symmetric ] < left-width right-width gutter family+font point-size lead colour hyphenation-flags >

Before you enter your first margin note, you must initialize all the parameters associated with margin notes with MN_INIT. If you forget to do so, mom will issue a warning and abort.

The argument list is quite long; an explanation of each argument follows. Any argument whose value you want to be the default must be entered as "" (i.e. two double-quotes with no space between them). Defaults for each argument are given in the explanation below.

[ ragged | symmetric ]
If the first argument is "ragged", both left and right margin notes will be flush left. If the first argument is "symmetric", left margin notes will be set flush right, and right margin notes will be set flush left. The effect is something like this:

	     A left    This is a meaningless batch        A right
	margin note    of text whose sole purpose is      margin note
	  with just    to demonstrate how the sym-        with just
	a few words    metric argument to MN sets left    a few words
	     in it.    and right margin notes.            in it.
If the argument is omitted, or given as "", both left and right margin notes will be set justified. (Justified is usually not a good idea, since the narrow measure of margin notes makes pleasing justification a near impossibility.)

left-width
The width of left margin notes. A unit of measure must be appended directly onto the argument. The default is to set left margin notes right out to the edge of the page, which is almost certainly not what you want, so you should give a value for this argument if using left margin notes.

right-width
The width of right margin notes. A unit of measure must be appended directly onto the argument. The default is to set right margin notes right out to the edge of the page, which is almost certainly not what you want, so you should give a value for this argument if using right margin notes.

gutter
The gutter between margin notes and running text. A unit of measure must be appended directly onto the argument. The gutter applies to both left and right margin notes. The default is 1 em.

font
The family+font for margin notes. Yes, that's right: the family PLUS font combo. For example, if you want Times Roman Medium, the argument must be TR. If you want Palatino Medium Italic, the argument must be PI. The default is the same family+font combo used for a document's paragraph text.

lead
The leading of margin notes. lead uses points as its unit of measure, so don't tack a unit of measure onto the end of the argument. The default lead is the same leading as is used for paragraph text (i.e. the document's base leading). For convenience and clarity, you may also give the word, DOC, to this argument, which indicates that the leading should be the same as the document's base leading.

colour
The colour of margin notes. The colour must be pre-initialized with NEWCOLOR or XCOLOR. The default is black.

hyphenation-flags
A number telling groff how you want margin notes hyphenated.

	1 = hyphenate without restrictions
	2 = do not hyphenate the last word on the page
	4 = do not hyphenate the last two characters of a word
	8 = do not hyphenate the first two characters of a word
The values can be added together, so, for example, if you want neither the first two nor the last two characters of words hyphenated, the hyphenation-flag would be 12. The default value is 14 (i.e. 2+4+8).


Macro: MN LEFT|RIGHT | <anything>

Once you've initialized margin notes with MN_INIT, you can enter margin notes any time you like with MN. An argument of LEFT will set a left margin note. An argument of RIGHT will set a right margin note.

Any argument, such as OFF (or QUIT, END, X, etc) exits the current margin note.


Inserting a blank page into the document

Macro: BLANKPAGE <# of blank pages to insert>

This one does exactly what you'd expect -- inserts a blank page into the document. Mom silently increments the page number of every blank page and keeps track of recto/verso stuff, but otherwise, does nothing. It's up to you, the user, to figure out what to do with this feature. However, it's worth noting that without it, inserting completely blank pages, to use a vernacular Québécois phrase, "c'est pas évident" (somewhere between "isn't easy", "isn't obvious" and "isn't fun").

The argument to BLANK_PAGE is the number of blank pages to insert. The argument is not optional, hence even if you only want one blank page, you have to tell mom:

	.BLANKPAGE 1

Terminate document processing

The use of FINIS is optional. If you invoke it (at the end of a document before TOC or ENDNOTES), mom deposits the word END, centred after a blank line, beneath the last line of the document. END is enclosed between em-dashes.

Please note that in versions of mom prior to 1.1.9, FINIS used to turn off footers (if they were on) and page numbering (if page numbers were at the bottom of the page). Damned if I can recall why I thought anyone would want this behaviour, but it has been removed.

If you're writing in a language other than English, you can change what mom prints for END with the control macro FINIS_STRING.


Table of contents

Want a table of contents for your document? Easy. Just enter

	.TOC
as the very last macro of your document file. Mom will have picked up all document titles (in collated documents), all heads, subheads, and paragraph heads, as well as any endnotes pages that have been output, and assigned them the appropriate page number (and page numbering style). Talk about a no-brainer! That said, tables of contents (tocs) have even more control macros than endnotes. As always, the reason for so many control macros is so that if you want to change just about any aspect of the toc's typographic appearance, you can. Mom is all about simplicity AND flexibility.

TOC behaviour

When you output a toc (with TOC), mom finishes processing the last page of your document, then breaks to a new page for printing the toc.

Mom follows standard typesetting conventions for tables of contents. To this end, if HEADERS are on for the document, the first page of the toc has no page header, but does have a first page (roman numeral) number, always "1", in the bottom margin. If FOOTERS are on for the document, the first page has neither a footer, nor a page number in the top margin. (If you absolutely must have a page footer on the first page of the toc, simply invoke FOOTER_ON_FIRST_PAGE immediately before TOC.) Subsequent toc pages have both page headers or footers and a page number.

Entries in the toc are hierarchically indented, as you would expect. By default, each type of entry (e.g. a head or a subhead) is set in a different font as well. If any of heads, subheads or paragraph heads are numbered in the body of the document, they are also numbered in the toc. Head numbering in the toc is NOT concatenated as it is in the body of the document, which would be visually redundant in a toc.

Tocs are never set in columns, regardless of whether the rest of the document is. Lastly, if recto/verso printing is enabled, the toc respects it. This sometimes leads to tocs that begin with the wrong margins, but the margins can be corrected either by outputting a BLANKPAGE or by using the toc control macro TOC_RV_SWITCH.

The overall toc family, point size and lead can be altered with the toc control macros, as can the family, font, point size and indent of each type of toc entry (i.e. title, head, subhead, paragraph head). Furthermore, the page numbering style can be changed, as can the amount of visual space reserved for toc entry page numbers.


Macro: TOC

If you want a toc, just put TOC as the last macro in a document. Mom takes care of the rest.


TOC control macros

Toc entries are not actually processed when mom collects them, so you can put any toc control macros anywhere you like in your document. Some may prefer to place them at the top of the file. Others may prefer to place them just before outputting the toc. The choice is yours.

  1. General toc page style control
  2. Toc page numbering
  3. Changing the toc header (title), string and style
  4. Changing the style for toc entries
  5. Additional toc control macros

1. General toc page style control

*Toc family

See Arguments to the control macros.

Set the family of toc pages with TOC_FAMILY, which establishes the default family for every element of a toc page, including the toc title ("Contents") and the page number in the top or bottom margin. The default is the prevailing document family.

All elements on a toc page also have their own _FAMILY control macros, which override the default set by TOC_FAMILY.

*Toc point size

Macro: TOC_PT_SIZE <base type size of the toc>

Unlike most other control macros that deal with size of document elements, TOC_PT_SIZE takes as its argument an absolute value, relative to nothing. Therefore, the argument represents the size of toc type in points, unless you append an alternative unit of measure. For example,

	.TOC_PT_SIZE 12
sets the base point size of type for the toc to 12 points, whereas

	.TOC_PT_SIZE .6i
sets the base point size of type for the toc to 1/6 of an inch.

The type size set with TOC_PT_SIZE forms the basis from which the point size of other toc page elements are calculated.

The default for PRINTSTYLE TYPESET is 12.5 points (the same default size used in the body of the document).

*Toc lead

Macro: TOC_LEAD <leading of the toc> [ ADJUST ]
*Does not require a unit of measure; points is assumed

Unlike most other control macros that deal with leading of document elements, TOC_LEAD takes as its argument an absolute value, relative to nothing. Therefore, the argument represents the leading of tocs in points unless you append an alternative unit of measure. For example,

	.TOC_LEAD 14
sets the base leading of type on the endnotes page to 14 points, whereas

	.TOC_LEAD .5i
sets the base leading of type on the endnotes page to 1/2 inch.

If you want the leading of toc pages adjusted to fill the page, pass TOC_LEAD the optional argument ADJUST. (See DOC_LEAD_ADJUST for an explanation of leading adjustment.)

The default for PRINTSTYLE TYPESET is the prevailing document lead (16 by default), adjusted.

NOTE: Even if you give mom a DOC_LEAD_ADJUST OFF command, she will still, by default, adjust toc leading. You MUST enter TOC_LEAD <lead> with no ADJUST argument to disable this default behaviour.

ADDITIONAL NOTE: Tocs are always double-spaced in PRINTSTYLE TYPEWRITE, regardless of whether the body of the document is single-spaced.

2. Toc page numbering

The page numbering of toc pages is controlled by the same macros that control document page numbering, except PAGENUM (tocs always start on page 1). The defaults are the same as the rest of the document.

If you wish to change some aspect of toc pagination, use the document pagination control macros immediately prior to .TOC.

A special macro, TOC_PAGENUM_STYLE controls the style of toc pages page numbers.


Macro: PAGINATE_TOC <toggle>

By default, mom paginates the toc. If you'd like her not to, do

	.PAGINATE_TOC OFF
NOTE: Simply invoking PAGINATION OFF or PAGINATE OFF disables toc pagination for the first toc page only. You MUST use .PAGINATE_TOC OFF to disable toc pagination, even if pagination is turned off elsewhere in your document.


Macro: TOC_PAGENUM_STYLE <DIGIT | ROMAN | roman | ALPHA | alpha>

By default, mom uses roman numerals to number toc pages. Use TOC_PAGENUM_STYLE if you'd prefer something else. For example, to have standard digits instead of roman numerals, do the following:

	.TOC_PAGENUM_STYLE DIGIT

3. Changing the toc header (title) string and style

The toc header string is the title that appears at to top of the toc. By default, it's "Contents". If you'd like something else, say, "Table of Contents", do

	.TOC_HEADER_STRING "Table of Contents"
The style of the toc header (title) is managed by the usual control macros (see arguments to the control macros).

	.TOC_HEADER_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
	.TOC_HEADER_FONT    default = bold
	.TOC_HEADER_SIZE    default = +4
	.TOC_HEADER_QUAD    default = left

4. Changing the style for toc entries

"Toc entries" refers to titles, heads, subheads and paragraph heads as they appear in the toc. Their style is managed by the usual control macros, starting with TOC_

The toc _INDENT control macros

The toc control macros that end in _INDENT all take a single argument that requires a unit of measure. The argument is the distance to indent the entry, always measured from the left margin. For example,

	.TOC_HEAD_INDENT 2P
indents head entries 2 picas from the left margin.

*Changing the style for toc title entries

(See arguments to the control macros).

Toc title entries are the titles of documents that have been collated together.

	.TOC_TITLE_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
	.TOC_TITLE_FONT    default = bold italic
	.TOC_TITLE_SIZE    default = +0
	.TOC_TITLE_INDENT  default = 0 for TYPESET and TYPEWRITE

*Changing the style for toc head entries

(See arguments to the control macros).

Toc head entries are main heads that appear in the body of a document.

	.TOC_HEAD_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
	.TOC_HEAD_FONT    default = bold
	.TOC_HEAD_SIZE    default = +.5
	.TOC_HEAD_INDENT  default = 18p for TYPESET; 2m for TYPEWRITE

*Changing the style for toc subhead entries

(See arguments to the control macros).

Toc subhead entries are subheads that appear in the body of a document.

	.TOC_SUBHEAD_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
	.TOC_SUBHEAD_FONT    default = roman
	.TOC_SUBHEAD_SIZE    default = +0
	.TOC_SUBHEAD_INDENT  default = 30p for TYPESET; 4m for TYPEWRITE

*Changing the style for toc paragraph head entries

(See arguments to the control macros).

Toc paragraph head entries are paragraph heads that appear in the body of a document.

	.TOC_PARAHEAD_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
	.TOC_PARAHEAD_FONT    default = italic
	.TOC_PARAHEAD_SIZE    default = +0
	.TOC_PARAHEAD_INDENT  default = 42p for TYPESET; 6m for TYPEWRITE

*Changing the style for toc paragraph page number listings

(See arguments to the control macros).

Toc paragraph head entries are paragraph heads that appear in the body of a document.

	.TOC_PN_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
	.TOC_PN_FONT    default = roman
	.TOC_PN_SIZE    default = +0

5. Additional toc macros

The following macros allow you to switch page margins should they be incorrect for recto/verso printing, to establish how many placeholders to leave for page listings, and to have mom append author(s) to toc title entries.


Macro: TOC_RV_SWITCH

TOC_RV_SWITCH doesn't take an argument. It simply instructs mom to switch the left and right margins of recto/verso documents should the toc happen to begin on an even page when you want an odd, or vice versa.

The same result can be accomplished by outputting a BLANKPAGE.


Macro: TOC_TITLE_ENTRY <"alternate wording for a title entry in the toc">

In collated documents, the title of each separate document appears in the table of contents. It may sometimes happen that you don't want the title as it appears in the toc to be the same as what appears in the docheader. You might, for example, want to shorten it. Or, in the case of chapters where the docheader contains both a chapter number and a chapter title, like this

	           Chapter 6
	Burning Bush -- Maybe God Was Right
you might want only the chapter title, not the chapter number, to show up in the toc. (By default, TOC generates both.)

If you want to change the wording of a title entry in the toc, simply invoke TOC_TITLE_ENTRY with the desired wording, enclosed in double-quotes. Using the example, above,

	.CHAPTER 6
	.CHAPTER_TITLE "Burning Bush -- Maybe God Was Right"
	.TOC_TITLE_ENTRY "Burning Bush"
	.DOCTYPE CHAPTER
would identify chapter 6 in the toc simply as "Burning Bush".


Macro: TOC_APPENDS_AUTHOR <none> | <"name(s) of authors">

In certain kinds of collated documents, different authors are responsible for the articles or stories contained within them. In such documents, you may wish to have the author or authors appended to the toc's title entry for each story or article.

If you invoke TOC_APPENDS_AUTHOR with no argument, mom appends the first argument you passed to AUTHOR to toc title entries, separated by a front-slash.

If you invoke TOC_APPENDS_AUTHOR with an argument (surrounded by double-quotes), mom will append it to the toc title entries instead. This is useful if you have multiple authors you wish to identify by last name only. For example, if three authors--Joe Blough, Jane Doe, and John Deere--are responsible for a single article

	.TOC_APPENDS_AUTHOR "Blough et al."
would be a good way to identify them in the toc.


Macro: TOC_PADDING <# of placeholders to allow for page number listings>

By default, mom allows room for 3 digits in the page number listings of tocs. If you'd like some other number of placeholders, say 2, do

	.TOC_PADDING 2

Macro: FINIS

The use of FINIS is optional, but if you use it, it should be the last macro you invoke in a document (before ENDNOTES or TOC). See above for a description of how FINIS behaves.

NOTE: If you don't use FINIS, and you don't want footers (if they're on) or a page number at the bottom of the last page of a document, you have to turn them off manually, as the last two lines of your document file, like this:

	.FOOTERS OFF
	.PAGINATE OFF

Changing the FINIS string

By default, FINIS prints the word END between em-dashes. If you'd like mom to print something else between the dashes, use the FINIS_STRING macro (anywhere in the document prior to FINIS).

For example, if your document's in French, you'd do

	.FINIS_STRING "FIN"
Double-quotes must enclose the macro's argument.

NOTE: If you pass FINIS_STRING a blank string, i.e.

	.FINIS_STRING ""
mom will still print the em-dashes if you invoke FINIS. This, in effect, produces a short, centred horizontal rule that terminates the document. (In PRINTSTYLE TYPEWRITE, it's a short, dashed line composed of four hyphens.)

Changing the FINIS colour

Invoking FINIS_COLOR with a pre-defined (or "initalized") color changes the colour of both the FINIS string and the em-dashes that surround it. If you use the inline escape, \*[<colorname>], in the argument passed to FINIS, only the text will be in the new colour; the em-dashes will be in the default document colour (usually black).


Next   Prev   Top   Back to Table of Contents