ioctl_userfaultfd.2: Update UFFDIO_API description
[man-pages.git] / man7 / mdoc.7
blobd1433f00bb0645995f0327f8c4403d604f68902c
1 .\" Copyright (c) 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by the University of
16 .\"     California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\" %%%LICENSE_END
33 .\"
34 .\"     @(#)mdoc.7      8.2 (Berkeley) 12/30/93
35 .\"     $Id: mdoc.7,v 1.8 1998/12/04 00:51:17 jkoshy Exp $
36 .\"
37 .\" The December 30, 1993 version
38 .\" Modified by David A. Wheeler (dwheeler@ida.org) on 1999-07-11
39 .\" to conform to Linux.
40 .\"
41 .\"
42 .Dd July 11, 1999
43 .Dt MDOC 7
44 .Os Linux
45 .Sh NAME
46 .Nm mdoc
47 .Nd quick reference guide for the
48 .Nm \-mdoc
49 macro package
50 .Sh SYNOPSIS
51 .Nm groff
52 .Fl m Ns Ar doc
53 .Ar files ...
54 .Sh DESCRIPTION
55 The
56 .Nm \-mdoc
57 package is a set of content-based and domain-based macros
58 used to format the
59 .Bx
60 man pages.
61 The macro names and their meanings are
62 listed below for quick reference; for
63 a detailed explanation on using the package, see
64 .Xr groff_mdoc 7
65 and the tutorial sampler
66 .Xr mdoc.samples 7 .
67 .Pp
68 Note that this is not the usual macro package for Linux documentation,
69 although it is used for documentation of several widely used programs;
70 see
71 .Xr man 7 .
72 .Pp
73 The macros are described in two groups, the first
74 includes the structural and physical page layout macros.
75 The second contains the manual and general text domain
76 macros which differentiate the
77 .Nm \-mdoc
78 package from other
79 .Xr troff
80 formatting packages.
81 .Sh PAGE STRUCTURE DOMAIN
82 .Ss Title Macros
83 To create a valid manual page, these three macros, in this order,
84 are required:
85 .Bl -tag -width "xxxx.Os OPERATINGxSYSTEM [version/release]" -compact
86 .It Li "\&.Dd  " Ar "Month day, year"
87 Document date.
88 .It Li "\&.Dt  " Ar "DOCUMENT_TITLE [section] [volume]"
89 Title, in uppercase.
90 .It Li "\&.Os  " Ar "OPERATING_SYSTEM [version/release]"
91 Operating system
92 .Pq Tn BSD .
93 .El
94 .Ss Page Layout Macros
95 Section headers, paragraph breaks, lists and displays.
96 .Bl -tag -width flag -compact
97 .It Li \&.Sh
98 Section Headers.
99 Valid headers, in the order of presentation:
100 .Bl -tag -width "RETURN VALUE" -compact
101 .It Ar NAME
102 Name section, should include the
103 .Ql \&.Nm
105 .Ql \&.Fn
106 and the
107 .Ql \&.Nd
108 macros.
109 .It Ar SYNOPSIS
110 Usage.
111 .It Ar DESCRIPTION
112 General description, should include
113 options and parameters.
114 .It Ar RETURN VALUE
115 Sections two and three function calls.
116 .It Ar ENVIRONMENT
117 Describe environment variables.
118 .It Ar FILES
119 Files associated with the subject.
120 .It Ar EXAMPLES
121 Examples and suggestions.
122 .It Ar DIAGNOSTICS
123 Normally used for section four device interface diagnostics.
124 .It Ar ERRORS
125 Sections two and three error and signal
126 handling.
127 .It Ar SEE ALSO
128 Cross references and citations.
129 .It Ar CONFORMING TO
130 Conformance to standards if applicable.
131 .It Ar HISTORY
132 If a standard is not applicable, the history
133 of the subject should be given.
134 .It Ar BUGS
135 Gotchas and caveats.
136 .It Ar other
137 Customized headers may be added at
138 the authors discretion.
140 .It Li \&.Ss
141 Subsection Headers.
142 .It Li \&.Pp
143 Paragraph Break.
144 Vertical space (one line).
145 .It Li \&.D1
146 (D-one) Display-one
147 Indent and display one text line.
148 .It Li \&.Dl
149 (D-ell) Display-one literal.
150 Indent and display one line of literal text.
151 .It Li \&.Bd
152 Begin-display block.
153 Display options:
154 .Bl -tag -width "xoffset string " -compact
155 .It Fl ragged
156 Unjustified (ragged edges).
157 .It Fl filled
158 Justified.
159 .It Fl literal
160 Literal text or code.
161 .It Fl file Ar name
162 Read in named
163 .Ar file
164 and display.
165 .It Fl offset Ar string
166 Offset display.
167 Acceptable
168 .Ar string
169 values:
170 .Bl -tag -width indent-two -compact
171 .It Ar left
172 Align block on left (default).
173 .It Ar center
174 Approximate center margin.
175 .It Ar indent
176 Six constant width spaces (a tab).
177 .It Ar indent-two
178 Two tabs.
179 .It Ar right
180 Left aligns block 2 inches from
181 right.
182 .It Ar xx Ns Cm n
183 Where
184 .Ar xx
185 is a number from
186 .No \&4 Ns Cm n
188 .No \&9\&9 Ns Cm n .
189 .It Ar Aa
190 Where
191 .Ar Aa
192 is a callable macro name.
193 .It Ar string
194 The width of
195 .Ar string
196 is used.
199 .It Li \&.Ed
200 End-display (matches \&.Bd).
201 .It Li \&.Bl
202 Begin-list.
203 Create lists or columns.
204 Options:
205 .Bl -tag -width flag -compact
206 .It Ar List-types
207 .Bl -column ".Fl bullet" -compact
208 .It Fl bullet Ta "Bullet Item List"
209 .It Fl item Ta "Unlabeled List"
210 .It Fl enum Ta "Enumerated List"
211 .It Fl tag Ta "Tag Labeled List"
212 .It Fl diag Ta "Diagnostic List"
213 .It Fl hang Ta "Hanging Labeled List"
214 .It Fl ohang Ta "Overhanging Labeled List"
215 .It Fl inset Ta "Inset or Run-on Labeled List"
217 .It List-parameters
218 .Bl -tag -width "xcompact " -compact
219 .It Fl offset
220 (All lists.) See
221 .Ql \&.Bd
222 begin-display above.
223 .It Fl width
224 .Pf ( Fl tag
226 .Fl hang
227 lists only.)
229 .Ql \&.Bd .
230 .It Fl compact
231 (All lists.)
232 Suppresses blank lines.
235 .It Li \&.El
236 End-list.
237 .It Li \&.It
238 List item.
240 .Sh MANUAL AND GENERAL TEXT DOMAIN MACROS
241 The manual and general text domain macros are special in that
242 most of them are parsed for callable macros
243 for example:
244 .Bl -tag -width ".Op Fl s Ar filex" -offset indent
245 .It Li "\&.Op Fl s Ar file"
246 Produces
247 .Op Fl s Ar file
250 In this example, the option enclosure macro
251 .Ql \&.Op
252 is parsed, and calls the callable content macro
253 .Ql \&Fl
254 which operates on the argument
255 .Ql s
256 and then calls the callable content macro
257 .Ql \&Ar
258 which operates on the argument
259 .Ql file .
260 Some macros may be callable, but are not parsed and vice versa.
261 These macros are indicated in the
262 .Em parsed
264 .Em callable
265 columns below.
267 Unless stated, manual domain macros share a common syntax:
269 .Dl \&.Va argument [\ .\ ,\ ;\ :\ (\ )\ [\ ]\ argument \...\ ]
271 .Sy Note :
272 Opening and closing
273 punctuation characters are recognized as such only if they are presented
274 one at a time.
275 The string
276 .Ql "),"
277 is not recognized as punctuation and will be output with a leading white
278 space and in what ever font the calling macro uses.
280 argument list
281 .Ql "] ) ,"
282 is recognized as three sequential closing punctuation characters
283 and a leading white space is not output between the characters
284 and the previous argument (if any).
285 The special meaning of a punctuation character may be escaped
286 with the string
287 .Ql \e& .
288 For example the following string,
289 .Bl -tag -width "&.Ar file1\ , file2\ , file3\ )\ ." -offset indent
290 .It Li "\&.Ar file1\ , file2\ , file3\ )\ ."
291 Produces
292 .Ar file1 , file2 , file3 ) .
294 .ne 1i
295 .Ss Manual Domain Macros
296 .Bl -column "Name" "Parsed" Callable" -compact
297 .It Em "Name    Parsed  Callable        Description"
298 .It Li \&Ad Ta Yes Ta Yes Ta "Address. (This macro may be deprecated.)"
299 .It Li \&An Ta Yes Ta Yes Ta "Author name."
300 .It Li \&Ar Ta Yes Ta Yes Ta "Command-line argument."
301 .It Li \&Cd Ta \&No Ta \&No Ta "Configuration declaration (section four only)."
302 .It Li \&Cm Ta Yes Ta Yes Ta "Command-line argument modifier."
303 .It Li \&Dv Ta Yes Ta Yes Ta "Defined variable (source code)."
304 .It Li \&Er Ta Yes Ta Yes Ta "Error number (source code)."
305 .It Li \&Ev Ta Yes Ta Yes Ta "Environment variable."
306 .It Li \&Fa Ta Yes Ta Yes Ta "Function argument."
307 .It Li \&Fd Ta Yes Ta Yes Ta "Function declaration."
308 .It Li \&Fn Ta Yes Ta Yes Ta "Function call (also .Fo and .Fc)."
309 .It Li \&Ic Ta Yes Ta Yes Ta "Interactive command."
310 .It Li \&Li Ta Yes Ta Yes Ta "Literal text."
311 .It Li \&Nm Ta Yes Ta Yes Ta "Command name."
312 .It Li \&Op Ta Yes Ta Yes Ta "Option (also .Oo and .Oc)."
313 .It Li \&Ot Ta Yes Ta Yes Ta "Old style function type (Fortran only)."
314 .It Li \&Pa Ta Yes Ta Yes Ta "Pathname or filename."
315 .It Li \&St Ta Yes Ta Yes Ta "Standards (\-p1003.2, \-p1003.1 or \-ansiC)"
316 .It Li \&Va Ta Yes Ta Yes Ta "Variable name."
317 .It Li \&Vt Ta Yes Ta Yes Ta "Variable type (Fortran only)."
318 .It Li \&Xr Ta Yes Ta Yes Ta "Manual Page Cross Reference."
320 .Ss General Text Domain Macros
321 .Bl -column "Name" "Parsed" Callable" -compact
322 .It Em "Name    Parsed  Callable        Description"
323 .It Li \&%A Ta Yes Ta \&No Ta "Reference author."
324 .It Li \&%B Ta Yes Ta Yes Ta "Reference book title."
325 .It Li \&%\&C Ta \&No Ta \&No Ta "Reference place of publishing (city)."
326 .It Li \&%\&D Ta \&No Ta \&No Ta "Reference date."
327 .It Li \&%J Ta Yes Ta Yes Ta "Reference journal title."
328 .It Li \&%N Ta \&No Ta \&No Ta "Reference issue number."
329 .It Li \&%\&O Ta \&No Ta \&No Ta "Reference optional information."
330 .It Li \&%P Ta \&No Ta \&No Ta "Reference page number(s)."
331 .It Li \&%R Ta \&No Ta \&No Ta "Reference report Name."
332 .It Li \&%T Ta Yes Ta Yes Ta "Reference article title."
333 .It Li \&%V Ta \&No Ta \&No Ta "Reference volume."
334 .It Li \&Ac Ta Yes Ta Yes Ta "Angle close quote."
335 .It Li \&Ao Ta Yes Ta Yes Ta "Angle open quote."
336 .It Li \&Ap Ta Yes Ta Yes Ta "Apostrophe."
337 .It Li \&Aq Ta Yes Ta Yes Ta "Angle quote."
338 .It Li \&At Ta \&No Ta \&No Ta Tn "AT&T UNIX"
339 .It Li \&Bc Ta Yes Ta Yes Ta "Bracket close quote."
340 .It Li \&Bf Ta \&No Ta \&No Ta "Begin font mode."
341 .It Li \&Bo Ta Yes Ta Yes Ta "Bracket open quote."
342 .It Li \&Bq Ta Yes Ta Yes Ta "Bracket quote."
343 .It Li \&Bx Ta Yes Ta Yes Ta Bx .
344 .It Li \&Db Ta \&No Ta \&No Ta "Debug (default is \*qoff\*q)"
345 .It Li \&Dc Ta Yes Ta Yes Ta "Double close quote."
346 .It Li \&Do Ta Yes Ta Yes Ta "Double open quote."
347 .It Li \&Dq Ta Yes Ta Yes Ta "Double quote."
348 .It Li \&Ec Ta Yes Ta Yes Ta "Enclose string close quote."
349 .It Li \&Ef Ta \&No Ta \&No Ta "End font mode."
350 .It Li \&Em Ta Yes Ta Yes Ta "Emphasis (traditional English)."
351 .It Li \&Eo Ta Yes Ta Yes Ta "Enclose string open quote."
352 .It Li \&Fx Ta \&No Ta \&No Ta Tn "FreeBSD operating system"
353 .It Li \&No Ta Yes Ta Yes Ta "Normal text (no-op)."
354 .It Li \&Ns Ta Yes Ta Yes Ta "No space."
355 .It Li \&Pc Ta Yes Ta Yes Ta "Parenthesis close quote."
356 .It Li \&Pf Ta Yes Ta \&No Ta "Prefix string."
357 .It Li \&Po Ta Yes Ta Yes Ta "Parenthesis open quote."
358 .It Li \&Pq Ta Yes Ta Yes Ta "Parentheses quote."
359 .It Li \&Qc Ta Yes Ta Yes Ta "Straight Double close quote."
360 .It Li \&Ql Ta Yes Ta Yes Ta "Quoted literal."
361 .It Li \&Qo Ta Yes Ta Yes Ta "Straight Double open quote."
362 .It Li \&Qq Ta Yes Ta Yes Ta "Straight Double quote."
363 .It Li \&Re Ta \&No Ta \&No Ta "Reference end."
364 .It Li \&Rs Ta \&No Ta \&No Ta "Reference start."
365 .It Li \&Rv Ta \&No Ta \&No Ta "Return values (sections two and three only)."
366 .It Li \&Sc Ta Yes Ta Yes Ta "Single close quote."
367 .It Li \&So Ta Yes Ta Yes Ta "Single open quote."
368 .It Li \&Sq Ta Yes Ta Yes Ta "Single quote."
369 .It Li \&Sm Ta \&No Ta \&No Ta "Space mode (default is \\*qon\\*q)"
370 .It Li \&Sx Ta Yes Ta Yes Ta "Section Cross Reference."
371 .It Li \&Sy Ta Yes Ta Yes Ta "Symbolic (traditional English)."
372 .It Li \&Tn Ta Yes Ta Yes Ta "Trade or type name (small Caps)."
373 .It Li \&Ux Ta Yes Ta Yes Ta Ux
374 .It Li \&Xc Ta Yes Ta Yes Ta "Extend argument list close."
375 .It Li \&Xo Ta Yes Ta Yes Ta "Extend argument list open."
377 .\" .It Sy \&Hf Ta \&No Ta \&No Ta "Include file with header"
379 Macro names ending in
380 .Ql q
381 quote remaining items on the argument list.
382 Macro names ending in
383 .Ql o
384 begin a quote which may span more than one line of input and
385 are close quoted with the matching macro name ending in
386 .Ql c .
387 Enclosure macros may be nested and are limited to
388 eight arguments.
390 Note: the extended argument list macros
391 .Pf ( Ql \&.Xo ,
392 .Ql \&.Xc )
393 and the function enclosure macros
394 .Pf ( Ql \&.Fo ,
395 .Ql \&.Fc )
396 are irregular.
397 The extended list macros are used when the number of macro arguments
398 would exceed the
399 .Xr troff
400 limitation of nine arguments.
402 The macros UR (starting a URI/URL hypertext reference), UE (ending one),
403 and UN (identifying a target for a reference) are also available.
405 .Xr man 7
406 for more information on these macros.
407 .\" The following does not apply on Linux:
408 .\" .Sh CONFIGURATION
409 .\" For site specific configuration of the macro package,
410 .\" see the file
411 .\" .Pa /usr/src/share/tmac/README .
412 .Sh FILES
413 .Bl -tag -width "tmac.doc-ditroff" -compact
414 .It Pa doc.tmac
415 Manual and general text domain macros.
416 .It Pa tmac/doc-common
417 Common structural macros and definitions.
418 .It Pa tmac/doc-nroff
419 Site dependent
420 .Xr nroff
421 style file.
422 .It Pa tmac/doc-ditroff
423 Site dependent
424 .Xr troff
425 style file.
426 .It Pa tmac/doc-syms
427 Special defines (such as the standards macro).
429 .Sh "SEE ALSO"
430 .Xr groff_mdoc 7 ,
431 .Xr man 7 ,
432 .Xr man-pages 7 ,
433 .Xr mdoc.samples 7