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