* doc/groff.texinfo: Spelling fixes.
[s-roff.git] / tmac / groff_man.man
blobc97a762b521e89f0a9b3a8374742e8480c7a3da9
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.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.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 .BI ".SH [" "text for a heading" ]
102 Sets up an unnumbered section heading sticking out to the left.
103 Prints out all the text following `.SH' up to the end of the line (resp. the
104 text in the next line if there is no argument to `.SH') in bold face, at a
105 default size of 9\ point.
106 Additionally, the left margin for the following text is reset to its default
107 value.
109 .BI ".SS [" "text for a heading" ]
110 Sets up an unnumbered section heading.
111 Prints out all the text following `.SS' up to the end of the line (resp. the
112 text in the next line if there is no argument to `.SS') in bold face, at a
113 default size of 10\ point.
114 Additionally, the left margin for the following text is reset to its default
115 value.
117 .BI ".TP [" nnn ]
118 Sets up an indented paragraph with label.
119 The indentation is set to 
120 .I nnn
121 if that argument is supplied (the default unit is `n' if omitted), otherwise
122 it is set to the default indentation value.
123 The first line of text following this macro is interpreted as a string to be
124 printed flush-left, as it is appropriate for a label.
125 It is not interpreted as part of a paragraph, so there is no attempt to fill
126 the first line with text from the following input lines.
127 Nevertheless, if the label is not as wide as the indentation, then the
128 paragraph starts at the same line (but indented), continuing on the
129 following lines.
130 If the label is wider than the indentation, then the descriptive part of the
131 paragraph begins on the line following the label, entirely indented.
132 Note that neither font shape nor font size of the label is set to a default
133 value; on the other hand, the rest of the text will have default font
134 settings.
135 The `.TP' macro is the macro used for the explanations you are just reading.
137 .B .LP
139 .B .PP
141 .B .P
142 These macros are mutual aliases.
143 Any of them causes a line break at the current position, followed by a
144 vertical space downwards by the amount specified by the `PD' macro.
145 The font size and shape are reset to the default value (10pt resp. Roman).
146 Finally, the current left margin is restored.
148 .BI ".IP [" designator "] [" nnn ]
149 Sets up an indented paragraph, using 
150 .I designator 
151 as a tag to mark its beginning.
152 The indentation is set to
153 .I nnn
154 if that argument is supplied (default unit is `n'), otherwise the default
155 indentation value is used.
156 Font size and face of the paragraph (but not the designator) are reset to
157 its default values.
158 To start an indented paragraph with a particular indentation but without a
159 designator, use `""' (two doublequotes) as the second argument.
161 For example, the following paragraphs were all set up with bullets as the
162 designator, using `.IP\ \\(bu\ 4':
164 .IP \(bu 4
165 `IP' is one of the three macros used in 
166 .B tmac.an
167 to format lists.
168 .IP \(bu 4
169 `HP' is another.
170 This macro produces a paragraph with a left hanging indentation.
171 .IP \(bu 4
172 `TP' is another.
173 This macro produces an unindented label followed by an indented paragraph.
176 .BI ".HP [" nnn ]
177 Sets up a paragraph with hanging left indentation.
178 The indentation is set to
179 .I nnn
180 if that argument is supplied (default unit is `n'), otherwise the default
181 indentation value is used.
182 Font size and face are reset to its default values.
183 The following paragraph illustrates the effect of this macro with hanging
184 indentation set to\ 4:
186 .HP 4
187 This is a paragraph following an invocation of the `.HP' macro.
188 As you can see, it produces a paragraph where all lines but the first are
189 indented.
192 .BI ".RS [" nnn ]
193 This macro moves the left margin to the right by the value
194 .I nnn
195 if specified (default unit is `n'); otherwise the default indentation value
196 is used.
197 Calls to the `RS' macro can be nested.
199 .BI ".RE [" nnn ]
200 This macro moves the left margin back to level
201 .IR nnn ;
202 if no argument is given, it moves one level back.
203 The first level (i.e., no call to `RS' yet) has number\ 1, and each call to
204 `RS' increases the level by\ 1.
206 .SH "MACROS TO SET FONTS"
208 The standard font is Roman; the default text size is 10\ point.
210 .BI ".SM [" text ]
211 Causes the text on the same line or the text on the next line to appear in a
212 font that is one point size smaller than the default font.
214 .BI ".SB [" text ]
215 Causes the text on the same line or the text on the next line to appear in
216 boldface font, one point size smaller than the default font.
218 .BI ".BI " text
219 Causes text on the same line to appear alternately in bold face and italic.
220 The text must be on the same line as the macro call.
221 Thus
224 \&.BI this "word and" that
226 would cause `this' and `that' to appear in bold face, while `word and'
227 appears in italics.
230 .BI ".IB " text
231 Causes text to appear alternately in italic and bold face.
232 The text must be on the same line as the macro call.
234 .BI ".RI " text
235 Causes text on the same line to appear alternately in roman and italic.
236 The text must be on the same line as the macro call.
238 .BI ".IR " text
239 Causes text on the same line to appear alternately in italic and roman.
240 The text must be on the same line as the macro call.
242 .BI ".BR " text
243 Causes text on the same line to appear alternately in bold face and roman.
244 The text must be on the same line as the macro call.
246 .BI ".RB " text
247 Causes text on the same line to appear alternately in roman and bold face.
248 The text must be on the same line as the macro call.
250 .BI ".R [" text ]
251 Causes text to appear in roman font.
252 If no text is present on the line where the macro is called, then the text
253 of the next line appears in roman.
254 This is the default font to which text is returned at the end of processing
255 of the other macros.
257 .BI ".B [" text ]
258 Causes text to appear in bold face.
259 If no text is present on the line where the macro is called, then the text
260 of the next line appears in bold face.
262 .BI ".I [" text ]
263 Causes text to appear in italic.
264 If no text is present on the line where the macro is called, then the text
265 of the next line appears in italic.
267 .SH "MISCELLANEOUS"
269 The default indentation is 7.2n for all output devices except for
270 .B grohtml
271 which uses 1.2i instead.
273 .B .DT
274 Sets tabs every 0.5 inches.
275 Since this macro is always called during a
276 .B TH
277 request, it makes sense to call it only if the tab positions have been
278 changed.
280 .BI ".PD [" nnn ]
281 Adjusts the empty space before a new paragraph (resp. section).
282 The optional argument gives the amount of space (default units are `v');
283 without parameter, the value is reset to its default value (1 line for tty
284 devices, 0.4v otherwise).
285 This affects the macros
286 .BR SH ,
287 .BR SS ,
288 .BR TP ,
289 .B LP
290 (resp.\&
291 .B PP
293 .BR P ),
294 .BR IP ,
296 .BR HP .
298 The following strings are defined:
300 .B \e*S
301 Switch back to the default font size.
303 .B \e*R
304 The `registered' sign.
306 .B \e*(Tm
307 The `trademark' sign.
309 .B \e*(lq
311 .B \e*(rq
312 Left and right quote.
313 This is equal to `\e(lq' and `\e(rq', respectively.
315 .SH "SEE ALSO"
317 Since the 
318 .B tmac.an
319 macros consist of groups of 
320 .I groff 
321 requests, one can, in principle, supplement the functionality of the
322 .B tmac.an
323 macros with individual 
324 .I groff
325 requests where necessary.
326 A complete list of these requests is available on the WWW at
327 .ce 1
328 http://www.cs.pdx.edu/~trent/gnu/groff/groff_toc.html
330 .SH AUTHOR
332 This manual page was originally written for the Debian GNU/Linux system by
333 Susan G. Kleinmann <sgk@debian.org>, corrected by Werner Lemberg
334 <wl@gnu.org>, and is now part of the GNU troff distribution.