.H 1 "EXTENDING AND MODIFYING THE MACROS \*(BU
.H 2 "Naming Conventions"
In this section, the following conventions are used to
describe legal names:
.DS1
n:	digit
a:	lower-case letter
A:	upper-case letter
x:	any letter or digit (any alphanumeric character)
s:	special character (any non-alphanumeric character)
.DE
.P
All other characters are literals (i.e., stand for themselves).
.P
Note that
.I request,
.I macro,
and
.I string
names are kept by
the formatters in a single internal table,
so that there must be no duplication among such names.
.I "Number register"
names are kept in a separate table.
.H 3 "Names Used by Formatters"
\&
.VL 15
.LI requests:
aa (most common)
.br
an (only one, currently: \f3.\fPc2)
.LI registers:
aa (normal)
.br
\&\f3.\fPx (normal)
.br
\&\f3.\fPs (only one, currently: \f3.\fP$)
.br
%  (page number)
.LE
.H 3 "Names Used by MM"
\&
.VL 15
.LI macros:
AA (most common, accessible to user)
.br
A  (less common, accessible to user)
.br
)x (internal, constant)
.br
>x (internal, dynamic)
.LI strings:
AA (most common, accessible to user)
.br
A  (less common, accessible to user)
.br
.br
]x (internal, usually allocated to specific functions throughout)
.br
}x (internal, more dynamic usage)
.LI registers:
Aa (most common, accessible to users)
.br
An (common, accessible to user)
.br
A  (accessible, set on command line)
.br
\f3:\fPx (mostly internal, rarely accessible, usually dedicated)
.br
\f3;\fPx (internal, dynamic, temporaries)
.H 3 "Names Used by EQN/NEQN and TBL"
The equation preprocessors,
.I eqn \^(1)
and
.I neqn \^(1),
use registers
.I and
string names of the form 
.I nn.
The table preprocessor,
.I tbl \^(1),
uses names of the form:
.HC
.DS1
.if t .ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i 7i
a-	a+	a\|\(bv	nn	#a	##	#\^-	#\^\*^	\*^\^a	T&	TW
.DE
.HC ^
.H 3 "User-Definable Names"
After the above, what is left for user extensions?
To avoid problems, we suggest using names that consist either of
a single lower-case letter,
or of a lower-case letter followed by anything other than a lower-case letter.
The following is a sample naming convention:
.VL 15
.LI macros:
aA
.br
Aa
.LI strings:
a
.br
a) (or a], or a}, etc.)
.LI "registers"
a
.br
aA
.LE
.H 2 "Sample Extensions"
.H 3 "Appendix Headings"
The following gives a way of
generating and numbering appendices:
.Es 1
.tr ``
\&\f3.\fPnr Hu 1
\&\f3.\fPnr a 0
\&\f3.\fPde aH
\&\f3.\fPnr a +1
\&\f3.\fPnr P 0
\&\f3.\fPPH "\^\'\^\^\'\^\^\'\^Appendix ``na - ````````nP\^\'\^"
\&\f3.\fPSK
\&\f3.\fPHU "``$1"
\&\f3.\|.\fP
.tr `\\
.Ee
.tr ``
.P
After the above initialization and definition,
each call of the form ``\f3.\fPaH\ "\^title\^"\^'' 
begins a new page (with the page header changed to ``Appendix\ \f2a\fP\ -\ \f2n\fP'')
and generates an
unnumbered heading of
.I title,
which, if desired, can be saved for the table of contents.
Those who wish Appendix titles to be centered must, in addition, set the register
.I Hc
to 1 {4.2.2.3}.
.H 3 "Hanging Indent with Tabs"
The following example illustrates the use of the
hanging-indent feature of variable-item lists {5.3.3.6}.
First, a user-defined macro is built to
accept four arguments
that make up the 
.I mark.
Each argument is to be separated from the previous one by a tab character;
tab settings are defined later.
Since the first argument may begin with a period or apostrophe, the ``\\&'' 
is used so that the formatter will not
interpret such a line as a formatter request
or macro.\*F\ 
.FS
The two-character sequence ``\e&'' is understood
by the formatters to be a ``zero-width'' space,
i.e., it causes no output characters to appear.
.FE
The ``\\t''
is translated by the formatter into a tab character.
The ``\\c'' is used to concatenate
the line of
.I text 
that follows the macro
to the line of text built by the macro.
The macro definition and an example of its use are as follows:
.Es  1
\&\f3.\fPde aX
\&\f3.\fPLI
\&\\\\&\\\\\\\\$1\\\\t\\\\\\\\$2\\\\t\\\\\\\\$3\\\\t\\\\\\\\$4\\\\t\\\\c
\&\f3.\|.\fP
\&\ \ \f3.\fP
.sp -.5v
\&\ \ \f3.\fP
.sp -.5v
\&\ \ \f3.\fP
\&\f3.\fPta 9n 18n 27n 36n
\&\f3.\fPVL 36
\&\f3.\fPaX \f3.\fPnh off \e- no
\&No hyphenation.
\&Automatic hyphenation is turned off.
\&Words containing hyphens
\&(e.g., mother-in-law) may still be split across lines.
\&\f3.\fPaX \f3.\fPhy on \e- no
\&Hyphenate.
\&Automatic hyphenation is turned on.
\&\f3.\fPaX \f3.\fPhc\e\(sqc none none no
.sp-1v
.tl|||(\(sq stands for a space)|
\&Hyphenation indicator character is set to ``c'' or removed.
\&During text processing the indicator is suppressed
\&and will not appear in the output.
\&Prepending the indicator to a word has the effect 
\&of preventing hyphenation of that word.
\&\f3.\fPLE
.Ee
.P 
The resulting output is:
.de aX
.LI
\&\\$1\t\\$2\t\\$3\t\\$4\t\c\"
..
.DS 0 1
.ta 9n 18n 27n 36n
.na
.VL 36
.aX \f3.\fPnh off \- no
No hyphenation.
Automatic hyphenation is turned off.
Words containing hyphens
(e.g., mother-in-law) may still be split across lines.
.aX \f3.\fPhy on \- no
Hyphenate.
Automatic hyphenation is turned on.
.aX \f3.\fPhc\ c none none no
Hyphenation indicator character is set to ``c'' or removed.
During text processing the indicator is suppressed
and will not appear in the output.
Prepending the indicator to a word has the effect 
of preventing hyphenation of that word.
.LE
.DE
.SA
.rm aX
