Also found in: Dictionary, Acronyms, Wikipedia.


(text, tool)
/T'rof/ or /trof/ The grey eminence of Unix text processing; a formatting and phototypesetting program, written originally in PDP-11 assembly code and then in barely-structured early C by the late Joseph Ossanna, modelled after the earlier ROFF which was in turn modelled after Multics' RUNOFF by Jerome Saltzer (*that* name came from the expression "to run off a copy"). A companion program, nroff, formats output for terminals and line printers.

In 1979, Brian Kernighan modified troff so that it could drive phototypesetters other than the Graphic Systems CAT. His paper describing that work ("A Typesetter-independent troff", AT&T CSTR #97) explains troff's durability. After discussing the program's "obvious deficiencies - a rebarbative input syntax, mysterious and undocumented properties in some areas, and a voracious appetite for computer resources" and noting the ugliness and extreme hairiness of the code and internals, Kernighan concludes:

None of these remarks should be taken as denigrating Ossanna's accomplishment with TROFF. It has proven a remarkably robust tool, taking unbelievable abuse from a variety of preprocessors and being forced into uses that were never conceived of in the original design, all with considerable grace under fire.

The success of TeX and desktop publishing systems have reduced troff's relative importance, but this tribute perfectly captures the strengths that secured troff a place in hacker folklore; indeed, it could be taken more generally as an indication of those qualities of good programs that, in the long run, hackers most admire.

groff is GNU's implementation of roff in C++.
This article is provided by FOLDOC - Free Online Dictionary of Computing (


(Typesetting RunOFF) A Unix utility that formats documents for typesetters and laser printers. Using a text editor, troff codes are embedded into the text and the troff command converts the document into the required output. See nroff and TeX.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
The idea was that the "front-end" (Scribe, troff) would do the heavy lifting of command processing, line/paragraph shaping, and pagination, but save results in a format that could then be repurposed for various output devices.
Major Erik Troff (B.S., Business Management, Northwestern College (1989); J.D.
(Beware of net addresses hyphenated across lines by LaTeX, troff, etc.!)
For example, the diction and style utilities call deroff, vi calls csh, and vgrind calls troff. When these sub-processes are called, they are often given direct access to the raw input data stream, so they are vulnerable to erroneous input.
UNIX has a bountiful library, but the sheer number of programs is a significant obstacle to finding what you need; key languages like shell and troff are arcane and difficult to learn.
Most procedurally based systems provide macro facilities, which users have long exploited for descriptive markup (e.g., the -ms facility for troff), and even some of the primitives of such systems may be descriptive (e.g., the .pp "control word" for paragraphs in Waterloo SCRIPT).