0

From the groff documentation:

GNU 'troff' (or 'groff') is a system for typesetting documents.

Again:

In this document, we consequently say 'gtroff' when talking about the GNU 'troff' program.

One more:

'groff' normally runs the 'gtroff' program and a postprocessor appropriate for the selected device.

So what is "gtroff" and what is the difference between "gtroff" and "groff"?

1
  • 1
    It sounds clear enough to me. The typesetting system groff runs several commands (programs), one of these being gtroff (troff with a g prepended, as described in the groff(1) manual and the manual that you quote). It's similar to saying that gcc runs cc1, as, and ld while compiling, assembling, and linking your code. Not turning this into an answer as I'm not sure where the confusion lies.
    – Kusalananda
    Commented Sep 21, 2020 at 6:43

1 Answer 1

3

gtroff is a component of groff.

gtroff is the GNU implementation of troff and nroff, the traditional roff processors; these process documents written in the roff formatting language and produce an intermediate output for device “postprocessors”. gtroff is described in detail in its own section of the groff manual. On Linux systems, it is usually installed as troff, not gtroff.

groff is the GNU implementation of a “complete” roff-based text processing system. It includes a number of pre-processors, which help produce roff starting with more abstract representations; these include tbl (for tables), eqn (for equations), pic (for diagrams). It also includes a number of post-processors, with support for ASCII, TEX DVI, HTML, PostScript, PDF output among others.

Traditional troff involves manually piping the input through the required pre-processors, then troff itself, then the appropriate post-processor. groff encapsulates all that; for example

groff -p -t -me -Tps example.me

pre-processes example.me with pic and tbl, then feeds the result to troff with the me macro package, and finally produces a PostScript file using grops.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .