Groff, troff, nroff, and roff

Short history

I won't do any better than the Wikipedia article on Troff (but also see the Wikipedia article on Groff) but here is my brief summary for my head. Prior to Unix there was text-formatting program (maybe pre-typesetting?) called RUNOFF and this evolved into roff on another pre-Unix system which was ported to Unix and then improved and called nroff for "newer roff." Nroff focuses on, or was used for, text formatting such as manual pages while troff was the typesetting roff.

Troff was rewritten by Brian Kernighan to generate device independent files and this was (sometimes?) called ditroff. A technical report called this a typesetter-independent troff.

Groff is the GNU replacement for nroff and troff with many extensions.

Apparently the pronounciation is en-roff, tee-roff, and jee-roff.

roff manual page

On my Lubuntu system, there is a manual page for roff that gives some background. I also learned there is an info page on groff with lots of background.

Macro sets

This is from the Info page for groff:

Elemental typesetting functions can be be challenging to use directly with complex documents. A "macro" facility specifies how certain routine operations, such as starting paragraphs, or printing headers and footers, should be performed in terms of those low-level instructions. Macros can be specific to one document or collected together into a "macro package" for use by many. Several macro packages available; the most widely used are provided with groff. They are man, mdoc, me, mm, mom, and ms.

Example Document in Groff

.TL
A document using MT of 5
.AU "Stephen Weigand"
.MT 

Author: Stephen Weigand

Created: 2024-12-24 Tue 13:31

Validate