New file.
[s-roff.git] / tmac / groff_man.man
blob4834f56d468f2c6aab83898a6d60ae8551bfb9c9
1 .de TQ
2 .br
3 .ns
4 .TP \\$1
5 ..
6 .TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
8 .SH NAME
10 groff_man \- groff `an' macros to support generation of man pages
12 .SH SYNOPSIS
14 .B groff
15 .B \-m@TMAC_AN_PREFIX@an
17 .IR options .\|.\|.
20 .IR files .\|.\|.
23 .SH DESCRIPTION
25 The 
26 .B tmac.@TMAC_AN_PREFIX@an 
27 macros used to generate man pages with 
28 .I groff
29 were written by James Clark.  
30 This document provides a brief summary of the use of each macro in that
31 package.
33 .SH OPTIONS
35 The
36 .B man
37 macros understand the following command line options (which define various
38 registers).
39 .TP
40 .B \-rC1
41 If more than one manual page is given on the command line, number the
42 pages continuously, rather than starting each at\ 1.
43 .TP
44 .B \-rD1
45 Double-sided printing.
46 Footers for even and odd pages are formatted differently.
47 .TP
48 .BI \-rP nnn
49 Enumeration of pages will start with
50 .I nnn
51 rather than with\ 1.
52 .TP
53 .BI \-rX nnn
54 After page
55 .IR nnn ,
56 number pages as
57 .IR nnn a,
58 .IR nnn b,
59 .IR nnn c,
60 etc.
61 For example, the option `\-rX2' will produce the following page numbers:
62 1, 2, 2a, 2b, 2c, etc.
64 .SH USAGE
66 This section describes the available macros for manual pages.
67 For further customization, put additional macros and requests into the file
68 .B man.local
69 which will be loaded immediately after
70 .BR tmac.@TMAC_AN_PREFIX@an .
71 .TP
72 .BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ]
73 Sets the title of the man page to 
74 .I title
75 and the section to
76 .IR section ,
77 which must take on a value between 1 and\ 8.
78 The value
79 .I section
80 may also have a string appended, e.g. `.pm', to indicate a specific
81 subsection of the man pages.
82 Both
83 .I title
84 and
85 .I section
86 are positioned at the left and right in the header line (with
87 .I section
88 in parentheses immediately appended to
89 .IR title .
90 .I extra1
91 will be positioned in the middle of the footer line.
92 .I extra2
93 will be positioned at the left in the footer line (resp. at the left on
94 even pages and at the right on odd pages if double-sided printing is
95 active).
96 .I extra3
97 is centered in the header line.
98 .IP
99 For HTML output, headers and footers are completely supressed.
101 Additionally, this macro starts a new page; the new line number is\ 1 again
102 (except if the `-rC1' option is given on the command line) -- this feature
103 is intended only for formatting multiple man pages; a single man page should
104 contain exactly one
105 .B TH
106 macro at the beginning of the file.
108 .BI ".SH [" "text for a heading" ]
109 Sets up an unnumbered section heading sticking out to the left.
110 Prints out all the text following
111 .B SH
112 up to the end of the line (resp. the text in the next line if there is no
113 argument to
114 .BR SH )
115 in bold face, at a default size of 9\ point.
116 Additionally, the left margin for the following text is reset to its default
117 value.
119 .BI ".SS [" "text for a heading" ]
120 Sets up an unnumbered section heading.
121 Prints out all the text following
122 .B SS
123 up to the end of the line (resp. the text in the next line if there is no
124 argument to
125 .BR SS )
126 in bold face, at a default size of 10\ point.
127 Additionally, the left margin for the following text is reset to its default
128 value.
130 .BI ".TP [" nnn ]
131 Sets up an indented paragraph with label.
132 The indentation is set to 
133 .I nnn
134 if that argument is supplied (the default unit is `n' if omitted), otherwise
135 it is set to the default indentation value.
136 The first line of text following this macro is interpreted as a string to be
137 printed flush-left, as it is appropriate for a label.
138 It is not interpreted as part of a paragraph, so there is no attempt to fill
139 the first line with text from the following input lines.
140 Nevertheless, if the label is not as wide as the indentation, then the
141 paragraph starts at the same line (but indented), continuing on the
142 following lines.
143 If the label is wider than the indentation, then the descriptive part of the
144 paragraph begins on the line following the label, entirely indented.
145 Note that neither font shape nor font size of the label is set to a default
146 value; on the other hand, the rest of the text will have default font
147 settings.
149 .B TP
150 macro is the macro used for the explanations you are just reading.
152 .B .LP
154 .B .PP
156 .B .P
157 These macros are mutual aliases.
158 Any of them causes a line break at the current position, followed by a
159 vertical space downwards by the amount specified by the
160 .B PD
161 macro.
162 The font size and shape are reset to the default value (10pt resp. Roman).
163 Finally, the current left margin is restored.
165 .BI ".IP [" designator "] [" nnn ]
166 Sets up an indented paragraph, using 
167 .I designator 
168 as a tag to mark its beginning.
169 The indentation is set to
170 .I nnn
171 if that argument is supplied (default unit is `n'), otherwise the default
172 indentation value is used.
173 Font size and face of the paragraph (but not the designator) are reset to
174 its default values.
175 To start an indented paragraph with a particular indentation but without a
176 designator, use `""' (two doublequotes) as the second argument.
178 For example, the following paragraphs were all set up with bullets as the
179 designator, using `.IP\ \\(bu\ 4':
181 .IP \(bu 4
182 .B IP
183 is one of the three macros used in 
184 .B tmac.@TMAC_AN_PREFIX@an
185 to format lists.
186 .IP \(bu 4
187 .B HP
188 is another.
189 This macro produces a paragraph with a left hanging indentation.
190 .IP \(bu 4
191 .B TP
192 is another.
193 This macro produces an unindented label followed by an indented paragraph.
196 .BI ".HP [" nnn ]
197 Sets up a paragraph with hanging left indentation.
198 The indentation is set to
199 .I nnn
200 if that argument is supplied (default unit is `n'), otherwise the default
201 indentation value is used.
202 Font size and face are reset to its default values.
203 The following paragraph illustrates the effect of this macro with hanging
204 indentation set to\ 4:
206 .HP 4
207 This is a paragraph following an invocation of the
208 .B HP
209 macro.
210 As you can see, it produces a paragraph where all lines but the first are
211 indented.
214 .BI ".RS [" nnn ]
215 This macro moves the left margin to the right by the value
216 .I nnn
217 if specified (default unit is `n'); otherwise the default indentation value
218 is used.
219 Calls to the
220 .B RS
221 macro can be nested.
223 .BI ".RE [" nnn ]
224 This macro moves the left margin back to level
225 .IR nnn ;
226 if no argument is given, it moves one level back.
227 The first level (i.e., no call to
228 .B RS
229 yet) has number\ 1, and each call to
230 .B RS
231 increases the level by\ 1.
233 To summarize, the following macros cause a line break with the insertion of
234 vertical space (which amount can be changed with the
235 .B PD
236 macro):
237 .BR SH ,
238 .BR SS ,
239 .BR TP ,
240 .B LP
241 .RB ( PP ,
242 .BR P ),
243 .BR IP ,
245 .BR HP .
246 The macros
247 .B RS
249 .B RS
250 also cause a break but no insertion of vertical space.
252 .SH "MACROS TO SET FONTS"
254 The standard font is Roman; the default text size is 10\ point.
256 .BI ".SM [" text ]
257 Causes the text on the same line or the text on the next line to appear in a
258 font that is one point size smaller than the default font.
260 .BI ".SB [" text ]
261 Causes the text on the same line or the text on the next line to appear in
262 boldface font, one point size smaller than the default font.
264 .BI ".BI " text
265 Causes text on the same line to appear alternately in bold face and italic.
266 The text must be on the same line as the macro call.
267 Thus
270 \&.BI this "word and" that
272 would cause `this' and `that' to appear in bold face, while `word and'
273 appears in italics.
276 .BI ".IB " text
277 Causes text to appear alternately in italic and bold face.
278 The text must be on the same line as the macro call.
280 .BI ".RI " text
281 Causes text on the same line to appear alternately in roman and italic.
282 The text must be on the same line as the macro call.
284 .BI ".IR " text
285 Causes text on the same line to appear alternately in italic and roman.
286 The text must be on the same line as the macro call.
288 .BI ".BR " text
289 Causes text on the same line to appear alternately in bold face and roman.
290 The text must be on the same line as the macro call.
292 .BI ".RB " text
293 Causes text on the same line to appear alternately in roman and bold face.
294 The text must be on the same line as the macro call.
296 .BI ".R [" text ]
297 Causes text to appear in roman font.
298 If no text is present on the line where the macro is called, then the text
299 of the next line appears in roman.
300 This is the default font to which text is returned at the end of processing
301 of the other macros.
303 .BI ".B [" text ]
304 Causes text to appear in bold face.
305 If no text is present on the line where the macro is called, then the text
306 of the next line appears in bold face.
308 .BI ".I [" text ]
309 Causes text to appear in italic.
310 If no text is present on the line where the macro is called, then the text
311 of the next line appears in italic.
313 .SH "MISCELLANEOUS"
315 The default indentation is 7.2n for all output devices except for
316 .B grohtml
317 which uses 1.2i instead.
319 .B .DT
320 Sets tabs every 0.5 inches.
321 Since this macro is always called during a
322 .B TH
323 request, it makes sense to call it only if the tab positions have been
324 changed.
326 .BI ".PD [" nnn ]
327 Adjusts the empty space before a new paragraph (resp. section).
328 The optional argument gives the amount of space (default units are `v');
329 without parameter, the value is reset to its default value (1 line for tty
330 devices, 0.4v otherwise).
331 This affects the macros
332 .BR SH ,
333 .BR SS ,
334 .BR TP ,
335 .B LP
336 (resp.\&
337 .B PP
339 .BR P ),
340 .BR IP ,
342 .BR HP .
344 The following strings are defined:
346 .B \e*S
347 Switch back to the default font size.
349 .B \e*R
350 The `registered' sign.
352 .B \e*(Tm
353 The `trademark' sign.
355 .B \e*(lq
357 .B \e*(rq
358 Left and right quote.
359 This is equal to `\e(lq' and `\e(rq', respectively.
361 If a preprocessor like
362 .B tbl
364 .B eqn
365 is needed, it has become usage to make the first line of the man page look
366 like this:
369 .BI .\e"\  word
372 Note the single space character after the double quote.
373 .I word
374 consists of letters for the needed preprocessors: `e' for
375 .BR eqn ,
376 `r' for
377 .BR refer ,
378 and `t' for
379 .BR table .
380 Modern implementations of the
381 .B man
382 program read this first line and automatically call the right
383 preprocessor(s).
385 .SH "SEE ALSO"
387 Since the 
388 .B tmac.@TMAC_AN_PREFIX@an
389 macros consist of groups of 
390 .I groff 
391 requests, one can, in principle, supplement the functionality of the
392 .B tmac.@TMAC_AN_PREFIX@an
393 macros with individual 
394 .I groff
395 requests where necessary.
396 A complete list of these requests is available on the WWW at
398 .ce 1
399 http://www.cs.pdx.edu/~trent/gnu/groff/groff_toc.html
401 .BR @g@tbl (@MAN1EXT@),
402 .BR @g@eqn (@MAN1EXT@),
403 .BR @g@refer (@MAN1EXT@),
404 .BR man (@MAN1EXT@)
406 .SH AUTHOR
408 This manual page was originally written for the Debian GNU/Linux system by
409 Susan G. Kleinmann <sgk@debian.org>, corrected by Werner Lemberg
410 <wl@gnu.org>, and is now part of the GNU troff distribution.