Download Troff User's Manual

Transcript
­2­
1989, the internals have been modestly revised, though much of the code remains as it
was when Ossanna wrote it.
Troff reads parameter files each time it is invoked, to set values for machine reso­
lution, legal type sizes and fonts, and character names, character widths and the like.
Troff output is ASCII characters in a simple language that describes where each character
is to be placed and in what size and font. A post-processor must be written for each
device to convert this typesetter-independent language into specific instructions for that
device.
The output language contains information that was not readily identifiable in the
older output. In the newer language, the beginning of each page, line, and word is
marked, so post-processors can do device-specific optimizations such as sorting the
data vertically or printing it boustrophedonically, independent of troff .
Capabilities for graphics have been added: troff recognizes commands for drawing
diagonal lines, circles, ellipses, circular arcs, and quadratic B-splines. There are also
ways to pass arbitrary information to the output, unprocessed by troff .
A number of limitations have been eased or eliminated. A document may have an
arbitrary number of fonts on any page (if the output device permits it, of course). Fonts
may be accessed merely by naming them; mounting is no longer necessary. There
are no limits on the number of characters. Character height and slant may be set inde­
pendently of width.
The remainder of this document contains a description of usage and commandline options; a summary of requests, escape sequences, and pre-defined number regis­
ters; a reference manual; tutorial examples; and a list of commonly-available characters.
Acknowledgements
Joe Ossannas troff remains a remarkable accomplishment. For more than twenty
years, it has proven a robust tool, taking unbelievable abuse from a variety of preproces­
sors and being forced into uses that were never conceived of in the original design, all
with considerable grace under fire.
Recent versions of troff have profited from significant code improvements by Jaap
Akkerhuis, Dennis Ritchie, Ken Thompson, and Molly Wagner. UTF facilities owe much
to Jaap Akkerhuis. Andrew Hume, Doug McIlroy, Peter Nelson and Ravi Sethi made valu­
able suggestions on the manual. I fear that the remaining bugs are my fault.