------------------------------- Page    i -------------------------------

                       Formatting Documents on UTS

                           the Ms User's Guide

------------------------------- Page   ii -------------------------------

                            TABLE OF CONTENTS


1.    Introduction  . . . . . . . . . . . . . . . . . . . . . . . . .   1

2.    Escape Sequences  . . . . . . . . . . . . . . . . . . . . . . .   1

3.    Document Format Style . . . . . . . . . . . . . . . . . . . . .   3

4.    Cover Sheet Information . . . . . . . . . . . . . . . . . . . .   4

5.    Font Changes  . . . . . . . . . . . . . . . . . . . . . . . . .   5

6.    Page Titles . . . . . . . . . . . . . . . . . . . . . . . . . .   6

7.    Section and Appendix Headings . . . . . . . . . . . . . . . . .   6

7.1      Section Headings . . . . . . . . . . . . . . . . . . . . . .   6
7.2      Appendix Headings  . . . . . . . . . . . . . . . . . . . . .   7
7.3      Saving Section Heading or Appendix Numbers . . . . . . . . .   7

8.    Paragraphs  . . . . . . . . . . . . . . . . . . . . . . . . . .   8

8.1      Ordinary Paragraphs  . . . . . . . . . . . . . . . . . . . .   8
8.2      Quoted Paragraphs  . . . . . . . . . . . . . . . . . . . . .   8

9.    Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9

9.1      List Initialization Commands . . . . . . . . . . . . . . . .   9

9.1.1       Identically Labeled Lists . . . . . . . . . . . . . . . .   9

9.1.1.1        Bullet Lists . . . . . . . . . . . . . . . . . . . . .  10
9.1.1.2        Dash Lists . . . . . . . . . . . . . . . . . . . . . .  10

9.1.2       Numbered Lists  . . . . . . . . . . . . . . . . . . . . .  10

9.1.2.1        Automatically Numbered or Lettered Lists . . . . . . .  10
9.1.2.2        Outline Lists  . . . . . . . . . . . . . . . . . . . .  10
9.1.2.3        Reference Lists  . . . . . . . . . . . . . . . . . . .  11

9.1.3       Variably Labeled Lists  . . . . . . . . . . . . . . . . .  11

9.2      List Entry . . . . . . . . . . . . . . . . . . . . . . . . .  11
9.3      Saving List Entry Numbers  . . . . . . . . . . . . . . . . .  12
9.4      List Exit  . . . . . . . . . . . . . . . . . . . . . . . . .  12

------------------------------- Page  iii -------------------------------

10.   Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  13

10.1     Table Headings . . . . . . . . . . . . . . . . . . . . . . .  15
10.2     Table Continuations  . . . . . . . . . . . . . . . . . . . .  15

11.   Displays  . . . . . . . . . . . . . . . . . . . . . . . . . . .  16

12.   Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . .  19

12.1     Ordinary Figure Titles . . . . . . . . . . . . . . . . . . .  19
12.2     Generalized Figure Titles  . . . . . . . . . . . . . . . . .  19
12.3     Saving Figure Numbers  . . . . . . . . . . . . . . . . . . .  19
12.4     Controlling the Table of Figures . . . . . . . . . . . . . .  20

13.   Definitions of Variables and Macros . . . . . . . . . . . . . .  20

13.1     Number Registers . . . . . . . . . . . . . . . . . . . . . .  20
13.2     String Registers . . . . . . . . . . . . . . . . . . . . . .  21
13.3     Macros . . . . . . . . . . . . . . . . . . . . . . . . . . .  22

14.   Bold or Italic Fonts  . . . . . . . . . . . . . . . . . . . . .  22

14.1     Specifying a Font Change . . . . . . . . . . . . . . . . . .  23

15.   Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . .  23

16.   Other Commands  . . . . . . . . . . . . . . . . . . . . . . . .  24

16.1     Break  . . . . . . . . . . . . . . . . . . . . . . . . . . .  24
16.2     Fill . . . . . . . . . . . . . . . . . . . . . . . . . . . .  24
16.3     No Fill  . . . . . . . . . . . . . . . . . . . . . . . . . .  24
16.4     Space Lines  . . . . . . . . . . . . . . . . . . . . . . . .  24
16.5     Restore Spacing  . . . . . . . . . . . . . . . . . . . . . .  25
16.6     Need Lines . . . . . . . . . . . . . . . . . . . . . . . . .  25
16.7     Skip Pages . . . . . . . . . . . . . . . . . . . . . . . . .  25
16.8     Indent . . . . . . . . . . . . . . . . . . . . . . . . . . .  26
16.9     Temporary Indent . . . . . . . . . . . . . . . . . . . . . .  26
16.10    Center . . . . . . . . . . . . . . . . . . . . . . . . . . .  26
16.11    Underline  . . . . . . . . . . . . . . . . . . . . . . . . .  26
16.12    Continuously Underline . . . . . . . . . . . . . . . . . . .  26
16.13    Upper-Case . . . . . . . . . . . . . . . . . . . . . . . . .  27
16.14    Controlling Hyphenation  . . . . . . . . . . . . . . . . . .  27
16.15    Tab Setting  . . . . . . . . . . . . . . . . . . . . . . . .  27
16.16    Set Margin Character . . . . . . . . . . . . . . . . . . . .  28  +
16.17    Include Source File  . . . . . . . . . . . . . . . . . . . .  28

17.   The ms Command  . . . . . . . . . . . . . . . . . . . . . . . .  28

18.   Error Messages  . . . . . . . . . . . . . . . . . . . . . . . .  30

------------------------------- Page   iv -------------------------------

19.   Other Supporting Text Processing Tools  . . . . . . . . . . . .  31

References  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  31

Appendix A.    Nested List Example  . . . . . . . . . . . . . . . . .  32

Appendix B.    Simple Table Example . . . . . . . . . . . . . . . . .  34

Appendix C.    Device Dependent Character Sets  . . . . . . . . . . .  36

Appendix D.    Command Summary  . . . . . . . . . . . . . . . . . . .  40


                                                            Last Page  41




                             TABLE OF TABLES


Table 1.    ms Escape Sequences . . . . . . . . . . . . . . . . . . .   2

Table 2.    Types of Automatic Numbering for Lists  . . . . . . . . .  10

Table 3.    Types of Displays . . . . . . . . . . . . . . . . . . . .  16

Table 4.    Predefined Strings  . . . . . . . . . . . . . . . . . . .  21

Table 5.    Example of a Table  . . . . . . . . . . . . . . . . . . .  34




                            TABLE OF FIGURES


Figure 1.    Amdahl Logo  . . . . . . . . . . . . . . . . . . . . . .  18

Figure 2.    This Is a Figure . . . . . . . . . . . . . . . . . . . .  19




                            TABLE OF EXAMPLES


Example 1.    This Is a Generalized Figure  . . . . . . . . . . . . .  19

-------------------------------- Page  1 --------------------------------

1.    INTRODUCTION

