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.
extensions refer to preprocessors or macro packages. These
extensions are fixed in all Unix
-like operating systems.
Later on, groff
added some more extensions. We will now write a
man-page about these filename extensions.
file can be optionally compressed
. That means that the
ends with a compressor name
. So the whole
filename has the structure
Mostly known are the compressor extensions .Z
. Relatively new is .xz
From now on, we will ignore the compressions
and only comment the
The Unix manual pages
are shortly named man-pages
style is the best known part of the roff
The extensions for man
should be better documented. So this is documented
Files written in the man
language use the following extension:
The traditional man-page <section>
is a digit from 1
- <name>.2 <name>.3
<name>.8 Classic man-page sections.
Linux added the section number 9
for kernel man-pages.
- Linux kernel man-pages
In older commercial Unix
systems, the 3 characters l
were also used as section
names. This is today
, but there are still documents in this format.
- <name>.n <name>.o
Deprecated old man-page sections.
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 tk
to refer to the tk
- is the man-page for groff in section 1
without a group
- is the man-page for the program xargs in
section 1 and group posix; moreover it is
compressed with gz (gzip).
- OpenSSL CONF library configuration files from
section 5 with group ssl.
- man-page for the program dpkg-reconfigure in
section 8 and group cdebconf.
There are 2 roff
languages for writing man-pages: man
The names of these 2 styles are taken as extensions
for the source code
files of man-pages in the groff
- traditional Unix-like man-page format within groff
- A temporary man-page file produced from a
name.man man-page by a run of make within the
groff source package.
- Man-page format in BSD.
- Man-page format in heirloom roff .
- Files using this extension recognize both man-page formats
in groff and other processors.
The classical roff
languages were interpreted by the traditional
There were several roff
languages, each represented by a
. Each of these provided a suitable file name
- roff file using the me macro
- roff file using the mm macro
- roff file using the ms macro
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
files. Their file names have the form:
- <package> is the name of the macro package
without the leading m character, which is reintegrated by the
For example, tmac.an
is the source for the man
In the groff
source, more suitable file names were integrated, see later
Moreover, the following preprocessors
were used as filename extension:
- for the integration of chemical formulas
- for the mathematical use of equations
- graphical tool
- for tables with tbl
- for files using the prefer preprocessor
GNU roff groff
- <name>.tr for files using the
roff language of any kind
is the actual roff
standard, both for
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
- <name>.roff general ending for files
using the groff language
As the classical form tmac.<package_without_m>,
file names is quite strange, groff
added the following
uses the following new macro packages:
- file with swedish mm macros for
- files written in the groff macro package
- files written in HTML-like groff
- a new tbl format. See groff_hdtbl(7).
- files written for the graphical grap processor.
- for including gremlin(1), pictures, see
- transform this file with pdfroff of the groff
- History and future
- roff(7), man-pages(7), groff_diff(7),
- uncompress(1posix), gzip2(1),
A man-page of the naming form name(n)
can be read in
text mode by
or in graphical mode (PDF) by
Ritter's Heirloom roff project
You can get this package with the shell
$ git clone https://github.com/n-t-roff/heirloom-doctools
Copyright © 2013-2014 Free Software Foundation, Inc.
This file is part of groff, a free software project. You can redistribute it
and/or modify it under the terms of the GNU General Public License version 2
(GPL2) as published by the Free Software Foundation (FSF).
The license text can be found in the internet at
This file was written by