1GROFF_FILENAMES(5) File Formats Manual GROFF_FILENAMES(5)
2
3
4
6 groff_filenames - filename extensions for roff and groff
7
9 Since the evolution of roff in the 1970s, a whole bunch of filename
10 extensions for roff files were used.
11
12 The roff extensions refer to preprocessors or macro packages. These
13 extensions are fixed in all Unix-like operating systems.
14
15 Later on, groff added some more extensions. This man page is about
16 these filename extensions.
17
19 Each roff file can be optionally compressed. That means that the total
20 filename ends with a compressor name. So the whole filename has the
21 structure <name>.<extension>[.<compression>].
22
23 Best-known are the compressor extensions .Z, .gz, and .bzip2. Rela‐
24 tively new is .xz.
25
26 From now on, we will ignore the compressions and only comment the
27 structure <name>.<extension>.
28
30 The Unix manual pages are widely called man pages. The man page style
31 is the best known part of the roff language.
32
33 The extensions for man should be better documented. So this is docu‐
34 mented here.
35
36 Files written in the man language use the following extension: *.<sec‐
37 tion>[<group>].
38
39 Man page Sections
40 The traditional man page <section> is a digit from 1 to 8.
41
42 <name>.1
43 <name>.2
44 <name>.3
45 <name>.4
46 <name>.5
47 <name>.6
48 <name>.7
49 <name>.8
50 Classic man page sections.
51
52 In older commercial Unix systems, the 3 characters l, n, and o were
53 also used as section names. This is today deprecated, but there are
54 still documents in this format.
55
56 <name>.l
57 <name>.n
58 <name>.o
59 Deprecated man page sections, which stood for “local”, “new”,
60 and “old”, respectively.
61
62 Man page Group Extensions
63 The <group> extension in .<section>[<group>] is optional, but it can be
64 any string of word characters. Usually programmers use a group name
65 that is already used, e.g. x for X Window System documents or tcl to
66 refer to the Tcl programming language.
67
68 Examples:
69
70 groff.1
71 is the man page for groff in section 1 without a group
72
73 xargs.1posix.gz
74 is the man page for the program xargs in section 1 and group
75 posix; moreover it is compressed with gz (gzip).
76
77 config.5ssl
78 OpenSSL CONF library configuration files from section 5 with
79 group ssl.
80
81 dpkg-reconfigure.8cdebconf
82 man page for the program dpkg-reconfigure in section 8 and group
83 cdebconf.
84
85 Source of man pages
86 There are 2 roff languages for writing man pages: man and mdoc.
87
88 The names of these 2 styles are taken as extensions for the source code
89 files of man pages in the groff package.
90
91 <name>.man
92 traditional Unix-like man page format within groff source files.
93
94 <name>.n
95 A temporary man page file produced from a name.man man page by a
96 run of make within the groff source package.
97
98 <name>.mdoc
99 Man page format in BSD.
100
101 <name>.1b
102 Man page format in heirloom roff .
103
104 <name>.mandoc
105 Files using this extension recognize both man page formats in
106 groff and other processors.
107
109 Files Using Macro Packages
110 The classical roff languages were interpreted by the traditional troff
111 and nroff programs.
112
113 There were several roff languages, each represented by a macro-package.
114 Each of these provided a suitable file name extension:
115
116 <name>.me
117 roff file using the me macro package.
118
119 <name>.mm
120 roff file using the mm macro package
121
122 <name>.ms
123 roff file using the ms macro package
124
125 All of these classical roff languages and their extensions are still
126 very active in groff.
127
128 Source Code for Macro Packages (TMAC Files)
129 In traditional roff the source code for the macro packages was stored
130 in TMAC files. Their file names have the form:
131
132 tmac.<package>,
133 <package> is the name of the macro package without the leading m
134 character, which is reintegrated by the option -m.
135
136 For example, tmac.an is the source for the man macro package.
137
138 In the groff source, more suitable file names were integrated, see
139 later on.
140
141 Preprocessors
142 Moreover, the following preprocessors were used as filename extension:
143
144 <name>.chem
145 for the integration of chemical formulas
146
147 <name>.eqn
148 for the mathematical use of equations
149
150 <name>.pic
151 graphical tool
152
153 <name>.tbl
154 for tables with tbl
155
156 <name>.ref
157 for files using the prefer preprocessor
158
159 Classical Roff Files
160 <name>.t
161 <name>.tr
162 for files using the roff language of any kind
163
165 GNU roff groff is the actual roff standard, both for classical roff and
166 new extensions. So even the used new extensions in the source code
167 should be regarded as actual standard. The following extensions are
168 used instead of classical .t or .tr:
169
170 <name>.groff
171 <name>.roff
172 general ending for files using the groff language
173
174 Source Code for Macro Packages (TMAC Files)
175 As the classical form tmac.<package_without_m>, of the TMAC file names
176 is quite strange, groff added the following structures:
177
178 <package_without_m>.tmac
179 m<package>.tmac
180 groff_m<package>.tmac
181
182 Files Using new Macro Packages
183 Groff uses the following new macro packages:
184
185 <name>.mmse
186 file with swedish mm macros for groff
187
188 <name>.mom
189 files written in the groff macro package mom
190
191 <name>.www
192 files written in HTML-like groff macros.
193
194 Preprocessors and Postprocessors
195 <name>.hdtbl
196 Heidelberger tables, an alternative to the preprocessor tbl.
197 See groff_hdtbl(7).
198
199 <name>.grap
200 files written for the graphical grap processor.
201
202 <name>.grn
203 for including gremlin(1), pictures, see grn(1).
204
205 <name>.pdfroff
206 transform this file with pdfroff of the groff system
207
209 This document was written by Bernd Warken ⟨groff-bernd.warken-72@
210 web.de⟩.
211
213 History and future
214 roff(7), man-pages(7), groff_diff(7), groff(7)
215
216 Compression
217 uncompress(1posix), gzip2(1), bzip2(1), xz(1)
218
219 A man page of the naming form name(n) can be read in text mode by
220 man n name
221 or in graphical mode (PDF) by
222 groffer n name
223
224 Gunnar Ritter's Heirloom roff project ⟨https://github.com/n-t-roff/
225 heirloom-doctools⟩. You can get this package with the shell command:
226 $ git clone https://github.com/n-t-roff/heirloom-doctools
227
228
229
230groff 1.22.4 3 November 2020 GROFF_FILENAMES(5)