This document describes the text formatting system called ms available on
UTS.  This document was formatted  using the ms command and the  commands
described below.  The ms commands are described in {#17}.

Numbers enclosed in braces refer  to sections in this document.   Special
character sequences are either enclosed in quotes '' or written  in bold,
which shows the exact syntax of the character sequence.  The commands are
presented roughly in  the order in  which they would  appear in an  input
file.

The input file  consists of  lines of text  interspersed with  formatting
commands.  Lines containing text normally begin in column 1.  Such  lines
are normally filled and right adjusted.  This means that each output line
is filled with as  many words as  will fit and  then blanks are added  to
justify the right  margin.  A  line beginning  with blanks  (or an  empty
line) will cause a  break in the  filling of the  output line, and a  new
line will be started.

A useful technique when typing a document is to begin a new line for each
sentence, and for  each handwritten line  when copying handwritten  text.
Editing is easier  when the  text lines  are short.   Another reason  for
beginning each sentence  on a new  line is that  extra space is  inserted
after a period, question mark, or exclamation point, but only if it is at
the end of an input line.

The ms commands in the text consist of a period in column 1 followed by a
two letter command name, and possibly arguments delimited by spaces.   An
argument may contain  spaces by  enclosing it  in double  quotes '"',  or
preceding each space with a  '\' {#2}.  An argument may contain a  double
quotes by  using the  alternate name  for the  double quote,  '\(dq'.   A
synopsis of each command or set of commands is presented in the following
sections.  Optional arguments are enclosed  in brackets.  There are  cer-
tain times when  an empty  argument is required.   This null argument  is
specified by two adjacent double  quotes.  A summary  of all ms  commands
appears in Appendix D.




2.    ESCAPE SEQUENCES

The backslash is used as an escape character in ms to begin several  con-
trol sequences for special characters and functions.  The '\' is  entered
and displayed on most EBCDIC devices as a '\'.  Two backslashes  together
produce one  when the text  is processed.   In many places,  text may  be

-------------------------------- Page  2 --------------------------------

processed several times, and it is often unclear how many backslashes are
needed to produce one on output.  The sequence '\e' may always be used to
produce exactly one '\'.

There are certain places where extra padding blanks between two words for
right margin justification would be inappropriate.  A backslash  followed
by a blank ('\ ')  is called an  unpaddable space and  no padding  blanks
will ever precede or  follow it.  An  unpaddable space between two  words
also guarantees that they will appear on the same line.

It is occasionally necessary to continue a  line on the next line.   This
is necessary for a command with several large arguments, since  arguments
must appear on the same line as the command.  A '\' at the end of a  line
means that the next line is a continuation of the current line.  When the
two lines are concatenated, the second  line begins in the position  that
the '\' occupied.  Therefore, it  is important to put a blank before  the
'\' if a blank is needed between the last word of the first line and  the
first word of the second line.

Text lines can never  have a period  in the first  position of the  line.
This is because such periods  mean that the following two characters  are
the name of a command or macro to  be invoked.  The sequence '\&'  disap-
pears on output.  If  it is placed at the  beginning of a text line  that
begins with a period then the period or single quote is no longer in  the
first position and the line is output normally.

Several special output  characters may  be generated in  addition to  the
standard ASCII set.  These are  produced by entering '\(xx', where xx  is
the name of the special character.  For example, a '\' may be produced by
entering '\(ct'.   Similarly  '\(no' produces  '~', and  '\(12'  produces
'12'.  All available special characters are listed in Appendix C.

It is occasionally desirable to include comments within the input text of
a document.  '\"'  begins a comment, and  any text to  the right of  this
sequence is  not  processed.  A  line  beginning with  this  sequence  is
treated as  a  blank  line.   A  line beginning  with  '.\"'  is  ignored
entirely.

The ablility to do superscripting  and subscripting is provided with  the
use  of  escape  sequences.   For  superscripting,  '\(sux\(sd'  is   the
sequence, where  x  is  the  character  to  superscript.   To  subscript,
'\(sdx\(su' is the sequence, where x is the character to subscript.

-------------------------------- Page  3 --------------------------------

                     Table 1.    ms Escape Sequences

    _________________________________________________________________
   |  Section       Escape      Meaning                             |
   | Described     Sequence                                         |
   |     2       \\             delay processing of '\'             |
   |     2       \e             printable '\' character             |
   |     2       \&             null character                      |
   |     2       \(space)       unpaddable space character          |
   |     2       \(new-line)    ignored new-line                    |
   |     2       \"             begin comment                       |
   |     2       \(xx           character named xx                  |
   |     2       \(su           will superscript the next character |
   |     2       \(sd           will subscript the next character   |
   |   13.1      \nX or \n(XX   value of number register X or XX    |
   |   13.2      \*X or \*(XX   value of string register X or XX    |
   |   13.3      \$D            value of macro argument D, for 1<D<9|
   |   14.1      \fF            change to font F, for F = B, I, or R|
   |     5       \@ or \_       '@' or '_' if .fo @_ is used        |
   |   16.14     \%             hyphenation place indicator         |
   |   16.15     \t             tab character                       |
   |             \X             use of any other escape sequence  is|
   |                                 unsupported and may produce un-|
   |_________________________________desirable_results______________|




3.    DOCUMENT FORMAT STYLE

     .cp [text]
     .re
     .1s
     .2s
     .cn [name]

The default format of an ms document is preliminary nonprivate.  A  prel-
iminary COMPANY PRIVATE document is produced by the .cp command.  If text
is provided on this command, it is used in place of the "COMPANY PRIVATE"
phrase.  The final release version is produced by the -r option of the ms
command {#17}.   Other  than  being printed  on  special  paper,  private
release versions are identical to nonprivate, thus the .cp command has no
effect if the release  version has been  specified.  This command  should
appear at the start of the file.  As an example,  this page has been pro-
duced in the preliminary, company private format.  The rest of this docu-

-------------------------------- Page  4 --------------------------------

beginning of a document produces the release format, exactly like the  -r
option to ms.

Release format  documents are  normally  printed double-sided,  that  is,
odd-numbered pages have  a larger left  margin than even-numbered  pages,
for the purpose of improving the appearance of double-sided reproduction.
This is not done for preliminary format documents.  The .1s  and .2s com-
mands may be used  to override  this feature, and  force single-sided  or
double-sided output, respectively.

The company name and UTS appear on  even and odd pages, respectively,  of
release format documents.  UTS appears on every page of preliminary docu-
ments.  The default  company name  is 'a m  d a  h l'.   The .cn  command
allows this to be replaced by an alternate company name by providing that
name as argument.  The company  name may simply be  omitted by using  the
.cn command with no arguments.

Headers and footers are text that is automatically placed at the top  and
bottom of each page respectively.  The header consists of the page number
on the outer corner,  the first two  lines of the  document title in  the
center, and 'UTS' or the company name on the inner  corner.  The user may
alter the document title that appears in  the header as often as  desired
{#6}).

Typically, footers are blank.  The footer of the preliminary format  con-
tains the day of the week and time, and the word 'Preliminary'.  'a m d a
h l   COMPANY PRIVATE' also appears in the footer of preliminary  company
private documents.




4.    COVER SHEET INFORMATION

     .mt title_1 [... title_8]
     .au author_1 [... author_8]

These commands  provide information  for  the cover  sheet and  the  page
headers.  They must appear before the document text.

At the top of the  cover sheet is the company  name followed by  'COMPANY
PRIVATE' on preliminary versions when  specified.  There are up to  eight
lines of title,  and up  to eight author's  names.  Preliminary  versions
also provide the word 'Preliminary'  and the day of week and time of  day
on the cover sheet.

-------------------------------- Page  5 --------------------------------

The .mt command specifies the document main title.  Title_1 is the  first
line of the  title, title_2  the second, and  so on.   Each line must  be
enclosed in double quotes if it is more than one word.

The arguments of the .au  command are the authors'  names.  A maximum  of
eight names may be given and each must be enclosed in double quotes.



The cover sheet for this document was  produced by these commands at  the
beginning of the input file for this document:

     .fo @_
     .re
     .mt "Formatting Documents on UTS" \
         "the _Ms_ user's guide"
     .tf




5.    FONT CHANGES

     .fo [bi]

The .fo command provides a mechanism for easily changing fonts.  It  con-
trols the bold and  italic fonts.  The argument  to the .fo command is  a
string of up to  two characters.  The  first character is  the bold  font
change character while the  second is the  italic font change  character.
Any character may be specified as a font change character but  characters
that are rarely used are best.  They are generally '@_'.

A font change character  acts a toggle  for its font.   For example,  the
first bold font change  character on a  line initiates the bold font  and
the second terminates the font.  The third initiates the bold font  again
and so forth.  Font change pairs must be on the same line.

Font change characters preceeded by a  backslash, '\', do not change  the
font.  Italicized characters printed on a device without italic capabili-
ties are typically underlined.

-------------------------------- Page  6 --------------------------------

6.    PAGE TITLES

     .pt [line_1] [line_2]

A page title appears in the header of  each page except the cover  sheet.
The default page title consists of the first two lines of the main title.
The .pt command allows  one to alter  these fields.  Note  that this  has
been done on this page.

If line_2 is omitted or empty, only line_1 will be used in the title, and
there will be one extra line available for text on each page.  Some exam-
ples are:

     .pt "Page Titles"
     .pt "Formatting Documents on UTS" "Bill Programmer"

which would provide a one line title, or a two line title.

It is possible to redefine the page title  as often as desired, even  for
each new subject heading.  However this command is generally used only to
alter the default  titles for  the entire  document, and  thus it  should
appear before the start of  the text, immediately following the .mt  com-
mand.




7.    SECTION AND APPENDIX HEADINGS


7.1      SECTION HEADINGS

     .hd level [heading_name]
     zero or more lines of text

The heading numbers in this document are an example of the numbering sys-
tem used and the appearance of the section headings.

The heading command allows five levels of numbered headings.  Level 1  is
the most major or highest, level 5 the lowest.  Level can be specified by
an absolute number or a relative  change to the current level.   Relative
level numbers begin with  a + or  -.  For instance,  a level of +1  means
that the next section is one level lower  (or more minor) than the  last.
+0 means that the new  section has the same level as the last.  -2  would
mean that the new section is two levels  more major than the last.   This
could be a jump from level 3 back to level 1, for instance.

-------------------------------- Page  7 --------------------------------

Heading_name is the section title and may contain up to 99 words.  String
references should be avoided in the heading.

In addition to the five levels  of numbered sections, it is  occasionally
desirable to have sections without section numbers, for such sections  as
Abstracts and  References.  Specifying  level 0  provides such  sections,
which generally are placed  at the beginning of  the text, or at the  end
(either before or after the appendices).

Level 0 and 1 headings are preceded by six blank lines; other levels  are
preceded by only  two lines.   All section headings  are followed by  one
blank line.  Headings appear in the  table of contents exactly as  typed,
so words should be capitalized as is appropriate.


7.2      APPENDIX HEADINGS

     .ap [appendix_name]

The appendix command  produces appendix  headings.  It  also causes  each
appendix to begin on a new page.  The appearance of  the appendix heading
is:

     APPENDIX X.    appendix_name

X is an automatically  generated capital letter.   The appendix_name  may
contain up to 99  words.  Each appendix  name is automatically placed  in
the table of contents exactly as entered.


7.3      SAVING SECTION HEADING OR APPENDIX NUMBERS

     .sh XX [.]

The save heading number command provides a way  to refer to a section  or
appendix without knowing its  number.  The .sh  command may be placed  at
the beginning  of a  nonzero level  section or  an appendix.   XX is  any
string register name {#13.2}.  All occurrences of '\*(XX' ('\*X' if  sin-
gle letter name) are replaced by  the section number.  Note that  forward
references are allowed.

The optional '.' argument has effect only if a level 1 section heading is
being saved.   If  so, a  trailing  decimal point  appears in  the  saved
string.  Without this argument only the decimal number appears.  Appendix
letters are always saved without decimal points.  Level 2 through  5 sec-
tion headings always have decimal points separating each level number.

-------------------------------- Page  8 --------------------------------

An example of the use of .sh is:

     XX is any string register name {\(sc\*(SR}.
        ...
     .hd 2 String Registers
     .sh SR
        ...




8.    PARAGRAPHS


8.1      ORDINARY PARAGRAPHS

     .pp
     one or more lines of text

The paragraph command produces block style paragraphs with one blank line
before and  after each  paragraph.  No  paragraph command  is needed  for
paragraphs immediately after headings.  This command will assure that  no
paragraph will begin at the bottom of a page unless  there is room for at
least the first two lines.


8.2      QUOTED PARAGRAPHS

     .bq
     one or more lines of text
     .eq

The .bq command begins  a quoted paragraph,  which is ended  by .eq.   On
output, a quoted paragraph is  preceded and followed by blank lines,  and
has left and right margins five spaces larger than normal.  For example,

     That we  but teach  bloody instructions,  which, being  taught,
     return to plague their inventor... -- William Shakespeare

is a quoted paragraph.

-------------------------------- Page  9 --------------------------------

9.    LISTS

There is a simple means of entering several different kinds of lists.  An
example of the input  and output of  several nested lists is included  in
Appendix A. to clarify the following explanation.  All lists are composed
of three parts:

 1.  a list initialization command (.al, .bl, .dl, .il, .ol, .rl or .vl),
     which controls the appearance of the list,

 2.  one or more list entry commands (.le), each followed by the text  of
     the corresponding list entry, and

 3.  a list exit command (.lx) that ends the list and restores the previ-
     ous indentation.

Normally there is  a blank  line before  each list  entry (including  the
first), which may be suppressed by the inclusion of the  no_spaces option
on whichever list initialization command was used.  There is also a blank
line after  the list,  which may  be suppressed  by the  presence of  the
no_space option on the  list exit  command.  To specify  either of  these
options, any nonnull argument may be used.

Lists can be nested  up to six levels.   Fill mode is  turned on by  each
list initialization  command, and  should not  be turned  off within  the
list.


9.1      LIST INITIALIZATION COMMANDS


9.1.1       IDENTICALLY LABELED LISTS

     .il label [no_spaces]

In an identically labeled list,  each item is  indented, and preceded  by
the same label, which  typically is a  single character, but needn't  be.
The amount indented is four spaces more than the size of the label, which
is centered  within that  indent.  Since identically  labeled lists  with
bullet or dash labels are frequently desired, these special cases may  be
produced with the commands .bl and .dl described in the next subsections.
See Appendix C. for other  characters that may  provide some variety  for
such lists when desired.  Some  likely candidates are \(sq for '#',  \(ss
for '#', and \(ch for '+'.

If the label is to contain blanks, each blank must be preceded by a  '\'.
Do not simply enclose the label in double quotes.

-------------------------------- Page 10 --------------------------------

9.1.1.1        BULLET LISTS

     .bl [no_spaces]

The .bl command begins an identically labeled list in which each item  is
labeled by a bullet '*'.


9.1.1.2        DASH LISTS

     .dl [no_spaces]

The .dl command begins an identically labeled list in which each item  is
labeled by a hyphen  '-'.  To be precise,  note that the hyphen is  used,
and not the dash '--'.


9.1.2       NUMBERED LISTS


9.1.2.1        AUTOMATICALLY NUMBERED OR LETTERED LISTS

     .al [type] [no_spaces]

The .al command  begins a  sequentially numbered or  lettered list.   The
text is indented 5 spaces  from the current indent for Arabic numbers  or
letters, or 7 spaces for Roman numerals.

The type is the first  element in the  desired sequence.  Arabic  numbers
are assumed if type is omitted or null.


           Table 2.    Types of Automatic Numbering for Lists

                   __________________________________
                  |_Type_|_Sequence_________________|
                  |   1  | Arabic numbers           |
                  |   A  | upper-case letters       |
                  |   a  | lower-case letters       |
                  |   I  | upper-case Roman numerals|
                  |___i__|_lower-case_Roman_numerals|



9.1.2.2        OUTLINE LISTS

     .ol [no_spaces]

-------------------------------- Page 11 --------------------------------

The .ol command is  convenient for producing  nested, automatically  num-
bered lists in a  standard outline format.   The following example  shows
the different numbering formats used at each level:

   I.  level one
        A.  level two
             1.  level three
                  a.  level four
                       i.  level five
                           (1)  level six

An outline list structure may be nested inside other lists, but only to a
total list depth of six.  Other lists may not be nested within an outline
list.  The number of items  in the highest level  list should not  exceed
17, or the Roman label  will not fit.  If it is necessary to exceed  this
limit, it is possible to indent before the outline list structure to make
room for the labels, using '.in +4' {#16.8}, for example.  Of course, the
indentation should be restored after ending the list.


9.1.2.3        REFERENCE LISTS

     .rl [no_spaces]

The .rl  command  begins an  automatically  numbered list  in  which  the
numbers are  enclosed by  square  brackets, and  the text  is indented  6
spaces.  This command creates  a list of  references to other  documents.
See [References] for an example of its use.


9.1.3       VARIABLY LABELED LISTS

     .vl [indent_size] [no_spaces]

When a list begins with a .vl it is  expected that each .le will  provide
its own label.   This form  is typically used  to display definitions  of
terms or phrases.

The indent_size gives the size of the field in which to place the labels,
which is the  distance from the  current indent to  the beginning of  the
text.  It defaults to five if omitted or null.   If the label has a  size
of indent_size  or more,  three spaces  will separate the  label and  the
text.


9.2      LIST ENTRY

     .le [label]
     one or more lines of text that make up the list entry

-------------------------------- Page 12 --------------------------------

The list entry command is used with all lists.  It precedes each entry in
a list.

It is intended that a label be supplied only  for .vl lists.  If a  label
is provided for other types of lists, the label will replace the automat-
ically supplied label, determined by the current list initialization com-
mand.  If label is  not provided for a  .vl type entry, that label  field
will be left empty.

If the label is to contain blanks, each blank must be preceded by a  '\'.
Do not simply enclose the label in double quotes.


9.3      SAVING LIST ENTRY NUMBERS

     .sl XX [.]

The save list  entry number command  provides a  way to refer  to a  list
entry of a numbered list without knowing its number.  The  .sl command is
placed after any .le command.   XX is any  string register name  {#13.2}.
All occurrences of '\*(XX' ('\*X' if single letter name) are  replaced by
the list entry number (or letter for lettered lists).  Note that  forward
references are allowed.

The optional '.' argument has effect only  if a nested list entry  number
is being  saved.   If so,  the  saved string  contains all  current  list
numbers, separated by decimal points, such as '2.A.iii.12'.  Without this
argument only the number of the innermost list entry appears.

An example of the use of .sl is:

     Tables are processed by the _tbl_ program
     described more fully in Reference [\*(TB],
        ...
     .hd 0 References
     .rl
        ...
     .le
     .sl TB
     _Formatting Tables on UTS_,
        ...


9.4      LIST EXIT

     .lx [no_space]

The list exit command signals the end of a list.  It restores the  inden-
tation that existed just before the current list initialization command.

-------------------------------- Page 13 --------------------------------

The presence of any argument will suppress the blank line that would oth-
erwise be provided after the list.




10.   TABLES

     .ts [h]
     [options;]
     format.
     data
     .te

Tables are processed by the tbl program described more fully in Reference
[2], which is a standard  part of the ms system.  For most simple  tables
the following explanation should be adequate.  An example table input and
output is included in  Appendix B. to  supplement this information.   The
.ts and .te commands are used to start and end each table.  There may  be
a single line  of options  affecting the whole  table.  If present,  this
line must follow the .ts command, and must contain a list of option names
separated by spaces or commas,  and ended by a semicolon.  The  allowable
options are:

center  center the table instead of the standard left-adjust

expand  make the table as wide as the standard ms line length

box     enclose the table in a box

allbox  enclose each item in the table in a box

sep(x)  use x instead of '/' to separate data items

The format section  of the  table specifies  the layout  of the  columns.
Each line in this section refers to one line of the data, except the last
line of the format,  which refers to  all following lines  of data.   The
last format line is  ended with a period.   Each line of the format  con-
tains one item for each column of  the table.  These items are  separated
by spaces or '|'.  A '|' between format items means  that the correspond-
ing data items are to be separated by a vertical line.  The items consist
of a key character optionally followed by modifying information.  The key
characters are:

l       left-adjusted column entry

r       right-adjusted column entry

-------------------------------- Page 14 --------------------------------

c       centered column entry

n       numerical column entry, adjusted such  that the units digit  line
        up, whether or not a decimal point appears

a       alphabetic subcolumn, entries aligned on  left, with the  largest
        entry centered within column

s       spanned horizontal field, the entry from the previous column con-
        tinues across this column

+       spanned vertical field, the entry from the previous row continues
        across this row

-       a horizontal line appears in the corresponding column

=       a double horizontal line appears

The format line with  the most  items determines the  number of  columns.
Missing items  at  the end  of  shorter lines  are  assumed to  be  left-
adjusted.  The  above key  characters may  be followed  by the  following
options:

number  A number  following the  key character  specifies the  number  of
        spaces of separation between this column and the next, default 3.
        If different gaps are specified for the same columns, the largest
        is used.  If the  expand option is  specified, these numbers  are
        multiplied by a constant to fill the page horizontally.

t       Place a table entry at the top of its vertical space, rather than
        centered in its vertical space

b       The entry is to be in bold face.

i       The entry is to be in italic.

wnumber This specifies a  minimum column  width value  of number  spaces.
        Normally the widest data item  in a column determines the  width.
        This also specifies the width of text block data items.

e       This specifies equal sized  columns.  The maximum  width of  each
        column containing an e option  is used as the width of each  such
        column, to produce a group of uniformly spaced columns.

The order of these options  is immaterial, except  that number may  obvi-
ously not follow wnumber.

The data items  in the  table are entered  after the format  information.
Each table line is  entered on one line.   However, ending a line with  a

-------------------------------- Page 15 --------------------------------

'\' allows the following line  to be considered part  of that line.   The
data items are separated by  '/', or whatever character was specified  by
the sep(x) option, which is necessary if the  table is to contain a  '/'.
There are a few exceptions:

.xx     An input line beginning with a '.' is assumed to be an ms command
        and is processed as such.  For example, space within a  table may
        be produced by '.sp' commands within the data.

-       An input line containing only  the character '-' produces a  hor-
        izontal line, extending the  full width of  the table.  An  input
        entry containing  only the  character '-'  produces a  horizontal
        line, extending the full width of the column.

=       This is the same as '-', except that a double line is produced.

\+      An input entry  containing only  the string '\+'  means that  the
        table entry immediately above  spans downward over this row.   It
        is equivalent to a table format key character of '+'.

text    A block  of text,  including ms  commands, may  be formatted  and
        included as a table entry by surrounding it with the  text delim-
        iters 't{'  at the  end of  the preceding  line and  't}' at  the
        beginning of the following line.  For example:

             entry 1/t{
             entry 2 is a
             block of text
             to be formatted
             t}/entry 3


10.1     TABLE HEADINGS

     .th

A table  that extends  across  multiple pages  may have  column  headings
repeated at the  top of each page  by including the  'h' argument on  the
table start command,  and including  a '.th' command  following the  data
items that make up the repeated heading.  That part of  the table between
the '.ts h' and the '.th' will be the heading for each page of the table.


10.2     TABLE CONTINUATIONS

     .t&

If the format of  a table must  be changed after  many similar lines,  as
with subheadings or summaries,  the '.t&' command  can be used to  change

-------------------------------- Page 16 --------------------------------

the column parameters.  The outline of such a table is:

     .ts
     [options;]
     format.
     data
     .t&
     format.
     data
     .t&
     format.
     data
     .te

Thus each data line may be kept near its controlling format line.  It  is
not possible to change the number of columns, the options  (such as box),
the table heading, or the selection of equal width columns without start-
ing a new table.




11.   DISPLAYS

     .dp [type]
     one or more lines of text and commands
     .ed

The display command is useful for examples and figures.  Each example  in
this document is  in a display.   Displays allow the  user to enter  text
exactly as it should appear on output or to format it with commands.   On
beginning a display (and on ending a list structure while  in a display),
text is not filled, nor is the right margin adjusted.  Text may be filled
normally inside a  display by  using the .pp  command.  Footnotes  cannot
appear inside a display, nor can displays be nested.

-------------------------------- Page 17 --------------------------------

The types of displays and their placement are summarized in the following
table:

                      Table 3.    Types of Displays

           ___________________________________________________
          |__type_|_________________placement________________|
          | s or 0|  The display will begin in the next  out-|
          |       |  put line,  and may be  split across  two|
          |_______|__pages.__________________________________|
          | p or 1|  The display will appear on one page, be-|
          |       |  ginning on the next page if it will  not|
          |       |  fit on the current one.  It will  retain|
          |       |  its relative  position  in the  text  so|
          |       |  there might be extra blank space at  the|
          |_______|__end_of_the_page.________________________|
          | f or 2|  The display will appear on one page, be-|
          |       |  ginning on the next page if it will  not|
          |       |  fit on the current one.  If there  isn't|
          |       |  room for the display,  it floats to  the|
          |       |  top of the next page and text  following|
          |_______|__the_display_fills_the_current_page._____|


[Disclaimer:  Type f displays are  a weak spot in  ms, and frequently  do
not work well.  Use them sparingly.]

If no type is provided, p is assumed.  .ed signals the end of the display
text for each display type.   A blank line appears before and after  each
display.  The following illustrates the use of displays.

-------------------------------- Page 18 --------------------------------

Input:
     .dp
     .in +5
                                         ...              ...         ...
                                         ...              ...         ...
                                         ...              ...         ...
      .........  ... ..... .....   .........   .........  ... ......  ...
     ..........  ...............  ..........  ..........  ..........  ...
            ...  ...   ...   ...  ...    ...         ...  ...    ...  ...
      .........  ...   ...   ...  ...    ...   .........  ...    ...  ...
     ..........  ...   ...   ...  ...    ...  ..........  ...    ...  ...
     ...    ...  ...   ...   ...  ...    ...  ...    ...  ...    ...  ...
     ..........  ...   ...   ...  ..........  ..........  ...    ...  ...
     ...... ...  ...   ...   ...  ...... ...  ...... ...  ...    ...  ...
     .in -5
     .fg Amdahl Logo
     .pp
     The above Amdahl logo, figure title, and this text are inside
     a display that will be kept together on one page.
     .ed


Output:

                                         ...              ...         ...
                                         ...              ...         ...
                                         ...              ...         ...
      .........  ... ..... .....   .........   .........  ... ......  ...
     ..........  ...............  ..........  ..........  ..........  ...
            ...  ...   ...   ...  ...    ...         ...  ...    ...  ...
      .........  ...   ...   ...  ...    ...   .........  ...    ...  ...
     ..........  ...   ...   ...  ...    ...  ..........  ...    ...  ...
     ...    ...  ...   ...   ...  ...    ...  ...    ...  ...    ...  ...
     ..........  ...   ...   ...  ..........  ..........  ...    ...  ...
     ...... ...  ...   ...   ...  ...... ...  ...... ...  ...    ...  ...

                        Figure 1.    Amdahl Logo

The above Amdahl logo, figure title, and  this text are inside a  display
that will be kept together on one page.

-------------------------------- Page 19 --------------------------------

12.   FIGURES


12.1     ORDINARY FIGURE TITLES

     .fg [title]

The .fg command provides a means  to title and automatically number  fig-
ures.  It is  usually placed  below the figure,  which often is  produced
with a display.  The title may be up to  99 words as defined for  section
headings.

For example,

     .fg This Is a Figure

produces:

                      Figure 2.    This Is a Figure


12.2     GENERALIZED FIGURE TITLES

     .gf label [title]

Often, in addition to Figures  as described above, one  may wish to  have
Examples, Diagrams, Exercises, Tables, or any other arbitrary label.

For example,

     .gf Example This Is a Generalized Figure

produces:

               Example 1.    This Is a Generalized Figure

If label  contains blanks,  it  must be  enclosed in  double  quotes.   A
separate counter is maintained for each unique label used in  a document,
so that they may be numbered independently, thus it is important to spell
the labels consistently.   All figure  titles, ordinary and  generalized,
are entered in tables that follow the table of contents.


12.3     SAVING FIGURE NUMBERS

     .sf XX

The .sf  command stores  the  current (ordinary  or  generalized)  figure
number in  a string  named XX  {#13.2}.  All occurrences  of '\*(XX'  (or

-------------------------------- Page 20 --------------------------------

'\*X' if only  one character  is given) will  be replaced  by the  figure
number.  Note that forward references to figures are allowed.

An example of the use of .sf is:
     See Table \*(PS. for a listing of all
     predefined strings.
        ...
     .gf Table Predefined Strings
     .sf PS
        ...


12.4     CONTROLLING THE TABLE OF FIGURES

     .tf [n]

A separate table is automatically generated, following the Table of  Con-
tents, for each  unique type  of (generalized) figure,  if the number  of
occurrences of that type is at  least five.  Specifying a positive  value
for n will cause  only those tables  with at least  n entries to be  gen-
erated.  If n  is omitted,  1 is assumed,  and each  table is  produced--
regardless of the number of entries.  Specifying .tf 0 will eliminate all
such tables.




13.   DEFINITIONS OF VARIABLES AND MACROS

The ms package allows a user to have a  form of integer and string  vari-
ables, called 'registers', to  be used in  the formatting of a  document.
There is also a facility for allowing the user to create his own commands
with macro definitions.  The names  that a user gives such registers  and
macros consist of an alphabetic character optionally followed by a second
character, which may be alphabetic  or numeric.  Names consisting of  two
lower-case alphabetics should not be used,  as they are reserved for  use
by ms.  A string register  and a macro may not be given identical  names;
number registers may share  names with strings  or macros, although  this
can be confusing.


13.1     NUMBER REGISTERS

     .nr XX +n

This command defines and assigns  a value to the  number register XX.   A
number register is  a variable  whose value can  be substituted into  the

-------------------------------- Page 21 --------------------------------

text.

If no sign precedes n, the value of the number register becomes n.  If  n
is preceded by  '+' or  '-', then n  is added to  or subtracted from  the
current value of the number register.  The value of a number register may
be substituted  into the  text by  specifying '\nX' for  a one  character
name, or '\n(XX' for a two character name.


13.2     STRING REGISTERS

     .ds XX string

A string register is a  named set of characters  that can be  substituted
into the text at any  point.  The string can contain blanks and is  never
enclosed by double quotes.  The beginning of string can contain blanks by
beginning the string with a double quote.  Any internal or  trailing dou-
ble quotes will be part of the string.

The value of a string register may be substituted into the text by speci-
fying '\*X'  for a one  character name,  or '\*(XX' for  a two  character
name.

For example, if the input contains

     .ds DT April 27, 1981

and later

     The project was completed on \*(DT.

then the output will be

     The project was completed on April 27, 1981.

Several predefined strings are available.  They contain the current date,
day of the week and time of formatting.


                     Table 4.    Predefined Strings

            ________________________________________________
           |_Input_|__________Name_________|__Sample_Value_|
           | \*(sd |       Slash Date      |     4/27/81   |
           | \*(fd |       Full Date       | April 27, 1981|
           | \*(dw |      Day of Week      |     Monday    |
           | \*(tw | Twenty-four Hour Time |      15:06    |
           |_\*(nt_|______Normal_Time______|____3:06_p.m.__|

-------------------------------- Page 22 --------------------------------

13.3     MACROS

     .de XX
     one or more lines of text or commands
     ..

A macro is a named set of arbitrary lines that are invoked by name in the
same way as a command.  The macro definition begins with '.de XX', and is
ended when  a line  with '..'  is encountered.   The enclosed  lines  are
included in the macro definition.   Within macro definitions each '\'  in
number and string register sequences  must be replaced  by two, to  delay
evaluation of the register until the macro is used.

Up to nine arguments can be passed to a macro  at the time it is  called.
The arguments are separated by  spaces.  Each argument is referred to  in
the macro definition by '\\$n'  where n is  the argument number.   Spaces
can be embedded in  an argument by enclosing  it in double quotes, or  by
preceding each embedded space with a '\'.

For example, the macro definition

     .de TD
     Today is \\$1 the \\$2.
     ..

is called by

     .TD Monday 27th

to produce the text

     Today is Monday the 27th.




14.   BOLD OR ITALIC FONTS

There are three 'fonts', or styles of type, which may be specified.   The
fonts are the normal roman, bold, and italic.  The printers  display bold
by overstriking,  and italic  by underlining.   There is  no  distinction
between italic text and text underlined by the .ul command,  although one
or the other may be  more convenient to use at  times.  The terminals  do
not distinguish fonts at all.

-------------------------------- Page 23 --------------------------------

14.1     SPECIFYING A FONT CHANGE

     .ft font

When large amounts of text are to appear in an alternate font, it is best
to use the .ft command.   The font is R for  roman, B for bold, or I  for
italic.  For example, boldfacing is turned  on with .ft B and turned  off
with .ft R, as in:

     .ft B
     .pp
     This is an important paragraph.
        ...
     .ft R




15.   FOOTNOTES

     .fs [label]
     one or more lines of footnote text
     .fe

[Disclaimer:  Footnotes are a weak spot in ms, and frequently do not work
well.  Use them sparingly.]

Two types of footnote labeling  are available.  One  is with labels  pro-
vided by the user* and  the other is  automatically numbered labels.1  To
provide a label, the user must place the label in the correct position in
the input text.  If the footnote is to  be numbered, the user must  place
'\*(fn' where the number should go in the input text.

.fs and .fe are used to delimit the footnote text.  The label is provided
by the user if automatic numbering is not desired, and is usually *, \(dg

for -, or \(dd for =.  The footnotes on this page were printed using:




_______________
  *This is an example of a label provided by the user.

  1This is an automatically numbered footnote.

-------------------------------- Page 24 --------------------------------

     One is with labels provided by the user*
     .fs *
     This is an example of a _label_ provided by the user.
     .fe
     and the other is automatically numbered labels.\*(fn
     .fs
     This is an automatically numbered footnote.
     .fe
     To provide a label, ...




16.   OTHER COMMANDS


16.1     BREAK

     .br

When a break occurs, the filling of the current line is stopped, and  the
line is  printed with  no  adjustment of  the right  margin.  Text  lines
beginning with spaces, blank lines, and several other commands also cause
a break.


16.2     FILL

     .fi

A break occurs and the  next output lines are filled  with as much  input
text as possible and right adjusted.  This is the normal mode.


16.3     NO FILL

     .nf

There is a break and the next output lines
are neither filled nor adjusted, as in a display.
The right margin is ignored.


16.4     SPACE LINES

     .sp [n]

-------------------------------- Page 25 --------------------------------

The space command,  .sp, produces  n blank  lines, default  1.  The  Qume
printer is capable of spacing fractional amounts, such as '.sp .5'.

This is such a 12 space.


16.5     RESTORE SPACING

     .rs

The above .sp  command is  inhibited at  the top  of each  page to  avoid
undesirable white space.  The .rs command restores the ability to  space.
This allows one to  have a nearly  blank page  for a figure  to be  added
later manually, with a .fg command near the page bottom.


16.6     NEED LINES

     .ne n

Often one has text that should not cross  a page boundary, or should  not
begin near the bottom  of a page.   Displays are often the solution,  but
when this is not appropriate or possible, the .ne command may be used  to
start a new page  if there are less than  n lines remaining on the  page.
It is usually necessary to force a break (with .br) before doing the .ne,
or the current  partially filled line will  be placed at  the top of  the
following page.


16.7     SKIP PAGES

     .sk [n]

The .sk command skips n pages, default 0.  A break occurs, n blank  pages
(except for header and footer)  are produced, and output proceeds at  the
top of  the following  page.  For  example, the  command .sk  (or .sk  0)
ejects the current page and  starts a new page; .sk 4 ejects the  current
page, leaves the next four blank, and starts a new page.  Thus when  this
command is used at the end of a document, n+1 blank pages are produced.

Whenever possible, the .dp or .ne commands should be used to control page
skipping, and not  .sk.  These  other instructions would  not have to  be
modified if  the document  is altered,  whereas .sk  commands  frequently
would.

-------------------------------- Page 26 --------------------------------

16.8     INDENT

     .in [+n]

          The indent  command changes  the current  indent and  causes  a
          break.  If no sign is given, then n becomes the current indent.
          If a sign is given, then n is  added to or subtracted from  the
          current indent.  If n  is omitted then the previously  existing
          indent is restored.


16.9     TEMPORARY INDENT

     .ti +n

     The temporary indent command causes only the next output line to  be
indented, after  first causing  a  break.  The  temporary indent  may  be
specified absolutely, or relative to the current indent, as described for
the .in command.  The sequence  '.pp', '.ti +5' begins a paragraph  whose
first line is indented five spaces.

The sequence '.pp', '.in +5' '.ti  -5', paragraph body, '.in' produces  a
     paragraph having all lines  except the first indented.  The  current
     indent is  not  changed by  the  .ti command,  and  the  indentation
     changes back to the current indent after one line is output.


16.10    CENTER

     .ce [n]

                       This command causes a break
                                   and
                  centers the next n input text lines.
                     If n is omitted, 1 is assumed.


16.11    UNDERLINE

     .ul [n]

All alphabetic and numeric characters in the  next n lines of input  text
are underlined.  If n is omitted, 1 is assumed.


16.12    CONTINUOUSLY UNDERLINE

     .cu [n]

-------------------------------- Page 27 --------------------------------

All characters and spaces between  characters are underlined in the  fol-
lowing n input text lines.  If n is omitted, 1 is assumed.


16.13    UPPER-CASE

     .up [n]

All lower-case letters  in the  next n input  text lines  are changed  to
upper-case.  If n is omitted, 1 is assumed.


Centering, underlining and upper-casing may be turned off, by  specifying
n to be 0.  For example,

     .up 999
     any number
     of lines
     .up 0

is the  lazy person's  way out  of counting  lines and  it also  protects
against errors when the number of lines is changed.


16.14    CONTROLLING HYPHENATION

     .hw word ...

If necessary, words  are hyphenated  during the  filling process.   Words
will never be hyphenated with only one or two letters  broken off, nor is
the last word on a  page ever hyphenated.   Words are usually  hyphenated
correctly.  If not, the correct  hyphenation can be specified by  putting
'\%' at each correct hyphenation point in the word.  The '\%' will disap-
pear on output.  Alternately, the .hw command can be used to list several
words that  are not  being hyphenated  correctly, specifying  hyphenation
points with hyphens.

'\%' can also be used to prevent hyphenation of  a word by placing it  at
the beginning of the word.   For instance, to prevent the hyphenation  of
the word hyphenate, use '\%hyphenate'.   However, words such as  'mother-
in-law' which contain  hyphens are  always subject to  splitting after  a
hyphen (and only after  a hyphen).  Words  containing any other  internal
nonalphabetic character are never subject to hyphenation.


16.15    TAB SETTING

     .ta position ...

-------------------------------- Page 28 --------------------------------

The default tab settings for ms are in columns  9, 17, 25, 33, ...,  from
the left margin.  The .ta command allows these settings to  be redefined.
In no fill mode, ASCII tab characters cause blanks to be output up to the
next tab setting.  However, it is difficult to create tab characters with
our text editors, and they typically cause confusion.  Fortunately,  tabs
are usually used only in displays, and within a (type p or f) display the
sequence '\t' may be used to represent  a tab.  Each such display  begins
with the default tab settings.  Thus the .ta command must be used in each
display using other settings.  The  tab settings outside the display  are
automatically reset on leaving the display.


16.16    SET MARGIN CHARACTER                                              +

     .mc [c]                                                               -

This command specifies a  margin character c  to appear to  the right  of  |
each nonempty text line.  If  c is omitted, the margin character  feature  |
is turned off.  Margin characters  are used to show  the lines that  have  |
been altered since the previous release of a document.  For  example, the  |
'|' character may be used  to display changed lines,  '+' can mean  added  |
lines, and '-' can mark the position of lines that have been deleted.      |

The revbar command may be used before ms to automatically generate  these  |
.mc commands, given two versions of a document.                            |


16.17    INCLUDE SOURCE FILE

     .so file

This command includes an  external file containing  text and ms  commands
into the input stream, analogously  to the '#include' command in C.   The
.so command line is replaced by the contents of file.




17.   THE MS COMMAND

Once the input file is  prepared, a document may  be formatted by  giving
the UTS command:

     ms [option ...] [file ...]

The following options are available:

-------------------------------- Page 29 --------------------------------

-i   Only the pre-text pages are printed, and the entire document body is
     suppressed.  The pre-text pages are  the cover sheet, and the  pages
     for the tables of contents and figures.  This option and the follow-
     ing range of pages option cannot both be in effect.

[start_page]-[stop_page]   Only the selected pages  will be printed,  and
     no pre-text  pages will  appear.   If start_page  is omitted,  1  is
     assumed; and  if stop_page  is omitted,  the last  page is  assumed.
     Thus 5-8 prints only  pages 5 through 8,  5- starts with page 5,  -8
     stops with page 8, and - prints  the entire document, but omits  the
     pre-text pages.  If  a single  page number appears  with no dash  at
     all, only that one page is printed.  Only one range of pages may  be
     selected.

-c   The document is prepared for the COMp  80 and may be piped  directly
     into the com command (see Reference [5]).

-e[q][copies]   The document is printed by  the E1 building printer.   If
     the q is provided, it  is formatted as it would be on the Qume  with
     pitch 12.  If the number  of copies desired is  not specified, 1  is
     assumed.  The document is spooled  with the user's standard VM  user
     id and bin number.  The  spool file name used is  that of the  first
     file given.

-p[color][copies]   The document is printed by the TN printer.  The color
     may be either w  or g, meaning  white (9510) paper or regular  green
     paper, respectively.  If color is  not specified, white is  assumed.
     If the number of copies desired is not specified, 1 is assumed.  The
     document is spooled  with the  user's standard  VM user  id and  bin
     number.  The spool file name used is that of the first file given.

-q[pitch]   The document is prepared for the Qume printer.  The pitch can
     be either 10 or  12, and defaults to 12  if not given.  This is  the
     desired number of characters per horizontal inch.

-Q   The document is formatted as it would be on the Qume with pitch  12,
     but made viewable on a crt.

-r   The final release format is used instead of the default  preliminary
     format.

-D   Do not format the document or output anything, but display on  stan-
     dard error the command generated by ms.

The options may appear  in any order,  even after or  between the  files.
Only one -c, -e, -p, -q or -Q option may be given.  If none is specified,
the document is formatted for a COI  3270 crt unless an stty memorex  has
been done, causing formatting to be done for the Memorex 1377 crt.

-------------------------------- Page 30 --------------------------------

If formatting is for a crt, the  pre-text pages (if not suppressed)  will
appear after the document text.

The files contain  the document  text interspersed  with text  formatting
commands as described in this document.  If multiple files are named they
are treated as one long file to produce  a single document.  If no  files
are specified, ms processes its standard input, and thus may be used as a
filter.

Following are examples of typical uses of ms:
     ms 12- doc > doc.out
     ms -p2 part.1 part.2 part.3

The ms command itself  invokes several  other processes to  do its  work.
The press program found  in /usr/lib/ss processes  the input data  first.
It resolves  forward references,  processes font  change characters,  and
expands many of the common ms macros.  Tables are then processed with the
tbl command and then  the text is  formatted using nroff.   If hard  copy
output is requested, the swap  program in /usr/lib/ss moves the  pre-text
pages to the beginning  of the document.   The appropriate output  device
filter is then used to  process bold face, underlining, and reverse  line
feeds, and to reduce the  total print time.  If the  -p option is  speci-
fied, the opr command  sends the output  to the printer.  The ms  command
assures the user that each program is used  in the right order, and  with
the appropriate options.  A -D  option to ms may be specified to see  the
generated command.




18.   ERROR MESSAGES

Each of the programs in the ms  system can potentially produce an  error.
The messages are  intended to be  self-explanatory, and usually  identify
the program that detected an  error.  Some messages  from tbl identify  a
line number  that may not  be correct  since the press  program adds  and
deletes various lines.  The line number  will usually be within 20  lines
of the place of error.

Some errors in the use of the ms formatting commands, such as nonexistent
commands, are silently ignored.  However, some generate an error  message
and stop formatting,  such as  attempting to nest  footnotes.  The  basic
error message has the form:

     ms macros: <some message>

-------------------------------- Page 31 --------------------------------

19.   OTHER SUPPORTING TEXT PROCESSING TOOLS

UTS provides the user with  numerous tools, many of which  are of use  in
the preparation of a  document.  These tools  are described in  Reference
[5], and the serious ms user is encouraged to learn to use many of  these
other commands as well.

The mm text formatting system is similar to ms, and is used for producing
memoranda, or  general text  with no  pre-text pages or  page headers  or
footers.

The  spell  and  mspell  programs   are  extremely  helpful  in   finding
incorrectly spelled words  in an  ms input text  file, by comparing  each
word to an internal list of correctly spelled words.

The typo program is also helpful at times in finding other  typographical
errors, by doing a statistical analysis of the input text.




REFERENCES

 [1]  Nroff User's Guide,

 [2]  Formatting Tables on UTS,

 [3]  Formatting Memoranda on UTS,

 [4]  Kernighan, B. W., M. E. Lesk, and J. F. Ossanna, Document  Prepara-
      tion, The Bell System Technical Journal, July-August 1978, Vol. 57,
      No. 6, Part 2, pp. 2115-2135.

 [5]  UTS Programmer's Manual, Volume 1,

 [6]  A Tutorial Introduction to the UTS Full Screen Text Editor,

-------------------------------- Page 32 --------------------------------

APPENDIX A.    NESTED LIST EXAMPLE

The following example of  nested lists  is provided to  help explain  the
various list commands.

Input:

.al A
.le
This is a lettered item.
'.al A' does the initialization for the list
and means that capital letters are to be
used for labeling the entries.
.al
.le
'.al' with no arguments begins a list numbered with
Arabic numbers.
It is nested because no '.lx' has occurred for the first
list yet.
.bl no
.le
First entry of a bullet list inside the numbered list.
.le
Second entry.
Notice that no blank lines precede these entries because
of the 'no' following the '.bl'.
.lx
.le
This is the second item of the numbered list because the
'.lx' ended the bullet list.
.pp
This item has two paragraphs.
The second paragraph is automatically indented the same
amount as the first.
.sp
.vl 8 no
.le one
This variably labeled list has an indent size of eight.
.le two
No blank lines precede the list entries.
.le three
Each '.le' command provides its own label.
.lx
.lx
.le
The inner lists are ended now,
so this is the second item of the lettered list.
 .lx

-------------------------------- Page 33 --------------------------------

Output:

 A.  This is a lettered item.   '.al A' does  the initialization for  the
     list and means that capital letters are to be used  for labeling the
     entries.

      1.  '.al' with  no arguments  begins a  list numbered  with  Arabic
          numbers.  It is nested  because no '.lx'  has occurred for  the
          first list yet.
            *  First entry of a bullet list inside the numbered list.
            *  Second entry.  Notice  that no blank  lines precede  these
               entries because of the 'no' following the '.bl'.

      2.  This is the second item of the numbered list because the  '.lx'
          ended the bullet list.

          This item has two paragraphs.  The second paragraph is automat-
          ically indented the same amount as the first.

          one     This variably labeled list has an indent size of eight.
          two     No blank lines precede the list entries.
          three   Each '.le' command provides its own label.

 B.  The inner lists are  ended now, so  this is the  second item of  the
     lettered list.

-------------------------------- Page 34 --------------------------------

APPENDIX B.    SIMPLE TABLE EXAMPLE

The following table is provided as an example of the table commands.  For
a detailed explanation of the use of tables, see Reference [2].

Input:

.gf Table Example of a Table
.ts
center, box;
cb s s s
cb | c | c s
+ | + | c c
cb | lw24 | n n.
Some Data for the Inner Planets
=
Planet/Description/Data (Earth = 1)
//mass/diameter
-
Mercury/t{
Nearest the sun, this planet has an 88 day orbit.
t}/.056/.382
-
Venus/t{
This planet is covered by thick layers of clouds or vapor,
and has a high surface temperature.
t}/.815/.9489
-
Earth/t{
This is the only planet known to contain biological life.
It has one natural satellite, the Moon.
t}/1/1
-
Mars/t{
This reddish planet has white polar regions that
change size with seasonal regularity.
It has two satellites.
t}/.1074/.5327
.te

-------------------------------- Page 35 --------------------------------

Output:


                     Table 5.    Example of a Table

       |_______________________________________________________|
       |_____________Some_Data_for_the_Inner_Planets___________|
       |  Planet |        Description       |  Data (Earth = 1)|
       |_________|__________________________|__mass____diameter|
       | Mercury | Nearest  the  sun,  this |  .056      .382  |
       |         | planet has an 88 day or- |                  |
       |_________|_bit._____________________|__________________|
       |  Venus  | This  planet is  covered |  .815      .9489 |
       |         | by   thick   layers   of |                  |
       |         | clouds or vapor, and has |                  |
       |         | a high  surface tempera- |                  |
       |_________|_ture.____________________|__________________|
       |  Earth  | This is the  only planet | 1         1      |
       |         | known to contain biolog- |                  |
       |         | ical  life.  It  has one |                  |
       |         | natural  satellite,  the |                  |
       |_________|_Moon.____________________|__________________|
       |   Mars  | This reddish  planet has |  .1074     .5327 |
       |         | white polar regions that |                  |
       |         | change size with season- |                  |
       |         | al  regularity.  It  has |                  |
       |_________|_two_satellites.__________|__________________|

-------------------------------- Page 36 --------------------------------

APPENDIX C.    DEVICE DEPENDENT CHARACTER SETS

The appearance of characters formatted by ms is necessarily device depen-
dent, especially in an  ASCII environment with primarily EBCDIC  devices.
The intended output devices are the COI 3270 and Memorex 1377  terminals,
the Qume printer, and the TN train printer.  There are several special ms
characters that may be specified, which appear differently and with  dif-
ferent degrees of success on the available devices.

The Qume and TN train graphics are displayed below.  As it is not  possi-
ble to display the output of the crt's in this  document, there are files
for   these   devices   for   direct   inspection.    On   a   3270,   do
'cat /usr/lib/ss/coi'.  On a 1377, after first specifying 'stty memorex',
do 'cat /usr/lib/ss/mem',




Qume Character Set

All ASCII characters appear normally:
     abcdefghijklmnopqrstuvwxyz.,''!
     ABCDEFGHIJKLMNOPQRSTUVWXYZ:;^"?
     0123456789=+-~*\/|_@#$%&()<>{}[]




TN Train Character Set

The following ASCII characters appear normally:
     abcdefghijklmnopqrstuvwxyz.,'!
     ABCDEFGHIJKLMNOPQRSTUVWXYZ:;"?
     0123456789=+-*/|_@#$%&()<>{}[]

The remaining ASCII characters appear abnormally:
     backslash \    circumflex ^    tilde ~    grave accent '




In addition, the following special characters are defined:

-------------------------------- Page 37 --------------------------------

Qume      TN          input         name


 --                   \(--          dash punctuation mark

 -                    \(mi          alternate minus sign

 _                    \(ru          rule for drawing box

 |                    \(lc          left  ceiling of box

 |                    \(lf          left  floor   of box

 |                    \(rc          right ceiling of box

 |                    \(rf          right floor   of box

 |                    \(bv          vertical rule of box

 |                    \(br          other vertical box rule

 T                    \(ua          up arrow

 v                    \(da          down arrow

 <-                   \(la          left arrow

 ->                   \(ra          right arrow

 *                    \(bu          bullet

 #                    \(sq          square

 #                    \(ss          solid square

 \                    \(ct          cent sign

 ~                    \(no          not sign

 -                    \(dg          dagger

 =                    \(dd          double dagger

 co                   \(co          copyright

 rg                   \(rg          registered

 TM                   \(TM          Trade Mark

-------------------------------- Page 38 --------------------------------

Qume      TN          input         name


 p                    \(*p          lower-case pi

 m                    \(*m          lower-case mu

 S                    \(*S          upper-case Sigma

 o                    \(de          degree

 0               \(su0\(sd          superscript 0

 1               \(su1\(sd          superscript 1

 2               \(su2\(sd          superscript 2

 3               \(su3\(sd          superscript 3

 4               \(su4\(sd          superscript 4

 5               \(su5\(sd          superscript 5

 6               \(su6\(sd          superscript 6

 7               \(su7\(sd          superscript 7

 8               \(su8\(sd          superscript 8

 9               \(su9\(sd          superscript 9

 (               \(su(\(sd          superscript (

 )               \(su)\(sd          superscript )

 +               \(su+\(sd          superscript +

 "                    \(dq          (other name for ")

 +                    \(ch          check mark

 #                    \(sc          section mark

 =                    \(==          equivalent

 -                    \(~=          approximately equal

 ~                    \(ap          approximates

-------------------------------- Page 39 --------------------------------

Qume      TN          input         name


 !                    \(!=          not equal

 <                    \(le          less than or equal

 >                    \(ge          greater than or equal

 +                    \(+-          plus or minus

 x                    \(mu          multiply symbol

 /                    \(di          divide symbol

 *                    \(**          math * symbol

 14                   \(14          one-fourth

 12                   \(12          one-half

 34                   \(34          three-fourths

 /                    \(es          empty set

 oo                   \(if          infinity

-------------------------------- Page 40 --------------------------------

APPENDIX D.    COMMAND SUMMARY

Section   Command Syntax                Description

3         .1s                           force single sided format
3         .2s                           force double sided format
9.1.2.1   .al [type] [no_spaces]        begin automatically numbered list
7.2       .ap [appendix_name]           appendix title
4         .au author_1 [... author_8]   author's names for cover sheet
9.1.1.1   .bl [no_spaces]               begin bullet list
8.2       .bq                           begin quoted paragraph
16.1      .br                           break line
16.10     .ce [n]                       center
3         .cn [name]                    specify [or omit] company name
3         .cp [text]                    company private format
16.12     .cu [n]                       continuously underline
13.3      .de XX                        define macro
9.1.1.2   .dl [no_spaces]               begin dash list
11        .dp [type]                    begin display
13.2      .ds XX string                 define string register
11        .ed                           end display
8.2       .eq                           end quoted paragraph
15        .fe                           footnote end
12.1      .fg [title]                   figure title
16.2      .fi                           fill mode
5         .fo [bi]                      font change chars are b and i
15        .fs [label]                   footnote text start
14.1      .ft font                      change fonts
12.2      .gf label [title]             generalized figure title
7.1       .hd level [heading_name]      heading
16.14     .hw word ...                  specify hyphenation points
9.1.1     .il label [no_spaces]         begin identically labeled list
16.8      .in [+n]                      indent
9.2       .le [label]                   list entry
9.4       .lx [no_space]                list exit
16.16     .mc [c]                       set margin character
4         .mt title_1 [... title_8]     main title for cover sheet
16.6      .ne n                         need lines
16.3      .nf                           no fill mode
13.1      .nr XX +n                     define number register
9.1.2.2   .ol [no_spaces]               begin outline list
8.1       .pp                           begin paragraph
6         .pt [line_1] [line_2] [date]  page title
9.1.2.3   .rl [no_spaces]               begin reference list
16.5      .rs                           restore spacing
12.3      .sf XX                        save figure number
7.3       .sh XX [.]                    save heading or appendix number
16.7      .sk [n]                       skip pages
9.3       .sl XX [.]                    save list entry number

-------------------------------- Page 41 --------------------------------

Section   Command Syntax                Description

16.17     .so file                      include source file
16.4      .sp [n]                       space lines
16.15     .ta position ...              tab setting
10        .te                           table end
12.4      .tf [n]                       table of figures control
10.1      .th                           end of table heading
16.9      .ti +n                        temporary indent
10        .ts [h]                       table start
10.2      .t&                           table continuation
16.11     .ul [n]                       underline
16.13     .up [n]                       upper-case
9.1.3     .vl [indent_size] [no_spaces] begin variably labeled list
