.\" $Copyright:	$
.\" Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
.\" Sequent Computer Systems, Inc.   All rights reserved.
.\"  
.\" This software is furnished under a license and may be used
.\" only in accordance with the terms of that license and with the
.\" inclusion of the above copyright notice.   This software may not
.\" be provided or otherwise made available to, or used by, any
.\" other person.  No title to or ownership of the software is
.\" hereby transferred.
...
.\" $Header: mmt.src 2.2 87/04/08 $
'''\"	UNIX Memorandum Macros - 15.130 of 10/7/82
'''\"	TROFF Version	@(#) mmt.src 15.130@(#)
'\"	*** COMMENTING CONVENTIONS ***
'\"	'''\"tab ==> prime comment, used in most terse macro summary
'\"	''\"tab  ==> additional external comments
'\"	'\"tab   ==> internal comments, not shown to user
'\"	*** MACRO DOCUMENTATION ***
'\"	(following for external macros)
'\"	'''\"tabXX: Description [number of args allowed: n or n:m]
'\"	''\"tab .XX arguments (with optional arguments in [] )
'\"	''\"tab further description, comments, notes, etc.
'\"	(internal macros similar, but prefixed only by single ')
''\"	*** NAMING CONVENTIONS ***
''\"	A = upper-case alphabetic; a = lower-case alphabetic;
''\"	n = digit; X = A, a, or n.
''\"	EXTERNALLY-KNOWN ITEMS (generally in order of preference)
''\"	MACROS: AA, A, nA, An
''\"	STRINGS: An, nA, AA, A (like macros, but necessarily disjoint)
''\"	REGISTERS: Aa, a, An.
''\"	INTERNAL ITEMS
''\"	MACROS:		)X (orignally defined)
''\"			(X (originally defined for splitting source)
''\"			>X (dynamically created via di, da, de, am)
''\"			?a (text of floating displays)
''\"	STRINGS:	]X (dedicated to specific uses)
''\"			}X (dynamic; function return; temps (esp }n))
''\"	REGISTERS:	:X (dedicated)
''\"			?a (size of floating displays)
''\"			;X (function return; temporaries (esp. ;n))
'\"	Available Name List
'\"	macros:
'\"	)acdegijHOP03456789
'\"	(A-Za-z0-9
'\"	>FGHIJLMOPQUVZaefghijklmno
'\"	strings:
'\"	]ABDGHIJKLMOPQRSTUVWXYijklmopqsu0789
'\"	}FGJKMNOPQRTUVWXYZacdghijklmnqrsu56789
'\"	registers:
'\"	:KMW
'\"	;GHLOQV
'\"	!EGHIJMRSU689
'\"	*** INTERNAL STRINGS ***
'\"	]a: list stack for counter :a
'\"	]b: list stack for text indent :b
'\"	]c: list stack for mark indent :c
'\"	]d: list stack for pad distance/justification :d
'\"	]e: list stack for type :e
'\"	]f: list stack for LI-space :f
'\"	]g: current list mark
'\"	]h: list stack for mark ]g
'\"	*** INTERNAL NUMBER REGISTERS ***
'\"	!A  set if long footnotes output on this page
'\"	!B flag wide display output on this page
'\"	!F flag narrow/wide (2/1) footnotes already on this page
'\"	:A accumulated amount of space before line :N on this page (.SP)
'\"	:D flag to indicate inside diversion
'\"	0 ==> not inside, 1 ==> inside
'\"	used by .SP to do spacing right
'\"	:N line number of end of block of blank lines :A long (.SP)
'\"	:I set to control indenting on paragraphs for Pt 2
'\"		0 is no indent; 1 is indent
'\"		also flag to )y (float displays) that am
'\"		inside header
'\"	:a current counter for lists
.nr :a 0 1
'\"	:b current text indent for lists
.nr :b 0
'\"	:c current mark indent for lists
.nr :c 0
'\"	:d current pad distance/justification for lists
.nr :d 0
'\"	:e current type for lists [0:1]
'\"	0 ==> simple mark, found in ]g
'\"	1 ==> autonumber/letter
.nr :e 0
'\"	:f current LI-space for lists
.nr :f 0
'\"	:g current level for lists = [0:6]
.nr :g 0 1
'\"	:h flag for default adjustment mode
'\"	0 ==> .na,  1 ==> .ad (used by .SA and thus .)R )
.nr :h 1\" default = adjust???
'\"	:u flag to controlling page increment & main section increment in )h
'\"	set by .H 1: = 0 if no section/page increment needed, = 1 if needed
.nr :u 0
'\"	;p flag controls floating displays cause a break when output
'\"	on the current page.  ;p set by FB mode of the WC macro.  by default,
'\"	floaters cause a break.
.nr ;p 1	\" set FB mode
'\"	!0 flag for figures, Fg may be reset to 0 by .H1
.nr !0 0
'\"	!1 flag for tables, Tb may be reset to 0 by .H1
.nr !1 0
'\"	!2 flag for equations, Ec may be reset to 0 by .H1
.nr !2 0
'\"	!3 flag for exhibits, Ex may be reset to 0 by .H1
.nr !3 0
.nr !N 0  \" copy-to flag; no copy-to's encountered yet
'\"	*** TEMPORARY REGISTERS ***
'\"	;0: .H, .HU, .LI, .SK
'\"	;1: .LI, .H, .HU, .)F
'\"	;2: .MT and .AF normally zero but set to 1 to suppress headings
'\"	also temp in .H
'\"	;3: .)I. .H.
'\"	;4: .SP
'\"	*** TEMPORARY STRINGS ***
'\"	}0: .H, .)F
'\"	}1: .H
'\"	}2: .H, .MT, .AF
'\"	following allows for override of Bell Laboratories by .AF
.ds }2 Bell Laboratories
'\"	}3: .)I return value; .H
'\"	*** TEMPORARY MACROS ***
'\"	>A: .H
'''\"	*** EXTERNALLY AVAILABLE STRINGS ***
'''\"	Notation: [n] means n arguments; [n:m] means n to m args
'''\"	BU: Bullet (for nroff/troff compatibility)
.ds BU \s-2\(bu\s0
'''\"	EM: Dash (for nroff/troff compatibility)
.ds EM \(em
'''\"	F : footnote numberer
.ds F \v'-.4m'\s-3\\n+(:p\s0\v'.4m'\" in the text.\*F
'''\"	DT: current date (unless overriden by .ND) in Month dy, 19yr
'''\"	HF: Heading Fonts: gives fonts for levels 1-7 of .H & .HU
'''\"	default: 3 3 2 2 2 2 2
'''\"	i.e.:    B B I I I I I
.ds HF 3 3 2 2 2 2 2
'''\"	Lf: title for List of Figures
.ds Lf LIST OF FIGURES
'''\"	Lt: title for List of Tables
.ds Lt LIST OF TABLES
'''\"	Lx: title for List of Exhibits
.ds Lx LIST OF EXHIBITS
'''\"	Le: title for List of Equations
.ds Le LIST OF EQUATIONS
'''\"	RE: SCCS Release.Level of memomacs
.ds RE 15.130
'''\"	Rf: reference numberer
.ds Rf \v'-.4m'\s-3[\\n+(:R]\s0\v'.4m'\" in the text.\*(Rf
'''\"	Rp: title for references page
.ds Rp References
'''\"	Tm: Trademark indicator
.ds Tm \v'-0.5m'\s-4TM\s+4\v'0.5m'
'''\"	*** EXTERNALLY-KNOWN NUMBER REGISTERS ***
'''\"	Notation: [n:m] means x st n <= x <= m
'''\"	Au: add'l author info after 'from' [0:1] default 1
.nr Au 1
'''\"	C : type of copy [0:3] default 0 (original)
''\"	0 original; 1 Official;2 Date;3 Draft
''\"	settable via -rCn
'''\"	Cp: List of Figs, etc. on TOC page or separate page, default 0
''\"	= 0 ==> Use separate pages
''\"	= 1 ==> Put on Table of Contents page
.nr Cp 0
'''\"	Cl: Contents level [0:3], default = 2
''\"	if heading level <= Cl, it is saved for table of contents,
''\"	0 ==> none, 1 ==> .H 1 only, etc.
.nr Cl 2
'''\"	D : debug flag, settable to debug mode via -rD1 [0:1], default = 0
''\"	0 ==> stop on any error, 1 ==> continue, even if garbage output
'''\"	Ej: page Ejection flag for headings, default = 0
''\"	Eject if heading level <= Ej.
''\"	0 ==> no Eject, 1 ==> .bp for level 1 headings, 2 ==> .bp
''\"	for levels 1 & 2.
'\"	nr Ej 0
'''\"	Ds: display space flag
.nr Ds 1v
'''\"	Ec:equation counter
.nr Ec 0 1
'''\"	Eq: equation label flag, default 0 means labels on right
.nr Eq 0
'''\"	Ex: exhibit counter, initially 0.
.nr Ex 0 1
'''\"	De: Eject after each floating display is output [0:1] default 0
''\"	0 => no eject,    <> 0 => eject
.nr De 0
'''\"	Df: Floating display format specifier [0:7] default 5
''\"	The following flags may be added together to set a combination of
''\"	action conditions.  The flags are:
''\"	  1: put one display on the current page if it fits
''\"	  2: put one on the top of each page (only if any are queued)
''\"	  4: put as many as will fit at the top of the page (always at least
''\"		one, if any are in the queue)
''\"	Note: if both 2 and 4 are selected, the result is as if only 4 were
''\"	selected.  If neither 2 or 4 are set, no floating displays will be
''\"	output at the top of the page.  Similarly, if 1 is not set, no
''\"	floating displays are output on the current page.
.nr Df 5
'''\"	Fg: Figure counter, initially 0.
.nr Fg 0 1
'''\"	Fs: amount of spacing between footnote entries; default 1
.nr Fs 1
'''\"	H1-H7: heading counters: controlled by .H and .HU
'''\"	H1: 1st level heading counter, initially 0
''\"	incremented by .H 1
.nr H1 0 1
'''\"	H2: 2nd level heading counter
.nr H2 0 1
'''\"	H3: 3rd level heading counter
.nr H3 0 1
'''\"	H4: 4th level heading counter
.nr H4 0 1
'''\"	H5: 5th level heading counter
.nr H5 0 1
'''\"	H6: 6th level heading counter
.nr H6 0 1
'''\"	H7: 7th level heading counter
.nr H7 0 1
'''\"	Hb: Break level for headings [0:7], default=2
''\"	If heading level <= Hb, break occurs after it, else run-in text.
''\"	Break always occurs after .H 1 heading.
.nr Hb 2
'''\"	Hc: heading centering level, [0:7], default = 0
''\"	if level <= Hc & (level <= Hs | level <= Hb), center heading
'\"	nr Hc 0
'''\"	Hi: heading temporary indent (following .H) [0:2], default = 1
''\"	when registers Hb and sl create a break or space after a heading
''\"	(.H and .HU), Hi controls the indent of next line.
''\"	= 0 ==> 0 indent (left margin)
''\"	= 1 ==> indent to right as much as paragraph (like .P 1)
''\"	= 2 ==> indent to line up with text part of preceding heading
.nr Hi 1
'''\"	Hs: space level for headings [0:7], default = 2
''\"	if head-level <= Hs, a space is output following the heading.
''\"	SEE ALSO: register Hb; .H, .HU.
.nr Hs 2
'''\"	Ht: Heading type of numbering (multiple or single)
'''\"	= 0 ==> multiple (1.1.1 etc), = 1 ==> single (as in outline)
'\"	nr Ht 0
'''\"	Hu: level at which HU considered to be [1:7], default = 2
''\"	This value is used for Bold, Italic, break, space determination,
''\"	and also causes incrementation of counter (H1-H7) as appropriate.
''\"	SEE ALSO: registers Bl, Hb, H1-H7, Il, sl; .HU, .H
.nr Hu 2
'''\"	Hy: control hyphenation in body
''\"	0 - no hyphenation (default)
''\"	1 - hyphenate
.nr Hy 0
'''\"	Le: list indicator for equations; default 0
'''\"	= 0 ==> no list generated after TOC
'''\"	= 1 ==> list generated
.nr Le 0
'''\"	Lf: list indicator for figures; default 1
'''\"	= 0 ==> no list generated after TOC
'''\"	= 1 ==> list generated
.nr Lf 1
'''\"	Li: standard list indent (for .AL), default = 5.
.nr Li 5
'''\"	Ls: list level for no LB/LI/LE space; default 6
'\"	there is no spacing for either LB, for LI, or for LE
'\"	even if requested if the list depth is greater than Ls value
.nr Ls 6
'''\"	Lt: list indicator for tables; default 1
'''\"	= 0 ==> no list generated after TOC
'''\"	= 1 ==> list generated
.nr Lt 1
'''\"	Lx: list indicator for exhibits; default 1
'''\"	= 0 ==> no list generated after TOC
'''\"	= 1 ==> list generated
.nr Lx 1
'''\"	Np: flag for numbered paragraphs, default 0
''\"	= 0 ==> paragraphs not numbered
''\"	= 1 ==> paragraphs numbered in first level headings
.nr Np 0
'''\"	Oc: Arabic TOC page numbering for OSDD, default 0
''\"	= 0 ==> Roman page numbering for TOC
''\"	= 1 ==> Arabic page numbering for TOC
.nr Oc 0
'''\"	Of: figure caption punctuation, default 0
''\"	= 0 ==> use period
''\"	= 1 ==> use dash
.nr Of 0
'''\"	!4: counter for numbered paragraphs
.nr !4 0 1
.af !4 01
'''\"	Pi: std paragraph indent, default 5
.nr Pi 3
'''\"	Ps: amount of paragraph spacing, default 1
.nr Ps 1
'''\"	Pt: default paragraph type [0:2], initial value = 0
''\"	= 0 ==> left-justified is default for .P macro
''\"	= 1 ==> indented first line for .P macro
''\"	= 2 ==> indent .P except after .H, .DE, .LE
.nr Pt 0
'''\"	Pv: put PRIVATE at top of page, default 0
''\"	= 0 ==> don't print PRIVATE on any page
''\"	= 1 ==> on first page only
''\"	= 2 ==> on every page
.nr Pv 0
'''\"	Rf: reference count for CS
.nr Rf 0
'''\"	Si: standard indent for displays (default 5)
.nr Si 3
'''\"	Tb: Table counter, initially = 0
.nr Tb 0 1
'''\"	U : Underline headings (0 ==> cu when possible, 1 ==> ul)
'\"	W will be used in environment initializations later in file
'''\"	*** EXTERNALLY-AVAILABLE MACROS ***
'''\"	RD: promt and read from standard input.
''\"	.RD prompt diversion string
''\"	This macro prints the prompt message on the standard error
''\"	channel (an ascii bel if prompt is empty), and then reads text from
''\"	the terminal, using the rd request.  All the input is captured in
''\"	the diversion named on the macro line, and the first line (up to the
''\"	first newline) is captured in the string named on the macro line.
.de RD
'fl
.di }w		\" diversion to capture text
.rd \\$1	\" get the input
.br
.di
.ie \w@\\$3@ \{\
'\"		set string only if asked for
.	di }x
.	ds \\$3 "\\*(}w
.	br
.	di
'	br \}
.if \w@\\$2@ .rn }w \\$2	\" set diversion only if asked for
.rm }w }x
..
'''\"	B : Boldface [0:6]
'''\"	.B ["Bold-arg" [prevailing-arg]] (up to six args)
''\"	If bold-arg is present, it is made Boldface,
''\"	and then the font reverts to the prevailing font.
''\"	If no argument is given, the font is changed to Bold
''\"	until explicitly changed again.
''\"	If the second argument is given, it is concatenated to the
''\"	first one, and return to prevailing font.
''\"	Up to six arguments are allowed, they will alternate in font.
''\"	SEE ALSO: I, R, .IB, .BI, .RI, .IR, .RB, .BR.
.de B
.ie \\n(.$ .nr ;G \\n(.f
.el .ft 3
.if \\n(.$ .if !\\n(.$-2 \&\f3\\$1\fP\\$2
.if \\n(.$-2 \{.ds }i
.		if @\\n(.f@2@ .ds }i \^
.		ds }I \&\f3\\$1\fP\\$2\\*(}i
'br \}
.if \\n(.$-2 .if !\\n(.$-4 \\*(}I\f3\\$3\fP\\$4
.if \\n(.$-4 .if !\\n(.$-6 \\*(}I\f3\\$3\fP\\$4\\*(}i\f3\\$5\fP\\$6
.if \\n(.$ .ft \\n(;G
..
'''\"	I : Italic font [0:6]
'''\"	.I [ "italic-arg" [prevailing-arg]] (up to six args)
''\"	If italic-arg is given, it is made Italic (TROFF) or underlined
''\"	(NROFF), and then font reverts to prevailing.
''\"	If the argument is omitted, font is changed to Italic (underlined)
''\"	until explicitly changed.
''\"	If the second argument is given, it is concatenated to the
''\"	first one, with one-half narrow blank, and return to prevailing font.
''\"	Up to six arguments are allowed, arguments will alternate in font.
''\"	SEE ALSO: .B, .R, .IR, .RI, .IB, .BI, .RB, .BR.
.de I
.ie \\n(.$ .nr ;G \\n(.f
.el .ft 2
.if \\n(.$ .if !\\n(.$-1 \&\f2\\$1
.if \\n(.$-1 \{.ds }i \^
.		if @\\n(.f@2@ .ds }i
.		ds }I \&
.		if \w@\\$1@ .ds }I \&\f2\\$1\fP\\*(}i
'br \}
.if \\n(.$-1 .if !\\n(.$-3 \\*(}I\\$2\f2\\$3
.if \\n(.$-3 .if !\\n(.$-5 \\*(}I\\$2\f2\\$3\fP\\*(}i\\$4\f2\\$5
.if \\n(.$-5 \\*(}I\\$2\f2\\$3\fP\\*(}i\\$4\f2\\$5\fP\\*(}i\\$6
.if \\n(.$ .ft \\n(;G
..
'''\"	RI : Alternate Roman and Italic [1:6]
.de RI
.nr ;G \\n(.f
.}S 1 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
..
'''\"	RB : Alternate Roman and Bold [1:6]
.de RB
.nr ;G \\n(.f
.}S 1 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
..
'''\"	IR : Alternate Italic and Roman [1:6]
.de IR
.nr ;G \\n(.f
.}S 2 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
..
'''\"	IB : Alternate Italic and Bold [1:6]
.de IB
.nr ;G \\n(.f
.}S 2 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
..
'''\"	BR : Alternate Bold and Roman [1:6]
.de BR
.nr ;G \\n(.f
.}S 3 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
..
'''\"	BI : Alternate Bold and Italic [1:6]
.de BI
.nr ;G \\n(.f
.}S 3 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
..
'''\"	}S : Common part of double-font macros [4:9]
.de }S
.ds }i
.if @\\$1@2@ .if !@\\$5@@ .ds }i\^
.ie !@\\$4@@ .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(}i" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
.el \\$3
.ft \\n(;G
..
'''\"	SM : If 1 or 2 args, reduce arg1's point size by 1; append arg2 [1:3]
'''\"	If 3 args, reduce arg2's point size by 1; prepend arg1 & append arg3.
.de SM
.ie \\n(.$-2 \&\\$1\s-1\\$2\s0\\$3
.el \&\s-1\\$1\s0\\$2
..
'''\"	R : Roman font [0]
'''\"	.R
''\"	Change to the Roman font.
''\"	NOTE: this is intended as the closing bracket for I and B, as in:
''\"	.I or .B
''\"	one or more lines of text
''\"	.R
.de R
.ft 1
.ul 0
..
'''\"	EQ: begin equation display [0:1]
'''\"	.EQ
.de EQ
.ds ]E \\$1
.di >E\"when inside display, begin NESTED DIVERSION
..
'''\"	EN: end equation display [0]
'''\"	.EN
.de EN
\!.br
.br
.di\"end diversion into >E
.rm >E
.lt \\n(.lu
.pc
.if \w@\\*(10\\*(}E@ \{\
.ie !\\n(Eq \{\
.    ie \\n(:Y>0 \{.if \\n(:Y<\w@\\*(10@ .nr :Y \w@\\*(10@\"if centered block
\!\\*(10\h'\\\\n(.lu-\w@\\*(10\\*(]E@u-\\\\n(.iu'\\*(]E
.    br \}
.    el .ie \\n(:B=2 .tl \(ts\(ts\\*(10\(ts\\*(]E\(ts\"if centered
.    el .ie \\n(:B=1 .tl \(ts\h'\\n(Sin'\\*(10\(ts\(ts\\*(]E\(ts\"if indented
.    el .if \\n(:B=0 .tl \(ts\\*(10\(ts\(ts\\*(]E\(ts\"if left-blocked
'    br \}		\" end block output only if strings 10 or }E have width
.el \{\
.    ie \\n(:Y>0 \{.if \\n(:Y<\w@\\*(10@ .nr :Y \w@\\*(10@\"if centered block
\!\\\\h'-\\\\n(.iu'\\*(]E\\\\h'\\\\n(.iu-\\w@\\*(]E@u'\\*(10
.    br \}
.    el .ie \\n(:B=2 .tl \(ts\\*(]E\(ts\\*(10\(ts\(ts\"if centered
.    el .ie \\n(:B=1 .tl \(ts\h'\\n(Sin'\\*(]E\(ts\(ts\\*(10\(ts\"if indented
.    el .if \\n(:B=0 .tl \(ts\\*(]E\(ts\(ts\\*(10\(ts\"if left-blocked
'    br  \} \}		\" end block output only if strings 10 or ]E have width
.pc %
.lt
.rm ]E 10
.rr :E
..
'''\"	HC: Set hyphenatication character everywhere [0:1]
''\"	.HC [hyphen-character]
'\"	sets hyphen character in all 3 enivornments
.de HC
.ev 0
.hc \\$1
.ev
.ev 1
.hc \\$1
.ev
.ev 2
.hc \\$1
.ev
..
'''\"	H : Heading, numbered [1:3]
'''\"	.H level ["heading"] [\*F]
''\"	level = subordination value [1:7], 1 = most major, 7 = most minor
''\"	1 space is output before heading (level = [2:7])
''\"	1 more space is added for level=1, unless register Ej=1,
''\"		a .bp occurs to get to next page
''\"	a .bp occurs in any case if level <= Ej
''\"	heading is Bold, Italic, or Roman depending on value of level-th
''\"	item in string HF.  null is considered 1 (Roman).
''\"	if level <= Hc & (level <= Hb | level <= Hs), heading is centered
''\"	if level <= Hb, a break occurs after the heading
''\"	if level <= Hs, a space occurs after it.
''\"	if there is break or space, temporary indent is done according to Hi
''\"	a .ne is done before the heading to keep it together. its value is:
''\"		(size of heading)+1	if run-in text used
''\"		(size of heading)+2	if break, but no space
''\"		(size of heading)+3	if space after heading
''\"	SEE ALSO: Hb, Ej, H1-H7, Hi, Hu, Hs; HF; .HU.
'\"	NOTE: a (secret) entry of .H 0 "heading" is used to implement .HU.
'\"	;0 used as temp
'\"	;1 is level, either from arg1, or from Hu.
'\"	;2 is temp (width of numbering + blanks)
'\"	;3 is temp (from .)I)
'\"	}0, }1, }2, }3 used as local temp strings
'\"	>A is created and removed
'\"	:S is flag for sect-page numbering
.de H
'\"	error checks
.if \\n(:F .)D "H:missing FE"
.if \\n(:y .)D "H:missing DE"
.if !\\n(.$ .)D "H:missing arg"
'\"	;0 set to 1 on any error
.nr ;0 0
.if \\$1-7 .nr ;0 1
.if \w@\\$1@-\w'0'u .nr ;0 1
.if \\n(;0 .)D "H:bad arg:\\$1"
'\"	make sure all List Control items cleared
'\"	Also, reset the world
.LC 0
.br
.)R
'\"	derive level in ;1, to control most decisions on format
.nr ;1 0\\$1
.if !0\\$1 .nr ;1 \\n(Hu \" for unnumbered heading
.if !\\n(;1 .)D "H:bad arg:\\$1"\" .H a title
'\"	clear lower-level counters
.if 2-\\n(;1 .nr H2 0 1
.if 3-\\n(;1 .nr H3 0 1
.if 4-\\n(;1 .nr H4 0 1
.if 5-\\n(;1 .nr H5 0 1
.if 6-\\n(;1 .nr H6 0 1
.if 7-\\n(;1 .nr H7 0 1
.if 2-\\n(;1 \{.if \\n(:S .)w\"flush floating keeps if .H 1 & sec-page
.	if \\n(:C .nr :p 0 1 \}\" reset fn ctr if .H 1 and :C set
'\"	do pre-spacing & fix increment of current-level counter
.SP .5
.nr :u 0
.if \\n(;1-1 .nr H\\n(;1 +1 \"all but 1st-level
.if !\\n(;1-1 \{.nr :u 1 \"in case we cross page
.	SP 1 \}\"total of 1 space, at least, if 1st level
.if \\n(;1-1 .if (\\n(Ej+1-\\n(;1)&(\\n(nl-\\n(:J) \{ .if \\n(;C .nr ;C 2	\" force into the first column
.				     bp \}
.if !\\n(;1-1 \{.if (\\n(Ej+\\n(:S)&(\\n(nl-\\n(:J) \{ .if \\n(;C .nr ;C 2	\" force in the 1st col
.				      bp \}	\" :S ==> Ej
.	if !\\n(:u-1 .nr H1 +1 \"bump if not done by )h
.if (\\n(:u=1)&(\\n(:S=1) .nr P 1 \}\"and for sec-page restart to 1
.nr :u 0
'\"	'	additional pre-space if space or break
'\"	.if !\\n(;1-\\n(Hs .SP 1\"if level <=Hs
'\"	.if !\\n(;1-\\n(Hb .SP 1\"if level <=Hb
'\"	all constant pre-space done. now accumulate number, if any
.ds }0 \\n(H1.
.if 0\\$1-1 .as }0 \\n(H2
.if 0\\$1-2 .as }0 .\\n(H3
.if 0\\$1-3 .as }0 .\\n(H4
.if 0\\$1-4 .as }0 .\\n(H5
.if 0\\$1-5 .as }0 .\\n(H6
.if 0\\$1-6 .as }0 .\\n(H7
.if \\n(Ht \{.)I \\n(;1 \\n(H1 \\n(H2 \\n(H3 \\n(H4 \\n(H5 \\n(H6 \\n(H7
.	ds }0 \\*(}3.
'	br  \}
.as }0 \ \ \"spaces between number and heading
.if !0\\$1 .ds }0 \"clear if unnumbered heading
'\"	at this pt, }0 is number blank blank, and $2 (if any) is heading
'\"	now set ;0 = 0 (run-in), = 1 (break only), = 2 (space)
.nr ;0 0
.if !\\n(;1-\\n(Hb .nr ;0 1
.if !\\n(;1-\\n(Hs .nr ;0 2
'\"	following defines for non-run-in and run-in text
.ds }2
.if !\\n(;0 .if \w@\\$2@ .ds }2 "  \" 2 adjustable blanks
'\"	set up ;3 to be increment for later .ne, so that HX can change
.nr ;3 2v
'\"	call user exit macro (if any exists) to override numbering
.HX \\n(;1 0\\$1 "\\$2\\$3"
'\" for double line indent reset counter if first or second level
.if \\$1<3 .nr !5 0 1
.af !5 01
'\"	if numbered paragraphs restart counter for .H 1
.if (\\$1=1)&(\\n(Np=1) .nr !4 0
'\"	figure out number of lines for .ne
.di >A
\&\\*(}0\\$2\\$3\\*(}2
.br
.di
.rm >A
.if \\n(;0-1 .nr ;3 +.5v\"add some for post-space
.ne \\n(;3u+\\n(dnu+.5p-1v
'\"	call user exit macro (if any exists) to reset indents
.HY \\n(;1 0\\$1 "\\$2\\$3"
'\"	finally put out the heading
.if \\n(;0 .na			\" only if not run-in heading
.)I \\n(;1 \\*(HF\" get font, }3 = 1/null (R), 2 (I), 3 (B)
.nr ;3 1
.nr ;3 \\*(}3
.ft \\n(;3
.nr :I \\n(.s\"save existing point size
.)I \\n(;1 \\*(HP\"set }3 with user-specified point size, if any
'\"	by default, shrink standalone bold hdgs
'\"	e.g. if }3 is 0 or null AND ;3=3 AND ;0>0 then shrink
.if ((\\*(}3=0):(\w@\\*(}3@>0))&(\\n(;3=3)&(\\n(;0>0) .ps -1
'\"	use user-specified point size when }3 is non-null and non-zero
.if !@\\*(}3@@ .if !@\\*(}3@0@ .ps \\*(}3
.nr ;2 \w@\\*(}0@
.if \\n(;0 \{.in+\\n(;2u
.	ti-\\n(;2u \}
.nr ;2 \\n(.i\"save current indent for use with Hi = 2
.if !\\n(;1-\\n(Hc .if \\n(;0 .ce
\\*(}0\&\c
.if \\n(;0 \&\\$2\\$3
.if !\\n(;0 \&\\$2\\$3\\*(}2\&\c
.ft 1
.ps \\n(:Ip\"restore point size
.if \\n(;0 'in
.if !\\n(;1-\\n(Cl .if \w@\\$2@ .)E \\$1 "\\$2"\"save entry for TOC
.SA
.if \\n(;0 .br
.if \\n(;0-1 .SP .5
'\"	do .ti only if Hi and Pt are both 1
.if \\n(;0*\\n(Hi*\\n(Pt .if !\\n(Hi-1+\\n(Pt-1 .ti+\\n(Pin
.if 0\\$1*\\n(;0 .if \\n(Hi-1 .ti\\n(;2u
.nr :I 1\"force indent on following .P
.nr !D \\n(nl		\" save position (for .P)
.nr !Z \\n(.k		\" save on-line position for .P
.if (\\$1=1)&(\\nN=5) \{\
.	nr Fg 0
.	nr Tb 0
.	nr Ec 0
.	nr Ex 0 \}
.HZ \\n(;1 0\\$1 "\\$2\\$3"
..
'''\"	HM: Heading Marker styles [0:7]
'''\"	.HM [arg1 ... arg7]
''\"	args are as .af args: 1,a,A,i,I
''\"	provide default in case of omitted args
.de HM
.af H1 \\$1 1
.af H2 \\$2 1
.af H3 \\$3 1
.af H4 \\$4 1
.af H5 \\$5 1
.af H6 \\$6 1
.af H7 \\$7 1
..
'''\"	HU: Heading, unnumbered [1:2]
'''\"	.HU "heading" [\*F]
''\"	SEE ALSO: register Hu, bl, br, Il, sl, H1-H7; .H
.de HU
.if !\\n(.$ .)D "HU:missing arg"
.H 0 "\\$1" "\\$2"
..
'''\"	HX: Heading user exit X [3]
'''\"	.HX level-1 level-2 "heading"
''\"	called by .H after number string built, just before heading
''\"	size computed and put out.
''\"	level-1	[1:7]	heading level, given in .H, or by Hu
''\"	level-2 [0:7]	same as level-1 for .H, = 0 for .HU
''\"	"heading"	heading given to .H or .HU, may be null
''\"	useful items (changeable by user):
''\"	}0	has string of accumulated numbers, followed by 2 blanks
''\"	}2	string to separate number and heading, normally 2 blanks
''\"	also: may want to do .ne dependent on level, add extra pre-space,
''\"	change indent (maybe?)
'\"	.de HX
'\"	..
'''\"	HY: Heading user exit Y [3]
'''\"	.HY level-1 level-2 "heading"
''\"	arguments same as .HX but called after heading
''\"	size computed, could be used to reset indents
'\"	.de HY
'\"	..
'''\"	HZ: Heading user exit Z [3]
'''\"	.HZ level-1 level-2 "heading"
'''\"	arguments same as .HX, but called at very end of .H
''\"	could be used to reset counters (figures, tables, footnotes, etc)
'\"	.de HZ
'\"	..
'''\"	LOWEST LEVEL LISTING MACROS - LB,LC,LE,LI.
'''\"	LB: List Begin (and define parameters) [4:7]
'''\"	.LB text-indent mark-indent pad type [mark [LI-space [LB-space]]]
''\"	text-indent = [0:?] = relative indent of text from current indent
''\"	normal = [1:2] (simple mark) or [4:5] (a.\ \ text, 10.\ \ text)
''\"	mark-indent = [0:?] = relative indent of beginning of
''\"	mark from current indent.  only used when left-justifying (pad = 0).
''\"	pad = [1:?] = position difference between right character of
''\"	right-justified mark and left character of text. normal = [1:3]
''\"	    = 0 ==> left justify mark
''\"	type = [0:6] notes type of marking desired
''\"	     = 0 ==> simple mark character(s)
''\"	     = 1 ==> auto number/letter, form x.
''\"	     = 2 ==> auto number/letter, form x)
''\"	     = 3 ==> auto number/letter, form (x)
''\"	     = 4 ==> auto number/letter, form [x]
''\"	     = 5 ==> auto number/letter, form <x>
''\"	     = 6 ==> auto number/letter, form {x}
''\"	mark = actual mark character (if type = 0)
''\"	     = beginning value for auto-marking (if type = 1) = 1,a,A,i,I
''\"		Defaults to null (type = 0) or 1 (type > 0)
''\"	LI-space = [0:1] = number of blank lines to precede .LI
''\"		If = 1, LB-space would normally be 0.
''\"		defaults to 1 if omitted.
''\"	LB-space = [0:1] = number of blank lines to preced .LB
''\"		if omitted, 0 assumed
.de LB
.if 4-\\n(.$ .)D "LB:missing arg(s)"
'\"	.)L \\$1u*1.5n \\$2u*1.5n \\$3n "\\$4" "\\$5" "\\$6" "\\$7"
.)L 0\\$1n 0\\$2n 0\\$3n "\\$4" "\\$5" "\\$6" "\\$7"
..
'\"	)L: actual LB as in nroff version
'\"	args already have proper dimension
.de )L
.if \\n(:g>5 .)D "LB:too many nested lists"\"if :g now 6
.if \\n(:g .)A \"push status
.if !\\n+(:g-1 .ds ]b \\n(.i\"save current indent at outer level
.nr :b \\n(.iu+0\\$1u \"text indent
.nr :c \\n(.iu+0\\$2u \"mark indent
.nr :d 0\\$3 \"pad
.nr :e 0\\$4 \"type
.nr :f 0\\$6 \"LI-space
.if !\w@\\$6@ .nr :f 1
.ds ]g \\$5
'\"	take care of omitted case
.if !\w@\\$5@ \{.ds ]g \&
.	if \\n(:e .ds ]g 1
'	br  \}
.nr :a 0 1
.if 0\\$4 .af :a \\$5 1\"in case $5 is null
.if (\\n(:g<=\\n(Ls)&(0\\$7) .SP .5
.fi
.in\\n(:bu
.ti\\n(:bu\"preserve against .ti of .H
..
'''\"	LC: List Status Clear (to specified level) [1]
'''\"	.LC nmbr
''\"	nmbr = [0:?]
''\"	List status information is popped, and the list level decremented
''\"	until = nmbr.  Thus, .LC 0 makes sure list information cleared.
.de LC
.if \\n(:g-0\\$1 .)B\"which decrements :g
.if \\n(:g-0\\$1 .LC 0\\$1\"only if more levels to pop
..
'''\"	LE: List End (at current level) [0:1]
'''\"	.LE [1]
''\"	Terminates list at current level (i.e., pops 1 level)
''\"	If the optional argument 1 given, a blank line is output.
.de LE
.if (\\n(:I>1)&(\\n(nl-\\n(:J) .nr :I 0\" no indent on following .P unless just past )h
.if \\n(:I<2 .nr :I 0
.ie \\n(:g<1 .)D "LE:mismatched"
.el .)B
.if (\\n(:g<=\\n(Ls)&(\\n(.$>0) .SP .5
.nr :J \\n(nl
..
'''\"	LI: List Item [0:2]
'''\"	.LI ["mark" [1]]
''\"	The list item is output according to parameters set by the last
''\"	previous .LB at same level.
''\"	If no arguments given, the mark used is that established by the .LB.
''\"	If "mark" is given alone, it is used in place of the default.
''\"	If the "1" option used, the "mark" is used as a prefix to the default.
.de LI 
.if !\\n(:g .)D "LI:no lists active" 
.if (\\n(:g<=\\n(Ls)&(\\n(:f>0) .SP .5
.in\\n(:bu
'\"	if doing space and not inside diversion, then use need
.if (\\n(:f)&(\\n(:D<1) .ne1v+.5p\"
.ds }0 \\*(]g
.if \\n(:e .ds }0 \\n+(:a.
.if \\n(:e-1 .ds }0 \\n(:a)
.if \\n(:e-2 .ds }0 (\\n(:a)
.if \\n(:e-3 .ds }0 [\\n(:a]
.if \\n(:e-4 .ds }0 <\\n(:a>
.if \\n(:e-5 .ds }0 {\\n(:a}
.if \\n(.$-1 .ds }0 \\$1\ \\*(}0
.if \\n(.$=1 .ds }0 \\$1
.nr ;0 \w@\\*(}0@
.nr ;1 \\n(:c
.if \\n(:d .nr ;1 \\n(:bu-\\n(:du-\\n(;0u
.if !\\n(;1 .nr ;1 0
.nr ;0 \\n(:bu-\\n(;1u-\\n(;0u
.ti\\n(;1u
.if !\\n(;0 .nr ;0 \w@ @u\"want at least one blank
'\"	if zero-width mark, do hanging indent instead
.if \w@\\*(}0@ \&\\*(}0\h@\\n(;0u@\&\c
..
'''\"	INTERMEDIATE LIST START MACROS: AL, BL, DL, ML, VL.
'''\"	AL: Begin Auto-Incremented List [0:2]
'''\"	.AL [type [text-indent]]
''\"	type (if present) is: 1, a, A, i, or I  indicating how list is to
''\"	be lettered/numbered.
''\"	text-indent gives indentation from current margin to text: 4 is
''\"	appropriate for lettered lists (or numbered lists going only to 9),
''\"	while 5 is better for numbered lists going higher than 9.
''\"	if text-indent only is omitted, it is assumed to be Li.
''\"	if type if omitted, it is assumed to be 1.
.de AL
.nr !D 0		\" clear header mark (for .P test)
.if !\\n(.$-1 .)L \\n(Lin 0 2n 1 "\\$1"
.if \\n(.$-1 .if !\\n(.$-2 .LB 0\\$2 0 2 1 "\\$1"
.if \\n(.$-2 .if !\w@\\$2@ .)L \\n(Lin 0 2n 1 "\\$1" 0 1
.if \\n(.$-2 .if \w@\\$2@ .LB 0\\$2 0 2 1 "\\$1" 0 1
..
'''\"	BL: Begin Bullet List [0:1]
'''\"	.BL [text-indent]
'''\"	(followed by 1 or more .LI which generate bullet items)
.de BL
.if \\n(.$<1 .)L \\n(Pin 0 1n 0 \\*(BU
.if \\n(.$=1 .LB 0\\$1 0 1 0 \\*(BU
.if \\n(.$>1 \{.ie !\w@\\$1@ .)L \\n(Pin 0 1n 0 \\*(BU 0 1
.	el .LB 0\\$1 0 1 0 \\*(BU 0 1 \}
..
'''\"	DL: Begin Dashed List [0:1]
'''\"	.DL [text-indent]
'''\"	(followed by 1 or more .LI which generate dashed items)
.de DL
.if \\n(.$<1 .)L \\n(Pin 0 1n 0 \(em
.if \\n(.$=1 .LB 0\\$1 0 1 0 \(em
.if \\n(.$>1 \{.ie !\w@\\$1@ .)L \\n(Pin 0 1n 0 \(em 0 1
.	el .LB 0\\$1 0 1 0 \(em 0 1 \}
..
'''\"	ML: Begin Marked List [1:2]
'''\"	.ML mark [text-indent]
''\"	similar to Bullet List or Dashed List, but with arbitrary mark
.de ML
.if \\n(.$<1 .)D "ML:missing arg"
.nr ;0 \w@\\$1@u/3u/\\n(.su+1u\" get size in n's
.ie \\n(.$<2 .LB \\n(;0 0 1 0 "\\$1"
.el .if \\n(.$<3 .LB 0\\$2 0 1 0 "\\$1"
.if \\n(.$>2 \{.ie !\w@\\$2@ .LB \\n(;0 0 1 0 "\\$1" 0 1
.	el .LB 0\\$2 0 1 0 "\\$1" 0 1 \}
..
'''\"	RL: Begin Reference List [0:1]
'''\"	.RL [text-indent]
''\"	makes auto-numbered list with square brackets.
''\"	text-indent defaults to 6 if omitted.
.de RL
.if \\n(.$<1 .LB 6 0 2 4
.if \\n(.$=1 .LB 0\\$1 0 2 4
.if \\n(.$>1 \{.ie !\w@\\$1@ .LB 6 0 2 4 1 0 1
.	el .LB 0\\$1 0 2 4 1 0 1 \}
..
'''\"	VL: Begin Variable-item List [1:2]
'''\"	.VL text-indent [mark-indent]
''\"	followed by: .LI item
''\"	text-ident gives distance to text
''\"	mark-indent gives indent from current margin to mark, default = 0
.de VL
.if \\n(.$<1 .)D "VL:missing arg"
.ie \\n(.$<3 .LB 0\\$1 0\\$2 0 0
.el .LB 0\\$1 0\\$2 0 0 \& 0 1
..
'''\"	P : Paragraph [0:1]
'''\"	.P [type]
''\"	if no argument is present, the default paragraph style is used.
''\"	type = 0 ==> use left-justified paragraph
''\"	type = 1 ==> use indented paragraph
''\"	the default is set by the register Pt (same 0:1 meanings)
'\"	if Pt = 2, then indent when :I >= 1 or when
'\"		:I = 0 and nl != :J (spot marked by things
'\"		that say "don't indent")
.de P
.if !(((\\n(!D=\\n(nl):(\\n(!D=(\\n(nl-.5v)))&(\\n(!Z=\\n(.k)&(\\n(Np=0)) \{\
'\"			\" if just after a .H (or DF, etc) - this is a no-op
'\"			\" unless numbered paragraphs are being used
.br
.nr ;1 \\n(:J\"save place where "no-indent" last marked
.nr ;2 \\n(nl\"save place where now
.SP \\n(Psu*.5
.if !\\n(:D .ne 1v+.5p
.ie !\\n(;1-\\n(:J .nr ;2 \\n(;2-\\n(:J
.el .nr ;2 \\n(nl-\\n(:J
.nr :J \\n(;2
.if \\n(.$>0&(0\\$1) .ti+\\n(Pin
.if \\n(.$=0 \{\
.if \\n(Pt=1 .ti+\\n(Pin
.if \\n(Pt>1&(\\n(:I) .ti+\\n(Pin
.if \\n(Pt>1&(\\n(:I=0)&(\\n(:J>0) .ti+\\n(Pin \}
.if \\n(Np \{\
\\n(H1.\\n+(!4\ \ \c
'br \}
.nr :I 1 \}		\"force indent on following .P (for Pt 2)
.nr :u  0
..
'''\"	nP: double-line indented paragraph (from ASC)
'''\"	.nP
'\"	uses !5 as paragraph number counter (set in .H)
.de nP
.P 0
 
.br
.sp -\\n(!7
.de )p
'ti 6n
.rm )p
.wh \\n(.du+\\n(!7
\\..
.wh \\n(.du+\\n(!7 )p
\\n(H2.\\n+(!5\h'|6n'\\c
..
'''\"	S : set point size and vertical spacing
'''\"	.S [arg1] [arg2] [0:2]
'\"	:P and !P current point size and vertical spacing respectively
'\"	:Q and !Q previous point size and vertical spacing respectively
'\"	first argument is selectable point size
'\"	second argument is selectable vertical spacing
'\"	D=default, P=previous, C=current
.de S
.if !\\n(:Q .nr :Q \\nS
.if !\\n(.$ .nr ;0 \\n(:Q
.if \\n(.$ .if !\w@\\$1@ \{\
.	nr ;J 2
.	nr ;0 \\n(:P \}
.if \w@\\$1@ \{\
.   ie @\\$1@D@ \{\
.	nr ;J 1
.	nr ;0 \\nS \}
.   el \{\
.	ie @\\$1@C@ \{\
.	    nr ;J 2
.	    nr ;0 \\n(:P \}
.	el \{\
.	    ie @\\$1@P@ \{\
.		nr ;J 3
.		nr ;0 \\n(:Q \}
.	    el \{.if !\\n(;J \{\
.		nr ;0 \\n(:P
.		nr ;0 \\$1 \}\}\}\}\}
.if 0\\$1-99 .nr ;0 \\nS
.if !\\n(;0 .)D "S:bad arg \\$1"
.nr :Q \\n(:P
.nr :P \\n(;0
.ps \\n(:Pp
.nr ;J 0
.if !\\n(!Q .nr !Q \\nS+2
.if !\\n(.$-1 \{\
.   ie \\n(.$ \{\
.	nr ;K 1
.	nr ;7 \\n(.s+2 \}
.   el \{\
.	nr ;K 3
.	nr ;7 \\n(!Q \}\}
.if \\n(.$-1 .if !\w@\\$2@ \{\
.	nr ;K 2
.	nr ;7 \\n(!P \}
.if \w@\\$2@ \{\
.   ie @\\$2@D@ \{\
.	nr ;K 1
.	nr ;7 \\n(.s+2 \}
.   el \{\
.	ie @\\$2@C@ \{\
.	    nr ;K 2
.	    nr ;7 \\n(!P \}
.	el \{\
.	    ie @\\$2@P@ \{\
.		nr ;K 3
.		nr ;7 \\n(!Q \}
.	    el \{.if !\\n(;K \{\
.		nr ;7 \\n(!P
.		nr ;7 \\$2 \}\}\}\}\}
.if 0\\$2-99 .nr ;7 \\n(.s+2
.if !\\n(;7 .)D "S:bad arg \\$2"
.nr !Q \\n(!P
.nr !P \\n(;7
.vs \\n(!Pp
.nr ;K 0
..
'''\"	pn: set page number
'''\"	REDEFINES pn REQUEST
'\"	fake out the function of the pn request so that
'\"	the P register tracks w/ the % register when .pn used
.rn pn ]N
.de pn
.nr :Z 1\"set flag that .pn invoked
.]N \\$1\"invoke real .pn request
..
'''\"	SA: Set Adjustment default [0:1]
'''\"	.SA [arg]
''\"	.SA 0	sets default & current adjustment to no adjust (.na)
''\"	.SA 1	sets default & current adjustment to adjust (.ad)
''\"	.SA	sets adjustment to current default value
'\"	SEE ALSO: nr :h, macro )R
.de SA
.if \\n(.$ \{.if \\$1-1 .)D "SA:bad arg:\\$1"
.	nr :h 0\\$1 \}
'na
.if \\n(:h 'ad
..
'''\"	SK: skip pages
'''\"	.SK [arg]
'\"	skip arg pages
'\"	if arg omitted, to top of a page
.de SK
.br
.bp
.nr ;0 0\\$1-1
.if \\n(;0+1 .rs
.if \\n(;0+1 .SK \\n(;0
..
'''\"	OP: odd page
'''\"	.OP
'\"	ensure top of odd page
.de OP
.SK
.if !\\nP%2 .SK 1
..
'''\"	SP: SPace 1 or more lines [0:1]
'''\"	.SP [lines]  defaults to 1 if omitted, must be positive
''\"	multiple .SP calls cooperate in producing only maximum requested
''\"	spacing.
''\"	uses ;4 as temp.
''\"	:A expected to be # of accumulate blank lines
''\"	:N = nl at end of last blank output
'\"	when in a diversion, use .d (rather than nl) for position
'\"	-mm diversion => :D set
'\"	tbl diversion => .z is non-null
'\"		careful--SP might occur at the same
'\"		position BUT in a different named diversion
'\"		(hence, the use of the string }D)
'\"	bug: still might be possible, if the same named diversion
'\"	is used, that a .SP might occur in the same vertical place.
'\"	very unlikely for
'\"		a) -mm will zero ;D and ;E whenever :D is cleared
'\"		b) tbl generates unique names
.de SP
.br
.ie \\n(:D .)S \\$1\" -mm diversion
.el .ie !'\\n(.z'' .)S \\$1\" tbl T{...}T diversion
.el \{.rr ;D ;E\"no diversion;remove the SP-in-diversion registers
.	nr ;4 1v
.	if \\n(.$ .nr ;4 \\$1v
.	if !(\\n(nl=\\n(:N) .nr :A 0\" different place for sure
.	nr ;4 -\\n(:Au\" remove previous accumulation, if any
'\"	space and recompute accumulation 
.	if \\n(;4 \{.sp\\n(;4u
.		nr :A +\\n(;4u \}
.	nr :N \\n(nl \}
..
.de )S\"space ala SP but within a diversion
.br
.if !'\\n(.z'\\*(}D' .rr ;D ;E
.nr ;4 1v
.if \\n(.$ .nr ;4 \\$1v
.if !(\\n(.d=\\n(;D) .nr ;E 0\" different place for sure
.nr ;4 -\\n(;Eu\" remove previous accumulation, if any
.if \\n(;4 \{.sp\\n(;4u
.	nr ;E +\\n(;4u \}
.nr ;D \\n(.d
.ds }D \\n(.z
..
''\"	Multi-page tables--carry headings over multiple pages
'\"	tbl-generated macros/registers that must be utilized:
'\"		macros:		T#
'\"		registers:	T. #T
'\"	(code gleaned from -ms and from tbl output)
'\"	macros used:
'\"	.t	diversion containing the top-of-table titles
'\"		and line drawing info
'\"	T#	tbl-defined macro that draws the bottom portion
'\"		of boxed tables
'\"	>u	macro into which footer is hidden while T# works
'\"	registers used:
'\"	;h	flag that header has printed >t
'\"	;f	flag that footer has printed T#
'\"	;I	temp storage for indent value
'\"	;A	flag that .TS H being used
'\"	;B	flag that .TH encountered
'''\"	TS: begin table display [0:1]
'''\"	.TS [H]
'\"	.de TS
'\"	..
.de TS
.if (\\n(:D=0)&(\\n(Ds>0) .SP\"space according to Ds if NOT being diverted 
.if @\\$1@H@ \{.br\"divert tbl-gen'd text up to TH call
.	di >t
.	nr ;A 1 \}
..
'''\"	TH: end .TS H
'''\"	.TH [N]
''\"	[N] causes the table header text to be output now only if it
''\"	 is the first table header on the current page
.de TH\"close off .TS H diversion
.if \\n(.du>0.5v \{.nr T. 0
.	T# 0 \}
.br
.di
.nr ;I \\n(.i
.nr ;B 1
.if \\n(;T .if !@\\$1@N@ .nr ;T 0
.in 0				\" this might trip )h
.mk #a
.mk #b
.mk #c
.mk #d
.mk #e
.mk #f
.if \\n(;T=0 \{\
.	>t			\" output the header
.	nr ;T 1	\}		\" mark header output
.in \\n(;Iu
.mk #T
..
'''\"	TE: end table display [0]
'''\"	.TE
.de TE
.if (\\n(:D=0)&(\\n(Ds>0) .SP\"space according to Ds if NOT being diverted 
.if (\\n(;A>0)&(\\n(;B=0) \{.br
.	di
.	)D "TE: used TS H but no TH" \}
.rr ;A ;B ;h ;D ;E
'\"	remove tbl-generated strings/macros/registers
.rm a+ b+ c+ d+ e+ f+ g+ h+ i+ j+ k+ l+ n+ m+
.rr 32 33 34 35 36 37 38 40 79 80 81 82
.rr a| b| c| d| e| f| g| h| i| j| k| l| m|
.rr a- b- c- d- e- f- g- h- i- j- k- l- m-
..
'\"	INNER UTILITY MACROS
'\"	)A: stack push for list macros; called by .LB
'\"	prepends each parameter to front of stack string
.de )A
.af :a 1
.ds ]a \\n(:a \\*(]a
.ds ]b \\n(:b \\*(]b
.ds ]c \\n(:c \\*(]c
.ds ]d \\n(:d \\*(]d
.ds ]e \\n(:e \\*(]e
.ds ]f \\n(:f \\*(]f
.ds ]h \\*(]g \\*(]h
..
'\"	)B: list status stack pop of 1 level: called by .LC
'\"	expects :g > 0
.de )B
.br
.nr :g -1
.)C nr :a ]a \\*(]a
.)C nr :b ]b \\*(]b
'in \\n(:bu
'ti \\n(:bu
.)C nr :c ]c \\*(]c
.)C nr :d ]d \\*(]d
.)C nr :e ]e \\*(]e
.)C nr :f ]f \\*(]f
.)C ds ]g ]h \\*(]h
.af :a 1
.if \\n(:e .af :a \\*(]g
..
'\"	)C: stack shift operation, called from .)B
'\"	.)C command current-name stack-name stack-args...
.de )C
.\\$1 \\$2 \\$4
.ds \\$3 \\$5 \\$6 \\$7 \\$8 \\$9
..
'\"	)D: print error message and possibly terminate
'\"	.)D "message"
.de )D
'di
.nr :D 0
.fl
.tm ERROR:(\\n(.F)input line \\n(.c:\\$1
.if !\\nD .ab \&
..
'''\"	TB: Table Title Line(s)
'''\"	.TB ["title" ["override" [flag]]]
''\"	issues table title and saves for TOC
''\"	all args same as for .FG
''\"	uses counter Tb.
''\"	SEE ALSO: .FG, .)F.
.de TB
.nr !1 1
.ie .)F TABLE 1 \\n+(Tb "\\$1" "\\n(H1-" 0
.el .)F TABLE 1 \\n+(Tb "\\$1" "\\$2" 0\\$3
..
'''\"	EC:equation caption lines
'''\"	.EC ["title" ["override" [flag]]]
'\"	args like FG or TB
'\"	uses Ec as counter
.de EC
.nr !2 1
.ie .)F Equation 2 \\n+(Ec "\\$1" "\\n(H1-" 0
.el .)F Equation 2 \\n+(Ec "\\$1" "\\$2" 0\\$3
..
'''\"	EX: Exhibit Title Line(s)
'''\"	.EX ["title" ["override" [flag]]]
''\"	args like FG or TB
''\"	uses Ex as counter
.de EX
.nr !3 1
.ie .)F Exhibit 3 \\n+(Ex "\\$1" "\\n(H1-" 0
.el .)F Exhibit 3 \\n+(Ex "\\$1" "\\$2" 0\\$3
..
'''\"	FG: Figure Title Line(s)
'''\"	.FG ["title" ["override" [flag]]]
''\"	issues figure title and saves for TOC
''\"	normally gives: Figure n -  title
''\"	if title omitted, so are preceding - and blanks
''\"	override is string which can modify normal numbering (using Fg)
''\"	and works according to flag:
''\"	flag: omitted or 0 ==> override used as prefix,
''\"	= 1 ==> suffix, = 2 ==> replaces Fg
''\"	!0 flag that there are figs since Fg may be reset to 0 by .H 1
''\"	SEE ALSO: .TB, .)F
.de FG
.nr !0 1
.ie .)F Figure 0 \\n+(Fg "\\$1" "\\n(H1-" 0
.el .)F Figure 0 \\n+(Fg "\\$1" "\\$2" 0\\$3
..
'\"	)F: Figure/Table/Equation line inner macro (for .FG, .TB, .EC)
'\"	.)F name type counter "title" "override" flag
'\"	name = Figure or Table or Equation
'\"	type = 0 (Figure) or 1 (Table)  or 2 (equation) for TOC saving
'\"	counter = already-incremented value of counter (Fg or Tb or Ec)
'\"	"title", "override", and flag as in FG/TB
'\"	flag = 0/null ==> prefix for override, 1 ==> suffix, 2 ==> replacement
'\"	uses temps: regs ;0 & ;1, string }0.
'\"	NOTE: needs more work (for TOC); also maybe option for spacing &
'\"	always indenting rather than current centering/indent choice.
.de )F
.nr ;0 \w@\\$5@
.nr ;1 0
.nr ;1 0\\$6
.ds }0 \\$3
.if \\n(;0 .ds }0 \\$5\\$3
.if \\n(;1*\\n(;0 .ds }0 \\$3\\$5
.if \\n(;1-1*\\n(;0 .ds }0 \\$5
.ds }0 \\$1\ \\*(}0
.ie (\w@\\$4@)&(\\n(Of=0) .as }0 .\ \ \" if actual title, add some space
.el .if \\n(Of .as }0 " -\ \"use dash rather than period for OSDD
'\"	}0 is now entire string before title: name number [ - ]
.nr ;0 \w@\\*(}0@
.ll \\nWu
.nr ;1 \\n(.lu-\\n(;0u-\w@\\$4@u+1u
'\"	;1 <= 0 ==> cannot center title, > 0 ==> can do so.
'\"	don't mess if display already centered (:B=2)
.if (\\n(:B<2)&(\\n(;1>0) \{\
.	in 0  \" center with respect to left margin
.	ce  \}
.if !\\n(;1 \{\
.if !\\n(.u .nr ;U 1  \" set flag that no-fill on
.	if \\n(:B=2 .ce 0
.	fi
.	in \\n(;0u
.	ti-\\n(;0u \}
\f3\\*(}0\fP\\$4
.ll
.in
.if \\n(:B=2 .ce 9999
.if \\n(;U \{\
.	nf
.	nr ;U 0 \}
'\"	code here to save for TOC, using }0, \\$2, \\$4
.if (\\n(Lf=1&(\\$2=0)):(\\n(Lt=1&(\\$2=1)):\
(\\n(Le=1&(\\$2=2)):(\\n(Lx=1&(\\$2=3)) \{\
.	ds }3
.	if \\n(:S .ds }3 \\n(H1
.ie \\n(:y=1 \{\
\!.am >L\" if display make page# transparent
\!.if \\$2=\\\\\\\\$1 .)T 1 1 "\\*(}0" "\\$4" \\\\nP \\*(}3
\!\\\\..
'br \}
.el \{\
.	am >L
.	if \\$2=\\\\$1 .)T 1 1 "\\*(}0" "\\$4" \\nP \\*(}3
\\.. \} \}
..
'\"	)I: index into list of items
'\"	.)I index item1 ... item8
'\"	sets }3 to value of item(index); items cannot contain normal blanks
'\"	if less items than index, }3 is set to null
.de )I
.nr ;9 0\\$1+1
.ds }3 \\$\\n(;9
.rr ;9
..
'\"	)E: accumulate 1 entry for TOC
'\"	.)E rlevel "heading"
'\"	expects:
'\"	;1 = dlevel = [1:7], = rlevel except when rlevel = 0
'\"	}0 = string of digits/letters, followed by 2 blanks (normally)
'\"	uses as temps: }3
'\"	SEE ALSO: .H, .TC
.de )E
.ds }3
.if \\n(:S .ds }3 \\n(H1
.am >C
.)T \\n(;1 \\$1 "\\*(}0" "\\$2" \\nP \\*(}3
\\..
..
'\"	)T: version 1: obtain maximum sizes for various section counters
'\"	.)T dlevel rlevel mark "heading" page [section]
'\"	(called from within .>C, set up by .)E )
'\"	sets H1 -- H7 to maximum widths of marks at that level
'\"	sets :a to max width of page number (incl. section)
'\"	TEMPS: ;0, }3
.de )T
.nr ;0 \w@\\$5@
.if \w@\\$6@ .nr ;0 +\w'-'u+\w@\\$6@u
.if \\n(;0-\\n(:a .nr :a \\n(;0
.)I \\$1 \\n(H1 \\n(H2 \\n(H3 \\n(H4 \\n(H5 \\n(H6 \\n(H7
.if \w@\\$3@-\\*(}3 .nr H\\$1 \w@\\$3@
..
'\"	)U: (actually version 2 of )T) expand 1 TOC entry
'\"	.)U dlevel rlevel mark "heading" page [section]
'\"	dlevel = [1:7]
'\"	rlevel = [0:7], 0 ==> .HU, ignore mark
'\"	mark = string of digits/letters, followed by 2 blanks (normally)
'\"	"heading" is always present (no entries for title-less sections)
'\"	page is page number, may be restarted at 1 in some cases
'\"	section is present if :S > 0
'\"	expects:
'\"	:a = max size of page, or size of section-page (not counting -)
'\"	:b,:c,:d,:f set to args 1-4 (or defaults) of .TC
'\"	}0, }1, and }2 set as described in .TC
.de )U
.if !0\\$1-\\n(:b .sp\\n(:cu*.5v
.)I \\$1 \\*(}0
.nr ;0 \\*(}3
.)I \\$1 \\*(Ci
.nr ;1 \\*(}3
.)I \\$1 \\*(}2
.nr ;2 \\*(}3
'\"	;0 = width of mark
'\"	;1 = offset to begin of mark
'\"	;2 = offset to text
.ds }3 \\$5
.if \\n(.$-5 .ds }3 \%\\$6\(hy\\$5
.nr :e \\n(:au-\w@\\*(}3@u+2n
.ds }3 \h@\\n(:eu@\\*(}3
'\"	}3 is complete [section-]page string
.ds }y
.nr ;0 -\w@\\$3@
.if \\n(;0 .as }y \h@\\n(;0u@
.if 2-0\\$1 .as }y "\\$3
.if 0\\$1-1 .ds }y "\\$3\\*(}y
.if !0\\$2 .ds }y
'\"	}y = mark string, with blanks (if necessary) prepended for level 1
'\"	is null for .HU heading
.ll \\nWu-\\n(:au-3n
.in \\n(;2u
.if !0\\$2 .in\\n(;1u
.ti \\n(;1u
.fi
.di >A
\!.cs 3 48\"for diversion layout
'''\"	\\\\f NEEDED to get bold leaders when laying out diversion
.if !0\\$1-\\n(:d .if !\\n(:f \\*(}y\\$4\\\\f3\\a\\\\fP\\*(}3
.if !0\\$1-\\n(:d .if \\n(:f \\*(}y\\$4\\t\\*(}3
.if 0\\$1-\\n(:d \\*(}y\\$4\\*(}3
.br\"force out partial line while diverting
\!.br\"force out partial line when laying out diversion
\!.cs 3
.di
.br
.ll \\nWu
.ne \\n(dnu+.5p-1v
.ta \\nWu-\\n(:au-2n
.nf
.in0
.na
.>A
..
'\"	)Z: set-up for list output
'\"	.)Z "list heading" type
'\"	"list heading" is the title of the particular
'\"	list (i.e., figure, exhibit, table, or equation)
'\"	type = [0:3], 0 ==> figure, 1 ==> table,
'\"	2 ==> equation, 3 ==> exhibit
.de )Z
.in 0
.ie !\\n(Cp \{\
.	SK
.	rs
.	sp 3v
.	ce 1 \}
.el .sp 2v
\\$1
.sp 1v
.nr :a 0
.nr H1 0
.af H1 1
.>L \\$2
.rn )T )V
.rn )U )T
.ds }0 \\n(H1
.ds Ci 0
.ds }2 \\n(H1
.>L \\$2
.rn )T )U
.rn )V )T
..
'''\"	TC: Generate Table of Contents
'''\"	.TC [slevel] [spacing] [tlevel] [tab] [head1 ... head5]
''\"	slevel gives max level number to have spacing between
''\"	spacing is number of spaces.
''\"	tlevel is max level which tabs over to right margin for page
''\"	tab = 0 (default) ==> leaders, >0 ==> tabs
.de TC
.LC 0\"clean out lists
.if \\n(:F .FE\"close dangling footnote
.if \\n(:y .DE \" end dangling DS
.if \\n(!N .NE \" end up dangling notation
.)N	\" flush stored NS/NE
.)w\" flush floating keeps
.if \\n(;R .RP 0 1
.)R
'\"	may need more, like messing with headers
.rm )E )F DE DF DS FD FE FG FS H HU TB
'\"	clear out top titles
.if !\\nP-1 .if \\nN .if !\\nN-1 .rn }t }b\"only if N = 1
.if !\\nP-1 .if \\nN .if !\\nN-1 .nr N 0 
.rm }t }e }o
.rs
.if \\n(;C .nr ;C 2		\" force back to the first column
.bp
.ie \\n(Oc .nr P 1 \" use page 1 for osdd contents
.el \{\
.	rm }f }p
.	nr ;g 1 1
.	af ;g i
.	ds }b ''- \\\\n(;g -''
.	am )b
.	nr ;g +1
\\..
'\"	3 lines above set up for roman page numbering, using ;g as counter
'	br \}
.nr N 0
.rs
.if !\\n(.$-4 .TX\"user exit if no more than 4 args
.if \\n(;C .ll \\n(:Lu		\" temp in wide mode
'''\"	TY is defined to put out CONTENTS--user may redefine
.if !\\n(.$-4 .TY\"user exit (without CONTENTS) if no more than 4 args
.ce99
.if \\n(.$-4 \\$5
.if \\n(.$-5 \\$6
.if \\n(.$-6 \\$7
.if \\n(.$-7 \\$8
.if \\n(.$-8 \\$9
.if \\n(.$-4 .sp
.ce 0
.sp
.if \\n(;C .ll \\n(:lu		\" go back to narrow mode
.nr ;m \\n(.hu+2v		\" return marker for 2C
.nr :b 1
.if \w@\\$1@ .nr :b 0\\$1
.nr :c 1
.if \w@\\$2@ .nr :c 0\\$2
.nr :d 2
.if \w@\\$3@ .nr :d 0\\$3
.nr :f 0
.if \w@\\$4@ .nr :f 0\\$4
'\"	:b = level for spacing, :c = number of spaces.
'\"	:d = max level to tab to right margin
'\"	:f = tab flag (0 ==> leader, 1 ==> tab)
'\"	set up to find max sizes of things
.nr H1 0
.af H1 1
.nr H2 0
.af H2 1
.nr H3 0
.af H3 1
.nr H4 0
.af H4 1
.nr H5 0
.af H5 1
.nr H6 0
.af H6 1
.nr H7 0
.af H7 1
.nr :a 0
'\"	H1 -H7 will have max widths; :a max width of [section] page
.>C
.rn )T )V
.rn )U )T
'\"	set up }0, }1, and }2 as useful arrays:
'\"	}0 = sizes of individual marks
'\"	}1 = offsets to beginning of marks
'\"	}2 = offsets to text parts
.ds }0 \\n(H1 \\n(H2 \\n(H3 \\n(H4 \\n(H5 \\n(H6 \\n(H7
.nr H2 +\\n(H1
.nr H3 +\\n(H2
.nr H4 +\\n(H3
.nr H5 +\\n(H4
.nr H6 +\\n(H5
.nr H7 +\\n(H6
.if !\w'\\*(Ci' .ds Ci 0 \\n(H1 \\n(H2 \\n(H3 \\n(H4 \\n(H5 \\n(H6
.ds }2 \\n(H1 \\n(H2 \\n(H3 \\n(H4 \\n(H5 \\n(H6 \\n(H7
'\"	more set up here for lists
.>C
.rm >C HX
.rn )T )U
.rn )V )T
.if (\\n(Lf=1)&(\\n(!0>0) .)Z "\\*(Lf" 0
.if (\\n(Lt=1)&(\\n(!1>0) .)Z "\\*(Lt" 1
.if (\\n(Lx=1)&(\\n(!3>0) .)Z "\\*(Lx" 3
.if (\\n(Le=1)&(\\n(!2>0) .)Z "\\*(Le" 2
.)R
..
'''\"	TY may be redefined by user to suppress CONTENTS
.de TY
.ce
CONTENTS
..
'''\"	Subject/Date/From and Signature
'\"	NB: certain portions of this are needed only____
'\"	at the beginning of the document.  
'\"	Therefore, certain macros/strings/registers are
'\"	used here and subsequently reused by other functions.
'\"	Reused names are so noted.
'\"	list of signatures are diverted and held until .SG macro
'\"	>v text of signature list
'\"	:V size of signature list
'\"	;x size/flag for TM number	REUSED
'\"	;y flag indicating title diversion	REUSED
'\"	>z text of FROM diversion	REUSED
'\"	;z size of FROM diversion	REUSED
'\"	}z diverted text of title	REUSED
'\"	>8 holder for TM number 	REUSED
'\"	:9 size of diverted title text	REUSED
'\"	:1 temp loc'n of prevailing indent	REUSED
'\"	:2 mark location	REUSED
'\"	:3 indent for Abstract REUSED
'\"	;2 flag to suppress Bell Laboratories, etc. 
'\"	}2 Bell Laboratories or other company name. 
'''\"	TL: title of memo [0:2]
'''\"	.TL [ [case] [file case] ]
'''\"	{text of title}
''\"	gather in charging case(s), filing case(s),
''\"	and lines of the title for the top of a memo page
.de TL
.nr :D 2 \"s/d/f flag & flag for other diversions
.nr ;c 2 \" set flag for FE
.nr ;z 0 \" zero size of author info diversion
.nr :V 0 \" zero size of signature diversion
.nr :1 \\n(.i \" save prevailing indent
.if \\nC=4 .ls 1 \" single space DRAFT for memo header
.ds >1 \\$1
.ds >2 \\$2
'nr ;y 1
.eo		\" remove the escape character until AU
'de >T AU
..
'''\"	AU: author info [6:9]
'''\"	.AU name initials [loc] [dept] [ext] [room] [[arg] ...]
'\"	optional args will appear, one line per each, following FROM
'\"	first arg (name) and second arg (initials) will be utilized in .SG
.de AU
.ec		\" restore the escape character
.nr :D 1 \"s/d/f flag
.nr ;c 1 \" set flag for FE
.if !\\n(;y 'nf
.if \\n(;y .>9 \" process TL text
.rm TL\" free up space
.ll \\nWu
'\"	build next author info for memo style
.da >z
'if \\nE 'ft 3
.if (\\n(;z>0)&(\\n(Au>0) .sp \" space if not first author
\\$1
.if \\n(Au>0 \{.if \w@\\$3@ .ie @\\$3@HP@ HP\ \&\c
.		el \\$3\ \&\c
.	if \w@\\$4@ \\$4
.	if \w@\\$3@ .if !\w@\\$4@ \&
.	if \w@\\$6@ \\$6\ \&\c
.	if \w@\\$5@ x\\$5
.	if \w@\\$6@ .if !\w@\\$5@ \&
'	br  \}
.if \\n(.$-6 \\$7
.if \\n(.$-7 \\$8
.if \\n(.$-8 \\$9
.br
'if \\nE 'ft1
.di
.nr ;z +\\n(dn
.nr dn 0
'\"	info for TM cover sheet
.am >A
.ie \\nE \{\
\f3\\$1\\\\t\\$3\ \\$6\\\\t\\$5\fP\" >A, inside MT into >S, then CS
'br \}
.el \{\
\\$1\\\\t\\$3\ \\$6\\\\t\\$5\" >A, inside MT into >S, then CS
'br \}
\\..
'\"	build signature & reference portion
'in \\n(:1u
.if !\\n(:V .ds }v \\$3-\\$4-\\$2
.if \\n(:V .as }v /\\$2
.da >v
'if \\nE 'ft 3
.sp 3
\\$1
.br
'if \\nE 'ft1
.di
.nr :V +\\n(dnu
.nr dn 0
'\"	released paper author info
.nr :H 0
.ds }L \\$3\" get location string
.if '\\$3'HOH' .ds }L HO\"change to 2-char name for HOH
.if '\\$3'HOH' .nr :H 1
.if '\\$3'HP' .ds }L }A\"used for HP location
.if '\\$3'AL' .ds }L }B\"used for AL location
.if '\\$3'ALF' .ds }L }B\"used for ALF location
.if '\\$3'RD' .ds }L }E\"used for RD location
.if '\\$3'INH' .ds }L }I\"used for INH location
.if '\\$3'FJ' .ds }L HO\"used for FJ location
.if '\\$3'IW' .ds }L IH\"used for IW location
.am >4
.ps +1
.ft2
\\$1
.br
.ps
.ft1
.if \\\\n(:2 .sp .5v
.if \\\\n(:2 \\*(}2
.if \\\\n(:2 .if \\n(:H \\\\*(}H
.if \\\\n(:2 \\\\*(\\*(}L
.if \\\\n(:2 .sp .5v
.ds }z \\\\*(\\*(}L
\\..
..
'\"	.>9
'\"	terminate .TL diversion and add case numbers if necessary
'\"	REUSED
.de >9
.di }z
'll \\nWu-34n
'nh
'na
'fi
'if \\nE 'ft 3
.>T
'\"	if both charge and file case were given
.if (\w'\\*(>1')&(\w'\\*(>2') \{\
.	ie '\\*(>1'\\*(>2' \{\
.		br
Charge and Filing Case \\*(>1
.		br \}
.	el \{\
.		br
Charge Case \\*(>1
.		br
File Case \\*(>2
.		br \} \}
.if (\w'\\*(>1'=0):(\w'\\*(>2'=0) \{\
.	ie \w'\\*(>1' \{\
- Case\ \\*(>1
.			br \}
.	el .ie \w'\\*(>2' \{\
- Case\ \\*(>2
.			br \}
.		el .br \}
.ll \\nWu
.di
.if \\nE .ft1
.nr :9 \\n(dn \" size of diverted title info
.nr dn 0
.nr ;y 0
'nf \" process rest of heading info in no-fill
.rm >9
..
'''\"	AT: author title [0:9]
'''\"	.AT "line1" [line2-9]
''\"	author title lines appear after signer's name
.de AT
.da >v
'if \\nE 'ft 3
.if \\n(.$-0 \\$1
.if \\n(.$-1 \\$2
.if \\n(.$-2 \\$3
.if \\n(.$-3 \\$4
.if \\n(.$-4 \\$5
.if \\n(.$-5 \\$6
.if \\n(.$-6 \\$7
.if \\n(.$-7 \\$8
.if \\n(.$-8 \\$9
.br
'if \\nE 'ft
.di
.nr :V +\\n(dnu
.nr dn 0
..
'''\"	OK: provide other keywords [1:9]
'''\"	.OK kw1 kw2 ... kw9
.de OK
.nr :D 1 \"s/d/f flag
.nr ;c 1  \" set FE flag
.de >7
.ps -1
.if \\n(.$-0 \\$1
.if \\n(.$-1 \\$2
.if \\n(.$-2 \\$3
.if \\n(.$-3 \\$4
.if \\n(.$-4 \\$5
.if \\n(.$-5 \\$6
.if \\n(.$-6 \\$7
.if \\n(.$-7 \\$8
.if \\n(.$-8 \\$9
.ps
\\..
.rm OK
..
'''\"	TM: get TM numbers [1:9]
'''\"	.TM number
.de TM
.nr :D 1 \"s/d/f flag
.nr ;c 1 \" set FE flag
.de >8
.if \\nE .ft 3
.if \\n(.$-0 \\$1
.if \\n(.$-1 \\$2
.if \\n(.$-2 \\$3
.if \\n(.$-3 \\$4
.if \\n(.$-4 \\$5
.if \\n(.$-5 \\$6
.if \\n(.$-6 \\$7
.if \\n(.$-7 \\$8
.if \\n(.$-8 \\$9
.if \\nE .ft1
\\..
.nr ;x \\n(.$+1 \" size of TM line(s) plus a space
.rm TM
..
'''\"	AS: abstract start [0:2]
'''\"	.AS [flag] [indent]
'\"	begin abstract indicating dump now & later (0 or null)
'\"	or dump later only (1)
'\"	indent and .ll shrink 2nd arg; deflt 5
'\"	>3 stored abstract text
'\"	:t flag
'\"	;3 size of >3
'\"	:3 register containing indent amount (passed to MT)
'\"	:t ;1 :3 REUSED
.de AS
.nr :D 3 \"s/d/f flag & flag for other diversions
.nr ;c 3 \" set FE flag
.rm TL\"free up space
.nr :t 0\\$1 \" set flag for type of abstract
.if \\n(:t=1 .nr ;s \\n(:s \" save value of footnote flag - AS/AE footnotes don't go in
.nr :3 0	\" no indent by default
.if \\n(.$-1 .nr :3 0\\$2n \" get optional indent
.nr ;N \\n(:1  \" save indent for copy-to list
'in \\n(:1u
'fi
.SA
'nh
'if \\n(Hy 'hy 14
.di >3
.ll 0u-2u*\\n(:3u+\\nWu\" really mean \\nW-(2*\\n(:3)
.ce
.ul
ABSTRACT
.SP 1.5
.ns
.nr :I 1\"indent any following .P's
.rm AS
..
'''\"	AE: abstract end [0]
'''\"	.AE
.de AE
.br
.di
'nf
'nh
.nr ;3 \\n(dn
.nr ;6 \\n(;3 \"save unperturbed copy for .NE
.ll \\nWu
'in \\n(:1u
.if \\n(:t=1 .nr :s \\n(;s \" restore value of :s
.rm AE
..
'''\"	MT: specify type of memo [0:2]
'''\"	.MT [type] [1]   or  .MT [type] [addressee name]
''\"	indicate type of memo; if no arg, get Memo for File
'\"	dump subj, date, from info as well
'\"	expects ;2 and }2 to be set appropriately (by default or .AF)
'\"	second arg (except for MT=4) is addressee's name
.de MT
.nr :D 0 \"clear s/d/f flag
.nr ;c 0  \" clear FE flag
.if !\\n(;y 'nf
.rm TL TM OK AS AE AF AU
.ll \\nWu
.rn TP >Y \" move TP so not there for )h
.in \\n(:1u\" causes )h to be tripped
.rn >Y TP
.rn )K >Y\"disguise )K in case of long abstract
'\"	call >6 for memo style
'\"	call >5 for released paper style
'\"	both of these disappear after either is used!
'\"	note that they use :2
'\"	second arg (except MT=4) adds addressee name to page header
'\"	must check width of $1 because .if !0\\$1=4 doesn't work for string
.ie \w@\\$1@u<2n .if !0\\$1=4 .if \\n(.$=2 .ds ]n \\$2
.el .if \\n(.$=2 .ds ]n \\$2
.if !\\n(.$ .>6
.if \\n(.$ .if \w@\\$1@u-\w'0'u .>6 "\\$1"
.if \\n(.$ .nr ;y 0\\$1
.if \\n(.$ .if !\\n(;y .>6 ""
.if \\n(.$ .if \\n(;y-4 .>x 
.if \\n(.$ .if \\n(;y-3 .>5 "\\$2"
.if \\n(.$ .if \\n(;y-2 .>6 "ENGINEER'S NOTES"
.if \\n(.$ .if \\n(;y-1 .>6 "PROGRAMMER'S NOTES"
.if \\n(.$ .if \\n(;y .>6 "MEMORANDUM FOR FILE"
.)R
.ft1\"to default font
.ft1\" so that previous is right, too
.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i
.ns
.if \\nC=4 .ls 2 \" double space for DRAFT
.>Y\" kill macros/strings; zero registers
.rm >Y MT
..
'\"	)x: print external letter
.de >x
.rm >6 >5 )Y )X
.ta \\nWu-1.4i
.br
.rs
.sp 1
.if \\n(Pv \{\
.	ce
PRIVATE\h'-\w'PRIVATE'u'\l'\w'PRIVATE'u'
.		sp \}
.sp |4v
.}z
.br
.rs
.mk :2
.sp |12v
.in \\nWu-1.4i
.ti+6
.ie \\nE \{\
\f3\\*(DT\fP
'br \}
.el \{\
\\*(DT
'br \}
.if \\n(:2u-\\n(nlu .sp |\\n(:2u
.sp 2v
.rm >x
..
'\"	>6: dump out memorandum style
.de >6 
.rm >5 >x )Y
.di ]t  \" heading will be saved in ]t
.ta \\nWu-1.75i 
.br 
.rs 
.sp 1
.if \\n(Pv \{\
.	ce
PRIVATE\h'-\w'PRIVATE'u'\l'\w'PRIVATE'u'
.		sp \}
.sp |1.1i-1v
\t\s36\(bs\s0
.vs .3i
.if \w@\\*(}2@ \t\s16\f3\\*(}2\fP\s0
.vs 12p
.sp |1.9i
.mk :2
\!.po -\w'\s8subject:\s0'u+1n
\s8subject:\s0
.rt -1
\!.po
.}z
.br
.rt \\n(:2u
.in \\nWu-1.4i
.ps 8
.ti -6n
date:
.ps
.rt -1
.ie \\nE \{\
\f3\\*(DT\fP
'br \}
.el \{\
\\*(DT
'br \}
.sp
.ps 8
.ti -6n
from:
.ps
.rt -1
.if \\nE .ft 3
.>z
.if \\nE .ft
.in \\n(:1u
.if \\n(;x \{.sp
.	in \\nWu-1.4i
.	if \\nE .ft 3
TM 
.	rt -1
'	in +\w'TM 'u
'	if \\nE 'ft
.	>8
.	in \\n(:1u \}
.br
.if \\n(:9u-\\n(;zu-2v-\\n(;xv .sp \\n(:9u-\\n(;zu-2v-\\n(;xv
.sp 3
.di
.rs
'''\"	produce abstract page conditionally, depending
'''\"	upon the existence of a abstract and whether
'''\"	or not ".AS 1" was specified.
'''\"	".AS" or ".AS 0" puts abstract on page 1 and saves for CS
'''\"	".AS 2" makes memo-style cover sheet with abstract
.ie \\n(;3 \{\
.	ie \\n(:t=2 \{\
.		af !S \\gP \" save format of P register
.		af P i
.		]t  \"put out heading
.		in +\\n(:3u
.		>3  \"put out abstract 
.		sp 3
.		)N  \"put out copy to
.		in -\\n(:3u
.		wh 0 )k  \"disable page-top trap except for cutmarks
.		bp
.		nr P 1  \"necessary for tbl of cntnts
.		af P \\g(!S \" restore format of P register
.		]t  \"put out heading
.		wh 0 )h  \"re-enable page top trap
.		if \\n(:G \{\
.			nr :s +1  \"put ftnt from cs -- increment cntr
.			da >y
.			>d
\!.			br
.			di
'			nr dn +4v+.5p	\" leave space for 2 blank lines and rule
'			nr :o +\\n(dnu
'			nr :O +\\n(dnu
.			nr dn 0
'\"			Move up footer trap, but not above current position on page,
'			if !\\n(.pu-\\n(nlu-.5p-\\n(:ou 'nr :o \\n(.pu-\\n(nlu-.5p
'\"			or below :m!
'			if !\\n(:ou-\\n(:mu 'nr :o \\n(:mu
'			ch )f -\\n(:ou \" move footer trap
'			br \}
.		rm CS \}  \"can't have both kinds of cover sheet
.	el .ie \\n(:t=1 .]t  \" just put out heading (no abstract)
.		el \{\
.			]t  \" put out heading
.			in +\\n(:3u
.			>3  \" put out abstract
.			sp 3
.			in -\\n(:3u \} \}
.el .]t  \"no abstract just put out heading
.ns
.ne 10
.ce
.ul
.if !\\n(.$ MEMORANDUM FOR FILE
.if \\n(.$ .if \w@\\$1@ \\$1
.SP 3 \" no effect if $1 is null (due to .ns above)
.ce 0
.ul 0
.if !\\n(:t=2 .)X\"build memo style cover sheet
.nr ;M 1 \"indicate to .NS that .MT has been called
.rm )X >6
..
'\"	>5: dump released paper style
.de >5
.rm >6 >x )X
.br
.rs
.sp 1
.ie \\n(Pv \{\
.	ce
PRIVATE\h'-\w'PRIVATE'u'\l'\w'PRIVATE'u'
.		sp 4\}
.el 'sp 5
.in 0
.ds }H "Crawford Hill Laboratory
.ds }A "South Plainfield, New Jersey 07080\"
.ds PY "Piscataway, New Jersey 08854\"
.ds MH "Murray Hill, New Jersey 07974\"
.ds WH "Whippany, New Jersey 07981\"
.ds HO "Holmdel, New Jersey 07733\"
.ds RR "Piscataway, New Jersey 08854\"
.ds }B Allentown, Pennsylvania 18103\"
.ds AK Norcross, Georgia 30071\"
.ds CP Piscataway, New Jersey 08854\"
.ds CH Chester, New Jersey 07930\"
.ds CB Columbus, Ohio 43213\"
.ds DR Denver, Colorado 80234\"
.ds IN Indianapolis, Indiana 46206\"
.ds }I Indianapolis, Indiana 46250\"
.ds IH Naperville, Illinois 60566\"
.ds MV North Andover, Maine 01845\"
.ds }E Reading, Pennsylvania 19604\"
.ds WB "West Long Branch, New Jersey 07764\"
.ds WV Warren, New Jersey 07060\"
.ds HL Short Hills, New Jersey 07078\"
.ll \\nWu
.fi
.na
.nh
.di >6
.ps +2
.vs \\n(.sp+4p
.if \\nE .ft3
.nr ;X 1
.>T
.nr ;X 0
.ps
.vs \\n(.sp+2p
.if \\nE .ft1
.br
.di
.nf
.ce 1000
.>6
.nr :2 0
.if \w@\\$1@ .nr :2 1
.ul 0
.sp .5v
.>4
.br\"required!!
.if !\\n(:2 .sp.5v
.if !\\n(:2 \\*(}2
.if !\\n(:2 .if \\n(:H \\*(}H
.if !\\n(:2 \\*(}z
.ce 0
.sp 
'\"	if abstract (;3 non zero), output according to flag :t
.if \\n(;3 .if !\\n(:t .in +\\n(:3u
.if \\n(;3 .if !\\n(:t .>3
.if \\n(;3 .if !\\n(:t .in -\\n(:3u
.if \\n(;3 .if !\\n(:t .sp 
.ns
.br\"needed so that RP maintains fill mode via )R in MT (bug??)
.)Y\"build RP style cover sheet
.rm )Y >6 PY MH WH HO RR }H WB }A }B }E HL }I
.rm AK CP CH CB DR IN IH MV WV SG )N )M
.de NS
.br
.di
.di >Y
\\..
.de NE
.br
.di
\\..
.rm >5
..
'\"	)K: kill S/D/F stuff
'\"	throw away unneeded macros/strings
'\"	zero unneeded registers
.de )K
.if \\n(:D .ie !\\n(:t=2 .)D "check TL, AU, AS, AE, MT sequence"
.		el .)D "check TL, AU, AS, AE, NS, NE, MT sequence"
.rm )X )Y >T >x >z >1 >2 >3 >4 >5 >6 >7 >8 >9 }2 }z
.rr ;x ;y ;z :D :1 :2 :3 :9 ;0 ;1 ;2 ;3 
.rm TL AU TM AF AS AE OK
.rm )K
..
'\"	)X: build part of memo style cover sheet
'\"	some things currently known; other things must
'\"	be computed when >S called (in CS)
.de )X
.di >S
\!.nr O 216u\"get back default page offset
\!.po 216u
\!.nr W 6.5i\"get back default line length
\!.ll 6.5i
\!.lt 6.5i
\!.ll +.45i
\!.lt +.45i
\!.sp 3
\!.tl '\s24\(bs\s0\s14\f3  Bell Laboratories\s0\fP''\s16Cover Sheet for Technical Memorandum\s0'
\!.if !\n(.A \l@\\\\n(.lu@
\!.if \n(.A __________
\!.br
\!.fi
\!.ad
\!.ss 10
\!.ps 9
\!.ft 2
\!The information contained herein is for the use of
\!employees of Bell Laboratories
\!and is not for publication
\!(see GEI 13.9-3)\\\\p
\!.ps
\!.ft
\!.nf
\!.SA\"back to user-selected adjustment
\!.ss 12
\!.sp -.6v
\!.if !\n(.A \l@\\\\n(.lu@
\!.if \n(.A __________
\!.ll
\!.lt
\!.nf
\!.sp 2
\!.mk ;2
\s9Title:\s0
\!.rt -1
.ll \\nWu-34n
.nh
.na
.fi
\!.in \w'\s9Title:\s0'u+1n
.if \\nE .ft3
.nr ;X 1
.>T
.nr ;X 0
.if \\nE .ft1
.rm >T
.ll
.hy
.ad
.nf
\!.in0
\!.sp
\s9Other\ Keywords:\s0
\!.rt -1
\!.in \w'\s9Other Keywords:\s0'u+1n
.if \\nE .ft 3
.>7
.rm >7
.if \\nE .ft
\!.br
\!.mk ;0
\!.rt \\\\n(;2u
\!.in \\\\nWu-1.4i
\!.ti -6n
\s9Date:\s0
\!.rt -1
.ie \\nE \{\
\f3\\*(DT\fP
'br \}
.el \{\
\\*(DT
'br \}
\!.sp
\!.in \\\\nWu-1.4i
\!.ti -6n
\s9TM:\s0
\!.rt -1
.>8
\!.in 0
\!.br
\!.if \\\\n(;0u-\\\\n(nlu .sp \\\\n(;0u-\\\\n(nlu
\!.sp 2
\!.ta 2.5i 3.7i
\!.mk ;0
\!.ul
\s9Author(s)\\tLocation\\tExtension\s0
.>A
.rm >A
\!.mk ;1
\!.rt \\\\n(;0u
.br
.di
''\"	go through TERRIBLE convolutions to get the case numbers
''\"	in >1 and >2 into vertically stacked lists w/o commas
''\"	biggest problem was that in contructing a macro call line
''\"	within a diversion, a blank didn't stay as a blank
.nf
.de >7
.di >A
.tr ,+
.tr |.
.ie \\nE \{\
|ds\ >8\ \f3\\\\$1+\\\\$2+\\\\$3+\\\\$4+\\\\$5+\\\\$6+\\\\$7+\\\\$8+\\\\$9\fP
'br \}
.el \{\
|ds\ >8\ \\\\$1+\\\\$2+\\\\$3+\\\\$4+\\\\$5+\\\\$6+\\\\$7+\\\\$8+\\\\$9
'br \}
.br
\!.br
.tr ,,++||
.di
\\..
.>7 \\*(>1
.>A
.rn >8 >1
.>7 \\*(>2
.>A
.rn >8 >2
.di >7
.tr |.
.tr +
|>A\ \\*(>1
|rn\ >T\ >1
|>A\ \\*(>2
|rn\ >T\ >2
.br
.tr ||++
.di
.de >A
.de >T
.if \\\\n(.$ \\\\$1
.if \\\\n(.$-1 \\\\$2
.if \\\\n(.$-2 \\\\$3
.if \\\\n(.$-3 \\\\$4
.if \\\\n(.$-4 \\\\$5
.if \\\\n(.$-5 \\\\$6
.if \\\\n(.$-6 \\\\$7
.if \\\\n(.$-7 \\\\$8
.if \\\\n(.$-8 \\\\$9
\\\\..
\\..
.>7
.rm >A >7 >T
.da >S
\!.in \\\\nWu-13n
\!.ti \\\\nWu-1.4i-6n
\!.mk ;0
\s9Charging\\\\ Case:\s0
.br
\!.br
\!.rt -1
\!.if \\nE .ft 3
.>1
\!.if \\nE .ft
.rm>1
.br
\!.br
\!.if \\\\n(nl=\\\\n(;0 .sp1v\"since >1 must have been empty
\!.ti \\\\nWu-1.4i-6n
\s9Filing\\\\ Case:\s0
.br
\!.br
\!.rt -1
\!.if \\nE .ft 3
.>2
\!.if \\nE .ft
.rm>2
.br
\!.br
\!.if \\\\n(;1u-\\\\n(nlu .sp \\\\n(;1u-\\\\n(nlu
\!.sp 3
\!.in 0
\!.ll \\\\nWu
\!.in +\\n(:3u
\!.po +(6.95i-\\\\n(!Wu)/2u
.>3
\!.in -\\n(:3u
\!.po
\!.nr ;0 0\" TM style cover sheet
.br
.di
'\"	Now put the footnotes, if any, on the cover sheet
.di >b
.nf
.na
.>c
.br
.di
.rm >b
.if \\n(dn \{\
.nr ;c \\n(.pu-\\n(dnu-8v
.da >S
\!.ie \\n(;cu-\\\\n(nlu .sp \\n(;cu-\\\\n(nlu
\!.el .sp .5v
.nr ;c 0
\l'60p'
.>c
.di
.br \}
..
'\"	)Y: build part of cover sheet for released paper
'\"	some things currently known; other things must
'\"	be computed when >S called (in CS)
.de )Y
.di >S
\!.sp 5
\!.in 0
\!.ce 1000
\!.ul 1000
.>6
\!.ul 0
\!.sp .5v
.>4
\!.br\"required!!
\!.if \\n(:2=0 .sp.5v
\!.if \\n(:2=0 \\*(}2
\!.if \\n(:2=0 .if \\n(:H \\*(}H
\!.if \\n(:2=0 \\*(}z
\!.ce 0
\!.sp 
\!.in 0
\!.in +\\n(:3u
.>3
\!.in -\\n(:3u
\!.nr ;0 1\"release paper cover sheet
.di
'\"	Now put the footnotes, if any, on the cover sheet
.di >b
.nf
.na
.>c
.br
.di
.rm >b
.if \\n(dn \{\
.nr ;c \\n(.pu-\\n(dnu-8v
.da >S
\!.ie \\n(;cu-\\\\n(nlu .sp \\n(;cu-\\\\n(nlu
\!.el .sp .5v
.nr ;c 0
\l'60p'
.>c
.di
.br \}
..
'''\"	CS: generate cover sheet [0:6]
'''\"	.CS [pages] [other] [total] [figs] [tbls] [refs]
.de CS
.LC 0\"clean out lists
.if \\n(:F .FE\"close dangling footnote
.if \\n(:y .DE \" end dangling DS
.if \\n(!N .NE \" end up dangling notation
.)N	\" flush stored NS/NE
.)w \" flush floating keeps
.if \\n(;R .RP 0 1
'\"	kill off any page titles
.if !\\nP-1 .if \\nN .if !\\nN-1 .rn }t }b\"only if N = 1
.if !\\nP-1 .if \\nN .if !\\nN-1 .nr N 0 
.rm }t }e }o
.wh 0 \" toss off header trap
.br
.rs
.bp
.)k\"get cut marks
.rm }b }f }p
.rn )f >z \" save footer def'n
.rn >B >s	\" save bottom block expander while moving it out
.ch )n 15.1i \" move away footnote diverter
.ch )b 15.2i \" move away bottom
.de )f \" temp footer
.)D "CS:cover sheet too long"
\\..
.ch )f -\\n(:Mu	\" reset footer in case moved by BS/BE
.)R
.ll \\nWu
.in 0
.nr !O \\nO	\" save offset to restore for later TC
.nr !W \\nW	\" save width to restore for later TC
.br
.rs
'\"	do previous part of cover sheet
.nf
.>S
.rm )f \" kill temp footer
.ch )f 15.0i \" move away footer trap
.sp \\n(.pu-\\n(nlu-7.5v
'\"	TM or Released Paper?
.ie \\n(;0 .sp 7.5
.el \{ .nr ;1 \\n(.lu+.45i
\l@\\n(;1u\(ul@
.	mk ;2
.	ta 1.3i 2.4i
.	ie \\n(.$ \{ .ds ]1 \\$1
.		ie \w'\\$1' .nr !T +0\\$1
.		el .nr !T \\nP \}
.	el .nr !T \\nP
.	if \\n(.$-1 \{ .ds ]2 \\$2
.		nr !T +0\\$2 \}
.	if \\n(.$-2 .ds ]3 \\$3
.	if \\n(.$-3 .ds ]4 \\$4
.	if \\n(.$-4 .ds ]5 \\$5
.	if \\n(.$-5 .ds ]6 \\$6
.	if !\w'\\*(]1' .ds ]1 \\nP
.	if !\w'\\*(]2' .ds ]2 0
.	if !\w'\\*(]3' .ds ]3 \\n(!T
.	if !\w'\\*(]4' .ds ]4 \\n(Fg
.	if !\w'\\*(]5' .ds ]5 \\n(Tb
.	if !\w'\\*(]6' .ds ]6 \\n(Rf
.	sp .5v
\s9Pages Text:\ \ \s0\\*(]1\t\s9Other:\ \ \s0\\*(]2\t\s9Total:\ \ \s0\\*(]3
.	sp 1v
\s9No. Figures:\ \ \s0\\*(]4\t\s9No. Tables:\ \ \s0\\*(]5\t\s9No. Refs.:\ \ \s0\\*(]6
.	sp .5v
.	mk ;3
\l@\\n(;1u\(ul@
.	nr ;1 \\n(;3u-\\n(;2u+1v
.	sp -1
\h'3.65i'\L'-\\n(;1u'\v'\\n(;1u'
.	tl '\s8E-1932-U (3-76)'SEE REVERSE SIDE FOR DISTRIBUTION LIST\s0''
'	br \}
.nr O \\n(!O	\" restore offset
.nr W \\n(!W	\" restore page width
.po \\nOu
.ll \\nWu
.lt \\nWu
'\"	put back traps
.wh 0 )h
.ch )n -\\n(:mu
.rn >z )f \" regular footer def'n
.rn >s >B	\" put back bottom block expander
.ch )f -\\n(:mu
.ch )b -\\n(:ru
.)R \" reset normal world
.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i
'\"	clean up
.nr ;0 0
.nr ;1 0
.nr ;2 0
.rm >S
..
'''\"	FC: generate formal closing [0:1]
'''\"	.FC [arg]
''\"	.FC   (no arg) uses "Yours very truly," as closing
''\"	.FC x    uses x as formal closing
.de FC
.)w	\" force out any floating keeps
.in 0
.nf
.ls 1
.in (\\n(.lu/2u)	\" start closing at center of page
.rs
.ne \\n(:Vu+3v+.5p	\" need .SG room + 2 lines
.sp
.ie \\n(.$ \\$1
.el Yours very truly,
.in
.fi
..
'''\"	SG: generate signature line(s) [0:2]
'''\"	.SG [arg] [1]
''\"	.SG	(no arg) causes signature, but no reference data
''\"	.SG ""	causes signature, followed by reference data
''\"	.SG x	causes x to be added to reference data as typist's initials
''\"	if 2nd arg, then ref data aligned with first joint author
.de SG
'\"	error checks
.if !\\n(:V .)D "SG:no authors"
.if \\n(:F .)D "SG:missing FE"
.if \\n(:y .)D "SG:missing DE"
.LC 0 \" clean out any lists
.)w		\" force out any floating keeps
.)R \" reset things
.in 0
.nf
.ls 1
.in (\\n(.lu/2u)
.ne \\n(:Vu+1v+.5p
.rs
.mk
.>v
.in
.if \w@\\$1@ .as }v -\\$1
.if \\n(.$-1 .rt \" go to top of sig. if 2nd arg
.if \\n(.$-1 .sp 3
.if \\n(.$ .if !\\n(.$-1 .rt -1
.if \\n(.$ \\*(}v
.rm >v
.fi
..
'''\"	NS: notation after .SG [0:1]
'''\"	.NS [arg]
'\"	null,0 - 9 => various notations
'\"	string => copy (string) to
.de NS
.if \\n(!N .di \"close diversion if multiple NS
.if \\n(;M .br \"break only if following .MT
.)R \" just in case
.nr :D 1  \" indicate nofill, open diversion
.ds }4 "Copy to\" default notation
.nr ;0 0\\$1
.if \w@\\$1@u-\w'\0\0'u .nr ;0 10\"arg value not over two digits
.if \\n(;0 .ds }4 "Copy (with att.) to\"
.if \\n(;0-1 .ds }4 "Copy (without att.) to\"
.if \\n(;0-2 .ds }4 "Att.\"
.if \\n(;0-3 .ds }4 "Atts.\"
.if \\n(;0-4 .ds }4 "Enc.\"
.if \\n(;0-5 .ds }4 "Encs.\"
.if \\n(;0-6 .ds }4 "U.S.C.\"
.if \\n(;0-7 .ds }4 "Letter to\"
.if \\n(;0-8 .ds }4 "Memorandum to\"
.if \\n(;0-9 .ds }4 "Copy (\\$1) to\"
'in \\n(;N  \" indent the same amount as the abstract
.if !\\n(!N .ds }5 \\*(}4  \"save initial copy-to string
.if \\n(!N  .da }C  \"if not initial copy-to, continue }C
.if !\\n(!N  .di }C  \" if initial copy-to, open }C
.if \\n(!N .sp
\!.ds }4 \\*(}4\"req'd for >Z macro inside )M
\\*(}4
.nf
.nr !N 1  \"indicate presence of at least 1 NS
..
''\"	)N: put out copy-to list(s)
.de )N
.br
.rr !N	\"indicate completion of a copy-to list
.di ]v		\" temp div to find size of copy to list
.}C
.br
.di
.rm ]v
.nr ;0 \\n(dn	\" size of list
.if \\n(;0 .)M	\" output notations, if any
..
''\"	)M - dump a notations list
.de )M
.nf
.sp
.ne 2v
.if \\n(.tu<=2v \{\
\&\\*(}5
See next page
'br \}
.nr !U \\n(;0>=\\n(.tu	\" will the list be continued?
.if \\n(!U \{\
.	ds ]w Continued next page\"	for footer
.	ds ]x \\\\*(}4\ \-\ contd.\"	for header
.	ch )f -(\\n(:ou+1v) \}	\" move up footer
.}C			\" output copy to list
.if \\n(!U \{\
.	rm ]w ]x
.	ch )f -\\n(:ou \}	\" restore footer pos
.rm }C
..
'''\"	NE: notation end
'''\"	.NE
.de NE
.br
.if \\n(!N .di
.if \\n(;M .)N  \"if post-MT, put out list immediately
.)R \" reset normal world
..
'''\"	AV: generate approval line
'''\"	.AV "name"
.de AV
.ne 6v
.in 0
.nf
.sp
APPROVED:
.sp 2
'\"	Draw 3 inch line then .3 inch space then 1.5 inch line
\l'3i'\h'.3i\l'1.5i'
'\" Arg is approver's name under 3" line then Date under 1.5" line
\\$1\h'|4i-(\w'Da'u)'Date
.in
.fi
..
'''\"	ND: set new date [0:1]
'''\"	.ND date
.de ND
.if !\\n(.$ .)D "ND:missing arg"
.ds DT "\\$1
..
'''\"	AF: Override Format of Bell Laboratories, Subject/Date/From
'''\"	.AF ["company"]
''\"	.AF "company" replaces BTL by company
''\"	.AF "" suppresses BTL only (so stamp) can be used
'\"	exists only to set ;2 and }2 for .MT
.de AF
.ds }2 "\\$1
..
'\"	Header, Footer, Bottom of page and Footnotes
'\"	header/bottom of page use .ev 2
'\"	footnotes done in .ev 1
'\"	;x flag set in .em to help flush any remaining footnotes
'\"	:o place that footer trap is moved at end of a footnote
'\"	:q size of diverted partial footnote
'\"	:m trap for partial footnote diverter and initial footer trap locn
'\"	:r bottom of page trap
'\"	:s counter of existing footnotes
'\"	:u flag set by .H to increment H1 (and p)
'\"	;y amount of space left on page when footer called TEMP
'\"	;z amt of space before expanding footnote TEMP
'\"	>x partial footnote text diverted here
'\"	>w entire footnote text diverted here
'\"	}y string used in line drawing func TEMP
'\"	!C test if PX outputs text     TEMP
'\"	
'\"	.)h
'\"	header macro
.de )h
'ev 0
'nh
'if \\n(Hy 'hy 14
'ev
'ev 2
.nr ;8 1
.)k\" do cut mark w/o messing w/ .po
.rr ;8
.)R
.nr P +1
.if \\n(:Z \{.nr P \\n%
.	rr :Z \}
'\"		following may occur when new page is because of .H 1
.if \\n(:u*\\n(:S .nr P 1 \" new section, restart to 1
.if \\n(:u \{.nr H1 +1 \" section needs increment
.            nr :u 2 \}\" show )h incremented it, so .H knows
'sp \\n(!X		\" extra for top margin
.TP\" user-redefinable macro
.br\"force a break in the header environment
.)R
'ev
.nr :I 2\"force indent on following .P & set flag for )y
.nr :J \\n(nl\"mark spot for )y
'ns
'if \\n(:q .)l \" reprocess any leftover partial footnotes
'nr :q 0
.mk ;r
.mk ;m
.nr !B 0		\" display width flag (set by )z)
.if \\n(;d=0&\\n(:z>0 \{\
'\"			\" then process floating keeps
'	ie \\n(Df>3  \{ ')z	\"option 4: output at least one
'			 )s \}	\"    but as many as will fit
'	el 'if \\n(Df>1 ')z \}	\"option 2: output one keep only
.nr !C \\n(.h		\" save position
.PX \"user-definable page exit
'ns\"in case PX is non-empty
.if !((\\n(!C=\\n(.h)&(\\n(!B=0)) .mk ;m	\" set only if PX or wide display
'\"	print top part of multi-page table--see )1 macro
.nr ;T 0
.if \\n(;A>0 \{.nr ;h \\n(.i
.	in0
.	>t
.	nr ;T 1		\" mark table header (>t) printed
.	in \\n(;hu	\}
.mk #T
.nr :J \\n(nl\"mark spot for .P indent check
.if !@\\*(]x@@ \\*(]x	\" output message for continued NS/NE
..
'\"	.)f
'\"	footer macro
.de )f
.if !@\\*(]w@@ \\*(]w	\" output message for continued NS/NE
.nr !D 0		\" clear header position (for .P)
'\"	following cancels effect of .SP lying around
.nr :N 0
'nr dn 0
'\"	print bottom part of boxed multi-page table
.rn )f >u\"hide footer
.if \\n(;A>0 \{.nr T. 1
.	if \\n(;f=0 .T# 1
'	br \}
.nr ;f 1
.rn >u )f\"restore footer
'\"	compute amount of room left on the page
'nr ;y \\n(.pu-\\n(nlu-\\n(:mu
'\"	if footnotes and there is room left, call footnote expander
'if \\n(:s \{'ie \\n(;y-4v .)o
'\"	if footnotes and no room left, save entire footnote text
'             el .)m \}
'nr :s 0
'nr :o \\n(:mu
'nr :O \\n(:mu
.ie \\n(;C=0 \{\
'\"		\"new page if not multi-column
.	if \\n(;e \&\c\"   if end of input - leave a partial
'	bp \}		\" and start a new page
.el .ie \\n(;C=2 .)2	\" end second column
.    el .)1		\" end first column
.rr ;f
.ie @\\*(]w@@ 'ch )f -\\n(:ou	\" reset footer trap pos if not contd NS/NE
.el 'ch )f -(\\n(:ou+1v)	\" up one line if contd NS/NE
..
'''\"	page headings
'\"	}t string containing top title info
'\"	}e string containing even top title info
'\"	}o string containing odd top title info
'\"	}b string containing bottom title info
'''\"	PH: set page header [1]
'''\"	.PH arg
.de PH
.ds }t "\\$1\"
..
'''\"	EH: set even page header [1]
'''\"	.EH arg
''\"	appears below .PH line
.de EH
.ds }e "\\$1\"
..
'''\"	OH: set odd page header [1]
'''\"	.OH arg
''\"	appears below .PH line
.de OH
.ds }o "\\$1\"
..
'''\"	PF: set page footer [1]
'''\"	.PF arg
.de PF
.ds }b "\\$1\"
..
'''\"	EF: set even page footer [1]
'''\"	.EF arg
''\"	appears above .PF line
.de EF
.ds }f "\\$1\"
..
'''\"	OF: set odd page footer [1]
'''\"	.OF arg
''\"	appears above PF line
.de OF
.ds }p "\\$1\"
..
'''\"	TP: user redefinable top of page macro [0]
'''\"	.TP
''\"	page titles (for top of page)
.de TP
'sp
.)K\" kill S/D/F macros when no .MT
.af ;P \\gP	\" save format of P
.af P 1		\" normal format for next line
.nr ;P \\nP	\" must use different name for P (see .PH)
.af P \\g(;P	\" restore format to P
.af ;P 1	\" normal format for control register
.ie \\n(Pv \{\
.	ie (\\n(Pv=1)&(\\n(;P>1) 'sp 2
.	el \{\
.		ce
PRIVATE\h'-\w'PRIVATE'u'\l'\w'PRIVATE'u'
.		sp \} \}
.el 'sp 2
.if !\\n(;P-1 .if \\nN 'sp
.if !\\n(;P-1 .if \\n(:S .tl \\*(}t
.if !\\n(;P-1 .if !\\nN .tl \\*(}t
.if \\n(;P-1 .ie \w'\\*(]n' .tl '\\*(]n - \\nP'''
.	el .tl \\*(}t
'if !\\n(;P%2 'tl \\*(}e
'if \\n(;P%2 'tl \\*(}o
'sp 2
..
'''\"	PX: page heading exit
'''\"	user-definable macro
'\"	.de PX
'\"	..
'''\"	.de PM [N:P:BP:BR:]
'\"	disclosure notice invoking macro.
.de PM
.if @\\$1@@ \{\
.	nr !K 0
.	nr :U 0-5v	\}
.if \w@\\$1@ \{\
.   ie @\\$1@P@ .nr !K 1
.   el .ie @\\$1@BP@ .nr !K 3
.	el .ie @\\$1@BR@ .nr !K 4
.	   el .nr !K 2 
.   nr :U 5v  \}	\" size of disclosure message
.)G		\" reserve bottom
..
'\"	.)b
'\"	bottom of page titles
.de )b
'ev 2
.ie \\n(!K=1 \{\
.	tl @@\fBPRIVATE\fR@@
.	tl @@This information should not be disclosed to unauthorized persons.@@
.	tl @@It is meant solely for use by authorized Bell System employees.@@ \}
.el .ie \\n(!K=3 \{\
.	tl @@\fBBELL LABORATORIES PROPRIETARY\fR@@
.	tl @@Not for use or disclosure outside Bell Laboratories except by@@
.	tl @@written approval of the director of the distributing organization.@@ \}
.el .ie \\n(!K=4 \{\
.	tl @@\fBBELL LABORATORIES RESTRICTED\fR@@
.	tl @@The information herein is meant solely for use by authorized@@
.	tl @@Bell Laboratories employees and is not to be disclosed to others.@@ \}
.el .if \\n(!K=2 \{\
.	tl @@\fBNOTICE\fR@@
.	tl @@Not for use or disclosure outside the@@
.	tl @@Bell System except under written agreement.@@ \}
.if \\n(!K .tl @@@@
.)R
.af ;P \\gP	\" save format of P
.af P 1		\" make the value of P be available
.nr ;P \\nP	\" must use different name for P (see .PH)
.af P \\g(;P	\" return format to P
.af ;P 1	\" make that value be available
.ie !\\n(;P%2 .tl \\*(}f
.el .tl \\*(}p
.ie \\n(;P=1 \{\
.   ie \\nN=1 .tl \\*(}t
.   el .tl \\*(}b \}
.el .tl \\*(}b
.if \\nC .tl \\*(]C
.)R
'ev
..
'\"	)2: end second column
.de )2
.po \\nOu \" reset page offset
.nr ;C 1 \"set col indicator
'bp \" force next page
..
'\"	)1: end first column
.de )1
.rt \\n(;mu
.po +\\n(;ou \"advance page offset
.nr ;C 2 \"set col indicator
.nr :I 2\"force indent on following .P & set flag for )y
.nr :J \\n(nl\"mark spot for )y
'ns
'if \\n(:q .)l \" reprocess any leftover partial footnotes
'nr :q 0
'if \\n(;d=0&\\n(:z>0 \{\
'\"				\" process floating keeps
'	ie \\n(Df>3 \{ ')z	\" option 4: output as many as will fit
'			 )s  \}
'	el 'if \\n(Df>1	')z  \}	\" option 2: output only one
'\"	print top part of multi-page table--see )h macro
.nr ;T 0
.if \\n(;A>0 \{.nr ;h \\n(.i
.	in0
.	>t
.	nr ;T 1			\" mark table header (>t) output
.	in \\n(;hu	\}
.mk #T
.nr :J \\n(nl\"mark spot for .P indent check
..
'\"	;l new line length for each column
'\"	;o page offset for 2nd column
'\"	;C column indicator
'\"	;m marked place (where 2nd col returns to)
.de 2C \" begin 2 column stuff
.if \\n(;C=0 \{\
'\"			\" a .2C when in 2C mode is a no-op
.br
.)R
.nr ;C 1
.if !\\n(.$ .nr ;l \\n(.lu*8u/17u \" new line length
.if !\\n(.$ .nr ;o \\n(.lu*9u/17u \" 2nd col page offset
.if \\n(.$ .nr ;l \\$1u*1.3n
.if \\n(.$ .nr ;o \\nWu-\\n(;lu
.ev 1
.ll \\n(;lu
.lt \\n(;lu
.ev
.ll \\n(;lu
.lt \\n(;lu
.nr :L \\nW\"save line length
.nr W \\n(.lu
.SP
.ns
.mk ;m \}
..
.de 1C
.if \\n(;C \{\
'\"			\" 1C no-ops if not in 2C mode
.br
.if \\n(;C>1 .sp |\\n(.hu	\" move below high water mark on this page
.po \\nOu			\" reset page offset
.)R
.nr W \\n(:Lu
.rr ;L ;C
.ev1
.ll \\nWu
.lt \\nWu
.ev
.ll \\nWu
.lt \\nWu
.SP .5
.ns \}
..
'''\"	WC:  Width and Output Control for displays/footnotes in 1C/2C
'''\"	.WC [arg1] [arg2] ... [arg9]
'''\"	where each of argi is either N, [-]WD, [-]WF, [-]FF, [-]FB
''\"	N - set defaults (;a=;b=;j=0, ;p=1)
''\"	WD - set wide display mode (;a=1) - all displays wide
''\"	WF - set wide footnote mode (;b=1) - all footnotes wide
''\"	FF - set footnotes follow mode (;j=1) - footnotes follow prev on page
''\"	FB - set floaters cause break mode (;p=1) - on current page
''\"	an optional '-' preceeding any of the latter 3 arguments will clear
''\"	the specified flag.
''\"	this macro sets the internal flags from the command mnemonics
.de WC
.if \\n(.$ \{\
.	ie @\\$1@N@ \{ .nr ;a 0
.			nr ;b 0
.			nr ;j 0
.			nr ;p 1 \}	\" set defaults
.	el .ie @\\$1@WD@ .nr ;a 1	\" set wide display mode
.	el .ie @\\$1@WF@ .nr ;b 1	\" set wide footnotes mode
.	el .ie @\\$1@FF@ .nr ;j 1	\" set footnotes follow mode
.	el .ie @\\$1@FB@ .nr ;p 1	\" set floaters cause break mode
.	el .ie @\\$1@-WD@ .nr ;a 0	\" clear wide display mode
.	el .ie @\\$1@-WF@ .nr ;b 0	\" clear wide footnode mode
.	el .ie @\\$1@-FF@ .nr ;j 0	\" clear footnotes follow mode
.	el .ie @\\$1@-FB@ .nr ;p 0	\" clear floaters cause break mode
.	el ')D "WC: unknown option"
.	if \\n(.$ .WC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
'	br  \}
..
.de >W
'\"	go to temporary wide mode for footnote or display
.if \\n(;C \{\
.	ev 1		\" change only footnote/keep environment
.	ll \\n(:Lu
.	lt \\n(:Lu	\" set long length
.	ev
.	nr W \\n(:Lu	\" set width register
.	nr ;W 1 \}	\" mark temporary wide mode
..
.de >N
'\"	go to temporary narrow mode for footnote or display
.if (\\n(;l>0)&(\\n(;C=0) \{\
.	ev 1		\" change only footnote/keep environment
.	ll \\n(;lu	\" set short length (calculated by 2C)
.	lt \\n(;lu
.	ev
.	nr W \\n(;lu
.	nr ;W 2 \}	\" mark temporary narrow mode
..
.de >R
'\"	return from temporary wide or narrow mode
.ie \\n(;W=1 .nr W \\n(;lu	\" change back to narrow
.el .if \\n(;W=2 .nr W \\n(;Lu	\" back to wide
.if \\n(;W \{\
.	ev 1
.	ll \\nWu		\" reset line lengths
.	lt \\nWu
.	ev
.	nr ;W 0 \}		\" clear temp mode flag
..
.de )Q
'\"	called in second column to not overprint a long footnote
'\"	(called as a substitute to )f)
.ch )Q 200v	\" move away
.rs
'sp 70 \}	\" space over already printed footnotes
..
'''\"	BS: bottom start [0]
'''\"	.BS
''\"	define a block of text to appear on
''\"	the bottom of a page between the footnotes and
''\"	the page footer
.de BS
.ev1
.)R
.di >K
..
'''\"	BE: bottom end [0]
'''\"	.BE
''\"	end bottom block
.de BE
.br
.di
.)R
.ev
.nr :U \\n(dnu\"how big is new tail block
.)W	\" set bottom to size of :U
.rn >K >D
.nr :T \\n(:Uu\"save size of current tail block
..
.de )W		\" move bottom definitions and traps.
.if (\\n(:Uu+\\n(:Mu)>(\\n(.pu-\\n(nlu-.5v) .SK\"new page if bigger than where we are now
.ch )n -(\\n(:Mu+\\n(:Uu)\"move footnote diverter trap
.nr :o +(\\n(:Uu-\\n(:Tu)
.nr :O +(\\n(:Uu-\\n(:Tu)
.ch )f -\\n(:ou\"move footer trap
.nr :m \\n(:Mu+\\n(:Uu\"new place for footer to reside
.ch >B -(\\n(:Mu+\\n(:Uu+\\n(!Yu-1v) \"plant trap for tail mode expander
..
'\"	>B: bottom expander
'\"	layout block of text collected by BS/BE
.de >B
.ev2
.)R
.nf
.>D
.)R
.ev
..
'''\"	VM - Vertical Margin control
'\"	VM t b   where t and b are extra number of lines for top and bottom
.de VM
.ie 0\\$1>=0 .nr !X 0\\$1	\" legal value
.el .nr !X 0			\" illegal - default
.ie 0\\$2>=0 .nr ;n 0\\$2	\" legal for bottom?
.el .nr ;n 0
.if !@\\$2@@ \{\
.	nr :U \\n(;nv	\" bottom size
.	ie !\\n(!K .nr :M \\n(!V	\" real bottom of page
.	el      .nr :M \\n(!V+5v	\" for disclosre message
.	)G \}		\" reserve new bottom
..
''\"	)G - reserve a new bottom margin (size in :U)
.de )G
.nr !Y \\n(:T	\" save old size
.nr :T 0
.)W		\" move traps, etc.
.nr :M \\n(:m	\" save 'real' bottom for BS/BE
.ch )b -(\\n(:mu-2v)	\" move bottom message trap
.nr :T \\n(!Y	\" restore
.rr !Y
..
'''\"	FS: footnote text start [0:1]
'''\"	.FS [flag]
''\"	optional flag used as footnote label;
''\"	if no argument, lay out a number derived from the
''\"	\*F that appears in the text which auto increment 
''\"	a number register
'\"	set hyphenation and adjust according to :i and :j
'\"	set }y to the "label" -- either the argument
'\"		or the footnote numberer
'\"	if no indent, layout the label
'\"	if indent, determine the width of the standard indent (;z)
'\"		and the width of the label
'\"		indent by the standard amount
'\"		if the label is to be left justified, undent the
'\"			std amount; layout either the label
'\"			and enough space to make up the std
'\"			amt or the label (if it is bigger than the 
'\"			amt); layout the label
'\"		if the label is to be right justified,
'\"			undent by the minimum of the std amt
'\"			and the width of the label
'\"			layout the label
'\"	!A  used to inhibit the output of footnotes in the second column
.de FS
'nr :s +1 \" incr counter of existing footnotes
.if \\n(:F .)D "FS:missing FE"\"error if existing footnote
.if \\n(:F .FE\"end prior footnote
.if \\n(:y .)D "FS:missing DE"\"error if existing keep
.if \\n(:y .DE\"end prior keep
.nr :F 1\"indicate FS begun
.if !\\n(!F \{\
.	ie \\n(;C .nr !F 2	\" narrow
.	el .nr !F 1  \}		\" go wide
.ie (\\n(;C>0)&((\\n(;b=1):((\\n(;j=1)&(\\n(!F=1))) \{\
.	nr !F 1			\" go wide
.	>W  \}
.el .if ((\\n(;C=0)&(\\n(;j=1)&(\\n(!F=2))  .>N   \" go narrow
'ev 1
'di >b
.nr :D 1
.)R
'nh
'if \\n(:i 'hy 14
'ad
'if \\n(:j 'na
'ps -2
'vs \\n(.sp+1p
'sp \\n(Fsu*3p
'if \\n(.$ 'ds }y \\$1\ \"
'if !\\n(.$ 'ds }y \\*(]y.\ \"
'if \\n(:k \\*(}y\&\c
'if !\\n(:k 'nr ;v \w@\0\0.\ @
'if !\\n(:k 'nr ;u \w@\\*(}y@
'if !\\n(:k 'in +\\n(;vu
'if !\\n(:k 'if !\\n(:l 'ti -\\n(;vu
'if !\\n(:k 'if !\\n(:l 'if !\\n(;u-\\n(;v \\*(}y\h@\\n(;vu-\\n(;uu@\&\c\"}y now free
'if !\\n(:k 'if !\\n(:l 'if \\n(;u-\\n(;v \\*(}y\&\c
'if !\\n(:k 'if \\n(:l 'if \\n(;v-\\n(;u 'ti -\\n(;uu
'if !\\n(:k 'if \\n(:l 'if !\\n(;v-\\n(;u 'ti -\\n(;vu
'if !\\n(:k 'if \\n(:l \\*(}y\&\c
..
'\"	.FE - Footnote end
.de FE
.if !\\n(:F .)D "FE:no FS active"
.br
'di
.nr :D 0
.if \\n(;c .nr :D \\n(;c
'in 0
'nf
'na
.if !\\n% \{\
'	da >c
.	>b
\!.	br
'	di
.	if !(\\n(:D=3) \{\
.		nr :G 1	\" save footnt for reprint on P. 1 of .AS 2
.		da >d
.		>b
\!.		br
.		di
'		br \}
'	br \}
.if !((\\n%=0)*(\\n(:D=3)*(\\n(:t=1):(\\n(;X)) \{\
'	da >y
.	>b
\!.	br
'	di
'	br \}
'rm >b
.)R
'ev
.nr :F 0\"indicate footnote ended
.>R		\" revert from possible temporary width
'\"	add a space if this is the first footnote
.if !((\\n%=0)*(\\n(:D=3)*(\\n(:t=1):(\\n(;X)) \{\
.if !((\\n(!A=1):((\\n(;C=2)&(\\n(!F=1))) \{\
'\"	No footnotes now if they are wide in 2C, or there are already
'\"	wide ones on this page
'	if !\\n(:s-1 'nr dn +4v+.5p
'	nr :o +\\n(dnu
'	nr :O +\\n(dnu
.	nr dn 0
'\"	Move up footer trap, but not above current position on page,
'	if !\\n(.pu-\\n(nlu-.5p-\\n(:ou 'nr :o \\n(.pu-\\n(nlu-.5p
'\"	or below :m!
'	if !\\n(:ou-\\n(:mu 'nr :o \\n(:mu
'	ch )f -\\n(:ou \" move footer trap
'	br \}\}
..
'\"	.)o
'\"	footnote expander, called via footer
.de )o
'\"	if first column and wide footnotes, prepare for second column.
.ie (\\n(!F=1)&(\\n(;C=1) \{\
.	nr !A 1 \}	\" mark wide footnotes output
.el .nr !A 0		\" else wont overprint footnotes
'ev 1
.)R
'ps -2
'vs \\n(.sp+1p
'nf
'\"	compensate for the .5p in FE
'nr ;5 \\n(.pu-\\n(:ou+.5p
'if \\n(;5u>\\n(nlu 'sp |\\n(;5u+.5p
'nr ;5 \\n(.pu-\\n(nlu-1v-\\n(:mu
.ie \\n(;5u>0 \{\
'	sp	\" put two spaces before footnote rule
.	ti 0
'\"		layout partial rule if new footnote
'\"		layout full line length rule if continued footnote
.	ie \\n(:n=0 \{.ie \n(.A=0 \l'72p'
.		el  __________ \}
.	el \{.ie \n(.A=0 \l@\\n(.lu@
.		el _____________________________ \}
'	nr :n 0
.	br
.	if \\n(!A .wh (\\n(nl-2v) )Q	\" set trap for later if long ftnts
'	br \}
.el 'sp 15i
.rr ;5
'nr ;Z 1	\" signal )n to expect text
'nr dn 0
'\"	dump accumulated footnote text
'\"	long text may spring )n trap so the remaining partial
'\"	text may go into >x
'ps
'vs \\n(.sp+2p
.>y
.br
'di
.if \\n(dn=1v .nr dn 0	\" if only the blank line - ignore it
'nr ;Z 0	\" footnotes over
.if !\\n(;C=1 \{\
.	rr !A		\" if new page - clr long footnotes on page flag
.	if \\n(dn=0 .rr !F \}  \" clr footnote width flag if no partial
'rm >y
'nr :q \\n(dnu
'nr dn 0
'nr :s 0 \" zero counter of existing footnotes
.)R
'ev
..
'\"	.)n
'\"	partial footnote text diverter
'\"	called via trap planted at -\n(:m
'\"	since the default footer trap is also at -n(:m,
'\"	this macro actually invoked when the footer trap
'\"	has been moved up due to footnote processing
.de )n
'if \\n(;Z \{
'	di >x
'	sp \\n(Fs  \}	\" only if footnotes
..
'\"	.)m
'\"	called from footer when the size of the footnote text
'\"	is greater than room left on the page
'\"	saves all the accumulated footnote text into >w
.de )m
'ev 1
.)R
'ps -2
'vs \\n(.sp+1p
.nf
'di >w
.>y
.br
'di
'rm >y
'nr :q \\n(dn
'nr dn 0
'nr :s 0
'if \\n(:q 'nr :n 1
.if !\\(;C=1 .rr !A	\" if new page - clr long notes on page flag
.)R
'ps
'vs \\n(.sp+2p
'ev
..
'\"	.)l
'\"	reprocess any leftover partial footnotes and any
'\"	entire footnotes
'\"	called from .)h
.de )l
'nr :s 1
.nr :n 1
'di
'ev 1
'di >b
.)R
'ps -2
'vs \\n(.sp+1p
'nh
'nf
.>x
.>w
.nr :F 1\"pretend to be .FS
.FE
'rm >x
'rm >w
..
'''\"	FD: set footnote default formatting [0:2]
'''\"	.FD [arg] [1] 		0 <= arg <= 11
''\"	arg=1 ==> hyphenate footnotes
''\"	arg=2 ==> don't adjust footnotes
''\"	arg=4 ==> footnotes flush left, no indent
''\"	arg=8 ==> footnotes indented, stub flush right
'\"			(or any combination <_ 11 decimal).
'\"		 arg=0, arg >11, or arg null ==> reset all defaults 
'\"	defaults: no hyphenate, adjust, indent, no stub right
'\"	nroff defaults via .FD 10 (or plain .FD)
'\"	if 2nd arg, arrange that .H 1's reset fn ctr (set :C)
.de FD
'\"	set defaults
'nr :i 0 \" hyphenate flag
'nr :j 0 \" no adjust flag
'nr :k 0 \" no-indent flag (on means no indent)
'nr :l 0 \" stub right flag
'nr ;z 0\"
'if \\n(.$ 'nr ;z \\$1\"
'if \\n(;z-11 'nr ;z 0\"
'if \\n(;z-7 'nr :l 1\"
'if \\n(;z-7 'nr ;z -8\"
'if \\n(;z-3 'nr :k 1\"
'if \\n(;z-3 'nr ;z -4\"
'if \\n(;z-1 'nr :j 1\"
'if \\n(;z-1 'nr ;z -2\"
'if \\n(;z 'nr :i 1\"
'if \\n(.$-1 .nr :C 1\"set flag for .H 1
..
'\"	Display mechanism
'\"	?a text of stored floating keep (where a is a-z)
'\"	?n size of stored floating keep (where a is a-z)
'\"	!a width of stored floating keep (where a is a-z)
'\"	>0 store for initally diverted text
'\"	:0 size of initially diverted text
'\"	:z counter of floating keeps 
'\"	:y flag indicating Display in progress
'\"	:x index of floating keep most recently expanded
'\"	:w index of floating keep most recently diverted
'\"	:v copy of value of :z (used in .)x and .)y)
'\"	:t register to pass fixed/float info to DE
'\"	;z size of next to-be-expanded floating keep TEMP
'''\"	DS: start fixed display [0:2]
'''\"	.DS [arg1] [arg2]
''\"	arg1: no indent (0 or L), indent (1 or I), center (2 or C),
''\"		center block (3 or CB)
''\"	arg2: no fill (0 or N), fill (1 or F)
.de DS
.nr :t 0
.)J "\\$1" "\\$2" "\\$3"
..
'''\"	DF: start floating display [0:2]
'''\"	.DF [arg1] [arg2]
''\"	arg1: no indent (0 or L), indent (1 or I), center (2 or C),
''\"		center block (3 or CB)
''\"	arg2: no fill (0 or N), fill (1 or F)
.de DF
.nr :t 1
.)J "\\$1" "\\$2" "\\$3"
..
'\"	)J: real display start
'\"	take args from either DS or DF
'\"	:t set to indicate float (1) or fixed (0)
'\"	add 2 if centered
.de )J
.nr ;i \\n(.i		\" save prevailing indent
.nr ;q \\n(.u		\" save prevailing fill/no-fill mode
'di
.if \\n(:D>1 \{.ie \\n(:t=0  .)D "DS:illegal inside TL or AS"
.	el  .)D "DF:illegal inside TL or AS" \}
.if \\n(:F \{.ie \\n(:t=0 .)D "DS:missing FE"
.	el .)D "DF:missing FE"
.	FE \}		\"close it
.if \\n(:y \{.ie \\n(:t=0 .)D "DS:missing DE"
.	el .)D "DF:missing DE"
.	DE \}		\" end the prev. DS
.nr :y 1		\" set flag indicating Display
.if (\\n(;C>0)&(\\n(;a=1) .>W	\" go wide
.ev 1			\" switch to keep/footnote environment
.)R			\" reset all things
'di >0
.nr :D 1
.nr ;z 0+0\\$1
.if @\\$1@L@ .nr ;z 0	\"left-blocked
.if @\\$1@I@ .nr ;z 1	\"indented
.if @\\$1@C@ .nr ;z 2	\"center each line
.if @\\$1@CB@ .nr ;z 3	\"center as a block
.if \\n(;z>3 .nr ;z 3
.nr :B \\n(;z		\"set flag for type of display
'\"	shorten line length only if .DS 0 or .DS 1
.if \\n(:t=0 .if \\n(;z<2 .ll -\\n(;iu
.if \\n(;z=1 .in +\\n(Sin
.if \\n(;z=2 \{.ce 9999
.	nr :t +2 \}	\"centering flag
.if \\n(:B=3 \{.nr :Y 1	\"initialize width-of-block register
.	nr :t +2
.	nr :X \\n(.i	\"save existing indent
.	di >X \}		\"begin second diversion
.nr ;z 0+0\\$2
.if @\\$2@N@ .nr ;z 0	\" No-fill mode
.if @\\$2@F@ .nr ;z 1	\" Fill mode
.nf
.if \\n(;z .fi
.ll -0\\$3
..
'\"	.)z
'\"	expand one floating keep here & now
'\"	dump it in keep/footnote env
.de )z
.nr ;w \\n(:x+1%26+1	\" name of next display in queue
.if !((\\n(;C=2)&(\\n(!\\n(;w=1)) \{\
'\"	inhibit if wide display in second column
.nr ;d 1		\" inhibit header from calling )y
.ev 1			\"keep/footnote env
.SP .5
.)R			\" reset all things
'nf
'rs
.nr :x \\n(:x+1%26	\" get index of the next in the queue
.?\\n(;w		\" lay out one keep
.rm ?\\n(;w
.rr ?\\n(;w !\\n(;w	\" and remove it
.if \\n(!\\n(;w=1 .nr !B 1	\" mark wide display
.)R			\" reset all things
.if \\n(De \{\
.	if \\n(;e \&\c\"   eject - but leave a partial after EOI
.	bp
.	nr !B 0 \}	\" clear wide column display flag
.ie \\n(:I>1 \{\
'\"			\" no indent on following .P
.	if \\n(nl>\\n(:J .nr :I 0 \}	\" unless just past )h
.el .nr :I 0
.SP .5
.nr :J \\n(nl
.ev
'nr :z -1		\" one less keep extant
.nr ;d 0 \}		\" allow )h to process fl keeps again
..
'\"	.)y
'\"	expand floating keep only if it will fit on this page
.de )y
'\"	get name of next floating display queue entry
'if \\n(:z \{\
'	nr ;w \\n(:x+1%26+1	\"get index of next in queue
'	nr ;z \\n(?\\n(;w	\"get length of next queue element
'\"	- if there is room to expand the display - do so,  then do a break
'\"	unless called from the header (:I=2) (and watch for the case
'\"	of header, then text, then a DF that fits).
'\"	the same test logic is used in )r.  The if conditional consists
'\"	of thee major parts: (1) the test on :I tests whether we just
'\"	finished a header, (2) the next test tests whether the display will
'\"	fit on this page (distance to the next trap), and (3) is a multiple
'\"	test - it takes the value true when the display is too large to
'\"	fit on any one page, and we have used less than half of the current
'\"	page (meaning that the display can be output now).
.	if (\\n(:I=2):(\\n(;z<\\n(.t):\
((\\n(;z>(\\n(.p-\\n(;r-\\n(:m))&(\\n(nl<(\\n(.p-\\n(;r-\\n(:o/2u+\\n(;r))) \{\
'		ie \\n(:I<2  .if \\n(;p .br	\" break only if FB mode
'		el .if \\n(:Ju<\\n(nlu  .if \\n(;p .br
'		)z  \}\}	\" output a DF
..
'\"	.)x
'\"	expand one floating keep here if it fits
'\"	else onto next page
'\"	called only via .)w
.de )x
'nr :v \\n(:z		\" count of keeps in queue
')y			\" attempt to output one
'if \\n(:v=\\n(:z \{\
'	nr ;d 1		\" don't let )h do the work
'	if \\n(;e \&\c\"   if no keep was output -
'	SP \\n(.tu+1v		\" then start a new page
'	nr ;d 0	
'	)z  \}		\" and force output of one floating keep
..
'\"	.)w
'\"	expand all floating keeps
'\"	must be called via .em-called macro
'\"	should be called by other macros which cause
'\"		major breaks i.e. certain level headings
.de )w
'if \\n(:z \{\
'	)x		\" output the next
'	)w \}		\" and do all
..
'\"	.)u
'\"	process floating keep for the current page
'\"	the action to be performed is controlled by the user-accessible
'\"	registers De and Df, which cause, respectively, a page eject after
'\"	each display, and specify the number of displays on each page.
.de )u
'if \\n+(:z>25 ')D "DF: too many displays"
'nr :w \\n(:w+1%26	\" form the next queue element name
'nr ;w \\n(:w+1		\" get the index name [a:z]
'rn >0 ?\\n(;w		\" put the display into the queue
.nr !\\n(;w 1		\" mark full column width
.if (\\n(;C>0)&(\\n(;a=0) .nr !\\n(;w 2	\" unless narrow
.nr ?\\n(;w \\n(:0	\" put the size of text into parallel nr queue
'\"	if single display, desired on current page, and not wide
'\"	in two columns, then try to fit it
'if !((\\n(;C>0)&(\\n(!\\n(;w=1)) 'if (\\n(:z=1)&((\\n(Df%2=1):(\\n(Df>5)) ')y
..
'\"	.)s
'\"	output as many floating keeps as will fit on this page
.de )s
'nr :v \\n(:z		\" mark the number of keeps now on queue
'nr ;Y \\n(:I		\" save
'nr :I 2		\" from the header
')y			\" try to output one
'ie \\n(:v>\\n(:z  ')s	\" and put them out while they fit
'el 'nr :I \\n(;Y	\" reset
..
'\"	.)t
'\"	process a static display.  If it is longer than one page and less
'\"	than half of the current page has been used, or the display will
'\"	fit on this page, output is begun immediately.  Otherwise, a new
'\"	page is begun (which may cause output of a floating keep via )h)
'\"	and the static display is output then.  If )h has output a floating
'\"	keep, then the tests for available space must be made again.
.de )t
.br
.nr !L \\n(!7		\" save line spacing
.ls 1			\" output display in ls 1
.)r			\" perform page/display length tests and leave setup
.ti \\n(.iu		\" preserve against .ti of .H
.nf
.if \\n(:t>1 .in -\\n(;iu  \" go to zero indent for centering
.rs
.nr ;d 1		\" prevent )h from outputting a floating keep
.>0			\" expand display
.)R
.nr ;d 0
.ie \\n(:I>1 \{\
.	if \\n(nl>\\n(:J .nr :I 0 \}  \" mark indent flag
.el .nr :I 0
.ls \\n(!L		\" reset line spacing
.in \\n(;iu		\" restore prevailing indent
.if !\\n(;q .nf		\" restore no-fill if necessary
.if \\n(Ds .SP .5
.nr :J \\n(nl
..
'\"	.)r
'\"	Control page orientation  of static displays.
'\"	Static displays are output as soon after their definition as
'\"	feasible.  The following rules are used:
'\"	  1. if the display will fit on the current page, output it there.
'\"	  2. if the display won't fit on any page, and we have used less than
'\"		half of the current page, then output the display on the
'\"		current page.
'\"	  3. skip to the next page.  If this causes a floating display (or
'\"		more than one) to be output, then start again with rule
'\"		1, otherwise, just output the display.
.de )r
.if \\n(Ds  .SP .5	\" initial spacing
'\"	The following if condition tests: (1) if the display is too large to
'\"	fit on the current page and either (2) it will fit on an unused page
'\"	or (3) we have already used more than half of the current page. (the
'\"	three conditions are grouped in the form 1 & (2 : 3)). If this
'\"	total condition is true, then a page is ejected and the display output
'\"	on the next page.  (see )y for a similar construction).
.if (\\n(:0>=\\n(.t)&((\\n(:0<(\\n(.p-\\n(;r-\\n(:m)):\
(\\n(nl>(\\n(.p-\\n(;r-\\n(:o/2u+\\n(;r))) \{\
'\"		\" conditions not met - force a new page
.	if \\n(;e \&\c\" save a partial
.	ne \\n(.tu+1v	\" spring the trap
.	if \\n(:I<2 .)r \}  \" verify room if a floating keep was output
..
'''\"	DE: display end
'''\"	.DE
'\"	:t=0=>fixed; :t=1=>float; +2 for centering
.de DE
.if !\\n(:y .)D "DE:no DS or DF active"
.if \\n(:B=3 \{.br
.	di		\"if centered block, end diversion into >X
.	if \\n(dl>\\n(:Y .nr :Y \\n(dl
.	if \\n(:Y<\\n(.l .in (\\n(.lu-\\n(:Yu)/2u \"indent by half of white-space
.	nf
.	>X
.	fi
.	rm >X
.	in \\n(:Xu
.	rr :X \}
.ce 0
.br
'di
.rr :D ;D ;E :B
.)R			\" reset all things
.ll \\nWu		\"including line length
.ev
'nr :0 \\n(dn		\" get size of keep 
'nr dn 0
.nr ;x \\n(:t
.if \\n(:t-1 .nr ;x -2
.>R			\" revert from possible temp width
.if !\\n(;x .)t		\" process fixed style 
.if \\n(;x .)u		\" process floating keep
.nr :y 0		\" flag indicating DE
.nr :Y 0		\"clear width-of-block register
..
'\"	.)R
'\"	reset all things
.de )R
'fi
'na\"	reset default adjustment (see .SA)
.if \\n(:h 'ad
'nh
'if \\n(Hy 'hy 14
'in 0
'ti 0
'ps \\n(:Pp
'vs \\n(!Pp
..
'''\"	RS: reference text start [0:1]
'''\"	.RS [stringname]
''\"	optional stringname used to store number for later reference
''\"	preceding \*(Rf in text generates new number from :R 
''\"	]r is string version of :r -- ;R flag indicates
''\"	that there are references which have not been printed on
''\"	references page yet (set to 2 by .RS and to 1 by .RF)
.de RS
.if \\n(;R=2 .)D "RS:missing RF"\"error if existing reference
.nr ;R 2 \" indicate a reference exists and is currently in progress
.nr Rf +1 \" total reference count for CS
.if \\n(.$ .ds \\$1 \v'-.4m'\s-3[\\n(:R]\s0\v'.4m'
.ev 2
.)R
'in \w@\0\0.\ @u
'ti -\w@\\*(]r.\ @u
.nr :D 1
.da >r
\!.ne 2
\\*(]r.\ \&\c
..
'''\"	RF: reference text finish
'''\"	.RF
''\"	completes reference text diversion - set ;R to 1 that reference ready
.de RF
.if !(\\n(;R=2) .)D "RF: no RS active"
.nr ;R 1
.br
\!.if \\\\n(Ls .sp .5
.di
'in
.nr :D 0
.ev
..
'''\"	RP: lays out references page [0:2]
'''\"	.RP [arg1] [arg2]
''\"	called by TC, CS, and )q or explicitly by user
''\"	first arg 0 means restart numbering
''\"	second arg 0 means do a .SK following references page
.de RP
.if \\n(;R=2 .)D "RP: missing RF"
.if \\n(;R \{\
.nr ;R 0 \" turn off references flag
.if !(0\\$1) .nr :R 0 1 \" restart counter
.)R
.ie (0\\$2=2):(0\\$2=3) \{\
.if \\n(;e \&\c
'ne 8
.sp 1 \}
.el \{\
.ie \\n(;e .SK
.el \{\
\&\c
.bp \" can't use .SK when called from )q
'br \} \}
.ce 1
.ul
\\*(Rp
.if \w@\\*(Rp@ \{
.am >C
.)T 1 1 "" "\\*(Rp" \\nP 
\\..
'br \}
.nf
.>r
.br
.rm >r
.)R
.if (0\\$2=0):(0\\$2=2) .SK
'br \}
..
'\"	.)q
'\"	called via .em request
'\"	set flag for footnotes and flush keep/releases
.de )q
.br\"force out partial line
.LC 0\"clean out lists
.nr ;e 1		\" mark end of input read
.if \\n(:F .FE\"close dangling footnote
.if \\n(:y .DE \" end dangling DS
.if \\n(!N .NE \" end up dangling notation
.)N	\" flush stored NS/NE
.nr ;x 0 \" flag for footnotes
.if \\n(;R .RP 0 1
\&\c
.if (\\n(;C>0)&(\\n(:z>0) 'bp	\" new page for keeps in 2C
.)w \" flush floating keeps
\&
'\"	if footnotes remain and there is no room 
'\"	on this page, or if diverted footnote text
'\"	remains, be sure to begin another page
'nr :0 \\n(.pu+1v-\\n(nlu-\\n(:Ou
'if \\n(:s 'if (\\n(:0<=0):((\\n(;C=2)&(\\n(!F=1)) 'nr ;x 1
'if \\n(:q 'nr ;x 1
'\"	if ;x set, force out footnotes
'if \\n(;x \&\c
'if \\n(;x 'bp
'if \\n(;x \&
.wh -.5p )k\"cut marks at end of page
.nr ;e 0		\" prevent extra pages
..
'\"	.)k
'\"	produce cut marks
.de )k
.po 0		\" always from left margin
.lt 7.5i
.ps 10
.vs 10p
.ft 1		\" always roman font
.tl '--''--'
.ft
.vs		\" restore values
.po
.ps
.lt
..
'\"	REQUIRED INITIALIZATIONS
'\"	initialize various regs
.nr :r .6i \" bottom of page
.nr :m .8i \" initial footer place and partial footnote diverter trap
'nr :i 0 \"	footnote hyphenate flag
'nr :j 0 \"	footnote no adjust flag
'nr :k 0 \"	footnote flush left flag
'nr :l 0 \"	footnote stub flush right flag
.nr :n 0 \" flag for continuation footnote rule
.nr :p 0 1 \" in-text footnote numberer
.nr :o 0 \" register for footer trap location (set via .FE)
.nr :z 0 1 \" counter for floating keeps in progress
.nr :y 0 \" flag indicating Display in progress
.nr :x 0		\" index for name of expanded floating keep
.af ;w a		\" conversion register for display queue names
.nr :w 0		\" index for name of diverted floating keep
.nr :F 0\" flag indicating FS in progress
.nr :R 0 1 \" in-text reference numberer
.ds ]r \\n(:R
.ds ]y \\n(:p
'\"			INITIAL SET UP
'wh 0 )h
.nr :o \n(:mu \" initial footer trap location on a page
.nr :O \n(:mu \" high water mark of :o (needed by )q)
'wh -\n(:mu )f
'ch )f 15i
'wh -\n(:mu )n \" trap for partial footnote diverter
'ch )f -\n(:mu
'wh -\n(:ru )b
.nr :M \n(:mu
.nr !V \n(:mu		\" save real bottom
.wh -(\n(:Mu-1v) >B\"initial trap for bottom expander
'''>S>NOCOMPACT<<name>>
.if @\*(]Z@MM DEFINED@ \{\
.	tm ERROR: MM package read twice
.	ab 	\}
.ds ]Z MM DEFINED
'''\"	*** EXTERNALLY-KNOWN NUMBER REGISTERS
'''\"	E : emboldening for s/d/f etc.
''\"	0=no bold (nroff default)
''\"	1=bold (troff default)
.if !\w'\gE' .nr E 1
'''\"	L : length of page
''\"	settable via -rLn
.if !\nL .nr L 11i
.pl \nLu
'''\"	N : numbering style [0:3] default = 0; set via -rNn
''\"	0/1 normal; 2/3 sect-page; if 1 or 3 special footer for P=1
'''\"	O : initial page offset, normally = 26/27i (.964i), but can be overridden from
''\"	command line (via -rOvalue)
.if !\w'\gO' .nr O .963i
.po\nOu
'''\"	P : Page number (internally managed), initially = 0
''\"	if :S = 0, same as %, but reset to 1 by each .H 1 when :S = 1
.if \nP .nr P -1
.nr P \nP 1
'''\"	S : default point size, initially 10
.if !\nS .nr S 10
'''\"	W : Width of page (line length and length of title)
''\"	settable via -rWn from command line
.ie \nW .nr W \nWu
.el .ie \nA .nr W 5.8i
.el .nr W 6.0i
'''\"	REQUIRED INITIALIZATIONS
'\"	load date into DT string
.if \n(mo-0 .ds DT January
.if \n(mo-1 .ds DT February
.if \n(mo-2 .ds DT March
.if \n(mo-3 .ds DT April
.if \n(mo-4 .ds DT May
.if \n(mo-5 .ds DT June
.if \n(mo-6 .ds DT July
.if \n(mo-7 .ds DT August
.if \n(mo-8 .ds DT September
.if \n(mo-9 .ds DT October
.if \n(mo-10 .ds DT November
.if \n(mo-11 .ds DT December
.as DT " \n(dy, 19\n(yr
'\"			INITIALIZE ALL THREE ENVIRONMENTS
.S D D\"set up point size
'ev 0
.)R
.ll \nWu
.lt \nWu
'ev
'ev 1
.)R
.ll \nWu
.lt \nWu
'ev
'ev 2
.)R
.ll \nWu
.lt \nWu
'ev
'\"	INITIALS SET UP
.PH "''- \\\\nP -''
'\"	set up type of copy
.if \nC=3 \{.ds ]C @@D\ R\ A\ F\ T@@
.	PF "''\\\\*(DT'' \}	\" set footer when DRAFT
.if \nC=4 \{.ds ]C @@D\ R\ A\ F\ T@@
.	PF "''\\\\*(DT''	\" set footer when DRAFT
.	ls 2	\" use double space
.	nr Pt 1	\" indented paragraphs
.	nr Pi 10 \}	\" with 10 space indent
.if \nC=2 .ds ]C ''DATE FILE COPY''
.if \nC=1 .ds ]C ''OFFICIAL FILE COPY''
'\"	set defaults for sect-page numbering scheme
.if (\nN=3):(\nN=5) \{.nr :S 1
.	PF "''\\\\n(H1-\\\\nP''"
.	PH \}
.if \nN=4 \{.PH\"inhibit default page numbering
.	nr N 0 \}
.if \nD .PH "'\\*(RE line # \\\\n(.c'- \\\\nP -''
.if \nA=1 .AF\" for use with preprinted forms
'em )q	\" end macro
.rm PM CS TM )X }2\" NON-BTL INSTALLATION
'''>E>NOCOMPACT<<name>>
'\"	accents put at end of file so that grave accent string doesn't
'\"	mess up commenting conventions
'\"	TROFF ACCENTS (` ' ^ ~ cedilla and 2 umlauts)
'\" The accent string must follow immediately the character to be accented.
'\" These strings are "tuned" to the Times Roman type faces ONLY.
'\" The R, I, and B fonts are assumed to be mounted in
'\" positions 1, 2, and 3, respectively.
'\" All of these strings alter the number register `:'.
'\"	Grave accent -- [aeou]\*`
.ds ` \\k:\h@-\\n(.wu*8u/10u@\h@\\n(.fu/2u*2u+1u-\\n(.fu*.2m@\(ga\h@|\\n:u@
'\"	Acute accent -- [aeou]\*'
.ds ' \\k:\h@-\\n(.wu*8u/10u@\h@\\n(.fu/2u*2u+1u-\\n(.fu*.2m+.07m@\(aa\h@|\\n:u@
'\"	Circumflex -- [aeou]\*^
.ds ^ \\k:\h@-\\n(.wu*8u/10u@\h@\\n(.fu/2u*2u+1u-\\n(.fu*.15m-.07m@\
\h@\\n(.fu-1u/2u*.02m@^\h@|\\n:u@
'\"	Tilde -- n\*~ (But watch out for ".tr ~")
.ds ~ \\k:\h@-\\n(.wu*8u/10u@\h@\\n(.fu/2u*2u+1u-\\n(.fu*.2m-.07m@\
\h@\\n(.fu-1u/2u*.05m@~\h@|\\n:u@
'\"	Cedilla -- c\*,
.ds , \\k:\h@-\\n(.wu*85u/100u@\v@.07m@,\v@-.07m@\h@|\\n:u@
'\"	Lower-case umlaut -- [aeou]\*:
.ds : \\k:\h@-\\n(.wu*85u/100u@\h@\\n(.fu/2u*2u+1u-\\n(.fu*3u*.06m@\
\h@3u-\\n(.fu/2u*.05m-.1m@\
\v@-.6m@\z.\h@\\n(.fu-1u/2u*.05m+.2m@.\v@.6m@\h@|\\n:u@
'\"	Upper-case umlaut -- [AEOU]\*;
.ds ; \\k:\h@-\\n(.wu*75u/100u@\h@\\n(.fu/2u*2u+1u-\\n(.fu*3u*.09m@\
\h@3u-\\n(.fu/2u*.06m-.15m@\h@\\n(.fu-1u/2u*.04m@\
\v@-.85m@\z.\h@.3m@.\v@.85m@\h@|\\n:u@
