Back to Table of Contents Next: Graphics, floats, preprocessor support

The document element tags


Document element tags table of contents


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 heading; this is a footnote,” and so on.

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 the tag 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 (ie 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.

Tip: 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.

Important: The family, font, point size, colour and leading control macros have no effect in PRINTSTYLE TYPEWRITE, except where noted throughout this documentation.

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

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 +<n> or -<n> where <n> is the number of points larger (+) or smaller (-) than the point size of paragraphs you want the document element to be. For example, to set blockquotes 2 points smaller than the type in paragraphs, do
.BLOCKQUOTE_SIZE -2 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 author linebreaks to be red, once you’ve defined or initialized the colour, red,
.LINEBREAK_COLOR red will turn them 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 leading. For example, to set footnotes solid, do
.FOOTNOTE_AUTOLEAD 0 To set footnotes with a 1-point lead (ie with the line spacing one point greater than the footnote’s point size), do
.FOOTNOTE_AUTOLEAD 1

Note: _AUTOLEAD control macros do not have a FACTOR argument.

Indents

Except for PARA_INDENT, the argument to control macros that end in _INDENT can take either a single numeral (whole numbers only, no decimal fractions) without a unit of measure appended to it, or a digit (including decimal fractions) with a unit of measure appended.

A digit without a unit of measure appended represents by how much you want your paragraph first-line indents (set with PARA_INDENT) multiplied to achieve the correct indent for a particular tag. For example,
.PARA_INDENT 2m .BLOCKQUOTE_INDENT 2 means that blockquotes will be indented from the left and right margins by twice the size of the paragraph indent, or 4 ems.

A digit with a unit of measure appended defines an absolute indent, relative to nothing. In the following, blockquotes will be indented by 3 picas and 6 points, regardless of the paragraph indent.
.PARA_INDENT 2m .BLOCKQUOTE_INDENT 3P+6p

Quad/justification style

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

Underline style, rule weight

If mom gives the option to underline a document element, the weight of the underline and its distance from the baseline are controlled by macros that end in _UNDERLINE.

Page elements that are separated from running text by a rule (ie page headers, page footers and footnotes) are controlled by macros that end in _RULE_WEIGHT.

The weight argument to _UNDERLINE macros is the same as the argument to RULE_WEIGHT, as is the argument to _RULE_WEIGHT macros.


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.”

EPIGRAPH

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 (ie just after START) or after headings. 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.

Tip: If you’re setting a document in columns and you’d like to add or subtract space after the epigraph, the place to do it is inside the epigraph, like this:
.EPIGRAPH A notable quote. .SP 1v .EPIGRAPH OFF If you were to add the .SP 1v outside the epigraph, the space would be added to the top of the leftmost column only, resulting in unbalanced columns.

EPIGRAPH control macros and defaults

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* (see Note on EPIGRAPH_INDENT, below) *Indent here refers to the indent from both the left and right margins that centres block style epigraphs on the page.

Note on EPIGRAPH_INDENT

If you pass EPIGRAPH_INDENT an integer with no unit of measure appended, the integer represents the amount by which to multiply PARA_INDENT to arrive at an indent for block style epigraphs. If you append a unit of measure to the argument, the indent will be precisely the amount specified.

Please also note that if your PARA_INDENT is 0 (ie no indenting of the first line of paragraphs), you must set an EPIGRAPH_INDENT yourself, with a unit of measure appended to the argument. Mom has no default for EPIGRAPH_INDENT if paragraph first lines are not being indented.

The default value for EPIGRAPH_INDENT is 3 (for PRINTSTYLE TYPESET) and 2 (for PRINTSTYLE TYPEWRITE).


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 headings. 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.

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.)

Tip: If you want to add less than a full linespace between paragraphs, you may give the amount of space you’d like as an argument to .PARA_SPACE. Introducing a paragraph with .PP2 will add a space equal to one-quarter of the prevailing linespace before the start of the paragraph. Initial paragraphs, ie those at the start of a document, or after a heading or linebreak, should still be introduced with .PP.

