language-icon Old Web
English
Sign In

troff

troff (/ˈtiːrɒf/, short for typesetter roff) is the major component of a document processing system developed by AT&T Corporation for the Unix operating system. troff features commands to designate fonts, spacing, paragraphs, margins, footnotes and more. Unlike many other text formatters, troff can position characters arbitrarily on a page, even overlapping them, and has a fully programmable input language. Separate preprocessors are used for more convenient production of tables, diagrams, and mathematics. Inputs to troff are plain text files that can be created by any text editor. Extensive macro packages have been created for various document styles. A typical distribution of troff includes the me macros for formatting research papers, man and mdoc macros for creating Unix man pages, mv macros for creating mountable transparencies, and the ms and mm macros for letters, books, technical memoranda, and reports. troff's origins can be traced to a text-formatting program called RUNOFF, which was written by Jerome H. Saltzer for MIT's CTSS operating system in the mid-1960s. (The name allegedly came from the phrase I'll run off a document.) Bob Morris ported it to the GE 635 architecture and called the program roff (an abbreviation of runoff). It was rewritten as rf for the PDP-7, and at the same time (1969), Doug McIlroy rewrote an extended and simplified version of roff in the BCPL programming language. The first version of Unix was developed on a PDP-7 which was sitting around Bell Labs. In 1971 the developers wanted to get a PDP-11 for further work on the operating system. In order to justify the cost for this system, they proposed that they would implement a document-formatting system for the AT&T patents division. This first formatting program was a reimplementation of McIllroy's roff, written by Joe F. Ossanna. When they needed a more flexible language, a new version of roff called nroff (newer 'roff') was written, which provided the basis for all future versions. When they got a Graphic Systems CAT phototypesetter, Ossanna modified nroff to support multiple fonts and proportional spacing. Dubbed troff, for typesetter roff, its sophisticated output amazed the typesetter manufacturer and confused peer reviewers, who thought that manuscripts using troff had been published before. As such, the name troff is pronounced /ˈtiːrɒf/ rather than */ˈtrɒf/. With troff came nroff (they were actually almost the same program), which was for producing output for line printers and character terminals. It understood everything troff did, and ignored the commands which were not applicable, e.g., font changes.

[ "Command-line interface", "Unix architecture", "Environment variable", "shar", "Single UNIX Specification" ]
Parent Topic
Child Topic
    No Parent Topic