Unlike many other text formatters, troff can position characters arbitrarily on a page, even overlapping them, and has a fully programmable input language.
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.
[citation needed] 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.
When they got a Graphic Systems CAT phototypesetter, Ossanna modified nroff to support multiple fonts and proportional spacing.
[4] The program's documentation defines the output format of ditroff, which is used by many modern troff clones like GNU groff.
[5] The troff collection of tools (including pre- and post-processors) was eventually called Documenter's WorkBench (DWB), and was under continuous development in Bell Labs and later at the spin-off Unix System Laboratories (USL) through 1994.
In addition, due to the open sourcing of Ancient UNIX systems, as well as modern successors such as the ditroff-based open-sourced versions found on OpenSolaris and Plan 9 from Bell Labs, there are several versions of AT&T troff (CAT and ditroff-based[6]) available under various open-source licenses.
These macros include setting up page headers and footers, defining new commands, and influencing how the output will be formatted.
The embedded preprocessing instructions are written in a simple application-specific programming language, which provides a high degree of power and flexibility.
Used for writing memos, reports, documents, Sanscribe is built upon basic troff commands as well as the me macros and various pre- and post-processors such as soelim, eqn, tbl, grap, and pic.
[28] A special-purpose front-end is vgrind, which generates nicely formatted source program listings, with such features as putting comments in italics, keywords in bold, and function names highlighted in margins.
It has support for the languages in use at Bell Labs facilities, including not just Fortran, C, and C++ but also domain-specific tools such as Bourne shell and yacc as well as those further afield such as Emacs Lisp and Icon.
Rather than the cadiz program being a preprocessor in the front of the pipeline, it interacts multiple times with troff as both input and output, using saved files rather than a pipe.