1 .\" man(7) manpage by rosenkra@hall.cray.com (Bill Rosenkranz)
2 .\" Modified a bit for MINIX 3 by Kees J. Bot (kjb@cs.vu.nl)
6 man - nroff macro package for manual pages
15 These macros are used to lay out reference pages for manuals.
19 may be zero to six words. Quotes may be used to include blanks in a 'word'.
21 can be empty, but unlike normal \s-2UNIX\s+2 macros, the next line is not used.
23 A prevailing indent distance is remembered between successive
24 indented paragraphs, and is reset to default value upon
25 reaching a non-indented paragraph (i.e. at .SH or .SS).
29 For standard MINIX 3 nroff.
39 Request Cause Explanation
42 \&.B t no Text t is bold. Quote to imbed blanks.
43 \&.I t no Text t is italic. Quote to imbed blanks.
44 \&.IP x yes Set prevailing indent to 5. Begin
45 indented paragraph with hanging tag
46 given by first argument. Tag x is
47 always placed on a separate line.
48 \&.LP yes Same as .PP.
49 \&.PP yes Begin paragraph. Set prevailing
51 \&.RE yes End of relative indent. Set prevailing
52 indent to amount of starting .RS.
53 \&.RS yes Start relative indent, move left margin
55 \&.SH t yes Subhead. Quote to imbed blanks.
56 \&.SS t yes Subsection. Quote to imbed blanks. No
58 \&.TH n s c v d yes Begin page named n of chapter s; c is
59 the chapter name; d is the date of the
60 most recent change; v is version number.
61 Sets prevailing indent and tabs to 5.
64 The following illustrates some of the requests available
65 with this macro package:
68 \&.\e" this is a comment
71 demo \e- show how to use \e-man package
77 This is a test for showing how to use the
79 man package. It shows how to use .TH, .SH, .PP, .B, .I, and .IP
82 This will be a new paragraph. You can also use normal
87 This is the comment command. \e" You won't see this.
89 No fill mode (the normal mode is fill mode where things
90 get justified right and left).
94 Break line here no matter what.
96 Vertical space (also causes a break to occur).
98 Note that to continue an indent and make a new paragraph (as
99 is the case here), just put in a space (.sp).
101 Now we should be at a new paragraph.
106 .B nroff \-man demo.man
107 results in the following output: (Ignoring page headers and footers)
112 demo \e- show how to use \e-man package
124 This is a test for showing how to use the
126 man package. It shows how to use .TH, .SH, .PP, .B, .I, and .IP
129 This will be a new paragraph. You can also use normal
131 commands in the text.
141 \&'\e"' This is the comment command.
144 nf No fill mode (the normal mode is fill mode where things
145 get justified right and left).
148 fi Re-enter fill mode.
151 br Break line here no matter what.
154 sp Vertical space (also causes a break to occur).
156 Note that to continue an indent and make a new paragraph (as
157 is the case here), just put in a space (.sp).
160 Now we should be at a new paragraph.
164 A typical manual page for a command or function is laid out as follows:
168 The name of the command or function in upper-case,
169 which serves as the title of the manual page. This is
170 followed by the number of the section in which it
174 name - one-line summary
176 The name, or list of names, by which the command is
177 called, followed by a dash and then a one-line summary
178 of the action performed. All in roman font, this sec-
179 tion contains no troff(1) commands or escapes, and no
180 macro requests. It is used to generate the whatis(1)
187 The syntax of the command and its arguments as
188 typed on the command line. When in boldface, a
189 word must be typed exactly as printed. When in
190 italics, a word can be replaced with text that you
191 supply. Syntactic symbols appear in roman face:
193 [ ] An argument, when surrounded by brackets is
196 | Arguments separated by a vertical bar are
197 exclusive. You can supply only item from
200 ... Arguments followed by an elipsis can be
201 repeated. When an elipsis follows a brack-
202 eted set, the expression within the brackets
207 If required, the data declaration, or #include
208 directive, is shown first, followed by the func-
209 tion declaration. Otherwise, the function declara-
213 A narrative description of the command or function in
214 detail, including how it interacts with files or data,
215 and how it handles the standard input, standard output
218 Filenames, and references to commands or functions
219 described elswhere in the manual, are italicised. The
220 names of options, variables and other literal terms are
224 The list of options along with a description of how
225 each affects the commands operation.
228 Environment variables used.
231 A list of files associated with the command or func-
235 A comma-separated list of related manual pages,
236 followed by references to other published materials.
237 This section contains no troff(1) escapes or commands,
238 and no macro requests.
241 A list of diagnostic messages and an explanation of
245 Any additional notes such as installation-dependent
249 A description of limitations, known defects, and possi-
250 ble problems associated with the command or function.
253 The program's author and any pertinent release info.
256 The program's current version number and release date.
261 has a better chance at formatting a random manual page then the standard
262 MINIX 3 nroff, it has two annoying bugs in its macro set. Both .PP and .IP
263 reset the indentation level to the level set by .SH. This means that
264 you can't use them in a piece of text indented by .RS. For .IP this is
265 troublesome, you can see why in the unformatted source of this text. .PP
266 can simply be replaced by .sp, or better yet, by .SP with the following
267 macro defined somewhere in your text:
278 This will make .SP use 4/10 of a line if formatted by troff, just like .PP.