GROFF_FILENAMES(5) | File Formats Manual | GROFF_FILENAMES(5) |
groff_filenames - filename extensions for roff and groff
Since the evolution of roff in the 1970s, a whole bunch of filename extensions for roff files were used.
The roff extensions refer to preprocessors or macro packages. These extensions are fixed in all Unix-like operating systems.
Later on, groff added some more extensions. This man page is about these filename extensions.
Each roff file can be optionally compressed. That means that the total filename ends with a compressor name. So the whole filename has the structure <name>.<extension>[.<compression>].
Best-known are the compressor extensions .Z, .gz, and .bzip2. Relatively new is .xz.
From now on, we will ignore the compressions and only comment the structure <name>.<extension>.
The Unix manual pages are widely called man pages. The man page style is the best known part of the roff language.
The extensions for man should be better documented. So this is documented here.
Files written in the man language use the following extension: *.<section>[<group>].
The traditional man page <section> is a digit from 1 to 8.
In older commercial Unix systems, the 3 characters l, n, and o were also used as section names. This is today deprecated, but there are still documents in this format.
The <group> extension in .<section>[<group>] is optional, but it can be any string of word characters. Usually programmers use a group name that is already used, e.g. x for X Window System documents or tcl to refer to the Tcl programming language.
Examples:
There are 2 roff languages for writing man pages: man and mdoc.
The names of these 2 styles are taken as extensions for the source code files of man pages in the groff package.
The classical roff languages were interpreted by the traditional troff and nroff programs.
There were several roff languages, each represented by a macro-package. Each of these provided a suitable file name extension:
All of these classical roff languages and their extensions are still very active in groff.
In traditional roff the source code for the macro packages was stored in TMAC files. Their file names have the form:
For example, tmac.an is the source for the man macro package.
In the groff source, more suitable file names were integrated, see later on.
Moreover, the following preprocessors were used as filename extension:
GNU roff groff is the actual roff standard, both for classical roff and new extensions. So even the used new extensions in the source code should be regarded as actual standard. The following extensions are used instead of classical .t or .tr:
As the classical form tmac.<package_without_m>, of the TMAC file names is quite strange, groff added the following structures:
Groff uses the following new macro packages:
This document was written by Bernd Warken.
A man page of the naming form name(n) can be read in text mode by
man n name
groffer n name
Gunnar Ritter's Heirloom roff project. You can get this package with the shell command:
$ git clone https://github.com/n-t-roff/heirloom-doctools
7 March 2023 | groff 1.22.4 |