TROFF(1)

NAME
troff - text formatting and typesetting

SYNOPSIS
troff [ options []] [ files []]

DESCRIPTION
troff formats text in the named files for printing on a laser printer or phototypesetter.

If no files argument is present, the standard input is read. An argument consisting of a single minus [- ) (] is taken to be a file name corresponding to the standard input. The options, which may appear in any order so long as they appear before the files, are:

[-o list]
Print pages in the comma-separated
    list of numbers and ranges. A range N-M means N through M; initial -M means up to and including M; final N- means from N to the end.

    [-n N]
Number first generated page
    N.

    [-m name]
Prepend the macro file
    to the input files.

    [-r aN]
Set register
    a (one-character name) to N.

    [-i]
Read standard input after the input files are exhausted.

    [-q]
Invoke the simultaneous input-output mode of the
    request.

    [-a]
Send a printable
    ASCII approximation of the results to the standard output.

    [-F dir]
Use dir as the font directory. The default dir is /pbulk/work/textproc/DWB/work/.destdir/usr/pkg/DWB/lib/font(.)

    [-N]
Run the program as
    nroff.

    [-T name]
Prepare output for typesetter
    name. The default name is post.

    [-V]
Print troff version.

EXAMPLES

Format file with MM macros:
    troff -mm file | spool
Use the local spool command (e.g., lp or prt) to send output to a printer. Use proof to preview output on DMD 5620 or 630 MTG terminals.

Format file with tables and MS macros; send Imagen 8/300 output to the local printer using lp:
    tbl file | troff -ms -Ti300 | lp
Preview view graphs with pictures and equations (using eqnchar(5) symbols) on a 630 MTG terminal:
    pic file | eqn /pbulk/work/textproc/DWB/work/.destdir/usr/pkg/DWB/pub/eqnchar - | troff -mview | proof
Format file with the works (graphs, pictures, tables, equations) and MM macros:
    grap file | pic | tbl | eqn | troff -Tpost -mm | spool
A few rules of order may apply if certain preprocessors are used in combination. A safe bet is to use the preprocessors in the order given above. Since grap is a preprocessor to pic, it must be used before pic on the command line.

FILES

SEE ALSO
dpost(1), eqn(1), grap(1), nroff(1), pic(1), tbl(1), font(5), troff(5)

REFERENCES

B. W. Kernighan and J. F. Ossanna, Troff User's Manual

B. W. Kernighan, A Troff Tutorial