V10/vol2/ms/refcard

.so /usr/lib/tmac/tmac.pictures
.fp 3 H
.po 1i
.de I
.ft 2
..
.de R
.ft 1
..
.de B
.bd R 2
\\$1
.bd R
..
.de hh
.br
.vs 10p
.ps 12
.bd 1 3
.ce
\\$1
.ps 9
.br
.bd 1
.sp
..
.de NP
'po 0
.ps 9
.ta .25i 3.75i 7.25i 7.7i
'po
'sp .2i
.mk z
..
.de FT
.po 0
.ps 9
.ta .25i 3.75i 7.25i
.po 1i
..
.wh -8p FT
.nr PN 1
.de b1
.br
.tm left col bottom at \\n(nl
.po +3.5i
.sp |\\nzu
.ph
..
.de b2
.br
.tm right col bottom at \\n(nl
.po -3.5i
.bp
.ph
.nr PN +1
..
.de ph
.nr x +1
.tl ''\\nx''
.sp .2i
..
.nr x 1
.wh 0 NP
.ll 3i
.lt 3i
.nr LL 3i
.nr IQ 4
.nr IR 4
.de IP
.RT
.if \\n(IP=0 .nr IP +1
.if \\n(.$ .LB "\\$1"
.if !\\n(.$ .LB
..
.de RT
.if \\n(IP .in -\\n(IQn
.if \\n(IP .nr IP -1
..
.de LP
.RT
.ti 0
.ne 3
.if \\n(.$ .LB \\$1
..
.de LB
.in +\\n(IQn
.ta \\n(IQn
.if \\n(.$ .ti -\\n(IQn
.if \\n(.$ \\$1\t\c
..
.de RS
.in +\\n(IRn
..
.	\"RE - retreat to the left
.de RE
.br
.in -\\n(IRn
..
.br
.rs
.sp 1i
.ps 14
.vs 16p
.ce 3
A Guide to Preparing
Documents with \-mcs and \-ms
.sp 2
.ps 10
.vs 12p
.ft I
.ce
L. L. Cherry
.ft I
.ce
M. E. Lesk
.ft R
.lt \n(.lu
.sp .5
.tl 'Bell Laboratories''July 1989'
.sp .5
.tl xx\l'\n(.lu'xx
.sp 1
.bd I 2
.vs 11p
.fi
This guide gives some simple examples of
document preparation on Bell Labs computers,
emphasizing the use of the \f(CW\-ms\fR and \f(CW\-mcs\fR macro
packages.
It enormously abbreviates
information in |reference(latest msmacros %no_cite)|reference(latest eqn %no_cite)|reference(latest tbl %no_cite)
.LP
|reference_placement
.vs 12p
.sp 1.5
.ce
.ps +2
Contents
.nf
.ps
.sp .5
.in .2i
.bd I
.ta 2.4i
.cs I 25
A TM or IM \fI\fR 2
A released paper \fI\fR 4
Headings, lists, displays, and keeps \fI\fR 5
Indents, double column and footnotes \fI\fR 6
Equations and registers \fI\fR 7
Tables and usage \fI\fR 8
.in 0
.cs I
.sp 1
.fi
.EQ
delim $$
.EN
Throughout the examples, input is shown in
.ft 3
.br
.ti +2n
this Helvetica sans serif font
.ft R
.br
while the resulting output is shown in
.ti +2n
this Times Roman font.
.nf
.sp  2
.ps 9
.vs 10p
.EQ
gsize 9
.EN
.b1
.hh "Commands for a TM or IM"
.nf
.ft 3
\&.DT July 1, 1989
\&.TI
\&The Role of the Allen Wrench in Modern
\&Electronics
\&.AH "J. Q. Pencilpusher" MH 11271 2345 2G-111 alice!jqp
\&.AH "X. Y. Hardwired" "" "" "" "" eddie.mit.edu!xyh M.I.T.
\&.SA
\&This abstract should be short enough to
\&fit on a single page cover sheet.
\&It must attract the reader into sending for
\&the complete memorandum.
\&.SE
\&.KW Tools Design
\&.TY TM n		\" for IM use .TY IM n
\&.NU 11271 890702 01 311403-0101 
\&.MY "" "" "" y "" y y ""
\&.PR 0
\&.RL y
\&.CO y
G. R. Emlin
\&.CE
\&.CV y
G. O. Blin
\&.CE
\&.SC 10
\&.NH
\&Introduction.
\&.PP
\&Now the first paragraph of actual text ...
\&...
\&Last line of text.
\&.SG
\&.NH
\&References ...
.ft
.sp
.fi
Commands not needed in a particular
format are ignored.
.sp 
.BP p1.ps 4.18 3.3 l 0 o
.b2
.BP p2.ps 4.18 3.3 l 0 o
.sp
.BP p3.ps 4.18 3.3 l 0 o
.b1
.hh "A Released Paper with Mathematics"
.ft 3
.nf
.EQ
delim off
.EN
\&.EQ
\&delim $$
\&.EN
\&.RP
.sp
.ft 1
\&... (as for a TM)
.sp
.ft 3
\&.SC 10
\&.NH
\&Introduction
\&.PP
\&The solution to the torque handle equation
\&.EQ (1)
\&sum from 0 to inf F ( x sub i ) = G ( x )
\&.EN
\&is found with the transformation $ x = rho over
\&theta $ where $ rho = G prime (x) $ and $theta$
\&is derived ...
.ft 1
.sp 2
.BP p4.ps 2.47 3.3 l 0 o
.sp
.BP p5.ps 2.47 3.3 l 0 o
.sp
.ft 1
.bd 1
.ps 9
.vs 10p
Other format possible (specify before \f3.TI\f1) is: \f3.TR\f1
(Computing Science Tech. Report).
.b2
..........
.hh "Headings"
.sp .5
.nf
.ft 3
.ta 2i
\&.NH	.SH
Introduction.	Appendix I
\&.PP	.PP
text text text	text text text
.ft 1
.bd 1 2
.sp
.br
1.  Introduction	Appendix I
.br
.sp .3v
.bd 1
\0\0text text text	\0\0text text text
.br
.sp 2
.hh "A Simple List"
.ft 3
.nf
\&.IP 1.
\&J. Pencilpusher and X. Hardwired,
\&.I
\&A New Kind of Set Screw,
\&.R
\&Proc. IEEE
\&.B 75
\&(1976), 23-255.
\&.IP 2.
\&H. Nails and R. Irons,
\&.I
\&Fasteners for Printed Circuit Boards,
\&.R
\&Proc. ASME
\&.B 23
\&(1974), 23-24.
\&.LP  \fP(terminates list)
.sp 1.5
.EQ
delim $$
gsize 9
.EN
.fi
.IP 1.
J. Pencilpusher and X. Hardwired,
.I
A New Kind of Set Screw,
.R
Proc. IEEE
$fat 75$
(1976), 23-255.
.IP 2.
H. Nails and R. Irons,
.I
Fasteners for Printed Circuit Boards,
.R
Proc. ASME
$fat 23$
(1974), 23-24.
.LP
.sp 2
.EQ
delim off
.EN
.hh "Displays"
.nf
.ft 3
\&hoboken harrison ...
\&.DS
\&and now
\&for something
\&completely different
\&.DE
\&murray hill berkeley heights ...
.ft
.sp 1
.fi
hoboken harrison newark roseville avenue grove street
east orange brick church orange highland avenue
mountain station south orange maplewood millburn short hills
summit new providence
.in .4i
.sp .5
.nf
and now
for something
completely different
.sp .5
.in
.fi
murray hill berkeley heights
gillette stirling millington lyons basking ridge
bernardsville far hills peapack gladstone
.sp .5
Options: \f3.DS L\f1: left-adjust;
\&\f3.DS C\f1: line-by-line center; \f3.DS B\f1: make block, then center.
.sp 2
.hh "Keeps"
.fi
Lines bracketed by the following commands are kept together,
and will appear entirely on one page:
.TS
center;
Lf3 5 L8 Lf3 5 L.
\&.KS	not moved	.KF	may float
\&.KE	through text	.KE	in text
.TE
.nf
.b1
.nf
.hh "Multiple Indents"
.ft 3
\&This is ordinary text to point out
\&the margins of the page.
\&.IP 1.
\&First level item
\&.RS
\&.IP a)
\&Second level.
\&.IP b)
\&Continued here with another second
\&level item, but somewhat longer.
\&.RE
\&.IP 2.
\&Return to previous value of the indenting now.
\&.IP 3.
\&Another line.
.ft
.sp 1
.fi
This is ordinary text to point out
the margins of the page.
.IP 1.
First level item
.RS
.IP a)
Second level.
.IP b)
Continued here with another second level
item, but somewhat longer.
.RE
.IP 2.
Return to previous value of the indenting now.
.IP 3.
Another
line.
.LP
.sp
.hh "Double Column"
.nf
.hy 0
.ft 3
\&.TI
The Declaration of Independence
\&.2C
.na
.fi
\&.PP
.br
When in the course of human events, it becomes
necessary for one people to dissolve the political bonds 
which have connected them with another,
.ft
.de xy
.nr X \\n(nl
.if \\n(xy=0 'rt
.if \\n(xy=0 'po +1.58i
.nr xy +1
..
.br
.ad
.hy 1 
.sp 1
.ce
The Declaration of Independence
.sp .5
.wh \n(nlu+1.8i xy
.ll 1.42i
.mk
.fi
.ti +2n
When in the course of human events, it becomes
necessary for one people to dissolve the political bonds which have
connected them with another, and to assume among the 
powers of the earth the separate and equal station to which
the laws of Nature and of Nature's God entitle them, a decent
respect to the opinions of mankind requires that they should
declare the causes which impel them to the separation.
.ti +2n
We hold these truths to be self-evident, that all men
are created equal, that they are endowed by their creator
with certain inalienable rights, that among these are life, liberty,
and the pursuit of happiness.\p
.br
.po -1.58i
.ll 3i
.lt 3i
.rm xy
.sp |\nXu
.sp
.hh "Footnotes"
.nf
.ft 3
\&Among the most important occupants
\&of the workbench are the long-nosed pliers.
\&Without these basic tools*
\&.FS
\&* As first shown by Tiger & Leopard
\&(1975).
\&.FE
\&few assemblies could be completed.  They may
\&lack the popular appeal of the sledgehammer
.ft
.sp 1.5
.fi
Among the most important occupants
of the workbench are the long-nosed
pliers.
Without these basic tools*
few assemblies could be completed.
They may lack the
popular appeal of the sledgehammer
.br
\l'1i'
.ps -1
.br
* As first shown by Tiger & Leopard (1975).
.ps
.br
.nf
.b2
............
.hh "Equations"
.nf
.de EQ  \"equation, breakout and display
.nr EF \\n(.u
.rm EE
.nr LE 1	\" 1 is center
.ds EL \\$1
.if "\\$1"L" .ds EL \\$2
.if "\\$1"L" .nr LE 0
.if "\\$1"C" .ds EL \\$2
.if "\\$1"I" .nr LE 0
.if "\\$1"I" .ds EE \\h'5n'
.if "\\$1"I" .if !"\\$3"" .ds EE \\h'\\$3n'
.if "\\$1"I" .ds EL \\$2
.nf
.di EZ
..
.de EN  \" end of a displayed equation
.di
.rm EZ
.lt \\n(.lu
.pc
.if \\n(dn>0 .if \\n(LE>0 .tl \(ts\(ts\\*(10\(ts\\*(EL\(ts
.if \\n(dn>0 .if \\n(LE=0 .tl '\\*(EE\\*(10''\\*(EL'
.pc %
.lt \\n(LLu
.if \\n(EF>0 .fi
.rm EL
.rm 10
.nr PE \\n(.d
..
.ft 3
A displayed equation is marked
with an equation number at the right margin
by adding an argument to the EQ line:
\&.EQ (1.3)
x sup 2 over a sup 2 ~=~ sqrt {p z sup 2 +qz+r}
\&.EN
.ft
.sp
.fi
A displayed equation is marked with an equation number
at the right margin by adding an argument to the EQ line:
.sp .4
.EQ (1.3)
x sup 2 over a  sup 2
~=~ sqrt { p z sup 2 + q z + r }
.EN
.sp 
.nf
.ft 3
\&.EQ  I (2.2a)
bold V bar sub nu~=~left [ pile {a above b above
c } right ] + left [ matrix { col { A(11) above .
above . } col { . above . above .} col {. above .
above A(33) }} right ] cdot left [ pile { alpha
above beta above  gamma } right ]
.nf
\&.EN
.ft
.sp
.EQ I (2.2a)
fat {roman  V}  bar sub nu~=~left [ pile {a above b above c}
right ] + left [ matrix { col { A(11) above .
above . } col { . above . above .} col {. above .
above A(33) }} right ] cdot left [ pile { alpha
above beta above  gamma } right ]
.EN
.sp
.ft 3
\&.EQ  L
F hat ( chi ) ~ mark = ~ | del V | sup 2
\&.EN
\&.EQ  L
.fi
.na
lineup =~ {left ( {partial V} over {partial x} right ) } sup 2
+ { left ( {partial V} over {partial y} right ) } sup 2
~~~~~~ lambda -> inf
.nf
\&.EN
.ft
.ta .25i
.sp
.EQ L
F hat ( chi ) ~ mark = ~ | del V | sup 2
.EN
.sp 1
.EQ L
delim off
lineup =~ {left ( {partial V} over {partial x} right ) } sup 2
+ { left ( {partial V} over {partial y} right ) } sup 2
~~~~~~ lambda -> inf
.EN
.rm EQ
.rm EN
.fi
.sp
.ft 3
$ a dot $,  $ b dotdot$,  $ xi tilde times
y vec$:
.EQ
delim $$
.EN
.ft R
.br
.sp
$ a dot $,  $ b dotdot$,  $ xi tilde times
y vec$.
.EQ
delim off
.EN
\h'.3i'(with delim $$ on, see panel 4).
.sp .5
See also the equations in the second table, panel 8.
.nf
.br
.sp
.bd I
.ft R
.hh "Some Registers You Can Change"
.nf
.mk
Line length
	.nr LL 7i
.sp .4
Title length
	.nr LT 7i
.sp .4
Point size
	.nr PS 9
.sp .4
Vertical spacing
	.nr VS 11
.sp .4
Column width
	.nr CW 3i
.sp .4
Intercolumn spacing
	.nr GW .5i
.sp .4
Margins \- head and foot
	.nr HM .75i
	.nr FM .75i
.sp .4
Paragraph indent
	.nr PI 2n
.rt
.po +1.6i
Paragraph spacing
	.nr PD 0
.sp .4
Page offset
	.nr PO 0.5i
.sp .4
Page heading
	.ds CH Appendix 
	    (center)
	.ds RH 7-25-76
	    (right)
	.ds LH Private
	    (left)
.sp .4
Page footer
	.ds CF Draft
	.ds LF
	.ds RF  \u similar \d
.sp .4
Page numbers
	.nr % 3
.po -1.6i
.b1
.hh Tables
.nf
.ds T \|\h'.35n'\v'-.1n'\s6\zT\s0\v'.1n'\h'-.35n'\(ci\|
.ft 3
.EQ
delim off
.EN
\&.TS\h'.5i'\fR(\f3\*T\f1 indicates a tab)\f3
\&allbox;
.nr x \n(nl
\&c s s
\&c c c
\&n n n.
\&AT&T Common Stock
\&Year\*TPrice\*TDividend
\&1984\*T15-20\*T$1\*.20
\&5\*T19-25\*T1\*.20
\&6\*T21-28\*T1\*.20
\&7\*T20-36\*T1\*.20
\&8\*T24-30\*T1\*.20
\&9\*T29-31\*T\*.30*
\&.TE
\&* (first quarter only)
.ft 1
.nr y \n(nl
.sp |\nxu
.di qq
.TS
allbox;
c s s
c c c
n1 n1 n1.
AT&T Common Stock
Year	Price	Dividend
1974	15-20	$1.20
5	19-25	1.20
6	21-28	1.20
7	20-36	1.20
8	24-30	1.20
9	29-37	.30*
.TE
* (first quarter only)
.br
.di
.in 3i-\n(TWu
.nf
.qq
.in 0
.if \ny>\n(nl .sp |\nyu
.sp .5
.ft 1
.fi
.ad
The meanings of the key-letters describing
the alignment of each entry are:
.br
.nf
.TS
center;
cf3 l6 cf3 l.
c	center	n	numerical
r	right-adjust	a	subcolumn
l	left-adjust	s	spanned
.TE
.fi
The global table options are
.ft 3
.bd I 2
.hy 0
center, expand, box, doublebox, allbox,
tab (\f2x\fP\|)
.ft 1
and
.ft 3
linesize (\f2n\fP\|).
.br
.hy 1
.ft 1
.bd I
.sp 1
.nf
.ta .1i
.ft 3
\&.TS\h'.5i'\fR(with delim $$ on, see panel 3)\fP
\&doublebox, center;
\&c c
\&l l.
\&Name\*TDefinition
\&.sp
\&Gamma\*T$GAMMA (z) = int sub 0 sup inf \e
	 t sup {z-1} e sup -t dt$
\&Sine\*T$sin (x) = 1 over 2i ( e sup ix - e sup -ix )$
\&Error\*T$ roman erf (z) = 2 over sqrt pi \e
	int sub 0 sup z e sup {-t sup 2} dt$
\&Bessel\*T$ J sub 0 (z) = 1 over pi \e
	int sub 0 sup pi cos ( z sin theta ) d theta $
\&Zeta\*T$ zeta (s) = \e
	sum from k=1 to inf k sup -s ~~( Re~s > 1)$
\&.TE
.ft
.sp
.EQ
delim $$
.EN
.vs +2p
.TS
doublebox, center;
c c
l l.
Name	Definition
.sp
Gamma	$GAMMA (z) = int sub 0 sup inf  t sup {z-1} e sup -t dt$
Sine	$sin (x) = 1 over 2i ( e sup ix - e sup -ix )$
Error	$ roman erf (z) = 2 over sqrt pi int sub 0 sup z e sup {-t sup 2} dt$
Bessel	$ J sub 0 (z) = 1 over pi int sub 0 sup pi cos ( z sin theta ) d theta $
Zeta	$ zeta (s) = sum from k=1 to inf k sup -s ~~( Re~s > 1)$
.TE
.vs -2p
.br
.bd I 2
.sp 1
.hh "Usage"
.ps 9
.vs 10p
.ds & \\s-1&\\s0
.TS
l.
Documents with just text:
.ft CW
\h'.25i'troff -mcs files
.R
With equations only:
.ft CW
\h'.25i'eqn files | troff -mcs
.R
With tables only:
.ft CW
\h'.25i'tbl files | troff -mcs
.R
With both tables and equations:
.ft CW
\h'.25i'tbl files\||\|eqn\||\|troff -mcs
.TE
.ft R
.fi
.ft 1
.bd I
.b2