Book HomeBook TitleSearch this book

Chapter 13. mm Macros

Contents:

Alphabetical Summary of mm Macros
Predefined String Names
Number Registers Used in mm
Other Reserved Macro and String Names
Sample Document

This chapter presents the following topics:

13.1. Alphabetical Summary of mm Macros

.1C

.1C

Return to single-column format.

.2C

.2C

Start two-column format.

.AE

.AE

End abstract (see .AS).

.AF

.AF [company name]

Alternate format for first page. Change first-page “Subject/Date/From” format. If argument is given, other headings are not affected. No argument suppresses company name and headings.

.AL

.AL [type] [indent] [1]

Initialize numbered or alphabetized list. Specify list type, and indent of text. If third argument is 1, spacing between items is suppressed. Mark each item in list with .LI; end list with .LE. Default is numbered listing. Default text indent is specified in register Li.

Type

1

Arabic numbers

A

Uppercase letters

a

Lowercase letters

I

Roman numerals, uppercase

i

Roman numerals, lowercase

.AS

.AS [type] [n]

Start abstract of specified type, indenting n spaces. Used with .TM and .RP only. End with .AE.

Type

1

Abstract on cover sheet and first page

2

Abstract only on cover sheet

3

Abstract only on Memorandum for File cover sheet

.AT

.AT title

Author's title appears after author's name in formal memoranda.

.AU

.AU name [init] [loc] [dept] [ext] [room]

Author's name and other information (up to nine arguments) supplied at beginning of formal memoranda.

.AV

.AV name

Approval signature line for name. Closing macro in formal memoranda.

.B

.B [barg] [parg] ...

Set barg in bold (underline or overstruck in nroff) and parg in previous font; up to six arguments.

.BE

.BE

End bottom block and print after footnotes (if any), but before footer. See .BS.

.BI

.BI [barg] [iarg]

Set barg in bold (underline or overstruck in nroff) and iarg in italics; up to six arguments.

.BL

.BL [indent] [1]

Initialize bullet list. Specify indent of text. Default indent is 3 and is specified in register Pi. If second argument is 1, suppress blank line between items.

.BR

.BR [barg] [rarg]

Set barg in bold (underline or overstruck in nroff) and rarg in roman; up to six arguments.

.BS

.BS

Begin block of text to be printed at bottom of page, after footnotes (if any), but before footer. End with .BE.

.CS

.CS [pgs] [other] [tot] [figs] [tbls] [ref]

Cover-sheet information supplied for formal memoranda. The arguments represent the counts of the respective items that are normally automatically computed. You may provide a value to override the computed one.

.DE

.DE

End static display started with .DS or floating display started with .DF.

.DF

.DF [type] [mode] [rindent]

Start floating display. That is, if the amount of space required to output text exceeds the space remaining on the current page, the display is saved for the next page, while text following the display is used to fill the current page. (See also registers De and Df.) Default type is no indent; default mode is no-fill. rindent is the amount by which to shorten the line length in order to bring text in from the right margin. End display with .DE.

Type

L or 0

No indent (default).

I or 1

Indent standard amount.

C or 2

Center each line individually.

CB or 3

Center as a block.

Mode

N or 0

No-fill mode (default).

F or 0

Fill mode.

.DL

.DL [indent] [1]

Initialize dashed list. Specify indent of text. Default indent is 3 and is specified in register Pi. If second argument is 1, suppress blank line between items.

.DS

.DS [type] [mode] [rindent]

Start static display. That is, if the display doesn't fit in the remaining space on the page, a page break occurs, placing the display at the top of the next page. See .DF about type, mode, and rindent. End display with .DE.

.EC

.EC [caption] [n] [flag]

Equation caption. Arguments optionally override default numbering, where flag determines use of number n. See .EQ.

Flag

0

n is a prefix to number (the default).

1

n is a suffix.

2

n replaces number.

.EF

.EF ['left'center'right']

Print three-part string as even page footer; parts are left-justified, centered, and right-justified at bottom of every even page.

.EH

.EH ['left'center'right']

Print three-part string as even page header; parts are left-justified, centered, and right-justified at top of every even page.

