xref: /titanic_53/usr/src/man/man5/man.5 (revision 95c635efb7c3b86efc493e0447eaec7aecca3f0f)
1*95c635efSGarrett D'Amore.\" Copryight 2014 Garrett D'Amore <garrett@damore.org>
2c10c16deSRichard Lowe.\" Copyright (c) 1995, Sun Microsystems, Inc.
3c10c16deSRichard Lowe.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4c10c16deSRichard Lowe.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5c10c16deSRichard Lowe.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6*95c635efSGarrett D'Amore.Dd "Jul 19, 2014"
7*95c635efSGarrett D'Amore.Dt MAN 5
8*95c635efSGarrett D'Amore.Os
9*95c635efSGarrett D'Amore.Sh NAME
10*95c635efSGarrett D'Amore.Nm man
11*95c635efSGarrett D'Amore.Nd macros to format Reference Manual pages
12*95c635efSGarrett D'Amore.Sh SYNOPSIS
13*95c635efSGarrett D'Amore.Nm mandoc
14*95c635efSGarrett D'Amore.Fl T Ar man
15*95c635efSGarrett D'Amore.Ar
16*95c635efSGarrett D'Amore.Nm nroff
17*95c635efSGarrett D'Amore.Fl man
18*95c635efSGarrett D'Amore.Ar
19*95c635efSGarrett D'Amore.Nm troff
20*95c635efSGarrett D'Amore.Fl man
21*95c635efSGarrett D'Amore.Ar
22*95c635efSGarrett D'Amore.Sh DESCRIPTION
23c10c16deSRichard LoweThese macros are used to lay out the reference pages in this manual. Note: if
24*95c635efSGarrett D'Amore.Ar file
25*95c635efSGarrett D'Amorecontains format input for a preprocessor, the commands shown
26c10c16deSRichard Loweabove must be piped through the appropriate preprocessor. This is handled
27*95c635efSGarrett D'Amoreautomatically by the
28*95c635efSGarrett D'Amore.Xr man 1
29*95c635efSGarrett D'Amorecommand. See the
30*95c635efSGarrett D'Amore.Sx Conventions
31*95c635efSGarrett D'Amoresection.
32*95c635efSGarrett D'Amore.Lp
33*95c635efSGarrett D'AmoreAny text argument
34*95c635efSGarrett D'Amore.Ar t
35*95c635efSGarrett D'Amoremay be zero to six words. Quotes may be used to
36*95c635efSGarrett D'Amoreinclude SPACE characters in a
37*95c635efSGarrett D'Amore.Qq word .
38*95c635efSGarrett D'AmoreIf
39*95c635efSGarrett D'Amore.Ar text
40*95c635efSGarrett D'Amoreis empty, the special
41c10c16deSRichard Lowetreatment is applied to the next input line with text to be printed. In this
42*95c635efSGarrett D'Amoreway
43*95c635efSGarrett D'Amore.Nm \&.I
44*95c635efSGarrett D'Amoremay be used to italicize a whole line, or
45*95c635efSGarrett D'Amore.Nm \&.SB
46*95c635efSGarrett D'Amoremay be used to make small bold letters.
47*95c635efSGarrett D'Amore.Lp
48c10c16deSRichard LoweA prevailing indent distance is remembered between successive indented
49c10c16deSRichard Loweparagraphs, and is reset to default value upon reaching a non-indented
50*95c635efSGarrett D'Amoreparagraph.  Default units for indents
51*95c635efSGarrett D'Amore.Nm i
52*95c635efSGarrett D'Amoreare ens.
53*95c635efSGarrett D'Amore.Lp
54c10c16deSRichard LoweType font and size are reset to default values before each paragraph, and after
55c10c16deSRichard Loweprocessing font and size setting macros.
56*95c635efSGarrett D'Amore.Pp
57*95c635efSGarrett D'AmoreThese strings are predefined by
58*95c635efSGarrett D'Amore.Nm -man :
59*95c635efSGarrett D'Amore.Bl -tag -width Ds
60*95c635efSGarrett D'Amore.It Nm \e*R
61*95c635efSGarrett D'Amore.Sq \(rg ,
62*95c635efSGarrett D'Amore.Sq (Reg)
63*95c635efSGarrett D'Amorein
64*95c635efSGarrett D'Amore.Nm nroff .
65*95c635efSGarrett D'Amore.It Nm \e*S
66c10c16deSRichard LoweChange to default type size.
67*95c635efSGarrett D'Amore.El
68*95c635efSGarrett D'Amore.Sh "Requests"
69c10c16deSRichard Lowe* n.t.l. = next text line; p.i. = prevailing indent
70*95c635efSGarrett D'Amore.Bl -column ".TH n s d f m" "Cause " "t=n.t.l.*" "Explanation " -offset Ds
71*95c635efSGarrett D'Amore.It Sy Request	Sy Cause	Sy "If No"	Sy Explanation
72*95c635efSGarrett D'Amore.It ""	Sy Break 	Sy "Argument"	""
73*95c635efSGarrett D'Amore.It Nm \&.B Ar "t"	no 	Ar t Ns =n.t.l.*	Text is in bold font.
74*95c635efSGarrett D'Amore.It Nm \&.BI Ar t	no	Ar t Ns =n.t.l.	Join words, alternating bold and italic.
75*95c635efSGarrett D'Amore.It Nm \&.BR Ar t	no	Ar t Ns =n.t.l.	Join words, alternating bold and roman.
76*95c635efSGarrett D'Amore.It Nm \&.DT	no	Li \&.5i 1i...	Restore default tabs.
77*95c635efSGarrett D'Amore.It Nm \&.HP Ar i	yes	Ar i Ns =p.i.*	"Begin paragraph with hanging indent. Set prevailing indent to" Ar i .
78*95c635efSGarrett D'Amore.It Nm \&.I Ar t	no	Ar t Ns =n.t.l.	Text is italic.
79*95c635efSGarrett D'Amore.It Nm \&.IB Ar t	no	Ar t Ns =n.t.l.	Join words, altenrating italic and bold.
80*95c635efSGarrett D'Amore.It Nm \&.IP Ar x Ar i	yes	Ar x Ns =""	Same as
81*95c635efSGarrett D'Amore.Nm \&.TP
82*95c635efSGarrett D'Amorewith tag
83*95c635efSGarrett D'Amore.Ar x .
84*95c635efSGarrett D'Amore.It Nm \&.IR Ar t	no	Ar t Ns =n.t.l.	Join words, alternating italic and roman.
85*95c635efSGarrett D'Amore.It Nm \&.IX Ar t	no	-	Index macro, not used (obsolete).
86*95c635efSGarrett D'Amore.It Nm \&.LP	yes	-	Begin left-aligned paragraph. Set prevailing indent to .5i.
87*95c635efSGarrett D'Amore.It Nm \&.P	yes	-	Same as
88*95c635efSGarrett D'Amore.Nm \&.LP .
89*95c635efSGarrett D'Amore.It Nm \&.PD Ar d	no	Ar d Ns =.4v	Set vertical distance between paragraphs.
90*95c635efSGarrett D'Amore.It Nm \&.PP	yes	-	Same as
91*95c635efSGarrett D'Amore.Nm \&.LP .
92*95c635efSGarrett D'Amore.It Nm \&.RE	yes	-	End of relative indent. Restores prevailing indent.
93*95c635efSGarrett D'Amore.It Nm \&.RB Ar t	no	Ar t Ns =n.t.l.	Join words, alternating roman and bold.
94*95c635efSGarrett D'Amore.It Nm \&.RI Ar t	no	Ar t Ns =n.t.l.	Join words, alternating roman and italic.
95*95c635efSGarrett D'Amore.It Nm \&.RS Ar i	yes	Ar i Ns =p.i.	Start relative indent, increase indent by Ar i .
96*95c635efSGarrett D'AmoreSets prevailing indent to .5i for nested indents.
97*95c635efSGarrett D'Amore.It Nm \&.SB Ar t	no	-	Reduce size of text by 1 point, make text bold.
98*95c635efSGarrett D'Amore.It Nm \&.SH Ar t	yes	-	Section Heading.
99*95c635efSGarrett D'Amore.It Nm \&.SM Ar t	no	Ar t Ns =n.t.l.	Reduce size of text by 1 point.
100*95c635efSGarrett D'Amore.It Nm \&.SS Ar t	yes	Ar t Ns =n.t.l.	Section Subheading.
101*95c635efSGarrett D'Amore.It Nm \&.TH Ar n s d f m	yes	-	Begin reference page Ar n , No of section Ar s ; Ar d No is the date of the most recent change.  If present, Ar f No is the left page footer; Ar m No is the main page (center) header.  Sets prevailing indent and tabs to .5i.
102*95c635efSGarrett D'Amore.It Nm \&.TP Ar i	yes	Ar i Ns =p.i.	Begin indented paragraph, with the tag given on the next text line. Set prevailing indent to
103*95c635efSGarrett D'Amore.Ar i .
104*95c635efSGarrett D'Amore.It Nm \&.TX Ar t p	no	-	Resolve the title abbreviation Ar t ; No join to punctuation mark (or text) Ar p .
105*95c635efSGarrett D'Amore.El
106*95c635efSGarrett D'Amore.Ss "Conventions"
107*95c635efSGarrett D'AmoreWhen formatting a manual page,
108*95c635efSGarrett D'Amore.Nm
109*95c635efSGarrett D'Amoreexamines the first line to determine
110c10c16deSRichard Lowewhether it requires special processing. For example a first line consisting of:
111*95c635efSGarrett D'Amore.Lp
112*95c635efSGarrett D'Amore.Dl \&'\e" t
113*95c635efSGarrett D'Amore.Lp
114*95c635efSGarrett D'Amoreindicates that the manual page must be run through the
115*95c635efSGarrett D'Amore.Xr tbl 1
116c10c16deSRichard Lowepreprocessor.
117*95c635efSGarrett D'Amore.Lp
118c10c16deSRichard LoweA typical manual page for a command or function is laid out as follows:
119*95c635efSGarrett D'Amore.Bl -tag -width ".SH RETURN VALUES"
120*95c635efSGarrett D'Amore.
121*95c635efSGarrett D'Amore.It Nm \&.TH Ar title Op "1-9"
122*95c635efSGarrett D'Amore.
123c10c16deSRichard LoweThe name of the command or function, which serves as the title of the manual
124c10c16deSRichard Lowepage. This is followed by the number of the section in which it appears.
125*95c635efSGarrett D'Amore.
126*95c635efSGarrett D'Amore.It Nm SH NAME
127*95c635efSGarrett D'Amore.
128c10c16deSRichard LoweThe name, or list of names, by which the command is called, followed by a dash
129c10c16deSRichard Loweand then a one-line summary of the action performed. All in roman font, this
130*95c635efSGarrett D'Amoresection contains no
131*95c635efSGarrett D'Amore.Xr troff 1
132*95c635efSGarrett D'Amorecommands or escapes, and no macro requests.
133*95c635efSGarrett D'AmoreIt is used to generate the database used by the
134*95c635efSGarrett D'Amore.Xr whatis 1
135*95c635efSGarrett D'Amorecommand.
136*95c635efSGarrett D'Amore.
137*95c635efSGarrett D'Amore.It Nm SH SYNOPSIS
138*95c635efSGarrett D'Amore.Bl -tag -width "Functions:"
139*95c635efSGarrett D'Amore.It Sy Commands:
140c10c16deSRichard LoweThe syntax of the command and its arguments, as typed on the command line.
141c10c16deSRichard LoweWhen in boldface, a word must be typed exactly as printed.  When in italics, a
142c10c16deSRichard Loweword can be replaced with an argument that you supply. References to bold or
143c10c16deSRichard Loweitalicized items are not capitalized in other sections, even when they begin a
144c10c16deSRichard Lowesentence.
145*95c635efSGarrett D'Amore.Lp
146c10c16deSRichard LoweSyntactic symbols appear in roman face:
147*95c635efSGarrett D'Amore.Bl -tag -width "   "
148*95c635efSGarrett D'Amore.It Op " "
149c10c16deSRichard LoweAn argument, when surrounded by brackets is optional.
150*95c635efSGarrett D'Amore.It |
151c10c16deSRichard LoweArguments separated by a vertical bar are exclusive. You can supply only one
152c10c16deSRichard Loweitem from such a list.
153*95c635efSGarrett D'Amore.It \&.\|.\|.
154c10c16deSRichard LoweArguments followed by an ellipsis can be repeated. When an ellipsis follows a
155c10c16deSRichard Lowebracketed set, the expression within the brackets can be repeated.
156*95c635efSGarrett D'Amore.El
157*95c635efSGarrett D'Amore.It Sy Functions:
158*95c635efSGarrett D'AmoreIf required, the data declaration, or
159*95c635efSGarrett D'Amore.Li #include
160*95c635efSGarrett D'Amoredirective, is shown first,
161c10c16deSRichard Lowefollowed by the  function declaration. Otherwise, the function declaration is
162c10c16deSRichard Loweshown.
163*95c635efSGarrett D'Amore.El
164*95c635efSGarrett D'Amore.
165*95c635efSGarrett D'Amore.It Nm \&.SH DESCRIPTION
166*95c635efSGarrett D'Amore.
167c10c16deSRichard LoweA narrative overview of the command or function's external behavior. This
168c10c16deSRichard Loweincludes how it interacts with files or data, and how it handles the standard
169c10c16deSRichard Loweinput, standard output and standard error. Internals and implementation details
170c10c16deSRichard Loweare normally omitted. This section attempts to provide a succinct overview in
171c10c16deSRichard Loweanswer to the question, "what does it do?"
172*95c635efSGarrett D'Amore.Lp
173c10c16deSRichard LoweLiteral text from the synopsis appears in constant width, as do literal
174c10c16deSRichard Lowefilenames and references to items that appear elsewhere in the  reference
175c10c16deSRichard Lowemanuals. Arguments are italicized.
176*95c635efSGarrett D'Amore.Lp
177c10c16deSRichard LoweIf a command interprets either subcommands or an input grammar, its command
178*95c635efSGarrett D'Amoreinterface or input grammar is normally described in a
179*95c635efSGarrett D'Amore.Nm USAGE
180*95c635efSGarrett D'Amoresection, which follows the
181*95c635efSGarrett D'Amore.Nm OPTIONS
182*95c635efSGarrett D'Amoresection.  The
183*95c635efSGarrett D'Amore.Nm DESCRIPTION
184*95c635efSGarrett D'Amoresection only
185c10c16deSRichard Lowedescribes the behavior of the command itself, not that of subcommands.
186*95c635efSGarrett D'Amore.
187*95c635efSGarrett D'Amore.It Nm \&.SH OPTIONS
188*95c635efSGarrett D'Amore.
189c10c16deSRichard LoweThe list of options along with a description of how each affects the command's
190c10c16deSRichard Loweoperation.
191*95c635efSGarrett D'Amore.
192*95c635efSGarrett D'Amore.It Nm \&.SH RETURN VALUES
193*95c635efSGarrett D'Amore.
194c10c16deSRichard LoweA list of the values the library routine will return to the calling  program
195c10c16deSRichard Loweand the conditions that cause these values to be returned.
196*95c635efSGarrett D'Amore.
197*95c635efSGarrett D'Amore.It Nm \&.SH EXIT STATUS
198*95c635efSGarrett D'Amore.
199c10c16deSRichard LoweA list of the values the utility will return to the calling  program or shell,
200c10c16deSRichard Loweand the conditions that cause these values to be  returned.
201*95c635efSGarrett D'Amore.
202*95c635efSGarrett D'Amore.It Nm \&.SH FILES
203*95c635efSGarrett D'Amore.
204c10c16deSRichard LoweA list of files associated with the command or function.
205*95c635efSGarrett D'Amore.
206*95c635efSGarrett D'Amore.It Nm \&.SH SEE ALSO
207*95c635efSGarrett D'Amore.
208c10c16deSRichard LoweA comma-separated list of related manual pages, followed by references to other
209c10c16deSRichard Lowepublished materials.
210*95c635efSGarrett D'Amore.
211*95c635efSGarrett D'Amore.It Nm \&.SH DIAGNOSTICS
212*95c635efSGarrett D'Amore.
213c10c16deSRichard LoweA list of diagnostic messages and an explanation of each.
214*95c635efSGarrett D'Amore.
215*95c635efSGarrett D'Amore.It Nm \&.SH BUGS
216*95c635efSGarrett D'Amore.
217c10c16deSRichard LoweA description of limitations, known defects, and possible problems associated
218c10c16deSRichard Lowewith the command or function.
219*95c635efSGarrett D'Amore.El
220*95c635efSGarrett D'Amore.Sh FILES
221*95c635efSGarrett D'Amore.Pa /usr/share/man/whatis
222*95c635efSGarrett D'Amore.Sh NOTES
223*95c635efSGarrett D'AmoreThe
224*95c635efSGarrett D'Amore.Nm
225*95c635efSGarrett D'Amorepackage should not be used for new documentation.  The
226*95c635efSGarrett D'Amore.Xr mdoc 5 ,
227*95c635efSGarrett D'Amorepackage is preferred, as it uses semantic markup rather than physical markup.
228*95c635efSGarrett D'Amore.Sh CODE SET INDEPENDENCE
229*95c635efSGarrett D'AmoreWhen processed with
230*95c635efSGarrett D'Amore.Xr mandoc 1 ,
231*95c635efSGarrett D'Amorethis package is Code Set Independent. However, when processed with
232*95c635efSGarrett D'Amorelegacy tools such as
233*95c635efSGarrett D'Amore.Xr nroff 1
234*95c635efSGarrett D'Amoreand
235*95c635efSGarrett D'Amore.Xr troff 1 ,
236*95c635efSGarrett D'Amorethe use of multi-byte characters may not be supported.
237*95c635efSGarrett D'Amore.Sh INTERFACE STABILITY
238*95c635efSGarrett D'Amore.Nm Obsolete Committed .
239*95c635efSGarrett D'AmoreThe
240*95c635efSGarrett D'Amore.Xr mdoc 5
241*95c635efSGarrett D'Amorepackage should be used instead.
242*95c635efSGarrett D'Amore.Sh SEE ALSO
243*95c635efSGarrett D'Amore.Xr eqn 1 ,
244*95c635efSGarrett D'Amore.Xr man 1 ,
245*95c635efSGarrett D'Amore.Xr mandoc 1 ,
246*95c635efSGarrett D'Amore.Xr nroff 1 ,
247*95c635efSGarrett D'Amore.Xr troff 1 ,
248*95c635efSGarrett D'Amore.Xr tbl 1 ,
249*95c635efSGarrett D'Amore.Xr whatis 1 ,
250*95c635efSGarrett D'Amore.Xr mdoc 5 ,
251*95c635efSGarrett D'Amore.Rs
252*95c635efSGarrett D'Amore.%A Dale Dougherty and Tim O'Reilly
253*95c635efSGarrett D'Amore.%B Unix Text Processing
254*95c635efSGarrett D'Amore.Re
255