* Imakefile replaced with Imakefile.in
[s-roff.git] / tmac / groff_man.man
blob57eb9ec4555b96f9a65c7b09bdeacf4df2d7213b
1 .TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
3 .SH NAME
5 groff_man \- groff `an' macros to support generation of man pages
6 .SH SYNOPSIS
7 .B groff
8 .B \-m@TMAC_AN_PREFIX@an
10 .IR options .\|.\|.
13 .IR files .\|.\|.
16 .SH DESCRIPTION
18 The 
19 .B tmac.an 
20 macros used to generate man pages with 
21 .I groff
22 were written by James Clark.  
23 This document provides a brief summary of the use of each macro in that
24 package.
25 .TP
26 .BI .TP " title section " [ extra1 "] [" extra2 "] [" extra3 ]
27 Sets the title of the man page to 
28 .I title
29 and the section to
30 .IR section ,
31 which must take on a value between 1 and\ 8.
32 The value
33 .I section
34 may also have a string appended, e.g. `.pm', to indicate a specific
35 subsection of the man pages.
36 .TP
37 .BI .SH " text for a heading"
38 Sets up an unindented and unnumbered section heading.
39 Prints out all the text following `.SH' up to the end of the line in bold
40 face, with a size slightly smaller than that for indented section headings.
41 .TP
42 .BI .SS " text for a heading"
43 Sets up an indented section heading.
44 Prints out all the text following `.SS' up to the end of the line in bold
45 face, with a size slightly larger than that for unindented section headings.
46 .TP
47 .BI ".TP [" nnn ]
48 Sets up an indented paragraph.
49 The indentation is set to 
50 .I nnn
51 if that argument is supplied.
52 The first line of text following this macro is interpreted as a string to be
53 printed flush-left, as it is appropriate for a label.
54 It is not interpreted as part of a paragraph, so there is no attempt to fill
55 the first line with text from the following input lines.
56 Nevertheless, if the label is not as wide as the indentation, then the
57 paragraph starts at the same line (but indented), continuing on the
58 following lines.
59 If the label is wider than the indentation, then the descriptive part of the
60 paragraph begins on the line following the label, entirely indented.
61 The `.TP' macro is the macro used for the explanations you are just reading.
62 .TP
63 .BR ".LP " or " .PP " or " .P"
64 These macros are mutual aliases.
65 Any of them causes a line break at the current position, followed by a
66 vertical space downwards by the amount that is set in the `PD' counter.
67 .TP
68 .BI ".IP [" designator "] [" nnn ]
69 Sets up an indented paragraph, using 
70 .I designator 
71 as a tag to mark its beginning.
72 The indentation is permanently set to
73 .I nnn
74 if that argument is supplied.
75 To set the indentation back to the previous level, one must call some other
76 macro that uses indented paragraphs, and explicitly provide it with the
77 value of the previous indentation.
78 .IP
79 For example, the following paragraphs were all set up with bullets as the
80 designator, using `.IP \\(bu 4':
81 .IP \(bu 4
82 `IP' is one of the three macros used in 
83 .B tmac.an
84 to format lists.
85 .IP \(bu 4
86 `HP' is another.
87 This macro produces a paragraph with a left hanging indentation.
88 .IP \(bu 4
89 `TP' is another.
90 This macro produces an unindented label (given by the text on the first line
91 following `TP'), followed by an indented paragraph with appropriately
92 descriptive text.
93 .TP
94 .BI ".HP [" nnn ]
95 Sets up paragraphs with hanging left indentation.
96 The indentation is set to
97 .I nnn
98 if that argument is supplied.
99 The following pargraph illustrates the effect of this macro with the hanging
100 indentation set to\ 2:
101 .HP 2
102 This is a pagraph following an invocation of the `.HP' macro.
103 As you can see, it produces a paragraph where all lines but the first are
104 flushed right and are shorter than the preceding lines.
106 .SH "MACROS TO SET FONTS"
109 .BI .SM 
110 Causes the text on the same line or the text on the next line to appear in a
111 font that is one point size smaller than the default font.
113 .BI .SB 
114 Causes the text on the same line or the text on the next line to appear in
115 small boldface font.
117 .BI ".BI " text
118 Causes text on the same line to appear alternately in bold face and italic.
119 The text must be on the same line as the macro call.
120 Thus `.BI this word and that' would cause `this' and `and' to appear in bold
121 face, while `word' and `that' appear in italics.
123 .BI ".IB " text
124 Causes text to appear alternately in italic and bold face.
125 The text must be on the same line as the macro call.
127 .BI ".BR " text
128 Causes text on the same line to appear alternately in bold face and roman.
129 The text must be on the same line as the macro call.
131 .BI ".RB " text
132 Causes text on the same line to appear alternately in roman and bold face.
133 The text must be on the same line as the macro call.
135 .BI ".R " text
136 Causes text to appear in roman font.
137 If no text is present on the line where the macro is called, then the text
138 of the next line appears in roman.
139 This is the default font to which text is returned at the end of processing
140 of the other macros.
142 .BI ".B " text
143 Causes text to appear in bold face.
144 If no text is present on the line where the macro is called, then the text
145 of the next line appears in bold face.
147 .BI ".I " text
148 Causes text to appear in italic.
149 If no text is present on the line where the macro is called, then the text
150 of the next line appears in italic.
152 .SH "SEE ALSO"
154 Since the 
155 .B tmac.an
156 macros consist of groups of 
157 .I groff 
158 requests, one can, in principle, supplement the functionality of the
159 .B tmac.an
160 macros with individual 
161 .I groff
162 requests where necessary.
163 A complete list of these requests is available on the WWW at
164 .ce 1
165 http://www.cs.pdx.edu/~trent/gnu/groff/groff_toc.html
167 .SH AUTHOR
169 This manual page was originally written for the Debian GNU/Linux system by
170 Susan G. Kleinmann <sgk@debian.org>, corrected by Werner Lemberg
171 <wl@gnu.org>, and is now part of the GNU troff distribution.