BSD 4_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Thu, 23 Jun 1983 02:55:51 +0000 (18:55 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Thu, 23 Jun 1983 02:55:51 +0000 (18:55 -0800)
Work on file usr/lib/ms/README
Work on file usr/lib/ms/end.awk
Work on file usr/lib/ms/endnote
Work on file usr/lib/ms/s.acc
Work on file usr/lib/ms/s.eqn
Work on file usr/lib/ms/s.cov
Work on file usr/lib/ms/s.ths
Work on file usr/lib/ms/s.ref
Work on file usr/lib/ms/s.tbl
Work on file usr/lib/ms/s.toc

Synthesized-from: CSRG/cd1/4.2

usr/lib/ms/README [new file with mode: 0644]
usr/lib/ms/end.awk [new file with mode: 0644]
usr/lib/ms/endnote [new file with mode: 0644]
usr/lib/ms/s.acc [new file with mode: 0644]
usr/lib/ms/s.cov [new file with mode: 0644]
usr/lib/ms/s.eqn [new file with mode: 0644]
usr/lib/ms/s.ref [new file with mode: 0644]
usr/lib/ms/s.tbl [new file with mode: 0644]
usr/lib/ms/s.ths [new file with mode: 0644]
usr/lib/ms/s.toc [new file with mode: 0644]

diff --git a/usr/lib/ms/README b/usr/lib/ms/README
new file mode 100644 (file)
index 0000000..8cbf5fa
--- /dev/null
@@ -0,0 +1,57 @@
+This directory, /usr/lib/ms, contains various macro files used
+by the -ms package, along with various scripts that are useful
+for text formatting.  These scripts are not supported commands--
+they are examples that may assist you with document preparation.
+These scripts are described below:
+
+endnote
+-------
+This program takes -ms footnotes (text placed between .FS and .FE
+macros) and moves them to the end of your output.  It should be
+used with numbered footnotes, which are entered like this:
+
+       this is best explained by Hodgkins.\**
+       .FS
+       Arthur Hodgkins, \fIThe Bone Marrow,\fP
+       Johns Hopkins Press, Baltimore, 1982.
+       .FE
+
+When you want to produce numbered endnotes instead of footnotes,
+you can run the program as follows:
+
+       % /usr/lib/ms/endnote filename(s) | nroff -ms
+
+Other nroff options, such as -T to specify terminal type, may
+also be given.  If you're using refer, tbl, or eqn, they should
+follow /usr/lib/ms/endnote, in the proper order.  The endnote
+program creates the file "endnotes" in the working directory;
+the file is removed afterward endnote finishes.  If this file
+already exists, the program exits with an error message.
+
+After a while you may find it more convenient to copy this script
+to your own directory, rather than saying /usr/lib/ms/endnote
+every time you want to run it.  To do this, type:
+
+       % cp /usr/lib/ms/endnote endnote
+       % chmod +x endnote
+
+The first command will copy it into your working directory, and
+the second will make it executable.
+
+swapacc
+-------
+This program takes accent marks in the old -ms format (where they
+come before the accented letter) and changes them into the new .AM
+format (where the come after the accented letter).
+
+       Old format:     t\*'el\*'ephone
+       New format:     te\*'le\*'phone
+
+The swapacc program is best run from inside the editor:
+
+       :1,$ ! /usr/lib/ms/swapacc
+
+The first to the last lines of the editor buffer will be sent to
+the shell, which will run /usr/lib/ms/swapacc, and then return
+all lines to where they were before.
+
diff --git a/usr/lib/ms/end.awk b/usr/lib/ms/end.awk
new file mode 100644 (file)
index 0000000..9707ea6
--- /dev/null
@@ -0,0 +1,21 @@
+BEGIN {
+       print ".bp"             >  "endnotes"
+       print ".nr # 0 1"       >> "endnotes"
+       print ".ds # \\\\n+#."  >> "endnotes"
+       print ".TL"             >> "endnotes"
+       print "ENDNOTES"        >> "endnotes"
+       print ".sp"             >> "endnotes"
+       }
+{
+       if ($1 == ".FS") {
+               inNote = 1
+               print ".IP \\*#" >> "endnotes"
+       }
+       else if ($1 == ".FE")
+               inNote = 0;
+
+       else if (inNote)
+               print $0 >> "endnotes"
+       else
+               print
+}
diff --git a/usr/lib/ms/endnote b/usr/lib/ms/endnote
new file mode 100644 (file)
index 0000000..4bc5653
--- /dev/null
@@ -0,0 +1,18 @@
+: endnote - move footnotes to separate file
+
+if test $# -eq 0
+then
+       echo "Usage: endnote textfile ...
+       moves all footnotes to separate file of endnotes
+       sends text, then endnotes, to standard output"
+       exit
+fi
+if test -f endnotes
+then
+       echo "endnotes exist - mv or rm before proceeding"
+       exit
+fi
+
+awk -f /usr/lib/ms/end.awk $*
+cat endnotes
+rm -f endnotes
diff --git a/usr/lib/ms/s.acc b/usr/lib/ms/s.acc
new file mode 100644 (file)
index 0000000..1980ae4
--- /dev/null
@@ -0,0 +1,79 @@
+.      \" AM - accent mark definitions
+.bd S B 3
+.      \" fudge factors for nroff and troff
+.if n \{\
+.      ds #H 0
+.      ds #V .8m
+.      ds #F .3m
+.      ds #[ \f1
+.      ds #] \fP
+.\}
+.if t \{\
+.      ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.      ds #V .6m
+.      ds #F 0
+.      ds #[ \&
+.      ds #] \&
+.\}
+.      \" simple accents for nroff and troff
+.if n \{\
+.      ds ' \h'-1'\'
+.      ds ` \h'-1'\`
+.      ds ^ \h'-1'^
+.      ds , \h'-1',
+.      ds ~ \h'-1'~
+.      ds ? ?
+.      ds ! !
+.      ds / \h'-1'\(sl
+.      ds q o\h'-1',
+.\}
+.if t \{\
+.      ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.      ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.      ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.      ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.      ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.      ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.      ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.      ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.      ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.      \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.      \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.      \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.      ds : \h'-1'"
+.      ds 8 B
+.      ds v \h'-1'\o'\(aa\(ga'
+.      ds _ \h'-1'^
+.      ds . \h'-1'.
+.      ds 3 3
+.      ds o a
+.      ds d- d\h'-1'\(ga
+.      ds D- D\h'-1'\(hy
+.      ds th \o'bp'
+.      ds Th \o'LP'
+.      ds ae ae
+.      ds Ae AE
+.      ds oe oe
+.      ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
diff --git a/usr/lib/ms/s.cov b/usr/lib/ms/s.cov
new file mode 100644 (file)
index 0000000..f732688
--- /dev/null
@@ -0,0 +1,256 @@
+.      \" TL - title and initialization
+.de TL
+.if \\n(TM .nr ST 1
+.if \\n(TM .pn 0
+.br
+.nr TV 1
+.nr YE 1
+.nr SJ \\n(.j
+.di WT
+.na
+.fi
+.ll 5.0i
+.ft 3
+.ps 12
+.hy 0
+..
+.      \" TX - actually print title
+.de TX
+.rs
+.sp .5i
+.ce 1000
+.if n .ul 1000
+.ps 12
+.ft 3
+.vs 15p
+.ne 4
+.hy 0
+.WT
+.hy 14
+.ce 0
+.ul 0
+..
+.      \" AU - author(s)
+.de AU
+.nr AV 1
+.ad \\n(SJ
+.br
+.di
+.br
+.nf
+.nr NA +1
+.di A\\n(NA
+.ll \\n(LLu
+.if t .ft 2
+.if n .ft 1
+.ps 10
+..
+.      \" AI - author's institution
+.de AI
+.br
+.ft 1
+.di
+.di I\\n(NA
+.nf
+..
+.      \" AX - actually print authors and institutions
+.de AX
+.ft 1
+.rs
+.ce 1000
+.if n .ul 0
+.ps 10
+.vs 12p
+.if n .sp 2
+.if t .sp
+.A1
+.if n .sp 
+.if t .sp .5
+.ns
+.I1
+.if \\n(NA-1 .if n .sp 2
+.if \\n(NA-1 .if t .sp
+.A2
+.if \\n(NA-1 .if n .sp
+.if \\n(NA-1 .if t .sp .5
+.ns
+.I2
+.if \\n(NA-2 .if t .sp
+.if \\n(NA-2 .if n .sp 2
+.A3
+.if \\n(NA-2 .if t .sp .5
+.if \\n(NA-2 .if n .sp
+.ns
+.I3
+.if \\n(NA-3 .if t .sp
+.if \\n(NA-3 .if n .sp 2
+.A4
+.if \\n(NA-3 .if t .sp .5
+.if \\n(NA-3 .if n .sp
+.ns
+.I4
+.if \\n(NA-4 .if t .sp
+.if \\n(NA-4 .if n .sp 2
+.A5
+.if \\n(NA-4 .if n .sp
+.if \\n(NA-4 .if t .sp .5
+.ns
+.I5
+.if \\n(NA-5 .if t .sp
+.if \\n(NA-5 .if n .sp 2
+.A6
+.if \\n(NA-5 .if n .sp
+.if \\n(NA-5 .if t .sp .5
+.ns
+.I6
+.if \\n(NA-6 .if t .sp
+.if \\n(NA-6 .if n .sp 2
+.A7
+.if \\n(NA-6 .if n .sp
+.if \\n(NA-6 .if t .sp .5
+.ns
+.I7
+.if \\n(NA-7 .if t .sp
+.if \\n(NA-7 .if n .sp 2
+.A8
+.if \\n(NA-7 .if n .sp
+.if \\n(NA-7 .if t .sp .5
+.ns
+.I8
+.if \\n(NA-8 .if t .sp
+.if \\n(NA-8 .if n .sp 2
+.A9
+.if \\n(NA-8 .if n .sp
+.if \\n(NA-8 .if t .sp .5
+.ns
+.I9
+..
+.      \" AB - abstract begin
+.de AB
+.br
+.di
+.ul 0
+.ce 0
+.nr 1T 1
+.nr IK 1
+.nr KI 1
+.di WB
+.rs
+.nr AJ 1
+.ce 1
+.ft 2
+.if n .ul
+.ll \\n(LLu
+.if \\n(.$=0 ABSTRACT
+.if \\n(.$>0 .if !\a\\$1\ano\a  \\$1
+.if \\n(.$=0 .sp
+.if \\n(.$>0 .if !\a\\$1\ano\a .sp
+.hy 14
+.ul 0
+.ce 0
+.fi
+.ft 1
+.nr OJ \\n(.i
+.in +\\n(.lu/12u
+.ll -\\n(.lu/12u
+.br
+.ps \\n(PS
+.if \\n(VS>=40 .vs \\n(VSu
+.if \\n(VS<=39 .vs \\n(VSp
+.ti +\\n(PIu
+.if \\n(TM .ls 1
+..
+.      \" AE - abstract end
+.de AE
+.br
+.di
+.ll \\n(LLu
+.ps \\n(PS
+.if \\n(VS>=40 .vs \\n(VSu
+.if \\n(VS<=39 .vs \\n(VSp
+.nr 1T 0
+.nr IK 0
+.in \\n(OJu
+.nr AJ 0
+.di
+.ce 0
+.if \\n(ST>0 .SY
+.if \\n(ST<3 .rm SY
+.if \\n(TM .ls 2
+..
+.      \" SY - cover sheet of released paper
+.de SY
+.ll \\n(LLu
+.if !\\n(LT .nr LT \\n(LLu
+.ns
+.if \\n(TV .TX
+.if \\n(AV .AX
+.rs
+.ce 0
+.nf
+.sp 3
+.pn 2
+.af PN i
+.ls 1
+.WB
+.ls 
+.sp 3v
+\\*(DY
+.af PN 1
+.sp |9i
+.if \\n(FP>0 .FA
+.FG
+.fi
+..
+.      \" S2 - cover and page 1 of RP
+.de S2
+.ce 0
+.br
+.SY
+.rm SY
+.bp 1
+.if \\n(TV .TX
+.if \\n(AV .AX
+.rs
+.ce 0
+.ft 1
+.ad \\n(SJ
+..
+.      \" S1 - cover and page 1 of RP (no p.1 title)
+.de S1
+.ce 0
+.br
+.SY
+.rm SY
+.bp 1
+.rs
+.ce 0
+.ft 1
+.ad \\n(SJ
+..
+.      \" S0 - conserve paper format (without RP)
+.de S0
+.ce 0
+.br
+.ll \\n(LLu
+.if \\n(TV+\\n(AV>0 .ns
+.if \\n(TV .TX
+.if \\n(AV .AX
+.if \\n(TV+\\n(AV>0 .rs
+.ce 0
+.if \\n(TV>0 .sp 2
+.ls 1
+.if \\n(FP>0 \{\
+.      FJ
+.      nf
+.      FG
+.      fi
+.      FK
+.      nr FP 0
+.\}
+.nf
+.WB
+.ls
+.fi
+.ad \\n(SJ
+..
diff --git a/usr/lib/ms/s.eqn b/usr/lib/ms/s.eqn
new file mode 100644 (file)
index 0000000..e03c4bd
--- /dev/null
@@ -0,0 +1,57 @@
+.bd S B 3
+.      \" EQ - equation, breakout and display
+.de EQ
+.nr UR \\n(.u
+.rm EE
+.nr LE 1       \" default centered
+.ds EL \f1\\$1\fP
+.if \a\\$1\aC\a .ds EL \f1\\$2\fP
+.if \a\\$1\aL\a \{\
+.      ds EL \f1\\$2\fP
+.      nr LE 0
+.\}
+.if \a\\$1\aI\a \{\
+.      ds EL \f1\\$2\fP
+.      nr LE 0
+.      ds EE \\h'|10n'
+.      if !\a\\$3\a\a .ds EE \\h'\\$3'
+.\}
+.if \\n(YE>0 .nf
+.di EZ
+..
+.      \" EN - end of a displayed equation
+.de EN
+.if !\a\\*(10\a\a .br
+.di
+.rm EZ
+.nr ZN \\n(dn
+.if \\n(ZN>0 .if \\n(YE=0 .LP
+.if \\n(ZN=0 .if !\a\\*(EL\a\a .nr ZN 1
+.if \a\\n(.z\a\a .if \\n(ZN>0 .if !\\n(nl=\\n(PE .sp \\n(DDu
+.if !\a\\n(.z\a\a .if \\n(ZN>0 .if !\\n(.d=\\n(PE .sp \\n(DDu
+.pc
+.if \\n(BD>0 .nr LE 0  \" can't mean centering in this case.
+.if \\n(MK>0 .if \\n(LE=1 .ds EE \\h'|10n'
+.if \\n(MK>0 .nr LE 0  \" don't center if mark/lineup
+.lt \\n(.lu
+.if \\n(EP=0 .if \\n(ZN>0 \{\
+.      if \\n(LE>0 .tl \a\a\\*(10\a\\*(EL\a
+.      if \\n(LE=0 .if \\n(BD=0 .tl \a\\*(EE\\*(10\a\a\\*(EL\a
+.      if \\n(LE=0 .if \\n(BD>0 .if \\n(BD<\\w\a\\*(10\a .nr BD \\w\a\\*(10\a
+.      if \\n(LE=0 .if \\n(BD>0 \!\\*(10\\t\\*(EL
+.\}
+.if \\n(EP>0 .if \\n(ZN>0 \{\
+.      if \\n(LE>0 .tl \a\\*(EL\a\\*(10\a\a
+.      if \\n(LE=0 .if \\n(BD=0 .tl \a\\*(EL\\*(EE\\*(10\a\a\a
+.      if \\n(LE=0 .if \\n(BD>0 .if \\n(BD<\\w\a\\*(10\a .nr BD \\w\a\\*(10\a
+.      if \\n(LE=0 .if \\n(BD>0 \!\\h'-\\\\n(.iu'\\*(EL\\h'|0'\\*(10
+.\}
+.lt \\n(LLu
+.pc %
+.if \\n(YE>0 .if \\n(UR>0 .fi
+.rm 10 11 12 13 14 15 16 17 18 19 20 21 22 23 EL
+.rr 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+.if \\n(ZN>0 .if t .sp \\n(DDu
+.if \a\\n(.z\a\a .nr PE \\n(nl
+.if !\a\\n(.z\a\a .nr PE \\n(.d
+..
diff --git a/usr/lib/ms/s.ref b/usr/lib/ms/s.ref
new file mode 100644 (file)
index 0000000..5724d27
--- /dev/null
@@ -0,0 +1,155 @@
+.      \" refer macros for citations
+.de []
+.][ \\$1
+..
+.de ][
+.if \\$1>4 .tm %M undefined (Bell Labs)
+.[\\$1
+..
+.if n .ds [o \&"
+.if n .ds [c \&"
+.if t .ds [o ``
+.if t .ds [c ''
+.ds <. .
+.ds <, ,
+.      \" [0 - other type of citation
+.de [0
+.FS
+.nr [: 0
+.if !\a\\*([F\a\a .FP \\*([F
+.if !\a\\*([Q\a\a \{\
+.nr [: 1
+\\*([Q\c
+.\}
+.if !\a\\*([A\a\a \{\
+.nr [: 1
+\\*([A\c
+.\}
+.if !\a\\*([T\a\a \{\
+.if \\n([:>0 ,
+.nr [: 1
+\f2\\*([T\f1\c
+.\}
+.if !\a\\*([S\a\a , \\*([S\c
+.if !\a\\*([V\a\a , \\*([V\c
+.if !\a\\*([P\a\a \{\
+.ie \\n([P>0 , pp. \\*([P\c
+.el , p. \\*([P\c
+.\}
+.if !\a\\*([C\a\a , \\*([C\c
+.if !\a\\*([D\a\a , \\*([D\c
+.if \\n([:>0 \&.
+.if !\a\\*([O\a\a \\*([O
+.FE
+..
+.      \" [1 - journal article
+.de [1
+.FS
+.if !\a\\*([F\a\a .FP \\*([F
+.if !\a\\*([Q\a\a \\*([Q,
+.if !\a\\*([A\a\a \\*([A,
+.if !\a\\*([T\a\a \\*([o\\*([T,\\*([c
+\f2\\*([J\f1\c
+.if !\a\\*([V\a\a , vol. \\*([V\c
+.if !\a\\*([N\a\a , no. \\*([N\c
+.if !\a\\*([P\a\a \{\
+.ie \\n([P>0 , pp. \\*([P\c
+.el , p. \\*([P\c
+.\}
+.if !\a\\*([I\a\a , \\*([I\c
+.if !\a\\*([C\a\a , \\*([C\c
+.if !\a\\*([D\a\a , \\*([D\c
+\&.
+.if !\a\\*([O\a\a \\*([O
+.FE
+..
+.      \" [2 - book
+.de [2
+.FS
+.if !\a\\*([F\a\a .FP \\*([F
+.if !\a\\*([Q\a\a \\*([Q,
+.if !\a\\*([A\a\a \\*([A,
+.if !\a\\*([T\a\a \f2\\*([T,\f1
+.if !\a\\*([S\a\a \\*([S,
+.if !\a\\*([V\a\a \\*([V,
+.if !\a\\*([P\a\a \{\
+.ie \\n([P>0 pp. \\*([P,
+.el p. \\*([P,
+.\}
+\\*([I\c
+.if !\a\\*([C\a\a , \\*([C\c
+.if !\a\\*([D\a\a , \\*([D\c
+\&.
+.if !\a\\*([O\a\a \\*([O
+.FE
+..
+.      \" [3 - article in book
+.de [3
+.FS
+.if !\a\\*([F\a\a .FP \\*([F
+.if !\a\\*([Q\a\a \\*([Q,
+.if !\a\\*([A\a\a \\*([A,
+.if !\a\\*([T\a\a \\*([o\\*([T,\\*([c
+in \f2\\*([B\f1\c
+.if !\a\\*([E\a\a , ed. \\*([E\c
+.if !\a\\*([S\a\a , \\*([S\c
+.if !\a\\*([V\a\a , vol. \\*([V\c
+.if !\a\\*([P\a\a \{\
+.ie \\n([P>0 , pp. \\*([P\c
+.el , p. \\*([P\c
+.\}
+.if !\a\\*([I\a\a , \\*([I\c
+.if !\a\\*([C\a\a , \\*([C\c
+.if !\a\\*([D\a\a , \\*([D\c
+\&.
+.if !\a\\*([O\a\a \\*([O
+.FE
+..
+.      \" [4 - report
+.de [4
+.FS
+.if !\a\\*([F\a\a .FP \\*([F
+.if !\a\\*([Q\a\a \\*([Q,
+.if !\a\\*([A\a\a \\*([A,
+.if !\a\\*([T\a\a \\*([o\\*([T,\\*([c
+.if !\a\\*([R\a\a \\*([R\c
+.if !\a\\*([G\a\a \& (\\*([G)\c
+.if !\a\\*([P\a\a \{\
+.ie \\n([P>0 , pp. \\*([P\c
+.el , p. \\*([P\c
+.\}
+.if !\a\\*([I\a\a , \\*([I\c
+.if !\a\\*([C\a\a , \\*([C\c
+.if !\a\\*([D\a\a , \\*([D\c
+\&.
+.if !\a\\*([O\a\a \\*([O
+.FE
+..
+.de ]<
+.[<
+..
+.de [<
+.SH
+References
+.LP
+.de FP
+.IP \\\\$1.
+\\..
+.rm FS FE
+..
+.de [>
+.]>
+..
+.de ]>
+.sp
+..
+.de ]-
+.[-
+..
+.de [-
+.rm [Q [A [T [J [B [E [S [V
+.rm [N [P [I [C [D [O [R [G
+..
+.de ]]
+.\" circumvent EOF bug in troff
+..
diff --git a/usr/lib/ms/s.tbl b/usr/lib/ms/s.tbl
new file mode 100644 (file)
index 0000000..8efe152
--- /dev/null
@@ -0,0 +1,82 @@
+.      \" TS - table start
+.de TS
+.br
+.if !\\n(1T .RT
+.ul 0
+.ti \\n(.iu
+.if t .sp .5
+.if n .sp
+.if \a\\$1\aH\a .TQ
+.nr IX 1
+..
+.de TQ
+.di TT
+.nr IT 1
+..
+.      \" TH - end table header (begun with .TS H)
+.de TH
+.if \\n(.d>.5v .nr T. 0
+.if \\n(.d>.5v .T# 0
+.di
+.nr TQ \\n(.i
+.nr HT 1
+.in 0
+.mk #a
+.mk #b
+.mk #c
+.mk #d
+.mk #e
+.mk #f
+.TT
+.in \\n(TQu
+.mk #T
+..
+.      \" TE - table end
+.de TE
+.nr IX 0
+.if \\n(IT>0 .if \\n(HT=0 \{\
+.      di
+.      nr UR \\n(.u
+.      nf
+.      TT
+.      if \\n(UR>0 .fi
+.\}
+.nr IT 0
+.nr HT 0
+.sp \\n(DDu
+.rm a+ b+ c+ d+ e+ f+ g+ h+ i+ j+ k+ l+ m+ n+
+.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|
+.rr 32 33 34 35 36 37 38 40 79 80 81 82
+..
+.      \" B1 - begin boxed text
+.de B1
+.br
+.di BB
+.nr BC 0
+.if \a\\$1\aC\a .nr BC 1
+.nr BE 1
+..
+.      \" B2 - end boxed text
+.de B2
+.br
+.nr BI 1n
+.if \\n(.$>0 .nr BI \\$1n
+.di
+.nr BE 0
+.nr BW \\n(dl
+.nr BH \\n(dn
+.ne \\n(BHu+\\n(.Vu
+.nr BQ \\n(.u
+.nf
+.if \\n(BC>0 .in +(\\n(.lu-\\n(BWu)/2u
+.in +\\n(BIu
+.BB
+.in -\\n(BIu
+.nr BW +2*\\n(BI
+.sp -1
+\l'\\n(BWu\(ul'\L'-\\n(BHu'\l'|0\(ul'\h'|0'\L'\\n(BHu'
+.if \\n(BC>0 .in -(\\n(.lu-\\n(BWu)/2u
+.if \\n(BQ .fi
+.br
+..
diff --git a/usr/lib/ms/s.ths b/usr/lib/ms/s.ths
new file mode 100644 (file)
index 0000000..47b17bb
--- /dev/null
@@ -0,0 +1,23 @@
+.      \" TM - U.C. Berkeley thesis mode
+.ls 2
+.if v .nr PO 1.5i
+.rm CH
+.ds RH \\n(PN
+.rm CF
+.P1
+.nr TM 1
+.      \" CT - chapter title 
+.de CT
+.rn RH R@
+.if \\n(1T .bp
+.RT
+.if \\n(1T .sp
+.if !\\n(1T .BG
+.RT
+.ft 3
+.if n .ul 100
+.ps \\n(PS+2
+.ce 100
+.nr CT 1
+.rn R@ RH
+..
diff --git a/usr/lib/ms/s.toc b/usr/lib/ms/s.toc
new file mode 100644 (file)
index 0000000..9327f75
--- /dev/null
@@ -0,0 +1,104 @@
+.      \" XS - begin index entry
+.de XS
+.if !\\n(1T .BG
+.ds XL \\n(PN
+.if \\n(.$ .ds XL \\$1
+.nr SJ \\n(.j
+.nr PF \\n(.f
+.nr PX \\n(.s
+.nr SL \\n(.l
+.ls 1
+.br
+.da XT
+.if \\n(.$-1 \{\
+.      nr XI 1
+.      in \\$2n
+.\}
+.ft 1
+.ps \\n(PS
+.ll \\n(LLu-8n
+.na
+.sp \\n(PDu
+..
+.      \" XA - add index entry
+.de XA
+.if !\a\\*(XL\ano\a \\a\\t\\*(XL
+.if \\n(.$ .ds XL \\$1
+.sp \\n(PDu
+.if \\n(.$-1 \{\
+.      nr XI 1
+.      in \\$2n
+.\}
+..
+.      \" XE - end index entry
+.de XE
+.if !\a\\*(XL\ano\a \\a\\t\\*(XL
+.br
+.da
+.ls
+.ad \\n(SJ
+.ft \\n(PF
+.ps \\n(PX
+.ll \\n(SLu
+.if \\n(XI \{\
+.      nr XI 0
+.      in 0
+.\}
+..
+.      \" PX - print index (table of contents)
+.de PX
+.if \\n(VS>=40 .vs \\n(VSu
+.if \\n(VS<=39 .vs \\n(VSp
+.ll \\n(LLu
+.lt \\n(LTu
+.ta \\n(LLu-5n \\n(LLuR
+.in 0
+.nf
+.rs
+.if !\a\\$1\ano\a \{\
+.      sp .5i
+.      tl ''\f3\s+2Table of Contents\s-2\f1''
+.      sp .5i
+.\}
+.XT
+..
+.      \" TC - table of contents at end of paper
+.de TC
+.af PN i
+.bp 1
+.PX \\$1
+..
+.      \" NH - numbered section header
+.de NH
+.RT
+.if \\n(1T .sp
+.if !\\n(1T .BG
+.RT
+.ne 3.1
+.ft 3
+.if n .ul 1000
+.nr NS \\$1
+.if !\\n(.$ .nr NS 1
+.if !\\n(NS .nr NS 1
+.nr H\\n(NS +1
+.if !\\n(NS-4 .nr H5 0
+.if !\\n(NS-3 .nr H4 0
+.if !\\n(NS-2 .nr H3 0
+.if !\\n(NS-1 .nr H2 0
+.if !\\$1 .if \\n(.$ .nr H1 1
+.if \a\\$1\aS\a \{\
+.      nr NS \\n(.$-1
+.      nr H1 \\$2
+.      nr H2 \\$3
+.      nr H3 \\$4
+.      nr H4 \\$5
+.      nr H5 \\$6
+.\}
+.ds SN \\n(H1.
+.ti \\n(.iu
+.if \\n(NS-1 .as SN \\n(H2.
+.if \\n(NS-2 .as SN \\n(H3.
+.if \\n(NS-3 .as SN \\n(H4.
+.if \\n(NS-4 .as SN \\n(H5.
+\\*(SN
+..