.\"**********************************************************************
.\"* ****** - M E N R O F F / T R O F F M A C R O S ****** *
.\"* Produced for your edification and enjoyment by: *
.\"* Electronics Research Laboratory *
.\"* 1919 Addison Street Suite 105 *
.\"* Berkeley, California 94704 *
.\"* VERSION 2.28 First Release: 11 Sept 1978 *
.\"* See file \*(||/revisions for revision history *
.\"* Documentation is available. *
.\"**********************************************************************
.\" @(#)tmac.orig_me 2.28 %G%
.\" Code on .de commands:
.\" *** a user interface macro.
.\" &&& a user interface macro which is redefined
.\" when used to be the real thing.
.\" $$$ a macro which may be redefined by the user
.\" to provide variant functions.
.\" --- an internal macro.
.if !\n(.V .tm You are using the wrong version of NROFF/TROFF!!
.if !\n(.V .tm This macro package works only on the version seven
.if !\n(.V .tm release of NROFF and TROFF.
.\"
\f *** INTERNAL GP MACROS ***
.de @C \" --- change ev's, taking info with us
.de @D \" --- determine display type (Indent, Left, Center)
.if \n@>1 .tm >> @z, .z=\\n(.z ?a=\\n(?a
. tm Line \\n(c. -- Unclosed block, footnote, or other diversion (\\n(.z)
. bp \" force out final table
.rm @b\" \" don't start another page
.de @I \" --- initialize processor
.\"
\f *** STANDARD HEADERS AND FOOTERS ***
.de he \" *** define header
. ds |4 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
. ds |5 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
.de eh \" *** define even header
. ds |4 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
.de oh \" *** define odd header
. ds |5 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
.de fo \" *** define footer
. ds |6 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
. ds |7 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
.de ef \" *** define even foot
. ds |6 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
.de of \" *** define odd footer
. ds |7 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
.de ep \" *** end page (must always be followed by a .bp)
.\"
\f *** INTERNAL HEADER AND FOOTER MACROS ***
.if \n@>1 .tm >> @h %=\\n% ?a=\\n(?a ?b=\\n(?b ?w=\\n(?w
.if (\\n(.i+\\n(.o)>=\\n(.l \
. tm Line \\n(c. -- Offset + indent exceeds line length
.if t .if (\\n(.l+\\n(.o)>7.75i \
. tm Line \\n(c. -- Offset + line length exceeds paper width
.\" initialize a pile of junk
.nr ?h \\n(?H \" transfer "next page" to "this page"
.nr _w 0 \" reset max footnote width
.nr ?W 0 \" no wide floats this page (yet)
.\" begin actual header stuff
.if t .@m \" output cut mark
. sp |\\n(hmu \" move to header position
.@t $h \" output header title
.sp |\\n(tmu \" move to top of text
.mk _k \" for columned output
.if \\n(?n .nm 1 \" restore line numbering if n1 mode
.nr $c 1 \" set first column
.if \n@>4 .tm -- @h >> .ns nl=\\n(nl %=\\n% _k=\\n(_k tm=\\n(tm
. de @m \" --- output cut mark (only on C/A/T-style)
.de @n \" --- new column or page
.if \n@>3 .tm >> @n nl=\\n(nl %=\\n% ?f=\\n(?f ?o=\\n(?o
.if (\\n(_w<=\\n($l)&(\\n(?W=0) \
. nr _b (\\n(ppu*\\n($ru)/2u \" compute fudge factor (must be < 1P)
. if \\n(_bu>((\\n(bmu-\\n(fmu-(\\n(tpu*\\n($ru))/2u) \
. nr _b (\\n(ppu*\\n($ru)-\n(.Vu
.nr _b +(\\n(ppu*\\n($ru) \" add 1 paragraph v in case of sweep past
.if \n@>2 .tm @n .p=\\n(.p bm=\\n(bm _b=\\n(_b _B=\\n(_B
.nr ?f 0 \" reset footnote flag
. (f _ \" reprocess footnotes which run off page
. |h \" output the table header
. mk #T \" for tbl commands
.if (\\n(?a)&((\\n($c<2):(\\n(?w=0)) \
. nr ?a 0 \" output floating keep
. mk _k \" don't overstrike wide keeps
.$H \" special column header macro
.if \n@>1 .tm >> @f %=\\n% nl=\\n(nl ?a=\\n(?a ?b=\\n(?b ?f=\\n(?f
.if \n@>2 .nr VL \\n(.pu-\\n(nlu
.if \n@>2 .tm @f bm=\\n(bm _B=\\n(_B _b=\\n(_b .p-nl=\\n(VL
. nr T. 1 \" for tbl commands (to output bottom line)
. T# 1 \" output the sides and bottom lines
. @k |b\" \" output bottom of page tables
. @o \" output footnote if present
. @c \" handle new column
.de @o \" --- output footnote
.if \n@>2 .tm @o last printed text = \\n(nl placing @r trap at -\\n(_B
.if \n@>2 .tm @o triggered @r (?o) = \\n(?o
. di \" just in case triggered @r
.if \n@>2 .tm >> @c %=\\n%
.sp |\\n(.pu-\\n(fmu-(\\n(tpu*\\n($ru) \" move to footer position
.@t $f \" output footer title
.de @t \" --- output header or footer title
. sz \\n(tp \" set header/footer type fonts, etc.
. lt \\n(_Lu \" make title span entire page
.de $h \" $$$ print header
.if !\(ts\\*(|z\(ts\(ts \
.de $f \" $$$ print footer
.if !\(ts\\*(|z\(ts\(ts \
.de @r \" --- reprocess overflow footnotes
.if \n@>3 .tm >> @r .z=\\n(.z ?f=\\n(?f ?a=\\n(?a ?b=\\n(?b _b=\\n(_b
.di |o \" save overflow footnote
.\"
\f *** COMMANDS WITH VARIANT DEFINITIONS ***
.rn bp @b \" --- begin page
.de bp \" *** begin new page (overrides columns)
.nr $c \\n($m \" force new page, not new column
. @h \" 'spring' the header trap
.rn ll xl \" *** special line length (local)
.de ll \" *** line length (global to environments)
.if (\\n($m<=1):(\\n($l>\\n(_L) \
.rn po @O \" --- local page offset
.de po \" *** page offset
.\"
\f *** MISCELLANEOUS ROFF COMMANDS ***
.de hx \" *** suppress headers and footers next page
.de ix \" *** indent, no break
.de bl \" *** contiguous blank lines
.de n1 \" *** line numbering 1
.de n2 \" *** line numbering 2
.de ro \" *** roman page numbers
.de ar \" *** arabic page numbers
.de m1 \" *** position one space
.de m2 \" *** position two space
.nr tm \\n(hmu+\\n(tpp+\\$1v
.de m3 \" *** position three space
.nr bm \\n(fmu+\\n(tpp+\\$1v
.de m4 \" *** position four space
.de sk \" *** leave a blank page (next page)
. tm Line \\n(c. -- I cannot skip multiple pages
.\"
\f *** MISCELLANEOUS USER SUPPORT COMMANDS ***
.de re \" *** reset tabs (TROFF defines 15 stops default)
.ta 0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i
.de re \" *** reset tabs (NROFF version)
.ta 0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i
.de ba \" *** set base indent
.de hl \" *** draw horizontal line
.\"
\f *** PARAGRAPHING ***
.de lp \" *** left aligned paragraph
.de ip \" *** indented paragraph w/ optional tag
.if (\\n(ii>0)&(\\n(ii<1n) \
. el \&\\$1\h'|\\n(_0u'\c
.de np \" *** numbered paragraph
. nr $p 0 \" reset number after .bu
.nr $p +1 \" increment paragraph number
\0(\\n($p)\h'|\w'\0(000)\0'u'\c
.de bu \" *** bulleted paragraph
. ns \" don't space between .bu paragraphs
.nr $p 0-1 \" mark "bulleted paragraph" mode
.de @p \" --- initialize for paragraph
.@I \" initialize macro processor
.if "\\n(.z"|e" .tm Line \\n(c. -- Unmatched continued equation
.\"
\f *** SECTION HEADINGS ***
.de sh \" &&& section heading
.sh "\\$1" "\\$2" \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
.de $p \" $$$ print section heading
.if (\\n(si>0)&(\\n(.$>2) \
. sp \\n(ssu \" one of them is non-null
. ne \\n(.Lv+\\n(.Vu+\\n(psu+(\\n(spu*\\n($ru*\\n(.Lu)
. if \w"\\$1">0 \\$1\f1\ \ \&
.de uh \" *** unnumbered section heading
.\"
\f *** COLUMNNED OUTPUT ***
.de 2c \" *** double columned output
. 1c \" revert to 1c if already 2c
. nr $s \\$1n \" param 1: column seperation
.nr $l (\\n(.l-((\\n($m-1)*\\n($s))/\\n($m
.de 1c \" *** single columned output
.ll \\n(_Lu \" return to normal output
.de bc \" *** begin column
.\"
\f *** FLOATING TABLES AND NONFLOATING BLOCKS ***
.de (z \" &&& begin floating keep
.de )z \" &&& end floating keep
.tm Line \\n(c. -- unmatched .)z
.de (t \" XXX temp ref to (z
.de )t \" XXX temp ref to )t
.de (b \" *** begin block
.if (\\n(bt=0):(\\n(.t<\\n(bt) \
. ne \\n(dnu \" make it all on one page
.if !"\\n(.z"" .tm Line \\n(c. -- Illegal nested keep \\n(.z
.de @M \" --- set modes for display
. fi \" set fill mode if "F" parameter
.if !"\\n(.z"|k" .tm Line \\n(c. -- Close of a keep which has never been opened
.de (c \" *** begin block centered text
.if "\\n(.z"|c" .tm Line \\n(c. -- Nested .(c requests
.de )c \" *** end block centered text
.if !"\\n(.z"|c" .tm Line \\n(c. -- Unmatched .)c
.br \" force out final line
.if \n@>4 .tm >> .)c .l=\\n(.l .i=\\n(.i $i=\\n($i dl=\\n(dl
.in (\\n(.lu-\\n(.iu-\\n(dlu)/2u
.if \n@>4 .tm -- .)c << .in .l=\\n(.l .i=\\n(.i dl=\\n(dl
.\"
\f *** BLOCK QUOTES (OR WHATEVER) AND LISTS ***
.de (q \" *** begin block quote
.de )q \" *** end block quote
.\"
\f *** PREPROCESSOR SUPPORT ***
.de EQ \" &&& begin equation
.de TS \" &&& begin table
.de ]- \" &&& initialize reference
.de ]< \" &&& initialize reference
.if t .ds [. \s-2\v'-.4m'\f1
.if t .ds .] \v'.4m'\s+2\fP
.de IS \" *** start ideal picture
.de IE \" *** end ideal picture
.de PS \" *** start picture: $1=height, $2=width in units
.de PE \" *** end picture
.de GS \" *** start gremlin picture
.nr g7 (\\n(.lu-\\n(g1u)/2u
.if "\\$1"L" .nr g7 \\n(.iu
.if "\\$1"R" .nr g7 \\n(.lu-\\n(g1u
.de GE \" *** end gremlin picture
.de GF \" *** finish gremlin picture; stay at top
.de sz \" *** set point size and vertical spacing
.vs \\n(.su*\\n($ru \" default vs at pointsize + 20%
.de r \" *** enter roman font
.if \\n(.$ \&\\$1\f\\n(_F\\$2
.de i \" *** enter italic
.if \\n(.$ \&\\$1\f\\n(_F\\$2
.de b \" *** enter boldface (underline in NROFF)
.if \\n(.$ \&\\$1\f\\n(_F\\$2
.de rb \" *** enter real boldface (not underlined in NROFF)
.if \\n(.$ \&\\$1\f\\n(_F\\$2
.de u \" *** enter underlined word
.de q \" *** enter quoted word
.de bi \" *** enter word in bold italics
.ie t \&\k~\\$1\h'|\\n~u+(\\w' 'u/4u)'\\$1\fP\\$2
.de bx \" *** enter boxed word
.ie \\n($T \&\f2\\$1\fP\\$2
.el \k~\(br\|\\$1\|\(br\l'|\\n~u\(rn'\l'|\\n~u\(ul'\^\\$2
.de sm \" *** print in smaller font
.de @F \" --- change font (8 -> underlined, 0 -> no change)
.de (f \" &&& begin footnote
.de )f \" &&& end footnote
.tm Line \\n(c. -- unmatched .)f
.de $s \" $$$ footnote separator
.\"
\f *** DELAYED TEXT ***
.de (d \" &&& begin delayed text
.de )d \" &&& end delayed text
.tm Line \\n(c. -- unmatched .)d
.\"
\f *** INDEXES (TABLE OF CONTENTS) ***
.de (x \" &&& begin index
.de )x \" &&& end index entry
.tm Line \\n(c. -- unmatched .)x
.\"
\f *** STUFF FOR "STANDARD" PAPERS ***
.de th \" *** set "thesis" mode
.de +c \" *** begin chapter
.ep \" force out footnotes
. bp \" force out a table or more footnote
.in \\n($iu \" reset the indent
.de ++ \" *** declare chapter type
. nr _0 11 \" renumbered chapter
. nr _0 12 \" renumbered appendix
. nr _0 3 \" preliminary material
. nr _0 4 \" bibliographic material
. tm Line \\n(c. -- Bad mode to .++
.if (\\n(_0=3):(\\n(_0=5) \
. pn 1 \" must do before .ep
.ep \" end page for correct page number types
.if !\\n(_0=\\n(_M .if \\n(_M=3 \
.de $c \" $$$ print chapter title
.ie \\n(_M=1 CHAPTER\ \ \\n(ch
.el .if \\n(_M=2 APPENDIX\ \ \\n(ch
.if \w"\\$1" .sp 3-\\n(.L
.if (\\n(_M<3):(\w"\\$1") \
. $C Chapter \\n(ch "\\$1"
. $C Appendix \\n(ch "\\$1"
.de ac \" *** setup for ACM photo-ready paper
.de lo \" *** pull in the set of local macros
.\" all these macros should be named "*X", where X is any letter
.if \n(mo=1 .ds mo January
.if \n(mo=2 .ds mo February
.if \n(mo=8 .ds mo August
.if \n(mo=9 .ds mo September
.if \n(mo=10 .ds mo October
.if \n(mo=11 .ds mo November
.if \n(mo=12 .ds mo December
.if \n(dw=1 .ds dw Sunday
.if \n(dw=2 .ds dw Monday
.if \n(dw=3 .ds dw Tuesday
.if \n(dw=4 .ds dw Wednesday
.if \n(dw=5 .ds dw Thursday
.if \n(dw=6 .ds dw Friday
.if \n(dw=7 .ds dw Saturday
.ds td \*(mo \n(dy, 19\n(yr
.\"
\f *** PARAMETRIC INITIALIZATIONS ***
. vs 9p \" for 12-pitch DTC terminals
.nr $r \n(.v/\n(.s \" ratio of vs to ps for .sz request
.nr $R \n($r \" ratio for displays & footnotes
.nr hm 4v \" header margin
.nr bm 6v \" bottom margin
.nr fm 3v \" footer margin
.nr tf 3 \" title font: (real) Times Bold
.nr tp 10 \" title point size
.nr bi 4m \" indent for blocks
.nr pi 5n \" indent for paragraphs
.nr pf 1 \" normal text font
.nr pp 10 \" normal text point size
.nr qi 4n \" indent for quotes
.nr qp -1 \" down one point
.nr ii 5n \" indent for .ip's and .np's
.nr $m 1 \" max number of columns
.nr $s 4n \" column separation
.\"
\f *** OTHER INITIALIZATION ***
. ds [ \v'-0.4m'\x'-0.2m'\s-3
. ds < \v'0.4m'\x'0.2m'\s-3
. po -0.5i \" make ugly line on LHS on C/A/T typesetters
.nr $b \nb \" figure the real font 8 font
. if n .nr $b 2 \" italic
.nr ps 0.5v \" paragraph pre/post spacing
.nr bs \n(ps \" block pre/post spacing
.nr qs \n(ps \" quote pre/post spacing
.nr zs 1v \" float-block pre/postspacing
.nr xs 0.2v \" index prespacing
.nr fs 0.2v \" footnote prespacing
.if n .nr es 1v \" equation pre/postspacing
.nr $l \n(.lu \" line length
.nr _L \n(.lu \" line length of page
.nr $c 1 \" current column number
.nr $f 1 1 \" footnote number
.ds * \*[1\*]\k*\" \" footnote "name"
.nr $d 1 1 \" delayed text number
.ds # [1]\k#\" \" delayed text "name"
.nr _M 1 \" chapter mode is chapter
.ds lq \&"\" \" left quote
.ds rq \&"\" \" right quote
.\" *** FOREIGN LETTERS AND SPECIAL CHARACTERS ***
.de sc \" *** define special characters