Note that mom does not provide widow or orphan control for paragraphs (ie 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 (eg 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 by four spaces 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 intial four spaces into .PP (plus a new line) and pipes the output to groff for processing and printing.

Another solution would be to insert a blank line between paragraphs of your text files. The blank lines can then be sedded out at print time, as above (.PP plus a newline), or, more conveniently, you could use the .blm primitive (blank line macro) to tell groff (and mom) that blank lines should be interpreted as PP’s.
.blm PP tells groff that blank lines are really the macro PP.

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, endnotes and footnotes.

PP control macros and defaults

The PP macro 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. Inter-paragraph spacing

1. Family control

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. Alternatively, set the family and font for paragraphs with PP_FONT, giving it a complete family+font name, eg
PP_FONT TI which would make the font used in paragraphs Times Roman Italic.

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

Note: Neither FAMILY nor DOC_FAMILY has any effect when the PRINTSTYLE is TYPEWRITE.

2. Font control

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, endnotes, 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.

Note: PP_FONT has no effect when the PRINTSTYLE is TYPEWRITE. If you wish to set whole typewritten paragraphs in italic, invoke invoke .FT I immediately after .PP. Depending on which of UNDERLINE_ITALIC or ITALIC_MEANS_ITALIC is currently enabled, the paragraph will be set underlined or in italic. Neither persists past the end of the paragraph.

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, \*[<colourname>], 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> .HEADING 1 "Monty Python" .HEADING 2 "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.

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.

Warning: It is extremely unwise to change a paragraph’s 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 (ie 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, footnotes, and endnotes, 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, invoke .JUSTIFY or .QUAD on the line 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 when the PRINTSTYLE is TYPESET is justified; for PRINTSTYLE TYPEWRITE, the default is quad left.

6. First-line 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 if the _INDENT control macro for these tags has no unit of measure appended to it. 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

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

If you wish to have first paragraphs indented, invoke the macro .INDENT_FIRST_PARAS without an 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. Inter-paragraph spacing

By default, mom does not insert a blank line between paragraphs. If you would like her to do so, invoke the macro, .PARA_SPACE, without an 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.

If you would like to space paragraphs by less than a full linespace, invoke PARA_SPACE with the amount of space you want as a numeric argument. A unit of measure is required. For example, to space paragraphs by one-quarter linespace .PARA_SPACE .25v is how you’d do it, or, if you want six points between paragraphs .PARA_SPACE 6p

PARA_SPACE is not recommended for use with PRINTSTYLE TYPEWRITE unless you give PRINTSTYLE the SINGLESPACE option.

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 (ie the start of a document), epigraphs, headings, 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.


Headings

Heads, subheads, and deeper levels of section headings are handled by a single macro, HEADING, to which you pass an argument stating the desired level. .HEADING 1 "<text>", for example, would be a main head; .HEADING 2 "<text>" would be a subhead; etc.

In addition to printing headings in the body of your document, HEADING collects the heading as an entry for the Table of Contents, if the document is to have one, and the PDF outline. With the NAMED argument, it furthermore acts as a bookmark for PDF links.

Headings can also be numbered on a per-heading-level basis, hierarchically and concatenatively, eg
1. 1.1 1.2 1.2.1 2. 2.1 2.2 2.2.1 By default, a blank line precedes headings, regardless of the level. Mom initially sets up a very basic style for nine levels of heading, of which you can have an infinite number, although as has been said, if you need more than four levels of heading, you should consider re-organizing your material. The pared-down style of mom’s defaults is intentional; it is expected that you will design headings to your own specifications with the control macro, HEADING_STYLE.

It is very good practice, and strongly recommended, that you respect the hierarchy of headings, using level-1 for main heads, level-2 for subheads, level-3 for subsubheads, etc. The ease of designing and re-designing the style for each level, plus mom’s very basic defaults, are meant, in part, to prevent the whimsical misuse of a particular heading level just because its style appeals to you.

HEADING

Macro: HEADING <level> [ PARAHEAD ] [ NAMED <pdf-id> ] "<heading text>"

The first argument to HEADING is the level. Level 1 is analogous to a main head; level 2 is analogous to a subhead; level 3 is analogous to a subsubhead; etc.

The second (optional) argument, PARAHEAD, instructs mom that the heading should be treated as a paragraph head. If HEADING is being used to create a parahead, it must come after PP, not before.

The indent applied to a parahead is the same as what would be expected from a paragraph without the parahead (see Indenting initial paragraphs). If you wish that a paragraph introduced by a parahead not be indented, use PARA_INDENT to set the paragraph indent to zero, then reset the indent for subsequent paragraphs.

The optional third argument, NAMED <id>, gives the heading a unique, non-printing identifier that allows it to referenced from anywhere in the final PDF document with the PDF_LINK macro, provided the mom file is processed with pdfmom. PDF_LINK usage is explained in the manual, Producing PDFs with groff and mom.

The final argument is the text of the heading, surrounded by double quotes. Long headings that are likely to exceed the current line length should be broken into chunks, each surrounded by double-quotes, like this:
.HEADING 1 "A needlessly long but instructive" "first level heading"

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

Spacing of headings

As described above, mom inserts a blank line before each heading. If the leading of your document never changes, and you introduce no additional space into the text—as, for example, between paragraphs—this will result in perfectly equal whitespace before each heading.

If, however, you disrupt the regular placement of text on mom’s baseline grid, HEADING adds as much whitespace to the blank line as is necessary to get things back on track. The extra whitespace is always less than the current leading and therefore usually doesn't draw attention to itself. This, along with a similar strategy for whitespace around quotes and blockquotes, is what allows mom to balance the bottom margins of pages effectively. The manual, Producing PDFs with groff and mom, demonstrates this well: the inter-paragraph spacing is 1/3 of the leading, yet mom is able to produce a document with good page-rhythm and evenly balanced bottom margins.

It occasionally happens that the extra whitespace becomes noticeable, typically when the amount of whitespace approaches the value of the current leading. The result looks like two blank lines instead of one. When this happens, a simple but effective fix is to reduce the space before the heading by backing up one line, either with
.SPACE -1v or
.RLD -1v This results in slightly less whitespace than normal, but the difference is usually not apparent.

If you’d prefer that mom not add flexible whitespace to headings, invoke the macro
.NO_SHIM either in the style sheet section of your document (ie after PRINTSTYLE but before START), which will globally disable whitespace adjustment not only before headings, but around quotes and blockquotes as well, or on a per-instance basis. .NO_SHIM is disabled by issuing
.NO_SHIM OFF Please note that .NO_SHIM also disables mom’s automatic shimming around quotes, blockquotes, after PDF images and floats, and SHIM macro itself.

HEADING control and defaults

By default, mom pre-initializes nine levels of headings to use the bold font of the prevailing document family, with a baseline adjustment of 1/10 of the current leading. In addition, level-1 headings are 3 points larger than running text, level-2 headings 2 points larger, and level 3-headings 1 point larger. The remaining 6 levels are the same size as running text. A single blank line precedes all levels of heading.

The HEADING_STYLE macro

Styling heads is accomplished with a single macro,
.HEADING_STYLE <level> where <level> is the numeric heading level to which the style applies.

HEADING_STYLE takes any or all of the following arguments, which may be given in any order:
FAMILY <family> \ FONT <font> \ SIZE <+|-size> \ QUAD <direction> \ COLOR <colour> \ UNDERSCORE <weight> <gap> | NO_UNDERSCORE \ UNDERSCORE2 <weight> <gap1> <gap2> | NO_UNDERSCORE2 \ CAPS | NO_CAPS \ BASELINE_ADJUST <amount to raise heading from the baseline> \ SPACE_AFTER | NO_SPACE_AFTER \ NUMBER | NO_NUMBER

You may enter your entire argument list on a single line, or, if it is very long, break it into shorter lines with the “line-continued” backslash {\), as shown above.

The arguments to FAMILY, FONT, SIZE, QUAD, and COLOR are the same as those you’d give to the control macros ending in _FAMILY, _FONT, _SIZE, _QUAD, or _COLOR. See Arguments to the control macros.

UNDERSCORE and UNDERSCORE2 require that a weight for the underscore be given, in points (decimal fractions allowed), but without the unit of measure p appended. They also require that the underscore's distance from the baseline be supplied; in the case of UNDERSCORE2, an additional gap argument representing the distance between the two underscores must be provided.

The CAPS argument capitalizes the text of a heading level in the body of a document but not in the Table of Contents, where capitalization of entries is controlled by TOC_ENTRY_STYLE <n>.

BASELINE_ADJUST allows you to raise a heading slightly above the baseline on which it would otherwise sit. For aesthetic reasons, it is often desirable to introduce a small amount of space between a heading and the text following it. Since headings are preceded by a blank line, it is preferable to move the heading upward than to lower the text following it. The argument to BASELINE_ADJUST is the amount by which to raise the heading. It requires no + or - sign, and must have a unit of measure appended to it.

SPACE_AFTER inserts a blank line equal to the current leading after a HEADING. If you'd like a full linespace after a heading level, use SPACE_AFTER. If you'd like additional space before a heading level, you must introduce it yourself with SPACE or ALD.

NUMBER and NO_NUMBER allow you to determine whether mom prepends a hierarchic numbering scheme to a heading level in the body of a document. Numbering of Table of Contents entries is controlled separately with TOC_ENTRY_NUMBERS. Mom also has a special macro to toggle whether to prefix a chapter number to numbered headings and Table of Contents entries, PREFIX_CHAPTER_NUMBER.

The argument list is long, so you may want to break it into several lines by using the backslash character (\). Here's an example of how you might style a level 1 heading:
.HEADING_STYLE 1 \ FONT B \ QUAD C \ UNDERSCORE .5 2p \ BASELINE_ADJUST 3p \ NUMBER This creates a level-1 heading style that's bold, centered, underscored and numbered, raised by 3 points from the baseline.

Prefixing chapter numbers

Macro: PREFIX_CHAPTER_NUMBER <none> | <chapter number as digit> | <anything>

If you’ve requested numbering for any level of heading and you’d like mom, in addition, to prefix a chapter number to the numbering scheme, you can do so with PREFIX_CHAPTER_NUMBER.

After you invoke .PREFIX_CHAPTER_NUMBER, mom will prepend the current chapter number to all headings you have requested be numbered with .HEADING_STYLE <n> NUMBER. Thus, assuming chapter number twelve (12):
1. LEVEL 1 HEADING 1.1. Level 2 heading would become
12.1. LEVEL 1 HEADING 12.1.1. Level 2 heading

When you invoke .PREFIX_CHAPTER_NUMBER without an argument, mom checks to see whether the argument you passed to CHAPTER is a digit. If it is, she immediately starts pre-pending the current chapter number to numbered head elements. If it isn’t (say you’ve called your chapter “One” instead of “1”), mom will abort with a request that you pass PREFIX_CHAPTER_NUMBER a digit representing the current chapter number.

In collated documents, mom automatically increments the digit used by PREFIX_CHAPTER_NUMBER by one (current chapter digit + 1) every time you invoke .COLLATE, even if you’ve (temporarily) turned off the prefixing of chapter numbers. Thus, even if you call your chapters “One”, “Two”, “Three” instead of “1”, “2”, “3”, mom will Do The Right Thing with respect to numbering head elements in all collated chapters following the first invocation of PREFIX_CHAPTER_NUMBER (assuming, of course, that the collated chapters are in incrementing order; if not, you must must put
.PREFIX_CHAPTER_NUMBER <chapter number> somewhere after the invocation of COLLATE and before the first numbered head element of each collated document).

PREFIX_CHAPTER_NUMBER can be disabled by passing it any argument other than a digit (eg OFF, QUIT, END, X, etc), although, as noted above, mom will keep, and—in the case of collated documents—increment the chapter number, allowing you to turn prefixing of chapter numbers to numbered head elements off and on according to your needs or whims.

Note: Because PREFIX_CHAPTER_NUMBER takes an (optional) digit representing the chapter number, it’s use need not be restricted to DOCTYPE CHAPTER. You can use it with any document type. Furthermore, even if your doctype isn’t CHAPTER, you can identify the document as a chapter for the purposes of numbering head elements by invoking the macro, .CHAPTER, with a numeric argument in your document setup.


Oldstyle headings

In versions of mom prior to 2.0, headings were entered by their commonly used names, viz. HEAD, SUBHEAD, and SUBSUBHEAD. The new HEADING scheme allows for greater flexibility, and permits seamless integration with PDF output.

Documents created with pre-2.0 versions may still use the oldstyle heading names, as may new documents, however there are some differences in their behaviour.

Whenever mom encounters an oldstyle heading, she loads the default style formerly associated with the oldstyle name. See below for a description of the default styles in the sections HEAD (now HEADING 1), SUBHEAD (now HEADING 2), and SUBSUBHEAD (now HEADING 3). Mom also emits a message to stderr alerting you to what she's doing.

The control macros formerly associated with oldstyle headings are no longer present in mom's macro file, which means that if you made changes to mom's default for those headings, you must recreate the changes with the HEADING_STYLE macro. The entire style need not be recreated, only those parameters that differed from mom's defaults. Thus, if your HEADs were set flush left, instead of the oldstyle default, centered, but otherwise kept mom's settings, you need only do
.HEADING_STYLE 1 QUAD L

Important: The macro, PARAHEAD, is no longer available. You must create paragraph heads using the HEADING macro. Mom will abort with an informational message whenever she encounters PARAHEAD. Assuming a heading level of 3 for your paraheads, the former defaults for PARAHEAD can be set up like this:
.HEADING STYLE 3 FONT BI SIZE -.25 \" For PRINTSTYLE TYPESET .HEADING STYLE 3 FONT I SIZE +0 \" For PRINTSTYLE TYPEWRITE Equally, the macro NUMBER_PARAHEADS is no longer available. You must enable numbering of the correct level for paraheads with HEADING_STYLE. Again assuming a heading level of 3 for paraheads, it's simply done:
.HEADING_STYLE 3 NUMBER

Correct usage of paraheads

It is tempting to choose an arbitrary heading level for paraheads, since they are sometimes needed out-of-sequence; for example, immediately after a main head (level-1) in a document that subsequently requires subheads (level-2). In such a circumstance, choosing level-3 for all your paraheads might seem to make sense, but in fact doesn’t, since it disrupts the hierarchy of both the Table of Contents (if your document has one) and the PDF outline.

Correct use of the PARAHEAD option to HEADING under such circumstances requires always assigning PARAHEAD to the next logical level in the heading hierarchy. For example, if there are no headings before the parahead, it should be assigned to level-1. If subsequently there is a main head to be followed by more paraheads, the main head should be level-1, and the paraheads level-2. This will almost certainly require assigning new style parameters to level-1 (with HEADING_STYLE) and to the level now being used for paraheads. The following example demonstrates.
.HEADING_STYLE 1 FONT BI SIZE +.25 \" parahead style, level-1 .PP .HEADING 1 PARAHEAD <parahead> <paragraph text> .PP .HEADING 1 PARAHEAD <parahead> <paragraph text> \# main head style, level-1 .HEADING_STYLE 1 FONT B SIZE +3 QUAD CENTER UNDERSCORE .5 2p .HEADING_STYLE 2 FONT BI SIZE +.25 \" parahead style, level-2 .HEADING 1 <main head> .PP <paragraph text> .PP .HEADING 2 PARAHEAD <parahead> <paragraph text>

OLDSTYLE HEADINGS

Macro: OLDSTYLE_HEADINGS

OLDSTYLE_HEADINGS requires no argument. It instructs mom to set the first three levels of heading to the parameters of her old defaults for HEAD, SUBHEAD, and SUBSUBHEAD. Use of OLDSTYLE_HEADINGS will also prevent mom from generating the message she issues the first time she encounters HEAD, SUBHEAD, and SUBSUBHEAD.

When invoked for the first time, with or without OLDSTYLE_HEADINGS, HEAD sets the parameters for level-1 headings to mom’s old HEAD defaults, then prints the head as a level-1 heading. The NAMED <id> optional argument is explained in the description of HEADING.

If, prior to invoking HEAD, you have given any parameters to level-1 heads with HEADING STYLE, they will be preserved; any you give afterwards will be respected.

The former style defaults for HEAD were:
FAMILY = prevailing document family FONT = bold (TYPESET); roman (TYPEWRITE) SIZE = +1 (TYPESET); +0 (TYPEWRITE) QUAD = C UNDERSCORE .5 2p CAPS

Note: The macro, NUMBER_HEADS, from pre-2.0 versions of mom, can still be used, though it is now a wrapper for
.HEADING_STYLE 1 NUMBER Mom will alert you to this on stderr.

Macro: SUBHEAD [ NAMED <id> ] "<text of head>" "<another line>"...

When invoked for the first time, with or without OLDSTYLE_HEADINGS, SUBHEAD sets the parameters for level-2 headings to mom’s old SUBHEAD defaults, then prints the subhead as a level-2 heading. The NAMED <id> optional argument is explained in the description of HEADING.

The former style defaults for SUBHEAD were:
FAMILY = prevailing document family FONT = bold (TYPESET); italic, ie underlined (TYPEWRITE) SIZE = +.5 (TYPESET); +0 (TYPEWRITE) QUAD = L BASELINE_ADJUST = 1/8 the current leading

Note: The macro, NUMBER_SUBHEADS, from pre-2.0 versions of mom, can still be used, though it is now a wrapper for
.HEADING_STYLE 2 NUMBER Mom will alert you to this on stderr.

Macro: SUBSUBHEAD [ NAMED <id> ] "<text of head>" "<another line>"...

When invoked for the first time, with or without OLDSTYLE_HEADINGS, SUBSUBHEAD sets the parameters for level-3 headings to mom’s old SUBSUBHEAD defaults, then prints the subsubhead as a level-3 heading. The NAMED <id> optional argument is explained in the description of HEADING.

The former style defaults for SUBSUBHEAD were:
FAMILY = prevailing document family FONT = italic (TYPESET); roman (TYPEWRITE) SIZE = +.5 (TYPESET); +0 (TYPEWRITE) QUAD = L BASELINE_ADJUST = 1/8 the current leading

Note: The macro, NUMBER_SUBSUBHEADS, from pre-2.0 versions of mom, can still be used, though it is now a wrapper for
.HEADING_STYLE 3 NUMBER Mom will alert you to this on stderr.


Linebreaks (section breaks)

Linebreaks (“author linebreaks”, “section breaks”) are gaps in the vertical flow of running text that indicate a shift in content (eg a scene change in story). They are frequently set off by typographic symbols, sometimes whimsical in nature.

LINEBREAK

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.

LINEBREAK control macros and defaults

By default, mom marks author linebreaks with three centred asterisks (stars) in the prevailing colour of the document (by default, black). You can alter this with the control macros

  1. LINEBREAK_CHAR
  2. LINEBREAK_COLOR

1. Linebreak character

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 valid groff character (eg * [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 valid 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 ie three asterisks, lowered 3 points from their normal vertical position (for PRINTSTYLE TYPESET; the vertical adjustment is -2 points for PRINTSTYLE TYPEWRITE).

2. Linebreak colour

Macro: LINEBREAK_COLOR <colourname>

Alias: SECTION_COLOR

To change the colour of the linebreak character(s), simply invoke .LINEBREAK_COLOR with the name of a colour pre-defined (or “initialized”) with NEWCOLOR or XCOLOR.


Quotes (line for line, poetry or code)

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 (ie 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, eg entering verbatim snippets of programming code, command line instructions, and so on. (See the CODE for a convenience macro to assist in including code snippets in documents.)

QUOTE spacing

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 (ie 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.

Further notes on quote spacing

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, processes text on a line-per-line basis.)

Disable shimming of quotes and blockquotes

If you don’t want the behaviour described above (ie you don’t want mom shimming quotes and blockquotes), issue the macro
.NO_SHIM in the style sheet section of your document (ie after PRINTSTYLE but before START), which will disable shimming globally, or on a per-instance basis prior to .QUOTE or .BLOCKQUOTE.

If you’ve disabled shimming of quotes and blockquotes with .NO_SHIM and you want mom to return to her default behaviour in this matter, invoke .NO_SHIM OFF (or QUIT, END, X, etc).

Please note that NO_SHIM disables shimming before headings, and the SHIM macro itself.

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.

Keeping QUOTEs and BLOCKQUOTEs together as a block

The text of quotes and blockquotes is output immediately, and may therefore start on one page and finish on the next. If you wish to keep the text together as a block, deferred to the following page if the block doesn’t all fit on one page, wrap (BLOCK)QUOTE / (BLOCK)QUOTE OFF inside a float. If you further wish to force a page break before the floated quote or blockquote (leaving whitespace at the bottom of the page, pass FLOAT the FORCE argument. .FLOAT FORCE .QUOTE Fly me to the moon And let me play among the stars Let me see what life is like On Jupiter and Mars .QUOTE END .FLOAT OFF

QUOTE

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 (eg 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 and defaults

  1. Family/font/size/leading/colour/indent
  2. Spacing above and below quotes (typeset only)
  3. Underlining quotes (typewrite only)

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 (ie same size as paragraph text) .QUOTE_AUTOLEAD default = none; leading of quotes is the same as paragraphs .QUOTE_COLOR default = black .QUOTE_INDENT (see below, "Quote indent")

Quote indent

QUOTE_INDENT takes one of two kinds of argument: an integer representing the amount by which to multiply the argument passed to .PARA_INDENT (by default, 2 ems for TYPESET, 3 picas for TYPEWRITE) to arrive at the quote indent, or a distance with a unit of measure appended. Both result in quotes being indented equally from the left and right margins.

The default value for QUOTE_INDENT is 3 (for PRINTSTYLE TYPESET) and 1 (for PRINTSTYLE TYPEWRITE).

Note: If your PARA_INDENT is 0 (ie no indenting of the first line of paragraphs), you must set a QUOTE_INDENT yourself, with a unit of measure appended to the argument. Mom has no default for QUOTE_INDENT if paragraph first lines are not being indented.

Additional note: QUOTE_INDENT also sets the indent for blockquotes.

2. Spacing above and below 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 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).


Blockquotes (cited material)

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.)

BLOCKQUOTE

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 blockquote. When you’re finished, invoke .BLOCKQUOTE with any argument (eg 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 \[em]George 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 or end with BLOCKQUOTE_.

BLOCKQUOTE control macros and defaults

  1. Family/font/size/leading/colour/quad/indent
  2. Spacing above and below (typeset only)

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 (see below)

Blockquote indent

BLOCKQUOTE_INDENT takes one of two kinds of argument: an integer representing the amount by which to multiply the argument passed to .PARA_INDENT (by default, 2 ems for TYPESET, 3 picas for TYPEWRITE) to arrive at the blockquote indent, or a distance with a unit of measure appended. Both result in blockquotes being indented equally from the left and right margins.

The default value for BLOCKQUOTE_INDENT is 3 (for PRINTSTYLE TYPESET) and 1 (for PRINTSTYLE TYPEWRITE).

Note: If your PARA_INDENT is 0 (ie no indenting of the first line of paragraphs), you must set a BLOCKQUOTE_INDENT yourself, with a unit of measure appended to the argument. Mom has no default for BLOCKQUOTE_INDENT if paragraph first lines are not being indented.

Additional note: BLOCKQUOTE_INDENT also sets the indent for quotes.

2. Spacing above and below blockquotes (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.


Inserting code into a document

CODE is a convenience macro that facilitates entering code blocks into documents. Its use is not restricted to documents created using mom’s document processing macros; it can be used for “manually” typeset documents as well.

CODE

Macro: CODE [BR | BREAK | SPREAD] toggle

Inline escape: \*[CODE]

When you invoke the macro, .CODE, or insert \*[CODE] into running text, mom switches to a fixed-width font (Courier, by default) and turns SMARTQUOTES off.

If your code includes the backslash character, which is groff’s escape character, you will have to change the escape character temporarily to something else with the macro, ESC_CHAR. Mom has no way of knowing what special characters you’re going to use in code snippets, therefore she cannot automatically replace the escape character with something else.

The correct order for changing the escape character inside CODE is .CODE .ESC_CHAR character <code> .ESC_CHAR . .CODE OFF

Alternatively, you can enter the backslash character as \e, which tells groff to print a literal backslash.

Note: .CODE does not cause a line break when you’re in a fill mode (ie JUSTIFY or QUAD LEFT, CENTER, or RIGHT). If you want CODE to deposit a break, invoke .CODE with the argument BR (or BREAK). If, in addition to having mom break the line before .CODE, you want her to force justify it as well, invoke .CODE with the argument, SPREAD. If, in addition to breaking the line before CODE you want a break afterwards, you must supply it manually with BR unless what follows immediately is a macro that automatically causes a break (eg PP).

In all likelihood, if you want the situation described above (ie a break before and after CODE), what you probably want is to use QUOTE in conjunction with CODE, like this:
.QUOTE .CODE $ echo "Hello, world" | sed -e 's/Hello,/Goodbye, cruel/' .CODE OFF .QUOTE OFF QUOTE takes care of breaking both the text and the code, as well as indenting the code and offsetting it from running text with vertical whitespace.

Passing any argument other than BR, BREAK or SPREAD to CODE (eg OFF, QUIT, END, X, etc.) turns CODE off and returns the family, font, and smartquotes back to their former state.

Using \*[CODE] inline

\*[CODE] invokes .CODE, allowing you to bracket code snippets inline. It does not accept the BR, BREAK, or SPREAD arguments. It is most useful for short snippets, as in the following example.
\*[CODE]apropos\*[CODE OFF] and \*[CODE]man -k\*[CODE] are identical.

\*[CODE] does not permit changing the escape character, so \e must be used. Furthermore, if your code starts with a period, you must enter it as “\&.”.
Registers are created with the \*[CODE]\&.nr\*[CODE OFF] request.

CODE and punctuation

.CODE OFF automatically inserts a word space into running text. If your CODE block is to be followed by punctuation with the parameters of running text, you must terminate the block with “\c” and enter the punctuation at the beginning of the next input line. If the punctuation mark is a period, you must precede it with “\&”.
...for example, .CODE echo "Hello, world" | sed -e 's/Hello,/Goodbye, cruel/'\c .CODE OFF \&. As this demonstrates... Use of \*[CODE] inline does not require the \c, however periods after \*[CODE OFF] still need to be introduced with \&, as in this example:
...append the unit of measure \*[CODE]p\*[CODE OFF]\&. New sentence...

CODE control macros and defaults

  1. Family/Font/Colour
  2. Size

1. Family/font/colour

See Arguments to the control macros.

.CODE_FAMILY default = Courier .CODE_FONT default = roman; see Note .CODE_COLOR default = black Note: Unlike other control macros, CODE_FONT sets the code font for both PRINTSTYLE TYPESET and PRINTSTYLE TYPEWRITE.

2. Size

CODE_SIZE works a little differently from the other _SIZE macros (see Arguments to the control macros). The argument you pass it is a percentage of the prevailing document point size. It does not require a pre-pended plus (+) or minus (-) sign, nor an appended percent sign (%). Thus, is you want the point size of your CODE font to be 90% of the prevailing document point size, you enter:
.CODE_SIZE 90 Fixed-width fonts have notoriously whimsical x-heights, meaning that they frequently look bigger (or, in some cases, smaller) than the type surrounding them, even if they're technically the same point size. CODE_SIZE lets you choose a percentage of the prevailing point size for your fixed-width CODE font so it doesn't look gangly or miniscule in relation to the type around it. All invocations of .CODE or \*[CODE] will use this size, so that if you decide to change the prevailing point size of your document, the CODE font will be scaled proportionally.


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 the typesetting macros.

LIST

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

Invoked by itself (ie 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 (ie with .LIST OFF), but does not store any information for lists you move forward to.

There are a lot of arguments (be sure to side-scroll through them all, above), so I’ll discuss them one at a time here.

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, eg "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 Some useful special groff characters you might want to pass to USER are: \[sq] - square box \[rh] - pointing hand \[->] - right arrow \[rA] - right double arrow \[OK] - checkmark The size and vertical positioning of special characters may be adjusted with inline escapes in the argument passed to USER. For example, to raise the position of \[sq] slightly, you might do .LIST USER "\*[UP .25p]\[sq]\*[DOWN .25p]" or .LIST USER \v'-.25p]\[sq]\[\v'.25p']

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 If you’d prefer, say, digits with right-parenthesis separators instead of the default period, you’d do
.LIST DIGIT ) .ITEM A numbered list item which would produce
1) A numbered list item

Note: BULLET, DASH and USER do not take a separator.

The third argument – prefix style

Additionally, you may give a prefix (ie 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 is 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.

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 (eg 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 (ie 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 thus 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.

ITEM

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 valid 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 and defaults

  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 d), e) and f). 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_LIST 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 (ie be padded "left"), simply invoke .PAD_LIST_DIGITS LEFT after .LIST ROMAN<n> or .LIST roman<n> and before .ITEM.


Line numbering – prepend numbers to output lines

When you turn line-numbering on, mom, by default

Mom expects that QUOTEs and BLOCKQUOTEs will not be line-numbered, however control macros are provided to enable line numbering for either. See Line numbering control macros for quotes and blockquotes.

NUMBER_LINES

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 Footnotes by linenumber for instructions on line-numbered footnotes, and ENDNOTE_MARKER_STYLE LINE for instructions on line-numbered endnotes.)

Note: Do not use NUMBER_LINES inside QUOTE or BLOCKQUOTE. By default, mom expects that quotes and blockquotes will not be line numbered. If you wish to enable line numbering for them, you must invoke NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_LINES.

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. The optional arguments which lines to number and gutter allow you to state which lines should be numbered (eg every five or every ten lines), and the gutter to place between line numbers and running text.

For example, if you want mom to number output lines using her defaults, .NUMBER_LINES 1 will prepend the number, 1, to the next output line and number all subsequent output lines sequentially.

If you want only every five lines numbered, pass mom the optional which lines to number argument, like this: .NUMBER_LINES 1 5

GOTCHA! The argument to <which lines to number> instructs mom to number only 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 want line number 1 to be numbered, you have to invoke .NUMBER_LINES 1 1 before the first output line you want numbered, then study your output copy and determine where best to insert the following in your input input text:
.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 in your input text.

The optional argument, <gutter>, tells mom how much space to put between the line numbers and the running text. <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.

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.

Off/suspend, resume

After initializing line numbering, you can suspend it, with the option to resume, using
.NUMBER_LINES OFF (or END, QUIT, X, etc).

To resume line numbering:
.NUMBER_LINES RESUME When you resume, the line number will be the next in sequence from where you left off. If that is not what you want—say you want to reset the line number to 1—re-invoke .NUMBER_LINES with whatever arguments are needed for the desired result.

Additional 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.
  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 running 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.

NUMBER_LINES control macros and defaults

  1. Family/font/size/colour
  2. Line numbering control for quotes and blockquotes

1. Family/font/size/colour

See Arguments to the control macros.

.LINENUMBER_FAMILY default = prevailing family or document family; default is Times Roman .LINENUMBER_FONT default = prevailing font .LINENUMBER_SIZE default = +0 .LINENUMBER_COLOR default = black

2. Line numbering control macros for QUOTE and BLOCKQUOTE

• Including QUOTEs and BLOCKQUOTEs in the line numbering scheme

If you’d like mom to number lines in a QUOTE or BLOCKQUOTE as part of the same order and sequence as paragraph text, invoke .NUMBER_QUOTE_LINES or .NUMBER_BLOCKQUOTE_LINES either before or after NUMBER_LINES. Both behave identically with respect to the affected macro (ie QUOTE or BLOCKQUOTE).

• Selectively enabling line numbering for QUOTEs and BLOCKQUOTEs

If you’d like to enable line numbering selectively for quotes and blockquotes only, enable NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_LINES first, followed by NUMBER_LINES <n>, where <n> is the first line number of the quote or blockquote. Afterwards, enter your QUOTE or BLOCKQUOTE. When the quote or blockquote is finished (ie after QUOTE OFF or BLOCKQUOTE OFF), turn line numbering off. Each subsequent quote or blockquote you want line numbered requires only NUMBER_LINES <n> (with a corresponding NUMBER_LINES OFF) until you turn NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_LINES off.

Here’s a recipe where the first line number of quotes starts repeatedly at “1”. <running text> .NUMBER_QUOTE_LINES .NUMBER_LINES 1 .QUOTE <text of quote> .QUOTE OFF .NUMBER_LINES OFF <further running text> .NUMBER_LINES 1 .QUOTE <text of quote> .QUOTE OFF .NUMBER_LINES OFF <further running text>

• Changing the line number gutter for QUOTEs and BLOCKQUOTEs

Owing to groff’s restriction on accepting only the figure space as the line number gutter’s unit of measure, it is not possible for line numbers in quotes or 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 quotes or blockquotes hang to the left of the quote, separated by the currently active gutter for NUMBER_LINES.

If you’d like to change the line number gutter for quotes or blockquotes, invoke NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_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 3 With the above, line numbers in quotes (and only quotes) will have a gutter of 3 figure spaces.

• Silently increment line numbers during QUOTE and BLOCKQUOTE

If you’ve asked mom not to line number quotes or blockquotes, but would like line numbering to continue while they’re being output (as opposed to mom’s default behaviour of suspending incrementing of line numbers during the output of quotes and blockquotes), invoke .NUMBER_QUOTE_LINES SILENT or .NUMBER_BLOCKQUOTE_LINES SILENT With these, mom continues to increment line numbers while quotes or blockquotes are being output, but the line numbers won’t appear in the output copy.

Once having turned NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_LINES on, you may disable them with .NUMBER_QUOTE_LINES OFF or .NUMBER_BLOCKQUOTE_LINES OFF


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, required whenever your FOOTNOTE_MARKER_STYLE is either STAR [star/dagger footnotes] or NUMBER [superscript numbers].)

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.

Note: See refer.html for information on using footnotes with the refer bibliographic database.

Footnote behaviour

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

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 (ie 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 (ie 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 (eg 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 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 a page and the 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.

Footnote markers and punctuation in the running text

  1. “Fill” modes – JUSTIFY, or QUAD LEFT | CENTER | RIGHT
  2. “No-fill” modes – LEFT, CENTER, RIGHT

1. “Fill” modes – JUSTIFY, or QUAD LEFT | CENTER | RIGHT

In fill modes, the correct way to enter the line after .FOOTNOTE OFF is to input it as if it’s literally a continuation of the input line you were entering before you invoked .FOOTNOTE. Therefore, if necessary, the input line may have to begin with space(s) or a punctuation mark, as in the two following examples.

Example 1
A line of text,\c .FOOTNOTE A footnote line. .FOOTNOTE OFF broken up with a comma. ^ (last line begins with a literal space)
Example 2
A line of text\c .FOOTNOTE A footnote line. .FOOTNOTE OFF , broken up with a comma. ^ (last line begins with a comma and a space)

Example 1 produces, on output
A line of text,* broken up with a comma. Example 2 produces
A line of text*, broken up with a comma. 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 sentence\c .FOOTNOTE A footnote line. .FOOTNOTE OFF \&. A new sentence... If you omit the \&., the line will vanish!

Note: The document element tags, EPIGRAPH and BLOCKQUOTE, imply a fill mode, therefore these instructions also apply when you insert a footnote into epigraphs or blockquotes.

2. “No-fill” modes – LEFT, CENTER, RIGHT

In no-fill modes, you must decide a) whether text on the input line after .FOOTNOTE OFF is to be joined to the output line before .FOOTNOTE was invoked, or b) whether you want the output text to begin on a new line.

In the first instance, simply follow the instructions, above, for fill modes.

In the second instance, you must explicitly tell mom that you want input text after .FOOTNOTE OFF to begin on a new output line. This is accomplished by passing .FOOTNOTE OFF (or QUIT, END, X, etc) an additional argument: BREAK or BR.

Study the two examples below to understand the difference.

Example 1
.LEFT A line of text\c .FOOTNOTE A footnote line .FOOTNOTE OFF that carries on after the footnote.
Example 2
.LEFT A line of text\c .FOOTNOTE A footnote line .FOOTNOTE OFF BREAK that doesn’t carry on after the footnote.

Example 1, on output, produces
A line of text* that carries on after the footnote. whereas Example 2 produces A line of text* that doesn’t carry on after the footnote. The distinction becomes particularly important if you like to see punctuation marks come after footnote markers. In no-fill modes, that’s accomplished like this:
.LEFT A line of text\c .FOOTNOTE A footnote line .FOOTNOTE OFF , broken up with a comma. The output of the above looks like this:
A line of text*, broken up with a comma.

Note: The document element tag, QUOTE, implies a no-fill mode, therefore these instructions also apply when you insert footnotes into quotes.

FOOTNOTE

Tag: FOOTNOTE <toggle> [ BREAK | BR ] | INDENT LEFT | RIGHT | BOTH <indent value>

• <indent value> requires a unit of measure
See HYPER-IMPORTANT NOTE.

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 (ie 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, in fill modes (JUSTIFY or QUAD), the line after a .FOOTNOTE OFF should be entered as if there were no interruption in the input text, ie the line should begin with a literal space or punctuation mark (see explanation and examples here).

In no-fill modes, the optional argument BREAK or BR may be used after the OFF (or QUIT, END, X, etc.) argument to instruct mom not to join the next input line to the previous output. See here for a more complete explanation, with examples.

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. In these instances, the line after .FOOTNOTE OFF should be entered normally.

FOOTNOTE control macros macros and defaults

  1. Family/font/size/colour/lead/quad
  2. Footnote markers – on or off
  3. Footnote marker style – star+dagger or numbered
  4. Footnotes by line number
  5. Reset footnote number – set footnote marker number to 1
  6. Inter-footnote spacing
  7. Footnote rule – on or off
  8. Footnote rule length – length of footnote separator rule
  9. Footnote rule weight – weight of footnote separator rule
  10. 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.)

If your PRINTSTYLE is TYPEWRITE and you would prefer that the footnotes themselves not use superscript numbers, you may pass .FOOTNOTE_MARKER_STYLE NUMBER an additional argument: NO_SUPERSCRIPT. While the marker in the text will still be superscript, the footnotes themselves will be identified with normal-sized, base aligned numbers, surrounded by parentheses.

Left padding of footnote numbers

When footnote numbering is enabled, in order to ensure that the left margin of footnote text aligns regardless of the footnote number, you sometimes have to pad the footnote numbers. This will be the case any time the footnote numbers change from 9 to 10 on the same page, or from 99 to 100. Consider this scenario:
9 Footnote text 10 Footnote text 11 Footnote text As you can see, the left margins of the footnotes are not aligned.

In order to correct this, use the macro .FOOTNOTE_NUMBER_PLACEHOLDERS, which takes a single argument: the number of placeholders in the longer digit. For example, placed at an appropriate point in your input file, .FOOTNOTE_NUMBER_PLACEHOLDERS 2 causes the above example to come out like this:
9 Footnote text 10 Footnote text 11 Footnote text Given the impossibility of knowing in advance when the number of placeholders required for footnote numbers will change, you must study your output file to determine where to insert this macro into your input file.

Obviously, mom does not provide a default for .FOOTNOTE_NUMBER_PLACEHOLDERS.

Note: .FOOTNOTE_NUMBER_PLACEHOLDERS affects both superscript footnote numbers, and, in PRINTSTYLE TYPEWRITE, the normal, base-aligned numbers surrounded by parentheses that you get with .FOOTNOTE_MARKER_STYLE NUMBER NO_SUPERSCRIPT.

4. Footnotes by line number – FOOTNOTE_MARKER_STYLE LINE

FOOTNOTE_MARKER_STYLE with the argument, 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 the terminating \c, at the appropriate place in running text. Input lines after the footnote has been terminated (eg with .FOOTNOTE OFF) must begin at the left margin.

If you want a range of line numbers (eg [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 the terminating \c); 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).

The behaviour of line-numbered footnotes can be controlled with the macros:
FOOTNOTE_LINENUMBER_BRACKETS
FOOTNOTE_LINENUMBER_SEPARATOR
FOOTNOTES_RUN_ON

• FOOTNOTE_LINENUMBER_BRACKETS

Mom, by default, surrounds footnote line numbers with 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.

Thus, for example, either
.FOOTNOTE_LINENUMBER_BRACKETS PARENS or
.FOOTNOTE_LINENUMBER_BRACKETS ( will surround footnote line numbers with round brackets.

• FOOTNOTE_LINENUMBER_SEPARATOR

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 valid groff character, or any combination of characters.

A word of caution: when using a separator, mom doesn’t insert any space after the separator. Hence, if you want 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 ": "

• FOOTNOTES_RUN_ON

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, ie each beginning on a new line. Rather, each footnote is separated from the footnote before it by horizontal space in the running line, 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.

5. 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.

6. Inter-footnote spacing – FOOTNOTE_SPACING

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

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

Note: If you’re using footnotes for references generated from the refer database (see refer.html), correct MLA style requires a full linespace between footnotes, which you can accomplish with .FOOTNOTE_SPACING 1v.

7. 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.

8. 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.

9. Footnote rule weight – FOOTNOTE_RULE_WEIGHT

If you want to change the weight (“thickness”) of the footnote separator rule, invoke .FOOTNOTE_RULE_WEIGHT with the desired weight. The weight is measured in points; however, do not append the unit of measure, p, to the argument.

Mom’s default footnote rule weight is 1/2 point. If you’d like a 1-point rule instead,
.FOOTNOTE_RULE_WEIGHT 1 is how you’d get it.

10. Adjust vertical position of footnote separator rule – FOOTNOTE_RULE_ADJ

The footnote separator rule is a rule whose bottom edge falls on the baseline (at the footnote leading) one line above 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.

Note: 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.


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.

Example
...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 or SUPERSCRIPT (both of which mark endnotes references in running text with superscript numbers). When the marker style is LINE, you must not use the \c escape.

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 or SUPERSCRIPT, 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 (ie before .ENDNOTE OFF), otherwise the changes will affect subsequent quotes and blockquotes that appear in the document body as well.

Note: See refer.html for information on using endnotes with the refer bibliographic database.

Endnotes 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”. Subsequently, for each section in a collated document (eg chapters in a book), she identifies the section in bold type, flush left and underscored, followed by one-half linespace. Endnotes pertaining to the section are output underneath, identified by superscript numbers. The text of the endnotes themselves is indented to the right of the numbers.

Note: The one-half linespace between section identifiers and the endnotes themselves, plus the need to group identifiers and endnotes sensibly, means that mom cannot guarantee perfectly aligned bottom margins. This is an unavoidable consequence of the structure of endnotes.

Of course, all the defaults, as well as the overall style of the endnotes pages, 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.

Endnotes and columnar documents

If your document is set in columns (see COLUMNS), mom gives you the option to have endnotes appear in either the column format or set to the full page width. See ENDNOTES_NO_COLUMNS.

ENDNOTE

Macro: ENDNOTE <toggle> [ BREAK | BR ]

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 (ie 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 or SUPERSCRIPT (mom’s default is NUMBER unless you have ENDNOTE_REFS enabled, in which case it’s SUPERSCRIPT), 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, in fill modes (JUSTIFY or QUAD, the line after .ENDNOTE OFF should be entered as if there were no interruption in the input text, ie the line should begin with a literal space or punctuation mark (see explanation and examples for footnotes, which apply equally to endnotes, here).

In no-fill modes, the optional argument BREAK or BR may be used after the OFF (or QUIT, END, X, etc.) argument to instruct mom not to join the next input line to the previous output. See here for a more complete explanation. The examples are for .FOOTNOTE, but apply equally to .ENDNOTE.

If your ENDNOTE_MARKER_STYLE is LINE, do not use the \c escape, and enter the line after .ENDNOTE OFF normally, ie at your text editor’s left margin.

ENDNOTES

Macro: ENDNOTES

Unlike footnotes, which mom automatically outputs at the bottom of pages, endnotes must be explicitly output by you, the user. ENDNOTES, by itself (ie 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 (ie 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.

ENDNOTES control macros and defaults

Important: Endnotes control macros must always be invoked prior to the first instance of .ENDNOTE.

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 style control
  2. Pagination of endnotes
  3. Header/footer control
  4. Endnotes' first-page title control
  5. Endnotes document-identification string control
  6. Endnotes referencing style

1. General endnotes page style control

• Base 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 (LEFT) or J (JUSTIFIED); R (RIGHT) and C (CENTER) will not work.
• Base 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).

• Leading
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 the prevailing document leading (16 by default), 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.

• Spacing between endnotes
Macro: ENDNOTE_SPACING <space to insert between endnotes>

• Requires a unit of measure

If you'd like some whitespace between endnotes, just invoke ENDNOTE_SPACING with the amount of space you want, eg
.ENDNOTE_SPACING 6p which inserts 6 points of lead between endnotes. Be aware, though, that inserting space between endnotes means that the bottoms of endnotes pages will most likely not align.

Mom’s default is not to insert any whitespace between endnotes.

• 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...).

• 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.

• Inter-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.

• 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. In such circumstances, you must re-enable ENDNOTES_NO_COLUMNS for each separate collated document.

2. Pagination of endnotes

• 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
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, ie 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.

However, if you set ENDNOTES_FIRST_PAGENUMBER in collated documents in which the endnotes are output after each section (chapter, article, etc), you have to reset every section’s first page number after COLLATE and before START with PAGENUMBER.

• 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 during endnotes output
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.

3. Header/footer control

• Modifying what goes in the endnotes header/footer

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, invoke
.HEADER_CENTER "Endnotes" or .FOOTER_CENTER "Endnotes" prior to invoking .ENDNOTES.

Note: If your DOCTYPE is CHAPTER, you must also invoke ENDNOTES_HEADER_CENTER for the ENDNOTES_HEADER_CENTER to appear.

• Header/footer centre string when doctype is CHAPTER
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.

4. Endnotes' first-page title control

• 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).

• Title control macros and defaults

See Arguments to the control macros.

.ENDNOTE_STRING_FAMILY default = prevailing document family .ENDNOTE_STRING_FONT default = bold .ENDNOTE_STRING_SIZE* default = +1 .ENDNOTE_STRING_QUAD default = centred .ENDNOTE_STRING_COLOR default = black *Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
• Title string placement
Macro: ENDNOTE_STRING_ADVANCE <distance from top of page>

• Argument requires a unit of measusure

By default, mom places the title (the docheader, as it were) of endnotes pages (typically "ENDNOTES") on the same baseline that is used for the start of running text. If you’d prefer another location, higher or lower on the page (thereby also raising or lowering the starting position of the endnotes themselves), invoke .ENDNOTE_STRING_ADVANCE with an argument stating the distance from the top edge of the page at which you’d like the title placed.

The argument requires a unit of measure, so if you’d like the title to appear 1-1/2 inches from the top edge of the page, you’d tell mom about it like this:
.ENDNOTE_STRING_ADVANCE 1.5i

• Title string underscoring
Macro: ENDNOTE_STRING_UNDERSCORE [DOUBLE] [<underscore weight> [<underscore gap> [<distance between double rules]]] | <none> | <anything>

Alias: ENDNOTE_STRING_UNDERLINE

• The argument <underscore weight> must not have the unit of measure, p, appended to it; all other arguments require a unit of measure

Invoked without an argument, .ENDNOTE_STRING_UNDERSCORE will place a single rule underneath the endnotes page title. Invoked with the argument, DOUBLE, ENDNOTE_STRING_UNDERSCORE will double-underscore the title. Invoked with any other non-numeric argument, (eg OFF, NO, X, etc.) the macro disables underscoring of the title.

In addition, you can use ENDNOTE_STRING_UNDERSCORE to control the weight of the underscore rule(s), the gap between the title and the underscore, and, in the case of double-underscores, the distance between the two rules.

Some examples:
.ENDNOTE_STRING_UNDERSCORE 1 - turn underscoring on; set the rule weight to 1 point .ENDNOTE_STRING_UNDERSCORE 1 3p - turn underscoring on; set the rule weight to 1 point; set the gap between the title and the underscore to 3 points .ENDNOTE_STRING_UNDERSCORE DOUBLE .75 3p - turn double-underscoring on; set the rule weight to 3/4 of a point; set the gap between the title and the upper underscore to 3 points; leave the gap between the upper and the lower underunderscore at the default .ENDNOTE_STRING_UNDERSCORE DOUBLE 1.5 1.5p 1.5p - turn double-underscoring on; set the rule weight to 1-1/2 points; set the gap between the title and the upper underscore to 1-1/2 points; set the gap between the upper and the lower underscore to 1-1/2 points Note, from the above, that in all instances, underscoring (single or double) is enabled whenever ENDNOTE_STRING_UNDERSCORE is used in this way.

Mom’s default is to double-underscore the title with 1/2-point rules placed 2 points apart and 2 points below the baseline of the title.

• Title string capitalization
Macro: ENDNOTE_STRING_CAPS toggle

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

If you’re generating a table of contents, you may want the endnotes pages title to be 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 title string.

5. Endnotes document-identification title control

• Document-identification title string(s)
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 like her to identify the document(s) another way, simply invoke .ENDNOTE_TITLE prior to START 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 (ie non-collated) document and find having the document’s title included in the endnotes redundant.

• Document-identification string control macros and defaults

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)
• Endnotes document-identification underscoring
Macro: ENDNOTE_TITLE_UNDERSCORE [DOUBLE] [<underline weight> [<underline gap> [<distance between double rules]]] | <none> | <anything>

Alias: ENDNOTE_TITLE_UNDERLINE

• The argument <underscore weight> must not have the unit of measure, p, appended to it; all other arguments require a unit of measure

Invoked without an argument, .ENDNOTE_TITLE_UNDERSCORE will place a single rule underneath the document identification string. Invoked with the argument DOUBLE, ENDNOTE_TITLE_UNDERSCORE will double-underscore the string. Invoked with any other non-numeric argument, (eg OFF, NO, X, etc.) the macro disables underscoring of the string.

In addition, you can use ENDNOTE_TITLE_UNDERSCORE to control the weight of the underscore rule(s), the gap between the title and the underscore, and, in the case of double-underscores, the distance between the two rules.

Some examples:
.ENDNOTE_TITLE_UNDERSCORE 1 - turn underscoring on; set the rule weight to 1 point .ENDNOTE_TITLE_UNDERSCORE 1 3p - turn underscoring on; set the rule weight to 1 point; set the gap between the string and the underscore to 3 points .ENDNOTE_TITLE_UNDERSCORE DOUBLE .75 3p - turn double-underscoring on; set the rule weight to 3 points .ENDNOTE_TITLE_UNDERSCORE DOUBLE 1.5 1.5p 1.5p - turn double-underscoring on; set the rule weight to 1-1/2 points; set the gap between the string and the upper underscore to 1-1/2 points; set the gap between the upper and the lower underscore to 1-1/2 points

Note, from the above, that in all instances, underscoring (single or double) is enabled whenever ENDNOTE_TITLE_UNDERSCORE is used in this way.

Mom’s default is to single-underscore the string with a 1/2-point rule placed 2 points below its baseline.

6. Endnotes referencing style

• Endnote marker style
Macro: ENDNOTE_MARKER_STYLE LINE | NUMBER | SUPERSCRIPT

• Argument: LINE By default, mom places superscript numbers in running text to identify endnotes. However, if you have linenumbering 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 by line ranges. If what you want is a single line number, you need only invoke .ENDNOTE at the appropriate place in running text without the terminating \c. Input lines after the endnote has been terminated (eg with .ENDNOTE OFF) must begin at the left margin.

(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 (eg [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 the terminating \c). Mom is smart enough to figure out that where .ENDNOTE is invoked represents the terminating line number.

Note: By default, mom reserves a fixed amount of space, equal to 8 placeholders, for the linenumbers of linenumbered endnotes. Within that space, the numbers are flush right with each other. The reserved space is enough to print a range of linenumbers of the form [nnnn-nnnn], but may be more than you need.

The goal with linenumbered endnotes is to ensure that the longest linenumber or range of lines is flush with the left margin of the page. Adjusting the reserved space is done with the macro ENDNOTE_NUMBERS_ALIGN, and the rules for getting it right are simple.

If your document runs to less than 100 lines, invoke
.ENDNOTE_NUMBERS_ALIGN RIGHT 0 If your document has between 100 and 999 lines
.ENDNOTE_NUMBERS_ALIGN RIGHT 1 If your document has between 1000 and 9999 lines
.ENDNOTE_NUMBERS_ALIGN RIGHT 2 etc.

• Argument: NUMBER With the argument NUMBER, mom places superscript numbers in running text, but identifies endnotes in the endnotes section of your document with normal-sized, base-aligned numbers.

• Argument: SUPERSCRIPT With the argument SUPERSCRIPT, mom places superscript numbers in running text, and identifies endnotes in the endnotes section of your document with superscript numbers as well. This is mom’s default.

Note: By default, mom reserves a fixed amount of space, equal to 2 placeholders, for the superscript numbers identifying endnotes in the endnotes section of your document. Within that space, the numbers are flush right with each other.

If you need less space (the total number of endnotes is less than 10) or more (the total number of endnotes is greater than 99), use the macro, ENDNOTE_NUMBERS_ALIGN, to set the desired amount of reserved space, eg
.ENDNOTE_NUMBERS_ALIGN RIGHT 1 or
.ENDNOTE_NUMBERS_ALIGN RIGHT 3

• Spacing between line-numbered endnotes and the endnote text
Macro: ENDNOTE_LINENUMBER_GAP <size of gap>

• Requires a unit of measure

When your ENDNOTE_MARKER_STYLE is LINE, mom, by default, inserts a space equal to 1/2-en between the linenumber and the text of an endnote. For aesthetic reasons, you may want to change the size of the gap, which is done with the macro, ENDNOTE_LINENUMBER_GAP.

ENDNOTE_LINENUMBER_GAP 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

• Brackets around endnote line numbers
Macro: ENDNOTE_LINENUMBER_BRACKETS PARENS | SQUARE | BRACES | ( | [ | {

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.

• Separator after endnote line numbers instead of brackets
Macro: ENDNOTE_LINENUMBER_SEPARATOR <character>

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.

ENDNOTE_LINENUMBER_SEPARATOR 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 valid 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 a document.

Numbered endnotes .ENDNOTE_NUMBER_FAMILY default = prevailing document family; default Times Roman .ENDNOTE_NUMBER_FONT default = bold .ENDNOTE_NUMBER_SIZE* default = 0 Linenumbered endnotes .ENDNOTE_LINENUMBER_FAMILY default = prevailing document family; default Times Roman .ENDNOTE_LINENUMBER_FONT default = bold .ENDNOTE_LINENUMBER_SIZE* default = 0 *Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
• Endnote numbering alignment

By default, when your ENDNOTE_MARKER_STYLE is NUMBER, 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. If you wish to change either the alignment or the number of placeholders, the macro to use is ENDNOTE_NUMBERS_ALIGN.

Macro: ENDNOTE_NUMBERS_ALIGN LEFT | RIGHT <number of placeholders>

ENDNOTE_NUMBERS_ALIGN determines how endnote numbers are aligned. If you invoke
.ENDNOTE_NUMBERS_ALIGN RIGHT 2 the periods (dots) after the numbers will align, 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. If you invoke .ENDNOTE_NUMBERS_ALIGN LEFT 2 the first digits of the numbers will line up flush left, 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. The argument <number of placeholders> represents the maximum size of the numbers, expressed as the number of digits in the largest number. Numbers in the range 0-9 require 1 placeholder; in the range 10-99, 2 placeholders; in the range 100-999 3 placeholders, and so on.

Therefore, if you have fewer than ten endnotes,
.ENDNOTE_NUMBERS_ALIGN RIGHT 1 would ensure proper right alignment of endnote numbers.

Mom’s default for endnote number alignment is to align the numbers right to two placeholders.

Note: ENDNOTE_NUMBERS_ALIGN can also be used to establish the alignment and number of placeholders when your ENDNOTE_MARKER_STYLE is SUPERSCRIPT. Furthermore, it can be used to establish the number of placeholders to reserve when your ENDNOTE_MARKER_STYLE is LINE, even though, in such an instance, the numbers themselves are always aligned right. See here for examples.


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. MN_INIT may be called before or after START.

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 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 a 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 (ie 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.

MN_INIT

Macro: MN_INIT <arguments> (see list)

Argument list:

RAGGED | SYMMETRIC <L_WIDTH> <value> <R_WIDTH> <value> <GUTTER> <value> <FONTSTYLE> <value> <SIZE> <value> <LEAD> <value> <COLOR> <value> <HY> <value>

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

The arguments may be entered in any order, and since the list is long, use of the backslash character ( \ ) to put each on a separate line is recommended, eg.
.MN_INIT \ SYMMETRIC \ L_WIDTH 4P \ SIZE 8 \ LEAD 9 \ HY 14 All arguments are optional, but since mom requires you to run MN_INIT before entering margin notes, you should, at a minimum, set the RAGGED or SYMMETRIC parameter. You will almost certainly want to set L_WIDTH, R_WIDTH, SIZE and LEAD as well.

RAGGED | SYMMETRIC

If the argument RAGGED is given, both left and right margin notes will be flush left. If the argument SYMMETRIC is given, left margin notes will be set flush right, and right margin notes 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, 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.)

L_WIDTH <value>

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.

R_WIDTH <value>

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 <value>

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.

FONTSTYLE <value>

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.

SIZE <value>

The point size of type for margin notes. There is no need to append a unit of measure to the argument; points is assumed (although there’s nothing preventing you from appending an alternative unit of measure directly to the argument). The default is for margin notes to use the same point size of type as is used in document paragraphs.

LEAD <value>

The leading of margin notes. <LEAD> takes 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 as paragraph text (ie the document’s base leading).

COLOR <value>

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

HY <value>

<value> is a digit telling groff how you want margin notes hyphenated.
0 = do not hyphenate 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 (ie 2+4+8).

MN

Macro: MN LEFT | RIGHT

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.


Document termination string

The use of FINIS is optional. If you invoke it at the end of a document (before .ENDNOTES, .BIBLIOGRAPHY or .TOC) mom deposits the word, END, centred after a blank line, beneath the last line of the document. END is enclosed between em-dashes, like this:
...and they all lived happily ever after. — END — If there is insufficient room for FINIS on the last page of a document, mom will alert you on stderr.

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

FINIS

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, .BIBLIOGRAPHY 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

Finis contol macros

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, ie
.FINIS_STRING "" mom will still print the em-dashes when 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.)

Automatic capitalization of the FINIS string

By default, mom sets the string you pass to FINIS all-caps. If you’d prefer that she not do so, but rather respect the FINIS string exactly as you enter it, invoke the macro, .FINIS_STRING_CAPS with the OFF argument, like this:
.FINIS_STRING_CAPS OFF OFF, above, could be anything, eg NO or X.

Changing the FINIS colour

Invoking the control macro, .FINIS_COLOR, with a pre-defined (or “initalized”) colour changes the colour of both the FINIS string and the em-dashes that surround it. If you use the inline escape, \*[<colourname>], 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).


Back to Table of Contents Top Next: Graphics, floats, and preprocessor support