.EN

.EN

End equation display. See .EQ.

.EQ

.EQ [text]

Start equation display to be processed by eqn, using text as label (see .EC). End with .EN. See Chapter 17, for more information on eqn.

.EX

.EX [caption] [n] [flag]

Exhibit caption. Arguments optionally override default numbering, where flag determines use of number n.

Flag

0

n is a prefix to number (the default).

1

n is a suffix.

2

n replaces number.

.FC

.FC [text]

Use text for formal closing.

.FD

.FD [n] [1]

Set default footnote format to n, as described in the next table. With a second argument of 1, footnote numbering starts over at 1 each time a first-level heading is encountered.

ValueHyphenationAdjustText IndentLabel Justification
0OffOnOnLeft
1OnOnOnLeft
2OffOffOnLeft
3OnOffOnLeft
4OffOnOffLeft
5OnOnOffLeft
6OffOffOffLeft
7OnOffOffLeft
8OffOnOnRight
9OnOnOnRight
10OffOffOnRight
11OnOffOnRight

.FE

.FE

End footnote. See .FS.

.FG

.FG [title] [n] [flag]

Figure title follows. Arguments optionally override default numbering, where flag determines use of number n.

Flag

0

n is a prefix to number (the default).

1

n is a suffix.

2

n replaces number.

.FS

.FS [c]

Start footnote using c as indicator. Default is numbered footnote. End with .FE.

.H

.H n [heading] [suffix]

Print a numbered heading at level n, where n is from 1 to 7. The optional suffix is appended to the heading, and may be used for footnote marks or other text that should not appear in the Table of Contents. See any of the following sections for more information.

Number Registers

Ej

Page eject.

Hb

Break after heading.

Hc

Centered heading.

Hi

Type of first paragraph after heading.

Hs

Space after heading.

Hu

Unnumbered headings.

Strings

HF

Font control.

HP

Point size.

Macros

.HM

Heading mark.

.HU

Unnumbered headings.

.HX, .HY, .HZ

User-supplied macros invoked during output of header.

.HC

.HC [c]

Use character c as hyphenation indicator.

.HM

.HM [H1] ... [H7]

Set the heading mark style for the seven levels of headings. Each heading can be arabic (1 or 001), roman (i or I), or alphabetic (a or A).

.HU

.HU heading

Unnumbered heading follows. Same as .H except that no heading mark is printed (see number register Hu).

.HX

.HX dlevel rlevel text

User-supplied exit macro executed before printing the heading.

The derived level dlevel is equal to the real level rlevel if .H is invoked by the user. If .HU is used, dlevel is equal to the value of the Hu register, and rlevel is zero. In both cases, text is the actual heading text.

.HY

.HY dlevel rlevel text

User-supplied exit macro executed in middle of printing the heading. See .HX for information about dlevel, rlevel, and text.

.HZ

.HZ dlevel rlevel text

User-supplied macro executed after printing the heading. See .HX for information about dlevel, rlevel, and text.

.I

.I [iarg] [parg]

Set iarg in italics (underline in nroff) and parg in previous font. Up to six arguments.

.IB

.IB [iarg] [barg]

Set iarg in italics (underline in nroff) and barg in bold. Up to six arguments.

.IR

.IR [iarg] [rarg]

Set iarg in italics (underline in nroff) and rarg in roman. Up to six arguments.

.LB

.LB n m pad type [mark] [LI-space] [LB-space]

List beginning. Allows complete control over list format. Begin each list item in the list with .LI; end the list with .LE:

n
Text indent.

m
Mark indent.

pad
Padding associated with mark.

type
If 0, use the specified mark. If nonzero, and mark is 1, A, a, I, or i, the list is automatically numbered or alphabetically sequenced. In this case, type controls how mark is displayed. For example, if mark is currently 1, type has the following results.

TypeResult
11.
21)
3(1)
4[1]
5<1>
6{1}

mark
Symbol or text to label each list entry. mark can be null (creates hanging indent); a text string; or 1, A, a, I, or i to create an automatically numbered or lettered list. See .AL.

LI-space
Number of blank lines to output between each following .LI macro. Default is 1.

