tmac/groff_man.man: Minor fixes.
[s-roff.git] / tmac / groff_man.man
blob0b706f59b0f2192ee0f5e2a9c581c0385dc9cae3
1 .ig
2 Copyright (C) 1999-2000, 2001, 2002, 2003, 2004
3 Free Software Foundation, Inc.
5 Permission is granted to make and distribute verbatim copies of this
6 manual provided the copyright notice and this permission notice are
7 preserved on all copies.
9 Permission is granted to copy and distribute modified versions of this
10 manual under the conditions for verbatim copying, provided that the
11 entire resulting derived work is distributed under the terms of a
12 permission notice identical to this one.
14 Permission is granted to copy and distribute translations of this
15 manual into another language, under the above conditions for modified
16 versions, except that this permission notice may be included in
17 translations approved by the Free Software Foundation instead of in
18 the original English.
21 .de TQ
22 .  br
23 .  ns
24 .  TP \\$1
28 .TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
31 .\" -----------------------------------------------------------------
33 .SH NAME
35 groff_man \- groff `man' macros to support generation of man pages
38 .\" -----------------------------------------------------------------
40 .SH SYNOPSIS
42 .B groff
43 .B \-man
45 .IR options .\|.\|.\&
48 .IR files .\|.\|.\&
50 .br
51 .B groff
52 .B \-m\ man
54 .IR options .\|.\|.\&
57 .IR files .\|.\|.\&
61 .\" -----------------------------------------------------------------
63 .SH DESCRIPTION
65 The
66 .B man
67 macros used to generate
68 .I \%man\~pages
69 with
70 .I groff
71 were written by James Clark.
73 This document provides a brief summary of the use of each macro in that
74 package.
77 .\" -----------------------------------------------------------------
79 .SH OPTIONS
81 The
82 .B man
83 macros understand the following command line options (which define
84 various registers).
86 .TP
87 .B \-rcR=1
88 This option (the default if in nroff mode) will create a single, very
89 long page instead of multiple pages.
91 Say
92 .B \-rcR=0
93 to disable it.
95 .TP
96 .B \-rC1
97 If more than one manual page is given on the command line, number the
98 pages continuously, rather than starting each at\ 1.
101 .B \-rD1
102 Double-sided printing.
104 Footers for even and odd pages are formatted differently.
107 .BI \-rFT= dist
108 Set distance of the footer relative to the bottom of the page if
109 negative or relative to the top if positive.
111 The default is -0.5i.
114 .BI \-rHY= flags
115 Set hyphenation flags.
117 Possible values are 1\ to hyphenate without restrictions, 2\ to not
118 hyphenate the last word on a page, 4\ to not hyphenate the last two
119 characters of a word, and 8\ to not hyphenate the first two characters
120 of a word.
122 These values are additive; the default is\ 14.
125 .BI \-rIN= width
126 Set body text indentation to
127 .IR width .
128 The default is 7n for
129 .IR nroff ,
130 7.2n for
131 .IR troff .
133 .IR nroff ,
134 this value should always be an integer multiple of unit `n' to get
135 consistent indentation.
138 .BI \-rLL= line-length
139 Set line length.
141 If this option is not given, the line length defaults to 78n in
142 .I nroff
143 mode and 6.5i in
144 .I troff
145 mode.
148 .BI \-rLT= title-length
149 Set title length.
151 If this option is not given, the title length defaults to the line
152 length.
155 .BI \-rP nnn
156 Enumeration of pages will start with
157 .I nnn
158 rather than with\ 1.
161 .BI \-rS xx
162 Base document font size is
163 .I xx
164 points
165 .RI ( xx
166 can be 10, 11, or\ 12) rather than 10\ points.
169 .BI \-rSN= width
170 Set sub-subheading indentation to
171 .IR width .
172 The default is 3n.
175 .BI \-rX nnn
176 After page\ \c
177 .IR nnn ,
178 number pages as
179 .IR nnn a,
180 .IR nnn b,
181 .IR nnn c,
182 etc.
184 For example, the option `\-rX2' will produce the following page
185 numbers: 1, 2, 2a, 2b, 2c, etc.
188 .\" -----------------------------------------------------------------
190 .SH USAGE
192 This section describes the available macros for manual pages.
194 For further customization, put additional macros and requests into the
195 file
196 .B man.local
197 which will be loaded immediately after the
198 .B man
199 package.
202 .BI .TH " title section \fB[\fPextra1\fB]\fP \fB[\fPextra2\fB]\fP \fB[\fPextra3\fB]"
203 Set the title of the
204 .I \man\~page
206 .I title
207 and the section to
208 .IR section ,
209 which must take on a value between 1 and\ 8.
211 The value
212 .I section
213 may also have a string appended, e.g. `.pm', to indicate a specific
214 subsection of the
215 .IR \%man\~pages .
216 Both
217 .I title
219 .I section
220 are positioned at the left and right in the header line (with
221 .I section
222 in parentheses immediately appended to
223 .IR title .
224 .I extra1
225 will be positioned in the middle of the footer line.
226 .I extra2
227 will be positioned at the left in the footer line (or at the left on
228 even pages and at the right on odd pages if double-sided printing is
229 active).
230 .I extra3
231 is centered in the header line.
234 For HTML output, headers and footers are completely supressed.
237 Additionally, this macro starts a new page; the new line number is\ 1
238 again (except if the `-rC1' option is given on the command line) --
239 this feature is intended only for formatting multiple
240 .IR \%man\~pages ;
241 a single
242 .I \%man\~page
243 should contain exactly one
244 .B TH
245 macro at the beginning of the file.
248 .BI ".SH [" "text for a heading" ]
249 Set up an unnumbered section heading sticking out to the left.
251 Prints out all the text following
252 .B SH
253 up to the end of the line (or the text in the next input line if there
254 is no argument to
255 .BR SH )
256 in bold face
257 (or the font specified by the string
258 .BR HF ),
259 one size larger than the base document size.
261 Additionally, the left margin and the indentation for the following
262 text is reset to the default values.
265 .BI ".SS [" "text for a heading" ]
266 Set up a secondary, unnumbered section heading.
268 Prints out all the text following
269 .B SS
270 up to the end of the line (or the text in the next input line if there
271 is no argument to
272 .BR SS )
273 in bold face
274 (or the font specified by the string
275 .BR HF ),
276 at the same size as the base document size.
278 Additionally, the left margin and the indentation for the following
279 text is reset to the default values.
282 .BI ".TP [" nnn ]
283 Set up an indented paragraph with label.
285 The indentation is set to
286 .I nnn
287 if that argument is supplied (the default unit is `n' if omitted),
288 otherwise it is set to the previous indentation value specified with
289 .BR TP ,
290 .BR IP ,
292 .B HP
293 (or to the default value if none of them have been used yet).
296 The first input line of text following this macro is interpreted as a
297 string to be printed flush-left, as it is appropriate for a label.
299 It is not interpreted as part of a paragraph, so there is no attempt
300 to fill the first line with text from the following input lines.
302 Nevertheless, if the label is not as wide as the indentation the
303 paragraph starts at the same line (but indented), continuing on the
304 following lines.
306 If the label is wider than the indentation the descriptive part of the
307 paragraph begins on the line following the label, entirely indented.
309 Note that neither font shape nor font size of the label is set to a
310 default value; on the other hand, the rest of the text will have
311 default font settings.
315 .B TP
316 macro is the macro used for the explanations you are just reading.
319 .B .LP
321 .B .PP
323 .B .P
324 These macros are mutual aliases.
326 Any of them causes a line break at the current position, followed by a
327 vertical space downwards by the amount specified by the
328 .B PD
329 macro.
331 The font size and shape are reset to the default value (10pt
332 resp. Roman).
334 Finally, the current left margin and the indentation are restored.
337 .BI ".IP [" designator "] [" nnn ]
338 Set up an indented paragraph, using
339 .I designator
340 as a tag to mark its beginning.
342 The indentation is set to
343 .I nnn
344 if that argument is supplied (the default unit is `n' if omitted),
345 otherwise it is set to the previous indentation value specified with
346 .BR TP ,
347 .BR IP ,
349 .B HP
350 (or to the default value if none of them have been used yet).
352 Font size and face of the paragraph (but not the designator) are reset
353 to its default values.
356 To start an indented paragraph with a particular indentation but
357 without a designator, use `""' (two doublequotes) as the second
358 argument.
361 For example, the following paragraphs were all set up with bullets as
362 the designator, using `.IP\ \\(bu\ 4'.
364 The whole block has been enclosed with `.RS' and `.RE' to set the left
365 margin temporarily to the current indentation value.
368 .IP \(bu 4
369 .B IP
370 is one of the three macros used in the
371 .B man
372 package to format lists.
373 .IP \(bu 4
374 .B HP
375 is another.
377 This macro produces a paragraph with a left hanging indentation.
378 .IP \(bu 4
379 .B TP
380 is another.
382 This macro produces an unindented label followed by an indented
383 paragraph.
387 .BI ".HP [" nnn ]
388 Set up a paragraph with hanging left indentation.
390 The indentation is set to
391 .I nnn
392 if that argument is supplied (the default unit is `n' if omitted),
393 otherwise it is set to the previous indentation value specified with
394 .BR TP ,
395 .BR IP ,
397 .B HP
398 (or to the default value if none of them have been used yet).
400 Font size and face are reset to its default values.
402 The following paragraph illustrates the effect of this macro with
403 hanging indentation set to\ 4 (enclosed by
404 .B .RS
406 .B .RE
407 to set the left margin temporarily to the current indentation):
410 .HP 4
411 This is a paragraph following an invocation of the
412 .B HP
413 macro.
415 As you can see, it produces a paragraph where all lines but the first
416 are indented.
420 .BI ".RS [" nnn ]
421 This macro moves the left margin to the right by the value
422 .I nnn
423 if specified (default unit is `n'); otherwise it is set to the
424 previous indentation value specified with
425 .BR TP ,
426 .BR IP ,
428 .B HP
429 (or to the default value if none of them have been used yet).
431 The indentation value is then set to the default.
434 Calls to the
435 .B RS
436 macro can be nested.
439 .BI ".RE [" nnn ]
440 This macro moves the left margin back to level
441 .IR nnn ,
442 restoring the previous left margin.
444 If no argument is given, it moves one level back.
446 The first level (i.e., no call to
447 .B RS
448 yet) has number\ 1, and each call to
449 .B RS
450 increases the level by\ 1.
453 To summarize, the following macros cause a line break with the
454 insertion of vertical space (which amount can be changed with the
455 .B PD
456 macro):
457 .BR SH ,
458 .BR SS ,
459 .BR TP ,
460 .B LP
461 .RB ( PP ,
462 .BR P ),
463 .BR IP ,
465 .BR HP .
466 The macros
467 .B RS
469 .B RE
470 also cause a break but no insertion of vertical space.
473 .\" -----------------------------------------------------------------
475 .SH "MACROS TO SET FONTS"
477 The standard font is Roman; the default text size is 10\ point.
480 .BI ".SM [" text ]
481 Causes the text on the same line or the text on the next input line to
482 appear in a font that is one point size smaller than the default font.
485 .BI ".SB [" text ]
486 Causes the text on the same line or the text on the next input line to
487 appear in boldface font, one point size smaller than the default font.
490 .BI ".BI " text
491 Causes text on the same line to appear alternately in bold face and
492 italic.
494 The text must be on the same line as the macro call.
496 Thus
499 \&.BI this "word and" that
501 would cause `this' and `that' to appear in bold face, while `word and'
502 appears in italics.
506 .BI ".IB " text
507 Causes text to appear alternately in italic and bold face.
509 The text must be on the same line as the macro call.
512 .BI ".RI " text
513 Causes text on the same line to appear alternately in roman and
514 italic.
516 The text must be on the same line as the macro call.
519 .BI ".IR " text
520 Causes text on the same line to appear alternately in italic and
521 roman.
523 The text must be on the same line as the macro call.
526 .BI ".BR " text
527 Causes text on the same line to appear alternately in bold face and
528 roman.
530 The text must be on the same line as the macro call.
533 .BI ".RB " text
534 Causes text on the same line to appear alternately in roman and bold
535 face.
537 The text must be on the same line as the macro call.
540 .BI ".B [" text ]
541 Causes
542 .I text
543 to appear in bold face.
545 If no text is present on the line where the macro is called the text
546 of the next input line appears in bold face.
549 .BI ".I [" text ]
550 Causes
551 .I text
552 to appear in italic.
554 If no text is present on the line where the macro is called the text
555 of the next input line appears in italic.
558 .\" -----------------------------------------------------------------
560 .SH "MISCELLANEOUS"
562 The default indentation is 7.2n in troff mode and 7n in nroff mode
563 except for
564 .B grohtml
565 which ignores indentation.
568 .B .DT
569 Set tabs every 0.5 inches.
571 Since this macro is always called during a
572 .B TH
573 request, it makes sense to call it only if the tab positions have been
574 changed.
577 .BI ".PD [" nnn ]
578 Adjust the empty space before a new paragraph or section.
580 The optional argument gives the amount of space (default unit is `v');
581 without parameter, the value is reset to its default value (1\ line in
582 nroff mode, 0.4v\ otherwise).
584 This affects the macros
585 .BR SH ,
586 .BR SS ,
587 .BR TP ,
588 .B LP
589 (resp.\&
590 .B PP
592 .BR P ),
593 .BR IP ,
595 .BR HP .
598 .BI ".AT [" system " [" release ]]
599 Alter the footer for use with \f[CR]AT&T\f[]
600 .IR \%man\~pages .
601 This command exists only for compatibility; don't use it.
603 See the
604 .I groff
605 info manual for more.
608 .BI ".UC [" version ]
609 Alter the footer for use with \f[CR]BSD\f[]
610 .IR \%man\~pages .
611 This command exists only for compatibility; don't use it.
613 See the
614 .I groff
615 info manual for more.
618 .B ".PT"
619 Print the header string.
621 Redefine this macro to get control of the header.
624 .B ".BT"
625 Print the footer string.
627 Redefine this macro to get control of the footer.
630 The following strings are defined:
632 .B \e*S
633 Switch back to the default font size.
636 .B \e*R
637 The `registered' sign.
640 .B \e*(Tm
641 The `trademark' sign.
644 .B \e*(lq
646 .B \e*(rq
647 Left and right quote.
649 This is equal to `\e(lq' and `\e(rq', respectively.
652 .B \e*(HF
653 The typeface used to print headings and subheadings.
655 The default is `B'.
658 If a preprocessor like
659 .B @g@tbl
661 .B @g@eqn
662 is needed, it has become usage to make the first line of the
663 .I \%man\~page
664 look like this:
667 .BI .\e"\  word
670 Note the single space character after the double quote.
671 .I word
672 consists of letters for the needed preprocessors: `e' for
673 .BR @g@eqn ,
674 `r' for
675 .BR @g@refer ,
676 and `t' for
677 .BR @g@tbl .
678 Modern implementations of the
679 .B man
680 program read this first line and automatically call the right
681 preprocessor(s).
684 .\" -----------------------------------------------------------------
686 .SH FILES
688 .B man.tmac
690 .B an.tmac
691 These are wrapper files to call
692 .BR andoc.tmac .
694 .B andoc.tmac
695 This file checks whether the
696 .B man
697 macros or the
698 .B mdoc
699 package should be used.
701 .B an-old.tmac
703 .B man
704 macros are contained in this file.
706 .B man.local
707 Local changes and customizations should be put into this file.
710 .\" -----------------------------------------------------------------
712 .SH "SEE ALSO"
714 Since the
715 .B man
716 macros consist of groups of
717 .I groff
718 requests, one can, in principle, supplement the functionality of the
719 .B man
720 macros with individual
721 .I groff
722 requests where necessary.
724 See the
725 .I groff
726 info pages for a complete reference of all requests.
729 .BR @g@tbl (@MAN1EXT@),
730 .BR @g@eqn (@MAN1EXT@),
731 .BR @g@refer (@MAN1EXT@),
732 .BR man (1),
733 .BR man (7),
736 .\" -----------------------------------------------------------------
738 .SH AUTHOR
740 This manual page was originally written for the Debian GNU/Linux
741 system by Susan G. Kleinmann <sgk@debian.org>, corrected and updated
742 by Werner Lemberg <wl@gnu.org>, and is now part of the GNU troff
743 distribution.
745 .\" Local Variables:
746 .\" mode: nroff
747 .\" End: