1 .\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
2 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
3 .\" Copyright (c) 1995, Sun Microsystems, Inc.
4 .\" 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.
5 .\" 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.
6 .\" 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]
12 .Nd macros to format Reference Manual pages
24 These macros are used to lay out the reference pages in this manual. Note: if
26 contains format input for a preprocessor, the commands shown
27 above must be piped through the appropriate preprocessor. This is handled
36 may be zero to six words. Quotes may be used to
37 include SPACE characters in a
42 treatment is applied to the next input line with text to be printed. In this
45 may be used to italicize a whole line, or
47 may be used to make small bold letters.
49 A prevailing indent distance is remembered between successive indented
50 paragraphs, and is reset to default value upon reaching a non-indented
51 paragraph. Default units for indents
55 Type font and size are reset to default values before each paragraph, and after
56 processing font and size setting macros.
58 These strings are predefined by
67 Change to default type size.
70 * n.t.l. = next text line; p.i. = prevailing indent
71 .Bl -column ".TH n s d f m" "Cause " "t=n.t.l.*" "Explanation " -offset Ds
72 .It Sy Request Sy Cause Sy "If No" Sy Explanation
73 .It "" Sy Break Sy "Argument" ""
74 .It Nm \&.B Ar "t" no Ar t Ns =n.t.l.* Text is in bold font.
75 .It Nm \&.BI Ar t no Ar t Ns =n.t.l. Join words, alternating bold and italic.
76 .It Nm \&.BR Ar t no Ar t Ns =n.t.l. Join words, alternating bold and roman.
77 .It Nm \&.DT no Li \&.5i 1i... Restore default tabs.
78 .It Nm \&.HP Ar i yes Ar i Ns =p.i.* "Begin paragraph with hanging indent. Set prevailing indent to" Ar i .
79 .It Nm \&.I Ar t no Ar t Ns =n.t.l. Text is italic.
80 .It Nm \&.IB Ar t no Ar t Ns =n.t.l. Join words, altenrating italic and bold.
81 .It Nm \&.IP Ar x Ar i yes Ar x Ns ="" Same as
85 .It Nm \&.IR Ar t no Ar t Ns =n.t.l. Join words, alternating italic and roman.
86 .It Nm \&.IX Ar t no - Index macro, not used (obsolete).
87 .It Nm \&.LP yes - Begin left-aligned paragraph. Set prevailing indent to .5i.
88 .It Nm \&.P yes - Same as
90 .It Nm \&.PD Ar d no Ar d Ns =.4v Set vertical distance between paragraphs.
91 .It Nm \&.PP yes - Same as
93 .It Nm \&.RE yes - End of relative indent. Restores prevailing indent.
94 .It Nm \&.RB Ar t no Ar t Ns =n.t.l. Join words, alternating roman and bold.
95 .It Nm \&.RI Ar t no Ar t Ns =n.t.l. Join words, alternating roman and italic.
96 .It Nm \&.RS Ar i yes Ar i Ns =p.i. Start relative indent, increase indent by Ar i .
97 Sets prevailing indent to .5i for nested indents.
98 .It Nm \&.SB Ar t no - Reduce size of text by 1 point, make text bold.
99 .It Nm \&.SH Ar t yes - Section Heading.
100 .It Nm \&.SM Ar t no Ar t Ns =n.t.l. Reduce size of text by 1 point.
101 .It Nm \&.SS Ar t yes Ar t Ns =n.t.l. Section Subheading.
102 .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.
103 .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
105 .It Nm \&.TX Ar t p no - Resolve the title abbreviation Ar t ; No join to punctuation mark (or text) Ar p .
108 When formatting a manual page,
110 examines the first line to determine
111 whether it requires special processing. For example a first line consisting of:
115 indicates that the manual page must be run through the
119 A typical manual page for a command or function is laid out as follows:
120 .Bl -tag -width ".SH RETURN VALUES"
122 .It Nm \&.TH Ar title Op "1-9"
124 The name of the command or function, which serves as the title of the manual
125 page. This is followed by the number of the section in which it appears.
129 The name, or list of names, by which the command is called, followed by a dash
130 and then a one-line summary of the action performed. All in roman font, this
133 commands or escapes, and no macro requests.
134 It is used to generate the database used by the
138 .It Nm \&.SH SYNOPSIS
139 .Bl -tag -width "Functions:"
141 The syntax of the command and its arguments, as typed on the command line.
142 When in boldface, a word must be typed exactly as printed. When in italics, a
143 word can be replaced with an argument that you supply. References to bold or
144 italicized items are not capitalized in other sections, even when they begin a
147 Syntactic symbols appear in roman face:
150 An argument, when surrounded by brackets is optional.
152 Arguments separated by a vertical bar are exclusive. You can supply only one
153 item from such a list.
155 Arguments followed by an ellipsis can be repeated. When an ellipsis follows a
156 bracketed set, the expression within the brackets can be repeated.
159 If required, the data declaration, or
161 directive, is shown first,
162 followed by the function declaration. Otherwise, the function declaration is
166 .It Nm \&.SH DESCRIPTION
168 A narrative overview of the command or function's external behavior. This
169 includes how it interacts with files or data, and how it handles the standard
170 input, standard output and standard error. Internals and implementation details
171 are normally omitted. This section attempts to provide a succinct overview in
172 answer to the question, "what does it do?"
174 Literal text from the synopsis appears in constant width, as do literal
175 filenames and references to items that appear elsewhere in the reference
176 manuals. Arguments are italicized.
178 If a command interprets either subcommands or an input grammar, its command
179 interface or input grammar is normally described in a
181 section, which follows the
186 describes the behavior of the command itself, not that of subcommands.
190 The list of options along with a description of how each affects the command's
193 .It Nm \&.SH RETURN VALUES
195 A list of the values the library routine will return to the calling program
196 and the conditions that cause these values to be returned.
198 .It Nm \&.SH EXIT STATUS
200 A list of the values the utility will return to the calling program or shell,
201 and the conditions that cause these values to be returned.
205 A list of files associated with the command or function.
207 .It Nm \&.SH SEE ALSO
209 A comma-separated list of related manual pages, followed by references to other
212 .It Nm \&.SH DIAGNOSTICS
214 A list of diagnostic messages and an explanation of each.
218 A description of limitations, known defects, and possible problems associated
219 with the command or function.
222 .Pa /usr/share/man/whatis
226 package should not be used for new documentation. The
228 package is preferred, as it uses semantic markup rather than physical markup.
229 .Sh CODE SET INDEPENDENCE
232 this package is Code Set Independent. However, when processed with
237 the use of multi-byte characters may not be supported.
238 .Sh INTERFACE STABILITY
239 .Sy Obsolete Committed .
242 package should be used instead.
253 .%A Dale Dougherty and Tim O'Reilly
254 .%B Unix Text Processing