LB-space
Number of blank lines to output by .LB macro itself. Default is 0.

.LC

.LC [n]

Clear list level up to n.

.LE

.LE [1]

End item list started by .AL, .BL, .DL, .LB, .ML, or .VL. An argument of 1 produces a line of whitespace (.5v) after the list.

.LI

.LI [mark] [1]

text

Item in list. List must be initialized (see .AL, .BL, .DL, .LB, .ML, and .VL) and then closed using .LE. If mark is specified, it replaces the mark set by the list-initialization macro. If mark is specified along with second argument of 1, the mark is prefixed to the current mark.

.ML

.ML mark [indent] [1]

Initialize list with specified mark, which can be one or more characters. Specify indent of text (default is one space wider than mark). If third argument is 1, omit space between items in list.

.MT

.MT [type] [title]

Specify memorandum type and title. Controls format of formal memoranda and must be specified after other elements, such as .TL, .AF, .AU, .AS, and .AE. User-supplied title is prefixed to page number.

Type

0

No type.

1

Memorandum for file (default).

2

Programmer's notes.

3

Engineer's notes.

4

Released paper.

5

External letter.

string

string is printed.

.ND

.ND date

New date. Change date that appears in formal memoranda.

.NE

.NE

Notation end. See .NS.

.nP

.nP

Numbered paragraphs with double-line indent at start of paragraph. See also .P.

.NS

.NS [type]

Notation start. Used with .MT 1 and .AS 2/.AE (memorandum for file) to specify note for cover sheet. Otherwise used at end of formal memoranda. Specify notation type.

Type

0

Copy to (the default).

1

Copy (with attention) to.

2

Copy (without att.) to.

3

Att.

4

Atts.

5

Enc.

6

Encs.

7

Under Separate Cover.

8

Letter to.

9

Memorandum to.

10

Copy (with atts.) to.

11

Copy (without atts.) to.

12

Abstract Only to.

13

Complete Memorandum to.

string

Copy string to.

.OF

.OF ['left'center'right']

Print three-part string as odd page footer; parts are left-justified, centered, and right-justified at bottom of every odd page.

.OH

.OH ['left'center'right']

Print three-part string as odd page header; parts are left-justified, centered, and right-justified at top of every odd page.

.OK

.OK [topic]

Other keywords. Specify topic to appear on cover sheet of formal memoranda. Up to nine arguments.

.OP

.OP

Force an odd page.

.P

.P [type]

Start new paragraph. A paragraph type can be specified, overriding default. Various registers can be set to control default formats:

Pt

Paragraph type for document (default is 0).

Pi

Amount of indent (default is 3n).

Ps

Spacing between paragraphs (default is one line of white space).

Np

Set this to 1 to produce numbered paragraphs.

Type

0

Left-justified (the default).

1

Indented.

2

Indented except after displays (.DE), lists (.LE), and headings (.H).

.PF

.PF ['left'center'right']

Print three-part string as page footer; parts are left-justified, centered, and right-justified at bottom of every page. Use \\\\nP in string to obtain page number. See also .EF and .OF.

.PH

.PH ['left'center'right']

Print three-part string as page header; parts are left-justified, centered, and right-justified at top of every page. Use \\\\nP in string to obtain page number. See also .EH and .OH.

.PM

.PM [type]

Proprietary marking on each page.

Type

P

Private.

N

Notice.

.PX

.PX

Page-heading user exit. Invoked after restoration of default environment. See .TP.

.R

.R

Return to roman font (end underlining or overstriking in nroff).

.RB

.RB [rarg] [barg]

Set rarg in roman and barg in bold. Up to six arguments.

.RD

.RD [prompt]

Read input from terminal, supplying optional prompt.

.RF

.RF

End of reference text. See also .RS.

.RI

.RI [rarg] [barg]

Set rarg in roman and barg in italics. Up to six arguments.

.RL

.RL [indent] [1]

Initialize reference list, essentially a numbered list with number set within brackets ([ ]). Specify indent of text; the default is set through register Li. If second argument is 1, omit space between list items.

.RP

.RP [counter] [skip]

Produce reference page.

