


      TROFF(5)                      (DWB)                      TROFF(5)



      NAME
           troff - description of output language

      DESCRIPTION
           The device-independent troff outputs a pure ASCII
           description of a typeset document.  The description
           specifies the typesetting device, the fonts, and the point
           sizes of characters to be used as well as the position of
           each character on the page.  A list of all the legal
           commands follows.  Most numbers are denoted as n and are
           ASCII strings.  Strings inside of [ ] are optional.  Troff
           may produce them, but they are not required for the
           specification of the language.  The character \n has the
           standard meaning of "newline" character.  Between commands
           white space has no meaning.  White space characters are
           spaces and newlines.  All commands which have an arbitary
           length numerical parameter or word must be followed by white
           space.  For example, the command to specify point size,
           s###, must be followed by a space or newline.

           sn                  The point size of the characters to be
                               generated.

           fn                  The font mounted in the specified
                               position is to be used.  The number
                               ranges from 0 to the highest font
                               presently mounted.  0 is a special
                               position, invoked by troff, but not
                               directly accessible to the troff user.
                               Normally fonts are mounted starting at
                               position 1.

           cx                  Generate the character x at the current
                               location on the page; x is a single
                               ASCII character.

           Cxyz                Generate the special character xyz.  The
                               name of the character is delimited by
                               white space.  The name will be one of
                               the special characters legal for the
                               typesetting device as specified by the
                               device specification found in the file
                               DESC.  This file resides in a directory
                               specific for the typesetting device.
                               (See font(5) and /usr/lib/font/dev*.)

           Hn                  Change the horizonal position on the
                               page to the number specified.  The
                               number is in basic units of motions as
                               specified by DESC.  This is an absolute
                               "goto".




      Page 1                                         (73 A2 02MTA REV1)






      TROFF(5)                      (DWB)                      TROFF(5)



           hn                  Add the number specified to the current
                               horizontal position.  This is a relative
                               "goto".

           Vn                  Change the vertical position on the page
                               to the number specified (down is
                               positive).

           vn                  Add the number specified to the current
                               vertical position.

           nnx                 This is a two-digit number followed by
                               an ASCII character.  The meaning is a
                               combination of hn followed by cx.  The
                               two digits nn are added to the current
                               horizontal position and then the ASCII
                               character, x, is produced.  This is the
                               most common form of character
                               specification.

           nb a                This command indicates that the end of a
                               line has been reached.  No action is
                               required, though by convention the
                               horizontal position is set to 0.  Troff
                               will specify a resetting of the x,y
                               coordinates on the page before
                               requesting that more characters be
                               printed.  The first number, b, is the
                               amount of space before the line and the
                               second number, a, the amount of space
                               after the line.  The second number is
                               delimited by white space.

           w                   A w appears between words of the input
                               document.  No action is required.  It is
                               included so that one device can be
                               emulated more easily on another device.

           pn                  Begin a new page.  The new page number
                               is included in this command.  The
                               vertical position on the page should be
                               set to 0.

           {                   Push the current environment, which
                               means saving the current point size,
                               font, and location on the page.

           }                   Pop a saved environment.

           txxxxx              Print the string of characters, xxxxx,
                               using the natural width of each
                               character to determine the next x



      Page 2                                         (73 A2 02MTA REV1)






      TROFF(5)                      (DWB)                      TROFF(5)



                               coordinate.  Troff does not currently
                               produce this form of command.  It is not
                               recommended.  The characters will
                               probably be too close together.

           # .... \n           A line beginning with a pound sign is a
                               comment.

           Dl x y\n            Draw a line from the current location to
                               x,y.  At the end of the drawing
                               operation the current location will be
                               x,y.

           Dc d\n              Draw a circle of diameter d with the
                               leftmost edge being at the current
                               location (x, y).  The current location
                               after drawing the circle will be x+d,y,
                               the rightmost edge of the circle.

           De dx dy\n          Draw an ellipse with the specified axes.
                               dx is the axis in the x direction and dy
                               is the axis in the y direction.  The
                               leftmost edge of the ellipse will be at
                               the current location.  After drawing the
                               ellipse the current location will be
                               x+dx,y.

           Da x y r\n          Draw a counterclockwise arc from the
                               current location to x,y using a circle
                               of radius r . The current location after
                               drawing the arc will be x,y.

           D~ x y x y...\n     Draw a spline curve (wiggly line)
                               between each of the x,y coordinate pairs
                               starting at the current location.  The
                               final location will be the final x,y
                               pair of the list.  Currently there may
                               be no more than 36 x,y pairs to this
                               command.

           x i[nit]\n          Initialize the typesetting device.  The
                               actions required are dependent on the
                               device.  An init command will always
                               occur before any output generation is
                               attempted.

           x T device\n        The name of the typesetter is device.
                               This is the same as the argument to the
                               -T option.  The information about the
                               typesetter will be found in the
                               directory /usr/lib/font/dev{device}.




      Page 3                                         (73 A2 02MTA REV1)






      TROFF(5)                      (DWB)                      TROFF(5)



           x r[es] n h v\n     The resolution of the typesetting device
                               in increments per inch is n.  Motion in
                               the horizontal direction can take place
                               in units of h basic increments.  Motion
                               in the vertical direction can take place
                               in units of v basic increments.  For
                               example, the APS-5 typesetter has a
                               basic resolution of 723 increments per
                               inch and can move in either direction in
                               723rds of an inch.  Its specification
                               is:
                               x res 723 1 1

           x p[ause]\n         Pause.  Cause the current page to finish
                               but do not relinquish the typesetter.

           x s[top]\n          Stop.  Cause the current page to finish
                               and then relinquish the typesetter.
                               Perform any shutdown and bookkeeping
                               procedures required.

           x t[railer]\n       Generate a trailer.  On some devices no
                               operation is performed.

           x f[ont] n name\n   Load the font name into position n.

           x H[eight] n\n      Set the character height to n points.
                               This causes the letters to be elongated
                               or shortened.  It does not affect the
                               width of a letter.

           x S[lant] n\n       Set the slant to n degrees.  Only some
                               typesetters can do this and not all
                               angles are available.





















      Page 4                                         (73 A2 02MTA REV1)



