xref: /titanic_51/usr/src/man/man5/man.5 (revision 3a005aada8ac0e291c13cbc488ba9ae1473f0a96)
1e6cb0f7eSMarcel Telka.\" Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
2698f87a4SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
3c10c16deSRichard Lowe.\" Copyright (c) 1995, Sun Microsystems, Inc.
4c10c16deSRichard 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.
5c10c16deSRichard 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.
6c10c16deSRichard 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]
7e6cb0f7eSMarcel Telka.Dd "Feb 18, 2015"
895c635efSGarrett D'Amore.Dt MAN 5
995c635efSGarrett D'Amore.Os
1095c635efSGarrett D'Amore.Sh NAME
1195c635efSGarrett D'Amore.Nm man
1295c635efSGarrett D'Amore.Nd macros to format Reference Manual pages
1395c635efSGarrett D'Amore.Sh SYNOPSIS
1495c635efSGarrett D'Amore.Nm mandoc
1595c635efSGarrett D'Amore.Fl T Ar man
1695c635efSGarrett D'Amore.Ar
1795c635efSGarrett D'Amore.Nm nroff
1895c635efSGarrett D'Amore.Fl man
1995c635efSGarrett D'Amore.Ar
2095c635efSGarrett D'Amore.Nm troff
2195c635efSGarrett D'Amore.Fl man
2295c635efSGarrett D'Amore.Ar
2395c635efSGarrett D'Amore.Sh DESCRIPTION
24c10c16deSRichard LoweThese macros are used to lay out the reference pages in this manual. Note: if
2595c635efSGarrett D'Amore.Ar file
2695c635efSGarrett D'Amorecontains format input for a preprocessor, the commands shown
27c10c16deSRichard Loweabove must be piped through the appropriate preprocessor. This is handled
2895c635efSGarrett D'Amoreautomatically by the
2995c635efSGarrett D'Amore.Xr man 1
3095c635efSGarrett D'Amorecommand. See the
3195c635efSGarrett D'Amore.Sx Conventions
3295c635efSGarrett D'Amoresection.
3395c635efSGarrett D'Amore.Lp
3495c635efSGarrett D'AmoreAny text argument
3595c635efSGarrett D'Amore.Ar t
3695c635efSGarrett D'Amoremay be zero to six words. Quotes may be used to
3795c635efSGarrett D'Amoreinclude SPACE characters in a
3895c635efSGarrett D'Amore.Qq word .
3995c635efSGarrett D'AmoreIf
4095c635efSGarrett D'Amore.Ar text
4195c635efSGarrett D'Amoreis empty, the special
42c10c16deSRichard Lowetreatment is applied to the next input line with text to be printed. In this
4395c635efSGarrett D'Amoreway
4495c635efSGarrett D'Amore.Nm \&.I
4595c635efSGarrett D'Amoremay be used to italicize a whole line, or
4695c635efSGarrett D'Amore.Nm \&.SB
4795c635efSGarrett D'Amoremay be used to make small bold letters.
4895c635efSGarrett D'Amore.Lp
49c10c16deSRichard LoweA prevailing indent distance is remembered between successive indented
50c10c16deSRichard Loweparagraphs, and is reset to default value upon reaching a non-indented
5195c635efSGarrett D'Amoreparagraph.  Default units for indents
5295c635efSGarrett D'Amore.Nm i
5395c635efSGarrett D'Amoreare ens.
5495c635efSGarrett D'Amore.Lp
55c10c16deSRichard LoweType font and size are reset to default values before each paragraph, and after
56c10c16deSRichard Loweprocessing font and size setting macros.
5795c635efSGarrett D'Amore.Pp
5895c635efSGarrett D'AmoreThese strings are predefined by
5995c635efSGarrett D'Amore.Nm -man :
6095c635efSGarrett D'Amore.Bl -tag -width Ds
6195c635efSGarrett D'Amore.It Nm \e*R
6295c635efSGarrett D'Amore.Sq \(rg ,
6395c635efSGarrett D'Amore.Sq (Reg)
6495c635efSGarrett D'Amorein
6595c635efSGarrett D'Amore.Nm nroff .
6695c635efSGarrett D'Amore.It Nm \e*S
67c10c16deSRichard LoweChange to default type size.
6895c635efSGarrett D'Amore.El
6995c635efSGarrett D'Amore.Sh "Requests"
70c10c16deSRichard Lowe* n.t.l. = next text line; p.i. = prevailing indent
7195c635efSGarrett D'Amore.Bl -column ".TH n s d f m" "Cause " "t=n.t.l.*" "Explanation " -offset Ds
7295c635efSGarrett D'Amore.It Sy Request	Sy Cause	Sy "If No"	Sy Explanation
7395c635efSGarrett D'Amore.It ""	Sy Break 	Sy "Argument"	""
7495c635efSGarrett D'Amore.It Nm \&.B Ar "t"	no 	Ar t Ns =n.t.l.*	Text is in bold font.
7595c635efSGarrett D'Amore.It Nm \&.BI Ar t	no	Ar t Ns =n.t.l.	Join words, alternating bold and italic.
7695c635efSGarrett D'Amore.It Nm \&.BR Ar t	no	Ar t Ns =n.t.l.	Join words, alternating bold and roman.
7795c635efSGarrett D'Amore.It Nm \&.DT	no	Li \&.5i 1i...	Restore default tabs.
7895c635efSGarrett D'Amore.It Nm \&.HP Ar i	yes	Ar i Ns =p.i.*	"Begin paragraph with hanging indent. Set prevailing indent to" Ar i .
7995c635efSGarrett D'Amore.It Nm \&.I Ar t	no	Ar t Ns =n.t.l.	Text is italic.
8095c635efSGarrett D'Amore.It Nm \&.IB Ar t	no	Ar t Ns =n.t.l.	Join words, altenrating italic and bold.
8195c635efSGarrett D'Amore.It Nm \&.IP Ar x Ar i	yes	Ar x Ns =""	Same as
8295c635efSGarrett D'Amore.Nm \&.TP
8395c635efSGarrett D'Amorewith tag
8495c635efSGarrett D'Amore.Ar x .
8595c635efSGarrett D'Amore.It Nm \&.IR Ar t	no	Ar t Ns =n.t.l.	Join words, alternating italic and roman.
8695c635efSGarrett D'Amore.It Nm \&.IX Ar t	no	-	Index macro, not used (obsolete).
8795c635efSGarrett D'Amore.It Nm \&.LP	yes	-	Begin left-aligned paragraph. Set prevailing indent to .5i.
8895c635efSGarrett D'Amore.It Nm \&.P	yes	-	Same as
8995c635efSGarrett D'Amore.Nm \&.LP .
9095c635efSGarrett D'Amore.It Nm \&.PD Ar d	no	Ar d Ns =.4v	Set vertical distance between paragraphs.
9195c635efSGarrett D'Amore.It Nm \&.PP	yes	-	Same as
9295c635efSGarrett D'Amore.Nm \&.LP .
9395c635efSGarrett D'Amore.It Nm \&.RE	yes	-	End of relative indent. Restores prevailing indent.
9495c635efSGarrett D'Amore.It Nm \&.RB Ar t	no	Ar t Ns =n.t.l.	Join words, alternating roman and bold.
9595c635efSGarrett D'Amore.It Nm \&.RI Ar t	no	Ar t Ns =n.t.l.	Join words, alternating roman and italic.
9695c635efSGarrett D'Amore.It Nm \&.RS Ar i	yes	Ar i Ns =p.i.	Start relative indent, increase indent by Ar i .
9795c635efSGarrett D'AmoreSets prevailing indent to .5i for nested indents.
9895c635efSGarrett D'Amore.It Nm \&.SB Ar t	no	-	Reduce size of text by 1 point, make text bold.
9995c635efSGarrett D'Amore.It Nm \&.SH Ar t	yes	-	Section Heading.
10095c635efSGarrett D'Amore.It Nm \&.SM Ar t	no	Ar t Ns =n.t.l.	Reduce size of text by 1 point.
10195c635efSGarrett D'Amore.It Nm \&.SS Ar t	yes	Ar t Ns =n.t.l.	Section Subheading.
10295c635efSGarrett 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.
10395c635efSGarrett 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
10495c635efSGarrett D'Amore.Ar i .
10595c635efSGarrett D'Amore.It Nm \&.TX Ar t p	no	-	Resolve the title abbreviation Ar t ; No join to punctuation mark (or text) Ar p .
10695c635efSGarrett D'Amore.El
10795c635efSGarrett D'Amore.Ss "Conventions"
10895c635efSGarrett D'AmoreWhen formatting a manual page,
10995c635efSGarrett D'Amore.Nm
11095c635efSGarrett D'Amoreexamines the first line to determine
111c10c16deSRichard Lowewhether it requires special processing. For example a first line consisting of:
11295c635efSGarrett D'Amore.Lp
11395c635efSGarrett D'Amore.Dl \&'\e" t
11495c635efSGarrett D'Amore.Lp
11595c635efSGarrett D'Amoreindicates that the manual page must be run through the
11695c635efSGarrett D'Amore.Xr tbl 1
117c10c16deSRichard Lowepreprocessor.
11895c635efSGarrett D'Amore.Lp
119c10c16deSRichard LoweA typical manual page for a command or function is laid out as follows:
12095c635efSGarrett D'Amore.Bl -tag -width ".SH RETURN VALUES"
12195c635efSGarrett D'Amore.
12295c635efSGarrett D'Amore.It Nm \&.TH Ar title Op "1-9"
12395c635efSGarrett D'Amore.
124c10c16deSRichard LoweThe name of the command or function, which serves as the title of the manual
125c10c16deSRichard Lowepage. This is followed by the number of the section in which it appears.
12695c635efSGarrett D'Amore.
127e6cb0f7eSMarcel Telka.It Nm \&.SH NAME
12895c635efSGarrett D'Amore.
129c10c16deSRichard LoweThe name, or list of names, by which the command is called, followed by a dash
130c10c16deSRichard Loweand then a one-line summary of the action performed. All in roman font, this
13195c635efSGarrett D'Amoresection contains no
13295c635efSGarrett D'Amore.Xr troff 1
13395c635efSGarrett D'Amorecommands or escapes, and no macro requests.
13495c635efSGarrett D'AmoreIt is used to generate the database used by the
13595c635efSGarrett D'Amore.Xr whatis 1
13695c635efSGarrett D'Amorecommand.
13795c635efSGarrett D'Amore.
138e6cb0f7eSMarcel Telka.It Nm \&.SH SYNOPSIS
13995c635efSGarrett D'Amore.Bl -tag -width "Functions:"
14095c635efSGarrett D'Amore.It Sy Commands:
141c10c16deSRichard LoweThe syntax of the command and its arguments, as typed on the command line.
142c10c16deSRichard LoweWhen in boldface, a word must be typed exactly as printed.  When in italics, a
143c10c16deSRichard Loweword can be replaced with an argument that you supply. References to bold or
144c10c16deSRichard Loweitalicized items are not capitalized in other sections, even when they begin a
145c10c16deSRichard Lowesentence.
14695c635efSGarrett D'Amore.Lp
147c10c16deSRichard LoweSyntactic symbols appear in roman face:
14895c635efSGarrett D'Amore.Bl -tag -width "   "
14995c635efSGarrett D'Amore.It Op " "
150c10c16deSRichard LoweAn argument, when surrounded by brackets is optional.
15195c635efSGarrett D'Amore.It |
152c10c16deSRichard LoweArguments separated by a vertical bar are exclusive. You can supply only one
153c10c16deSRichard Loweitem from such a list.
15495c635efSGarrett D'Amore.It \&.\|.\|.
155c10c16deSRichard LoweArguments followed by an ellipsis can be repeated. When an ellipsis follows a
156c10c16deSRichard Lowebracketed set, the expression within the brackets can be repeated.
15795c635efSGarrett D'Amore.El
15895c635efSGarrett D'Amore.It Sy Functions:
15995c635efSGarrett D'AmoreIf required, the data declaration, or
16095c635efSGarrett D'Amore.Li #include
16195c635efSGarrett D'Amoredirective, is shown first,
162c10c16deSRichard Lowefollowed by the  function declaration. Otherwise, the function declaration is
163c10c16deSRichard Loweshown.
16495c635efSGarrett D'Amore.El
16595c635efSGarrett D'Amore.
16695c635efSGarrett D'Amore.It Nm \&.SH DESCRIPTION
16795c635efSGarrett D'Amore.
168c10c16deSRichard LoweA narrative overview of the command or function's external behavior. This
169c10c16deSRichard Loweincludes how it interacts with files or data, and how it handles the standard
170c10c16deSRichard Loweinput, standard output and standard error. Internals and implementation details
171c10c16deSRichard Loweare normally omitted. This section attempts to provide a succinct overview in
172c10c16deSRichard Loweanswer to the question, "what does it do?"
17395c635efSGarrett D'Amore.Lp
174c10c16deSRichard LoweLiteral text from the synopsis appears in constant width, as do literal
175c10c16deSRichard Lowefilenames and references to items that appear elsewhere in the  reference
176c10c16deSRichard Lowemanuals. Arguments are italicized.
17795c635efSGarrett D'Amore.Lp
178c10c16deSRichard LoweIf a command interprets either subcommands or an input grammar, its command
17995c635efSGarrett D'Amoreinterface or input grammar is normally described in a
18095c635efSGarrett D'Amore.Nm USAGE
18195c635efSGarrett D'Amoresection, which follows the
18295c635efSGarrett D'Amore.Nm OPTIONS
18395c635efSGarrett D'Amoresection.  The
18495c635efSGarrett D'Amore.Nm DESCRIPTION
18595c635efSGarrett D'Amoresection only
186c10c16deSRichard Lowedescribes the behavior of the command itself, not that of subcommands.
18795c635efSGarrett D'Amore.
18895c635efSGarrett D'Amore.It Nm \&.SH OPTIONS
18995c635efSGarrett D'Amore.
190c10c16deSRichard LoweThe list of options along with a description of how each affects the command's
191c10c16deSRichard Loweoperation.
19295c635efSGarrett D'Amore.
19395c635efSGarrett D'Amore.It Nm \&.SH RETURN VALUES
19495c635efSGarrett D'Amore.
195c10c16deSRichard LoweA list of the values the library routine will return to the calling  program
196c10c16deSRichard Loweand the conditions that cause these values to be returned.
19795c635efSGarrett D'Amore.
19895c635efSGarrett D'Amore.It Nm \&.SH EXIT STATUS
19995c635efSGarrett D'Amore.
200c10c16deSRichard LoweA list of the values the utility will return to the calling  program or shell,
201c10c16deSRichard Loweand the conditions that cause these values to be  returned.
20295c635efSGarrett D'Amore.
20395c635efSGarrett D'Amore.It Nm \&.SH FILES
20495c635efSGarrett D'Amore.
205c10c16deSRichard LoweA list of files associated with the command or function.
20695c635efSGarrett D'Amore.
20795c635efSGarrett D'Amore.It Nm \&.SH SEE ALSO
20895c635efSGarrett D'Amore.
209c10c16deSRichard LoweA comma-separated list of related manual pages, followed by references to other
210c10c16deSRichard Lowepublished materials.
21195c635efSGarrett D'Amore.
21295c635efSGarrett D'Amore.It Nm \&.SH DIAGNOSTICS
21395c635efSGarrett D'Amore.
214c10c16deSRichard LoweA list of diagnostic messages and an explanation of each.
21595c635efSGarrett D'Amore.
21695c635efSGarrett D'Amore.It Nm \&.SH BUGS
21795c635efSGarrett D'Amore.
218c10c16deSRichard LoweA description of limitations, known defects, and possible problems associated
219c10c16deSRichard Lowewith the command or function.
22095c635efSGarrett D'Amore.El
22195c635efSGarrett D'Amore.Sh FILES
22295c635efSGarrett D'Amore.Pa /usr/share/man/whatis
22395c635efSGarrett D'Amore.Sh NOTES
22495c635efSGarrett D'AmoreThe
22595c635efSGarrett D'Amore.Nm
22695c635efSGarrett D'Amorepackage should not be used for new documentation.  The
22795c635efSGarrett D'Amore.Xr mdoc 5 ,
22895c635efSGarrett D'Amorepackage is preferred, as it uses semantic markup rather than physical markup.
22995c635efSGarrett D'Amore.Sh CODE SET INDEPENDENCE
23095c635efSGarrett D'AmoreWhen processed with
23195c635efSGarrett D'Amore.Xr mandoc 1 ,
23295c635efSGarrett D'Amorethis package is Code Set Independent. However, when processed with
23395c635efSGarrett D'Amorelegacy tools such as
23495c635efSGarrett D'Amore.Xr nroff 1
23595c635efSGarrett D'Amoreand
23695c635efSGarrett D'Amore.Xr troff 1 ,
23795c635efSGarrett D'Amorethe use of multi-byte characters may not be supported.
23895c635efSGarrett D'Amore.Sh INTERFACE STABILITY
239698f87a4SGarrett D'Amore.Sy Obsolete Committed .
24095c635efSGarrett D'AmoreThe
24195c635efSGarrett D'Amore.Xr mdoc 5
24295c635efSGarrett D'Amorepackage should be used instead.
24395c635efSGarrett D'Amore.Sh SEE ALSO
24495c635efSGarrett D'Amore.Xr eqn 1 ,
24595c635efSGarrett D'Amore.Xr man 1 ,
24695c635efSGarrett D'Amore.Xr mandoc 1 ,
24795c635efSGarrett D'Amore.Xr nroff 1 ,
24895c635efSGarrett D'Amore.Xr tbl 1 ,
249*3a005aadSYuri Pankov.Xr troff 1 ,
25095c635efSGarrett D'Amore.Xr whatis 1 ,
251e6cb0f7eSMarcel Telka.Xr mdoc 5
25295c635efSGarrett D'Amore.Rs
25395c635efSGarrett D'Amore.%A Dale Dougherty and Tim O'Reilly
25495c635efSGarrett D'Amore.%B Unix Text Processing
25595c635efSGarrett D'Amore.Re
256