6.38. Groff-

The Groff package contains programs for processing and formatting text.

Approximate build time: 0.4 SBU
Required disk space: 39.2 MB

6.38.1. Installation of Groff

Apply the patch that adds the “ascii8” and “nippon” devices to Groff:

patch -Np1 -i ../groff-


These devices are used by Man-DB when formatting non-English manual pages that are not in the ISO-8859-1 encoding. Currently, there is no working patch for Groff-1.19.x that adds this functionality.

Many screen fonts don't have Unicode single quotes and dashes in them. Tell Groff to use the ASCII equivalents instead:

sed -i -e 's/2010/002D/' -e 's/2212/002D/' \
    -e 's/2018/0060/' -e 's/2019/0027/' font/devutf8/R.proto

Groff expects the environment variable PAGE to contain the default paper size. For users in the United States, PAGE=letter is appropriate. Elsewhere, PAGE=A4 may be more suitable. While the default paper size is configured during compilation, it can be overridden later by echoing either “A4” or “letter” to the /etc/papersize file.

Prepare Groff for compilation:

PAGE=<paper_size> ./configure --prefix=/usr --enable-multibyte

Compile the package:


This package does not come with a test suite.

Install the package:

make install

Some documentation programs, such as xman, will not work properly without the following symlinks:

ln -sv eqn /usr/bin/geqn
ln -sv tbl /usr/bin/gtbl

6.38.2. Contents of Groff

Installed programs: addftinfo, afmtodit, eqn, eqn2graph, geqn (link to eqn), grn, grodvi, groff, groffer, grog, grolbp, grolj4, grops, grotty, gtbl (link to tbl), hpftodit, indxbib, lkbib, lookbib, mmroff, neqn, nroff, pfbtops, pic, pic2graph, post-grohtml, pre-grohtml, refer, soelim, tbl, tfmtodit, and troff

Short Descriptions


Reads a troff font file and adds some additional font-metric information that is used by the groff system


Creates a font file for use with groff and grops


Compiles descriptions of equations embedded within troff input files into commands that are understood by troff


Converts a troff EQN (equation) into a cropped image


A link to eqn


A groff preprocessor for gremlin files


A driver for groff that produces TeX dvi format


A front-end to the groff document formatting system; normally, it runs the troff program and a post-processor appropriate for the selected device


Displays groff files and man pages on X and tty terminals


Reads files and guesses which of the groff options -e, -man, -me, -mm, -ms, -p, -s, and -t are required for printing files, and reports the groff command including those options


Is a groff driver for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers)


Is a driver for groff that produces output in PCL5 format suitable for an HP LaserJet 4 printer


Translates the output of GNU troff to PostScript


Translates the output of GNU troff into a form suitable for typewriter-like devices


A link to tbl


Creates a font file for use with groff -Tlj4 from an HP-tagged font metric file


Creates an inverted index for the bibliographic databases with a specified file for use with refer, lookbib, and lkbib


Searches bibliographic databases for references that contain specified keys and reports any references found


Prints a prompt on the standard error (unless the standard input is not a terminal), reads a line containing a set of keywords from the standard input, searches the bibliographic databases in a specified file for references containing those keywords, prints any references found on the standard output, and repeats this process until the end of input


A simple preprocessor for groff


Formats equations for American Standard Code for Information Interchange (ASCII) output


A script that emulates the nroff command using groff


Translates a PostScript font in .pfb format to ASCII


Compiles descriptions of pictures embedded within troff or TeX input files into commands understood by TeX or troff


Converts a PIC diagram into a cropped image


Translates the output of GNU troff to HTML


Translates the output of GNU troff to HTML


Copies the contents of a file to the standard output, except that lines between .[ and .] are interpreted as citations, and lines between .R1 and .R2 are interpreted as commands for how citations are to be processed


Reads files and replaces lines of the form .so file by the contents of the mentioned file


Compiles descriptions of tables embedded within troff input files into commands that are understood by troff


Creates a font file for use with groff -Tdvi


Is highly compatible with Unix troff; it should usually be invoked using the groff command, which will also run preprocessors and post-processors in the appropriate order and with the appropriate options