Counter

0Reset the reference counter (default).
1Do not reset the reference counter.

Skip

0Put on a separate page (default).
1Do not issue a following .SK.
2Do not issue a preceding .SK.
3Do not issue either a preceding or following .SK.

.RS

.RS [strname]

Start automatically numbered reference. End with .RF. If provided, use strname as a troff string in which to save the reference number surrounded by brackets and appropriate line motions. This allows referring to the reference again from text further on in the document.

Example

J. Programmer\*(Rf
.RS W1
.I "Whizprog \- The Be All and End All Program,"
J. Programmer, Wizard Corp, April 1, 1999.
.RF
describes the design of
.IR whizprog .
The second chapter\*(W1 
presents


an especially insightful analysis.  ...
.S

.S [[±]n] [[±]m]

Set point size to n and vertical spacing to m (troff only). Alternatively, either argument can be specified by incrementing or decrementing the current value (C), default value (D), or previous value (P). Default point size is 10; default vertical spacing is 12.

.SA

.SA [n]

Set right margin justification to n. Defaults are no justification for nroff, justification for troff.

Values for n

0

No justification.

1

Justification.

.SG

.SG [typist] [1]

Add typist to Author's name on the signature line. (The Author's name is obtained from the .AU macro.) With a second argument of 1, the author's location, department etc. are placed on the same line as the name of the first author, instead of on the line with the last author's name.

.SK

.SK n

Skip n pages. Similar to a .bp request.

.SM

.SM x [y] [z]

Reduce a string by one point. Multiple arguments are concatenated, with one of them reduced in size, as described in this table.

# of ArgumentsAction
OneReduce size of first string by one point.
TwoReduce size of first string by one point.
ThreeReduce size of middle string by one point.

.SP

.SP [n]

Output n blank vertical spaces. The spacing requests of two consecutive .SP macros do not accumulate.

.TB

.TB [title] [n] [flag]

Supply table title. Arguments optionally override default numbering, where flag determines use of number n.

Flag

0

n is a prefix to number (default).

1

n is a suffix.

2

n replaces number.

.TC

.TC [slevel] [spacing] [tlevel] [tab] [head1] ...

Generate table of contents in format specified by arguments. The levels of headings that are saved for table of contents are determined by setting the Cl register.

slevel sets the levels of headings that have spacing before them. spacing sets the amount of spacing. Default is 1; first-level headings have a blank line before them.

tlevel and tab affect the location of the page number. Heading levels less than or equal to tlevel are output with page numbers at the right margin; otherwise, the heading and page number are separated by two spaces. If page numbers are at the right margin, and if tab is 0, a leader is output using dots; otherwise, spaces are used.

.TE

.TE

End table. See .TS.

.TH

.TH [N]

End table header. Must be used with a preceding .TS H. Use N to suppress table headers until a new page.

.TL

.TL [charge [file]]

text

Supply title for formal memoranda. charge and file are the “charging case” and “filing case” for the memorandum; not too useful outside the Bell System.

.TM

.TM [n]

Supply number n for technical memoranda.

.TP

.TP

Page top macro, invoked automatically at the beginning of a new page. Executed in environment in which heading is output. See also .PH.

.TS

.TS [H]

Start table to be processed by tbl. Use H to put a table header on all pages. End table header with .TH. End table with .TE. See Chapter 17 for more information on tbl.

.TX

.TX

User-supplied macro executed before table-of-contents titles.

.TY

.TY

User-supplied macro executed before table-of-contents header.

.VL

.VL n [m] [1]

Initialize variable item list. Used to produce indented or labeled paragraphs. Indent text n spaces and indent mark m spaces. If third argument is 1, omit space between list items. Begin each item with .LI, specifying a label for each item; end list with .LE.

.VM

.VM [n] [m]

Vertical margin. Add n lines to top margin and m lines to bottom.

.WC

.WC [x]

Change column or footnote width to x.

Values for x

FF

All footnotes same as first.

-FF

Turn off FF mode. Normal default mode.

WD

Wide displays.

-WD

Use default column mode.

WF

Wide footnotes.

-WF

Turn off WF mode.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.