groff_man.man revision 104862
1281168Spfg.ig
291586SmarkmCopyright (C) 1999-2000, 2001, 2002 Free Software Foundation, Inc.
391586Smarkm
491586SmarkmPermission is granted to make and distribute verbatim copies of
591586Smarkmthis manual provided the copyright notice and this permission notice
691586Smarkmare preserved on all copies.
791586Smarkm
891586SmarkmPermission is granted to copy and distribute modified versions of this
991586Smarkmmanual under the conditions for verbatim copying, provided that the
1091586Smarkmentire resulting derived work is distributed under the terms of a
1191586Smarkmpermission notice identical to this one.
1291586Smarkm
1391586SmarkmPermission is granted to copy and distribute translations of this
1491586Smarkmmanual into another language, under the above conditions for modified
1591586Smarkmversions, except that this permission notice may be included in
1691586Smarkmtranslations approved by the Free Software Foundation instead of in
1791586Smarkmthe original English.
1891586Smarkm..
1991586Smarkm.de TQ
2091586Smarkm.br
2191586Smarkm.ns
2291586Smarkm.TP \\$1
2391586Smarkm..
2491586Smarkm.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
2591586Smarkm.
2691586Smarkm.SH NAME
2791586Smarkm.
2891586Smarkmgroff_man \- groff `man' macros to support generation of man pages
2991586Smarkm.
3091586Smarkm.SH SYNOPSIS
3191586Smarkm.
32281168Spfg.B groff
33281168Spfg.B \-man
3491586Smarkm[
3591586Smarkm.IR options .\|.\|.\&
3691586Smarkm]
3791586Smarkm[
3891586Smarkm.IR files .\|.\|.\&
3991586Smarkm]
4091586Smarkm.br
4191586Smarkm.B groff
4291586Smarkm.B \-m\ man
4391586Smarkm[
4491586Smarkm.IR options .\|.\|.\&
4591586Smarkm]
4691586Smarkm[
4791586Smarkm.IR files .\|.\|.\&
4891586Smarkm]
4991586Smarkm.
5091586Smarkm.SH DESCRIPTION
5191586Smarkm.
5291586SmarkmThe
5391586Smarkm.B man
5491586Smarkmmacros used to generate man pages with
5591586Smarkm.I groff
56were written by James Clark.
57This document provides a brief summary of the use of each macro in that
58package.
59.
60.SH OPTIONS
61.
62The
63.B man
64macros understand the following command line options (which define various
65registers).
66.TP
67.BI \-rLL= line-length
68Set line length.
69If this option is not given, the line length defaults to 78n in nroff mode
70and 6.5i in troff mode.
71.TP
72.BI \-rLT= title-length
73Set title length.
74If this option is not given, the title length defaults to 78n in nroff mode
75and 6.5i in troff mode.
76.TP
77.B \-rcR=1
78This option (the default if in nroff mode) will create a single, very long
79page instead of multiple pages.
80Say
81.B \-rcR=0
82to disable it.
83.TP
84.B \-rC1
85If more than one manual page is given on the command line, number the
86pages continuously, rather than starting each at\ 1.
87.TP
88.B \-rD1
89Double-sided printing.
90Footers for even and odd pages are formatted differently.
91.TP
92.BI \-rP nnn
93Enumeration of pages will start with
94.I nnn
95rather than with\ 1.
96.TP
97.BI \-rS xx
98Base document font size is
99.I xx
100points
101.RI ( xx
102can be 10, 11, or\ 12) rather than 10\ points.
103.TP
104.BI \-rX nnn
105After page\ \c
106.IR nnn ,
107number pages as
108.IR nnn a,
109.IR nnn b,
110.IR nnn c,
111etc.
112For example, the option `\-rX2' will produce the following page numbers:
1131, 2, 2a, 2b, 2c, etc.
114.
115.SH USAGE
116.
117This section describes the available macros for manual pages.
118For further customization, put additional macros and requests into the file
119.B man.local
120which will be loaded immediately after the
121.B man
122package.
123.TP
124.BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ]
125Sets the title of the man page to
126.I title
127and the section to
128.IR section ,
129which must take on a value between 1 and\ 8.
130The value
131.I section
132may also have a string appended, e.g. `.pm', to indicate a specific
133subsection of the man pages.
134Both
135.I title
136and
137.I section
138are positioned at the left and right in the header line (with
139.I section
140in parentheses immediately appended to
141.IR title .
142.I extra1
143will be positioned in the middle of the footer line.
144.I extra2
145will be positioned at the left in the footer line (resp. at the left on
146even pages and at the right on odd pages if double-sided printing is
147active).
148.I extra3
149is centered in the header line.
150.IP
151For HTML output, headers and footers are completely supressed.
152.IP
153Additionally, this macro starts a new page; the new line number is\ 1 again
154(except if the `-rC1' option is given on the command line) -- this feature
155is intended only for formatting multiple man pages; a single man page should
156contain exactly one
157.B TH
158macro at the beginning of the file.
159.TP
160.BI ".SH [" "text for a heading" ]
161Sets up an unnumbered section heading sticking out to the left.
162Prints out all the text following
163.B SH
164up to the end of the line (resp. the text in the next input line if there is
165no argument to
166.BR SH )
167in bold face, one size larger than the base document size.
168Additionally, the left margin for the following text is reset to its default
169value.
170.TP
171.BI ".SS [" "text for a heading" ]
172Sets up an secondary, unnumbered section heading.
173Prints out all the text following
174.B SS
175up to the end of the line (resp. the text in the next input line if there is
176no argument to
177.BR SS )
178in bold face, at the same size as the base document size.
179Additionally, the left margin for the following text is reset to its default
180value.
181.TP
182.BI ".TP [" nnn ]
183Sets up an indented paragraph with label.
184The indentation is set to
185.I nnn
186if that argument is supplied (the default unit is `n' if omitted), otherwise
187it is set to the default indentation value.
188The first input line of text following this macro is interpreted as a string
189to be printed flush-left, as it is appropriate for a label.
190It is not interpreted as part of a paragraph, so there is no attempt to fill
191the first line with text from the following input lines.
192Nevertheless, if the label is not as wide as the indentation, then the
193paragraph starts at the same line (but indented), continuing on the
194following lines.
195If the label is wider than the indentation, then the descriptive part of the
196paragraph begins on the line following the label, entirely indented.
197Note that neither font shape nor font size of the label is set to a default
198value; on the other hand, the rest of the text will have default font
199settings.
200The
201.B TP
202macro is the macro used for the explanations you are just reading.
203.TP
204.B .LP
205.TQ
206.B .PP
207.TQ
208.B .P
209These macros are mutual aliases.
210Any of them causes a line break at the current position, followed by a
211vertical space downwards by the amount specified by the
212.B PD
213macro.
214The font size and shape are reset to the default value (10pt resp. Roman).
215Finally, the current left margin is restored.
216.TP
217.BI ".IP [" designator "] [" nnn ]
218Sets up an indented paragraph, using
219.I designator
220as a tag to mark its beginning.
221The indentation is set to
222.I nnn
223if that argument is supplied (default unit is `n'), otherwise the default
224indentation value is used.
225Font size and face of the paragraph (but not the designator) are reset to
226its default values.
227To start an indented paragraph with a particular indentation but without a
228designator, use `""' (two doublequotes) as the second argument.
229.IP
230For example, the following paragraphs were all set up with bullets as the
231designator, using `.IP\ \\(bu\ 4':
232.RS
233.IP \(bu 4
234.B IP
235is one of the three macros used in the
236.B man
237package to format lists.
238.IP \(bu 4
239.B HP
240is another.
241This macro produces a paragraph with a left hanging indentation.
242.IP \(bu 4
243.B TP
244is another.
245This macro produces an unindented label followed by an indented paragraph.
246.RE
247.TP
248.BI ".HP [" nnn ]
249Sets up a paragraph with hanging left indentation.
250The indentation is set to
251.I nnn
252if that argument is supplied (default unit is `n'), otherwise the default
253indentation value is used.
254Font size and face are reset to its default values.
255The following paragraph illustrates the effect of this macro with hanging
256indentation set to\ 4:
257.RS
258.HP 4
259This is a paragraph following an invocation of the
260.B HP
261macro.
262As you can see, it produces a paragraph where all lines but the first are
263indented.
264.RE
265.TP
266.BI ".RS [" nnn ]
267This macro moves the left margin to the right by the value
268.I nnn
269if specified (default unit is `n'); otherwise the default indentation value
270is used.
271Calls to the
272.B RS
273macro can be nested.
274.TP
275.BI ".RE [" nnn ]
276This macro moves the left margin back to level
277.IR nnn ;
278if no argument is given, it moves one level back.
279The first level (i.e., no call to
280.B RS
281yet) has number\ 1, and each call to
282.B RS
283increases the level by\ 1.
284.PP
285To summarize, the following macros cause a line break with the insertion of
286vertical space (which amount can be changed with the
287.B PD
288macro):
289.BR SH ,
290.BR SS ,
291.BR TP ,
292.B LP
293.RB ( PP ,
294.BR P ),
295.BR IP ,
296and
297.BR HP .
298The macros
299.B RS
300and
301.B RE
302also cause a break but no insertion of vertical space.
303Finally, the macros
304.BR SH ,
305.BR SS ,
306.B LP
307.RB ( PP ,
308.BR P ),
309and
310.B RS
311reset the indentation to its default value.
312.
313.SH "MACROS TO SET FONTS"
314.
315The standard font is Roman; the default text size is 10\ point.
316.TP
317.BI ".SM [" text ]
318Causes the text on the same line or the text on the next input line to
319appear in a font that is one point size smaller than the default font.
320.TP
321.BI ".SB [" text ]
322Causes the text on the same line or the text on the next input line to
323appear in boldface font, one point size smaller than the default font.
324.TP
325.BI ".BI " text
326Causes text on the same line to appear alternately in bold face and italic.
327The text must be on the same line as the macro call.
328Thus
329.RS
330.IP
331\&.BI this "word and" that
332.PP
333would cause `this' and `that' to appear in bold face, while `word and'
334appears in italics.
335.RE
336.TP
337.BI ".IB " text
338Causes text to appear alternately in italic and bold face.
339The text must be on the same line as the macro call.
340.TP
341.BI ".RI " text
342Causes text on the same line to appear alternately in roman and italic.
343The text must be on the same line as the macro call.
344.TP
345.BI ".IR " text
346Causes text on the same line to appear alternately in italic and roman.
347The text must be on the same line as the macro call.
348.TP
349.BI ".BR " text
350Causes text on the same line to appear alternately in bold face and roman.
351The text must be on the same line as the macro call.
352.TP
353.BI ".RB " text
354Causes text on the same line to appear alternately in roman and bold face.
355The text must be on the same line as the macro call.
356.TP
357.BI ".B [" text ]
358Causes
359.I text
360to appear in bold face.
361If no text is present on the line where the macro is called, then the text
362of the next input line appears in bold face.
363.TP
364.BI ".I [" text ]
365Causes
366.I text
367to appear in italic.
368If no text is present on the line where the macro is called, then the text
369of the next input line appears in italic.
370.
371.SH "MISCELLANEOUS"
372.
373The default indentation is 7.2n for all output devices except for
374.B grohtml
375which ignores indentation.
376.TP
377.B .DT
378Sets tabs every 0.5 inches.
379Since this macro is always called during a
380.B TH
381request, it makes sense to call it only if the tab positions have been
382changed.
383.TP
384.BI ".PD [" nnn ]
385Adjusts the empty space before a new paragraph (resp. section).
386The optional argument gives the amount of space (default units are `v');
387without parameter, the value is reset to its default value (1\ line for tty
388devices, 0.4v\ otherwise).
389This affects the macros
390.BR SH ,
391.BR SS ,
392.BR TP ,
393.B LP
394(resp.\&
395.B PP
396and
397.BR P ),
398.BR IP ,
399and
400.BR HP .
401.PP
402The following strings are defined:
403.TP
404.B \e*S
405Switch back to the default font size.
406.TP
407.B \e*R
408The `registered' sign.
409.TP
410.B \e*(Tm
411The `trademark' sign.
412.TP
413.B \e*(lq
414.TQ
415.B \e*(rq
416Left and right quote.
417This is equal to `\e(lq' and `\e(rq', respectively.
418.PP
419If a preprocessor like
420.B @g@tbl
421or
422.B @g@eqn
423is needed, it has become usage to make the first line of the man page look
424like this:
425.PP
426.RS
427.BI .\e"\  word
428.RE
429.PP
430Note the single space character after the double quote.
431.I word
432consists of letters for the needed preprocessors: `e' for
433.BR @g@eqn ,
434`r' for
435.BR @g@refer ,
436and `t' for
437.BR @g@tbl .
438Modern implementations of the
439.B man
440program read this first line and automatically call the right
441preprocessor(s).
442.
443.SH FILES
444.TP
445.B man.tmac
446.TQ
447.B an.tmac
448These are wrapper files to call
449.BR andoc.tmac .
450.TP
451.B andoc.tmac
452This file checks whether the
453.B man
454macros or the
455.B mdoc
456package should be used.
457.TP
458.B an-old.tmac
459All
460.B man
461macros are contained in this file.
462.TP
463.B man.local
464Local changes and customizations should be put into this file.
465.
466.SH "SEE ALSO"
467.
468Since the
469.B man
470macros consist of groups of
471.I groff
472requests, one can, in principle, supplement the functionality of the
473.B man
474macros with individual
475.I groff
476requests where necessary.
477A complete list of these requests is available on the WWW at
478.PP
479.ce 1
480http://www.cs.pdx.edu/~trent/gnu/groff/groff_toc.html
481.PP
482.BR @g@tbl (@MAN1EXT@),
483.BR @g@eqn (@MAN1EXT@),
484.BR @g@refer (@MAN1EXT@),
485.BR man (1)
486.
487.SH AUTHOR
488.
489This manual page was originally written for the Debian GNU/Linux system by
490Susan G. Kleinmann <sgk@debian.org>, corrected and updated by Werner Lemberg
491<wl@gnu.org>, and is now part of the GNU troff distribution.
492.
493.\" Local Variables:
494.\" mode: nroff
495.\" End:
496