Why groff?

UNIX systems in general and Linux systems in particular offer users a large and growing number of choices for committing text to print. These include everything from commercial and open-source WYSIWYG word processors, to other typesetting engines such as TEX/LATEX and lout. The main reason for preferring typesetters to word processors is the advantage of logical markup compared to visual formatting. This is in some ways a matter of personal preference, and in others a matter of conceptual savy. The main reason for preferring groff to its brethren is that it has a simpler, smaller command set than the other packages and is included with even minimal installs.

The article assumes the reader may already be familiar with the fundamental advantages of logical formatting. This difference is in many ways analogous to the difference between using a spreadsheet and a database. In a spreadsheet, the data is inseparable from its visual layout. A database, on the other hand, maintains data separately from its visual appearance, so that layout may be flexibly specified in any number of ways with other tools and report generators as the occasion demands. It is typical for a spreadsheet to be easier to set up in the initial stages of development and useful for prototyping. But for projects requiring longevity, flexibility and portability, it is generally considered preferable to keep the underlying data unbundled from its visual layout.

This is the philosophy behind the structured markup conventions demonstrated in the growing movement toward XML, which treats documents as consisting of logical blocks of information in order to make that information more accessible. These logical blocks may then be defined to have specific and consistent formatting and appearance attributes, to convey the visual cues appropriate for their logical structure, as well as to be appropriate for the target media used for publication.

Some other reasons for using groff may include: