* src/roff/nroff/nroff.man: Document option `-M'.
[s-roff.git] / tmac / groff_man.man
blob8e153b8f378ef7ba7a72d6cc5e2ce0ef0f0b727b
1 .ig
2 Copyright (C) 1999-2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 Permission is granted to make and distribute verbatim copies of
5 this manual provided the copyright notice and this permission notice
6 are preserved on all copies.
8 Permission is granted to copy and distribute modified versions of this
9 manual under the conditions for verbatim copying, provided that the
10 entire resulting derived work is distributed under the terms of a
11 permission notice identical to this one.
13 Permission is granted to copy and distribute translations of this
14 manual into another language, under the above conditions for modified
15 versions, except that this permission notice may be included in
16 translations approved by the Free Software Foundation instead of in
17 the original English.
20 .de TQ
21 .  br
22 .  ns
23 .  TP \\$1
27 .TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
30 .\" -----------------------------------------------------------------
32 .SH NAME
34 groff_man \- groff `man' macros to support generation of man pages
37 .\" -----------------------------------------------------------------
39 .SH SYNOPSIS
41 .B groff
42 .B \-man
44 .IR options .\|.\|.\&
47 .IR files .\|.\|.\&
49 .br
50 .B groff
51 .B \-m\ man
53 .IR options .\|.\|.\&
56 .IR files .\|.\|.\&
60 .\" -----------------------------------------------------------------
62 .SH DESCRIPTION
64 The
65 .B man
66 macros used to generate man pages with
67 .I groff
68 were written by James Clark.
69 This document provides a brief summary of the use of each macro in that
70 package.
73 .\" -----------------------------------------------------------------
75 .SH OPTIONS
77 The
78 .B man
79 macros understand the following command line options (which define various
80 registers).
82 .TP
83 .B \-rcR=1
84 This option (the default if in nroff mode) will create a single, very long
85 page instead of multiple pages.
86 Say
87 .B \-rcR=0
88 to disable it.
90 .TP
91 .B \-rC1
92 If more than one manual page is given on the command line, number the
93 pages continuously, rather than starting each at\ 1.
95 .TP
96 .B \-rD1
97 Double-sided printing.
98 Footers for even and odd pages are formatted differently.
101 .BI \-rFT= dist
102 Set distance of the footer relative to the bottom of the page if negative
103 or relative to the top if positive.
104 The default is -0.5i.
107 .BI \-rHY= flags
108 Set hyphenation flags.
110 Possible values are 1\ to hyphenate without restrictions, 2\ to not
111 hyphenate the last word on a page, 4\ to not hyphenate the last two
112 characters of a word, and 8\ to not hyphenate the first two characters
113 of a word.
115 These values are additive; the default is\ 14.
118 .BI \-rIN= width
119 Set body text indentation to
120 .IR width .
121 The default is 7n for
122 .IR nroff ,
123 7.2n for
124 .IR troff .
126 .IR nroff ,
127 this value should always be an integer multiple of unit `n' to get
128 consistent indentation.
131 .BI \-rLL= line-length
132 Set line length.
133 If this option is not given, the line length defaults to 78n in nroff mode
134 and 6.5i in troff mode.
137 .BI \-rLT= title-length
138 Set title length.
139 If this option is not given, the title length defaults to the line length.
142 .BI \-rP nnn
143 Enumeration of pages will start with
144 .I nnn
145 rather than with\ 1.
148 .BI \-rS xx
149 Base document font size is
150 .I xx
151 points
152 .RI ( xx
153 can be 10, 11, or\ 12) rather than 10\ points.
156 .BI \-rSN= width
157 Set sub-subheading indentation to
158 .IR width .
159 The default is 3n.
162 .BI \-rX nnn
163 After page\ \c
164 .IR nnn ,
165 number pages as
166 .IR nnn a,
167 .IR nnn b,
168 .IR nnn c,
169 etc.
170 For example, the option `\-rX2' will produce the following page numbers:
171 1, 2, 2a, 2b, 2c, etc.
174 .\" -----------------------------------------------------------------
176 .SH USAGE
178 This section describes the available macros for manual pages.
179 For further customization, put additional macros and requests into the file
180 .B man.local
181 which will be loaded immediately after the
182 .B man
183 package.
186 .BI .TH " title section \fB[\fPextra1\fB]\fP \fB[\fPextra2\fB]\fP \fB[\fPextra3\fB]"
187 Set the title of the man page to
188 .I title
189 and the section to
190 .IR section ,
191 which must take on a value between 1 and\ 8.
192 The value
193 .I section
194 may also have a string appended, e.g. `.pm', to indicate a specific
195 subsection of the man pages.
196 Both
197 .I title
199 .I section
200 are positioned at the left and right in the header line (with
201 .I section
202 in parentheses immediately appended to
203 .IR title .
204 .I extra1
205 will be positioned in the middle of the footer line.
206 .I extra2
207 will be positioned at the left in the footer line (or at the left on
208 even pages and at the right on odd pages if double-sided printing is
209 active).
210 .I extra3
211 is centered in the header line.
214 For HTML output, headers and footers are completely supressed.
217 Additionally, this macro starts a new page; the new line number is\ 1 again
218 (except if the `-rC1' option is given on the command line) -- this feature
219 is intended only for formatting multiple man pages; a single man page should
220 contain exactly one
221 .B TH
222 macro at the beginning of the file.
225 .BI ".SH [" "text for a heading" ]
226 Set up an unnumbered section heading sticking out to the left.
227 Prints out all the text following
228 .B SH
229 up to the end of the line (or the text in the next input line if there is
230 no argument to
231 .BR SH )
232 in bold face
233 (or the font specified by the string
234 .BR HF ),
235 one size larger than the base document size.
236 Additionally, the left margin and the indentation for the following text
237 is reset to the default values.
240 .BI ".SS [" "text for a heading" ]
241 Set up a secondary, unnumbered section heading.
242 Prints out all the text following
243 .B SS
244 up to the end of the line (or the text in the next input line if there is
245 no argument to
246 .BR SS )
247 in bold face
248 (or the font specified by the string
249 .BR HF ),
250 at the same size as the base document size.
251 Additionally, the left margin and the indentation for the following text
252 is reset to the default values.
255 .BI ".TP [" nnn ]
256 Set up an indented paragraph with label.
257 The indentation is set to
258 .I nnn
259 if that argument is supplied (the default unit is `n' if omitted), otherwise
260 it is set to the previous indentation value specified with
261 .BR TP ,
262 .BR IP ,
264 .B HP
265 (or to the default value if none of them have been used yet).
268 The first input line of text following this macro is interpreted as a string
269 to be printed flush-left, as it is appropriate for a label.
270 It is not interpreted as part of a paragraph, so there is no attempt to fill
271 the first line with text from the following input lines.
272 Nevertheless, if the label is not as wide as the indentation the
273 paragraph starts at the same line (but indented), continuing on the
274 following lines.
275 If the label is wider than the indentation the descriptive part of the
276 paragraph begins on the line following the label, entirely indented.
277 Note that neither font shape nor font size of the label is set to a default
278 value; on the other hand, the rest of the text will have default font
279 settings.
283 .B TP
284 macro is the macro used for the explanations you are just reading.
287 .B .LP
289 .B .PP
291 .B .P
292 These macros are mutual aliases.
293 Any of them causes a line break at the current position, followed by a
294 vertical space downwards by the amount specified by the
295 .B PD
296 macro.
297 The font size and shape are reset to the default value (10pt resp. Roman).
298 Finally, the current left margin and the indentation are restored.
301 .BI ".IP [" designator "] [" nnn ]
302 Set up an indented paragraph, using
303 .I designator
304 as a tag to mark its beginning.
305 The indentation is set to
306 .I nnn
307 if that argument is supplied (the default unit is `n' if omitted), otherwise
308 it is set to the previous indentation value specified with
309 .BR TP ,
310 .BR IP ,
312 .B HP
313 (or to the default value if none of them have been used yet).
314 Font size and face of the paragraph (but not the designator) are reset to
315 its default values.
318 To start an indented paragraph with a particular indentation but without a
319 designator, use `""' (two doublequotes) as the second argument.
322 For example, the following paragraphs were all set up with bullets as the
323 designator, using `.IP\ \\(bu\ 4'.
324 The whole block has been enclosed with `.RS' and `.RE' to set the left
325 margin temporarily to the current indentation value.
328 .IP \(bu 4
329 .B IP
330 is one of the three macros used in the
331 .B man
332 package to format lists.
333 .IP \(bu 4
334 .B HP
335 is another.
336 This macro produces a paragraph with a left hanging indentation.
337 .IP \(bu 4
338 .B TP
339 is another.
340 This macro produces an unindented label followed by an indented paragraph.
344 .BI ".HP [" nnn ]
345 Set up a paragraph with hanging left indentation.
346 The indentation is set to
347 .I nnn
348 if that argument is supplied (the default unit is `n' if omitted), otherwise
349 it is set to the previous indentation value specified with
350 .BR TP ,
351 .BR IP ,
353 .B HP
354 (or to the default value if none of them have been used yet).
355 Font size and face are reset to its default values.
356 The following paragraph illustrates the effect of this macro with hanging
357 indentation set to\ 4 (enclosed by `.RS' and `.RE' to set the left margin temporarily to
358 the current indentation):
361 .HP 4
362 This is a paragraph following an invocation of the
363 .B HP
364 macro.
365 As you can see, it produces a paragraph where all lines but the first are
366 indented.
370 .BI ".RS [" nnn ]
371 This macro moves the left margin to the right by the value
372 .I nnn
373 if specified (default unit is `n'); otherwise it is set to the previous
374 indentation value specified with
375 .BR TP ,
376 .BR IP ,
378 .B HP
379 (or to the default value if none of them have been used yet).
380 The indentation value is then set to the default.
383 Calls to the
384 .B RS
385 macro can be nested.
388 .BI ".RE [" nnn ]
389 This macro moves the left margin back to level
390 .IR nnn ,
391 restoring the previous left margin.
392 If no argument is given, it moves one level back.
393 The first level (i.e., no call to
394 .B RS
395 yet) has number\ 1, and each call to
396 .B RS
397 increases the level by\ 1.
400 To summarize, the following macros cause a line break with the insertion of
401 vertical space (which amount can be changed with the
402 .B PD
403 macro):
404 .BR SH ,
405 .BR SS ,
406 .BR TP ,
407 .B LP
408 .RB ( PP ,
409 .BR P ),
410 .BR IP ,
412 .BR HP .
413 The macros
414 .B RS
416 .B RE
417 also cause a break but no insertion of vertical space.
420 .\" -----------------------------------------------------------------
422 .SH "MACROS TO SET FONTS"
424 The standard font is Roman; the default text size is 10\ point.
427 .BI ".SM [" text ]
428 Causes the text on the same line or the text on the next input line to
429 appear in a font that is one point size smaller than the default font.
432 .BI ".SB [" text ]
433 Causes the text on the same line or the text on the next input line to
434 appear in boldface font, one point size smaller than the default font.
437 .BI ".BI " text
438 Causes text on the same line to appear alternately in bold face and italic.
439 The text must be on the same line as the macro call.
440 Thus
443 \&.BI this "word and" that
445 would cause `this' and `that' to appear in bold face, while `word and'
446 appears in italics.
450 .BI ".IB " text
451 Causes text to appear alternately in italic and bold face.
452 The text must be on the same line as the macro call.
455 .BI ".RI " text
456 Causes text on the same line to appear alternately in roman and italic.
457 The text must be on the same line as the macro call.
460 .BI ".IR " text
461 Causes text on the same line to appear alternately in italic and roman.
462 The text must be on the same line as the macro call.
465 .BI ".BR " text
466 Causes text on the same line to appear alternately in bold face and roman.
467 The text must be on the same line as the macro call.
470 .BI ".RB " text
471 Causes text on the same line to appear alternately in roman and bold face.
472 The text must be on the same line as the macro call.
475 .BI ".B [" text ]
476 Causes
477 .I text
478 to appear in bold face.
479 If no text is present on the line where the macro is called the text
480 of the next input line appears in bold face.
483 .BI ".I [" text ]
484 Causes
485 .I text
486 to appear in italic.
487 If no text is present on the line where the macro is called the text
488 of the next input line appears in italic.
491 .\" -----------------------------------------------------------------
493 .SH "MISCELLANEOUS"
495 The default indentation is 7.2n in troff mode and 7n in nroff mode except for
496 .B grohtml
497 which ignores indentation.
500 .B .DT
501 Set tabs every 0.5 inches.
502 Since this macro is always called during a
503 .B TH
504 request, it makes sense to call it only if the tab positions have been
505 changed.
508 .BI ".PD [" nnn ]
509 Adjust the empty space before a new paragraph or section.
510 The optional argument gives the amount of space (default unit is `v');
511 without parameter, the value is reset to its default value (1\ line in
512 nroff mode, 0.4v\ otherwise).
513 This affects the macros
514 .BR SH ,
515 .BR SS ,
516 .BR TP ,
517 .B LP
518 (resp.\&
519 .B PP
521 .BR P ),
522 .BR IP ,
524 .BR HP .
527 .BI ".AT [" system " [" release ]]
528 Alter the footer for use with AT&T manpages.
529 This command exists only for compatibility; don't use it.
530 See the groff info manual for more.
533 .BI ".UC [" version ]
534 Alter the footer for use with BSD manpages.
535 This command exists only for compatibility; don't use it.
536 See the groff info manual for more.
539 .B ".PT"
540 Print the header string.
541 Redefine this macro to get control of the header.
544 .B ".BT"
545 Print the footer string.
546 Redefine this macro to get control of the footer.
549 The following strings are defined:
551 .B \e*S
552 Switch back to the default font size.
555 .B \e*R
556 The `registered' sign.
559 .B \e*(Tm
560 The `trademark' sign.
563 .B \e*(lq
565 .B \e*(rq
566 Left and right quote.
567 This is equal to `\e(lq' and `\e(rq', respectively.
570 .B \e*(HF
571 The typeface used to print headings and subheadings.
572 The default is `B'.
575 If a preprocessor like
576 .B @g@tbl
578 .B @g@eqn
579 is needed, it has become usage to make the first line of the man page look
580 like this:
583 .BI .\e"\  word
586 Note the single space character after the double quote.
587 .I word
588 consists of letters for the needed preprocessors: `e' for
589 .BR @g@eqn ,
590 `r' for
591 .BR @g@refer ,
592 and `t' for
593 .BR @g@tbl .
594 Modern implementations of the
595 .B man
596 program read this first line and automatically call the right
597 preprocessor(s).
600 .\" -----------------------------------------------------------------
602 .SH FILES
604 .B man.tmac
606 .B an.tmac
607 These are wrapper files to call
608 .BR andoc.tmac .
610 .B andoc.tmac
611 This file checks whether the
612 .B man
613 macros or the
614 .B mdoc
615 package should be used.
617 .B an-old.tmac
619 .B man
620 macros are contained in this file.
622 .B man.local
623 Local changes and customizations should be put into this file.
626 .\" -----------------------------------------------------------------
628 .SH "SEE ALSO"
630 Since the
631 .B man
632 macros consist of groups of
633 .I groff
634 requests, one can, in principle, supplement the functionality of the
635 .B man
636 macros with individual
637 .I groff
638 requests where necessary.
639 See the groff info pages for a complete reference of all requests.
642 .BR @g@tbl (@MAN1EXT@),
643 .BR @g@eqn (@MAN1EXT@),
644 .BR @g@refer (@MAN1EXT@),
645 .BR man (1)
648 .\" -----------------------------------------------------------------
650 .SH AUTHOR
652 This manual page was originally written for the Debian GNU/Linux system by
653 Susan G. Kleinmann <sgk@debian.org>, corrected and updated by Werner Lemberg
654 <wl@gnu.org>, and is now part of the GNU troff distribution.
656 .\" Local Variables:
657 .\" mode: nroff
658 .\" End: