troff Command troff Format proportionally spaced text troff [option ...] [file ...] The command troff processes each given file, or the standard in- put if none is specified, and prints the formatted result on the standard output. The input must contain formatting instructions as well as the text to be processed. Basic commands provide for such things as setting line length, page length and page offset, generating vertical and horizontal motions, indentation, filling and adjusting output lines, and centering. The great flexibility of troff lies in its acceptance of user-defined macros to control almost all higher-level format- ting. For example, the formation of paragraphs, header and footer areas, and footnotes must all be implemented by the user via macros. troff uses the same commands and syntax and nroff; files prepared for one usually can be processed through the other without re- quiring any changes. troff differs from nroff in that it con- tains tables for proportional spacing of letters, and allows the user to move about the page in increments other than sixths of an inch vertically or tenths of an inch horizontally. The following gives troff's command line options and the primitives that it does not share with nroff. ***** Command-line Options ***** Command-line options may be listed in any order. They are as follows: -d Debugging mode: do not erase temporary file. -fname Write the temporary file in directory name. -i Read from the standard input after reading the given files. -mname Include the macro file /usr/lib/tmac.name in the input stream. -nN Number the first page of output N. -raN Set number register a to the value N. -x Do not eject to the bottom of the last page when text ends. This is often useful if the output device is a CRT. ***** troff's Primitives ***** COHERENT Lexicon Page 1
troff Command troff The following lists troff's basic commands, or primitives, that are not shared with nroff. .cs Np Set the constant character width, in points. .ps N Set point size to N. .ss N Set the minimum word spacing to N divided by 36 ems. .vs Np Set the vertical spacing to N points. One point is equiv- alent to 1/72 of an inch; the default setting is 12 points, or 1/6 of an inch. ***** Files ***** /tmp/rof* -- Temporary files /usr/lib/tmac.name -- Standard macro packages ***** See Also ***** col, commands, deroff, hpr, man, ms, nroff Introduction to nroff, Text Processing Language ***** Notes ***** The COHERENT version of troff produces output suitable for prin- ting on the Hewlett-Packard LaserJet II printer equipped with Hewlett-Packard soft fonts. The fonts are named as follows: \fR Times Roman \fI Times Italic \fB Times Bold \fS Times Roman, small \fL Line printer font \f(CM American Typewriter \fH Helvetica Bold troff output, unlike that of nroff, cannot be processed through a terminal driver. Like nroff, troff should be used with the macro packages ms, which is found in the file /usr/lib/tmac.s, and man, which is found in the file /usr/lib/tmac.an. COHERENT Lexicon Page 2