freebsd-dev/contrib/groff/tmac/groff_man.man

659 lines
15 KiB
Groff
Raw Normal View History

2001-07-10 17:09:00 +00:00
.ig
2003-05-01 13:09:50 +00:00
Copyright (C) 1999-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2000-12-05 18:49:44 +00:00
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.
..
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.de TQ
2003-05-01 13:09:50 +00:00
. br
. ns
. TP \\$1
2000-12-05 18:49:44 +00:00
..
2003-05-01 13:09:50 +00:00
.
.
2000-01-12 09:51:43 +00:00
.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-01-12 09:51:43 +00:00
.SH NAME
.
2000-12-05 18:49:44 +00:00
groff_man \- groff `man' macros to support generation of man pages
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-01-12 09:51:43 +00:00
.SH SYNOPSIS
2000-12-05 18:49:44 +00:00
.
2000-01-12 09:51:43 +00:00
.B groff
2001-04-17 12:12:05 +00:00
.B \-man
[
2002-10-11 08:52:17 +00:00
.IR options .\|.\|.\&
2001-04-17 12:12:05 +00:00
]
[
2002-10-11 08:52:17 +00:00
.IR files .\|.\|.\&
2001-04-17 12:12:05 +00:00
]
.br
.B groff
.B \-m\ man
2000-01-12 09:51:43 +00:00
[
2002-10-11 08:52:17 +00:00
.IR options .\|.\|.\&
2000-01-12 09:51:43 +00:00
]
[
2002-10-11 08:52:17 +00:00
.IR files .\|.\|.\&
2000-01-12 09:51:43 +00:00
]
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-01-12 09:51:43 +00:00
.SH DESCRIPTION
.
2001-04-17 12:12:05 +00:00
The
.B man
macros used to generate man pages with
2000-01-12 09:51:43 +00:00
.I groff
2001-04-17 12:12:05 +00:00
were written by James Clark.
2000-01-12 09:51:43 +00:00
This document provides a brief summary of the use of each macro in that
package.
2000-12-05 18:49:44 +00:00
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-12-05 18:49:44 +00:00
.SH OPTIONS
.
The
.B man
macros understand the following command line options (which define various
registers).
2003-05-01 13:09:50 +00:00
.
2002-10-11 08:52:17 +00:00
.TP
2001-04-17 12:12:05 +00:00
.B \-rcR=1
This option (the default if in nroff mode) will create a single, very long
page instead of multiple pages.
Say
.B \-rcR=0
to disable it.
2003-05-01 13:09:50 +00:00
.
2001-04-17 12:12:05 +00:00
.TP
2000-12-05 18:49:44 +00:00
.B \-rC1
If more than one manual page is given on the command line, number the
pages continuously, rather than starting each at\ 1.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.B \-rD1
Double-sided printing.
Footers for even and odd pages are formatted differently.
2003-05-01 13:09:50 +00:00
.
.TP
.BI \-rFT= dist
Set distance of the footer relative to the bottom of the page if negative
or relative to the top if positive.
The default is -0.5i.
.
.TP
.BI \-rHY= flags
Set hyphenation flags.
.
Possible values are 1\ to hyphenate without restrictions, 2\ to not
hyphenate the last word on a page, 4\ to not hyphenate the last two
characters of a word, and 8\ to not hyphenate the first two characters
of a word.
.
These values are additive; the default is\ 14.
.
.TP
.BI \-rIN= width
Set body text indentation to
.IR width .
The default is 7n for
.IR nroff ,
7.2n for
.IR troff .
For
.IR nroff ,
this value should always be an integer multiple of unit `n' to get
consistent indentation.
.
.TP
.BI \-rLL= line-length
Set line length.
If this option is not given, the line length defaults to 78n in nroff mode
and 6.5i in troff mode.
.
.TP
.BI \-rLT= title-length
Set title length.
If this option is not given, the title length defaults to the line length.
.
2000-12-05 18:49:44 +00:00
.TP
.BI \-rP nnn
Enumeration of pages will start with
.I nnn
rather than with\ 1.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.BI \-rS xx
Base document font size is
.I xx
points
.RI ( xx
can be 10, 11, or\ 12) rather than 10\ points.
2003-05-01 13:09:50 +00:00
.
.TP
.BI \-rSN= width
Set sub-subheading indentation to
.IR width .
The default is 3n.
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI \-rX nnn
After page\ \c
.IR nnn ,
number pages as
.IR nnn a,
.IR nnn b,
.IR nnn c,
etc.
For example, the option `\-rX2' will produce the following page numbers:
1, 2, 2a, 2b, 2c, etc.
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-12-05 18:49:44 +00:00
.SH USAGE
.
This section describes the available macros for manual pages.
For further customization, put additional macros and requests into the file
.B man.local
2001-04-17 12:12:05 +00:00
which will be loaded immediately after the
.B man
package.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ]
2003-05-01 13:09:50 +00:00
Set the title of the man page to
2000-01-12 09:51:43 +00:00
.I title
and the section to
.IR section ,
which must take on a value between 1 and\ 8.
The value
.I section
may also have a string appended, e.g. `.pm', to indicate a specific
subsection of the man pages.
2000-12-05 18:49:44 +00:00
Both
.I title
and
.I section
are positioned at the left and right in the header line (with
.I section
in parentheses immediately appended to
.IR title .
.I extra1
will be positioned in the middle of the footer line.
.I extra2
2003-05-01 13:09:50 +00:00
will be positioned at the left in the footer line (or at the left on
2000-12-05 18:49:44 +00:00
even pages and at the right on odd pages if double-sided printing is
active).
.I extra3
is centered in the header line.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.IP
For HTML output, headers and footers are completely supressed.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.IP
Additionally, this macro starts a new page; the new line number is\ 1 again
(except if the `-rC1' option is given on the command line) -- this feature
is intended only for formatting multiple man pages; a single man page should
contain exactly one
.B TH
macro at the beginning of the file.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI ".SH [" "text for a heading" ]
2003-05-01 13:09:50 +00:00
Set up an unnumbered section heading sticking out to the left.
2000-12-05 18:49:44 +00:00
Prints out all the text following
.B SH
2003-05-01 13:09:50 +00:00
up to the end of the line (or the text in the next input line if there is
2002-10-11 08:52:17 +00:00
no argument to
2000-12-05 18:49:44 +00:00
.BR SH )
2003-05-01 13:09:50 +00:00
in bold face
(or the font specified by the string
.BR HF ),
one size larger than the base document size.
Additionally, the left margin and the indentation for the following text
is reset to the default values.
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI ".SS [" "text for a heading" ]
2003-05-01 13:09:50 +00:00
Set up a secondary, unnumbered section heading.
2000-12-05 18:49:44 +00:00
Prints out all the text following
.B SS
2003-05-01 13:09:50 +00:00
up to the end of the line (or the text in the next input line if there is
2002-10-11 08:52:17 +00:00
no argument to
2000-12-05 18:49:44 +00:00
.BR SS )
2003-05-01 13:09:50 +00:00
in bold face
(or the font specified by the string
.BR HF ),
at the same size as the base document size.
Additionally, the left margin and the indentation for the following text
is reset to the default values.
.
2000-01-12 09:51:43 +00:00
.TP
.BI ".TP [" nnn ]
2003-05-01 13:09:50 +00:00
Set up an indented paragraph with label.
2001-04-17 12:12:05 +00:00
The indentation is set to
2000-01-12 09:51:43 +00:00
.I nnn
2000-12-05 18:49:44 +00:00
if that argument is supplied (the default unit is `n' if omitted), otherwise
2003-05-01 13:09:50 +00:00
it is set to the previous indentation value specified with
.BR TP ,
.BR IP ,
or
.B HP
(or to the default value if none of them have been used yet).
.
.IP
2002-10-11 08:52:17 +00:00
The first input line of text following this macro is interpreted as a string
to be printed flush-left, as it is appropriate for a label.
2000-01-12 09:51:43 +00:00
It is not interpreted as part of a paragraph, so there is no attempt to fill
the first line with text from the following input lines.
2003-05-01 13:09:50 +00:00
Nevertheless, if the label is not as wide as the indentation the
2000-01-12 09:51:43 +00:00
paragraph starts at the same line (but indented), continuing on the
following lines.
2003-05-01 13:09:50 +00:00
If the label is wider than the indentation the descriptive part of the
2000-01-12 09:51:43 +00:00
paragraph begins on the line following the label, entirely indented.
2000-12-05 18:49:44 +00:00
Note that neither font shape nor font size of the label is set to a default
value; on the other hand, the rest of the text will have default font
settings.
2003-05-01 13:09:50 +00:00
.
.IP
2000-12-05 18:49:44 +00:00
The
.B TP
macro is the macro used for the explanations you are just reading.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.B .LP
.TQ
.B .PP
.TQ
.B .P
2000-01-12 09:51:43 +00:00
These macros are mutual aliases.
Any of them causes a line break at the current position, followed by a
2000-12-05 18:49:44 +00:00
vertical space downwards by the amount specified by the
.B PD
macro.
The font size and shape are reset to the default value (10pt resp. Roman).
2003-05-01 13:09:50 +00:00
Finally, the current left margin and the indentation are restored.
.
2000-01-12 09:51:43 +00:00
.TP
.BI ".IP [" designator "] [" nnn ]
2003-05-01 13:09:50 +00:00
Set up an indented paragraph, using
2001-04-17 12:12:05 +00:00
.I designator
2000-01-12 09:51:43 +00:00
as a tag to mark its beginning.
2000-12-05 18:49:44 +00:00
The indentation is set to
2000-01-12 09:51:43 +00:00
.I nnn
2003-05-01 13:09:50 +00:00
if that argument is supplied (the default unit is `n' if omitted), otherwise
it is set to the previous indentation value specified with
.BR TP ,
.BR IP ,
or
.B HP
(or to the default value if none of them have been used yet).
2000-12-05 18:49:44 +00:00
Font size and face of the paragraph (but not the designator) are reset to
its default values.
2003-05-01 13:09:50 +00:00
.
.IP
2000-12-05 18:49:44 +00:00
To start an indented paragraph with a particular indentation but without a
designator, use `""' (two doublequotes) as the second argument.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.IP
For example, the following paragraphs were all set up with bullets as the
2003-05-01 13:09:50 +00:00
designator, using `.IP\ \\(bu\ 4'.
The whole block has been enclosed with `.RS' and `.RE' to set the left
margin temporarily to the current indentation value.
.
2000-12-05 18:49:44 +00:00
.RS
2000-01-12 09:51:43 +00:00
.IP \(bu 4
2000-12-05 18:49:44 +00:00
.B IP
2001-04-17 12:12:05 +00:00
is one of the three macros used in the
.B man
package to format lists.
2000-01-12 09:51:43 +00:00
.IP \(bu 4
2000-12-05 18:49:44 +00:00
.B HP
is another.
2000-01-12 09:51:43 +00:00
This macro produces a paragraph with a left hanging indentation.
.IP \(bu 4
2000-12-05 18:49:44 +00:00
.B TP
is another.
This macro produces an unindented label followed by an indented paragraph.
.RE
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
.BI ".HP [" nnn ]
2003-05-01 13:09:50 +00:00
Set up a paragraph with hanging left indentation.
2000-01-12 09:51:43 +00:00
The indentation is set to
.I nnn
2003-05-01 13:09:50 +00:00
if that argument is supplied (the default unit is `n' if omitted), otherwise
it is set to the previous indentation value specified with
.BR TP ,
.BR IP ,
or
.B HP
(or to the default value if none of them have been used yet).
2000-12-05 18:49:44 +00:00
Font size and face are reset to its default values.
The following paragraph illustrates the effect of this macro with hanging
2003-05-01 13:09:50 +00:00
indentation set to\ 4 (enclosed by `.RS' and `.RE' to set the left margin temporarily to
the current indentation):
.
2000-12-05 18:49:44 +00:00
.RS
.HP 4
This is a paragraph following an invocation of the
.B HP
macro.
2000-01-12 09:51:43 +00:00
As you can see, it produces a paragraph where all lines but the first are
2000-12-05 18:49:44 +00:00
indented.
.RE
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.BI ".RS [" nnn ]
This macro moves the left margin to the right by the value
.I nnn
2003-05-01 13:09:50 +00:00
if specified (default unit is `n'); otherwise it is set to the previous
indentation value specified with
.BR TP ,
.BR IP ,
or
.B HP
(or to the default value if none of them have been used yet).
The indentation value is then set to the default.
.
.IP
2000-12-05 18:49:44 +00:00
Calls to the
.B RS
macro can be nested.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.BI ".RE [" nnn ]
This macro moves the left margin back to level
2003-05-01 13:09:50 +00:00
.IR nnn ,
restoring the previous left margin.
If no argument is given, it moves one level back.
2000-12-05 18:49:44 +00:00
The first level (i.e., no call to
.B RS
yet) has number\ 1, and each call to
.B RS
increases the level by\ 1.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.PP
To summarize, the following macros cause a line break with the insertion of
vertical space (which amount can be changed with the
.B PD
macro):
.BR SH ,
.BR SS ,
.BR TP ,
.B LP
.RB ( PP ,
.BR P ),
.BR IP ,
and
.BR HP .
The macros
.B RS
and
.B RE
also cause a break but no insertion of vertical space.
2003-05-01 13:09:50 +00:00
.
.
.\" -----------------------------------------------------------------
2000-01-12 09:51:43 +00:00
.
.SH "MACROS TO SET FONTS"
.
2000-12-05 18:49:44 +00:00
The standard font is Roman; the default text size is 10\ point.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI ".SM [" text ]
2002-10-11 08:52:17 +00:00
Causes the text on the same line or the text on the next input line to
appear in a font that is one point size smaller than the default font.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI ".SB [" text ]
2002-10-11 08:52:17 +00:00
Causes the text on the same line or the text on the next input line to
appear in boldface font, one point size smaller than the default font.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
.BI ".BI " text
Causes text on the same line to appear alternately in bold face and italic.
The text must be on the same line as the macro call.
2000-12-05 18:49:44 +00:00
Thus
.RS
.IP
\&.BI this "word and" that
.PP
would cause `this' and `that' to appear in bold face, while `word and'
appears in italics.
.RE
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
.BI ".IB " text
Causes text to appear alternately in italic and bold face.
The text must be on the same line as the macro call.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI ".RI " text
Causes text on the same line to appear alternately in roman and italic.
The text must be on the same line as the macro call.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.BI ".IR " text
Causes text on the same line to appear alternately in italic and roman.
The text must be on the same line as the macro call.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
2000-01-12 09:51:43 +00:00
.BI ".BR " text
Causes text on the same line to appear alternately in bold face and roman.
The text must be on the same line as the macro call.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
.BI ".RB " text
Causes text on the same line to appear alternately in roman and bold face.
The text must be on the same line as the macro call.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI ".B [" text ]
Causes
.I text
to appear in bold face.
2003-05-01 13:09:50 +00:00
If no text is present on the line where the macro is called the text
2002-10-11 08:52:17 +00:00
of the next input line appears in bold face.
2003-05-01 13:09:50 +00:00
.
2000-01-12 09:51:43 +00:00
.TP
2000-12-05 18:49:44 +00:00
.BI ".I [" text ]
Causes
.I text
to appear in italic.
2003-05-01 13:09:50 +00:00
If no text is present on the line where the macro is called the text
2002-10-11 08:52:17 +00:00
of the next input line appears in italic.
2000-01-12 09:51:43 +00:00
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-12-05 18:49:44 +00:00
.SH "MISCELLANEOUS"
.
2003-05-01 13:09:50 +00:00
The default indentation is 7.2n in troff mode and 7n in nroff mode except for
2000-12-05 18:49:44 +00:00
.B grohtml
2001-04-17 12:12:05 +00:00
which ignores indentation.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.B .DT
2003-05-01 13:09:50 +00:00
Set tabs every 0.5 inches.
2000-12-05 18:49:44 +00:00
Since this macro is always called during a
.B TH
request, it makes sense to call it only if the tab positions have been
changed.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.BI ".PD [" nnn ]
2003-05-01 13:09:50 +00:00
Adjust the empty space before a new paragraph or section.
The optional argument gives the amount of space (default unit is `v');
without parameter, the value is reset to its default value (1\ line in
nroff mode, 0.4v\ otherwise).
2000-12-05 18:49:44 +00:00
This affects the macros
.BR SH ,
.BR SS ,
.BR TP ,
.B LP
(resp.\&
.B PP
and
.BR P ),
.BR IP ,
and
.BR HP .
2003-05-01 13:09:50 +00:00
.
.TP
.BI ".AT [" system " [" release ]]
Alter the footer for use with AT&T manpages.
This command exists only for compatibility; don't use it.
See the groff info manual for more.
.
.TP
.BI ".UC [" version ]
Alter the footer for use with BSD manpages.
This command exists only for compatibility; don't use it.
See the groff info manual for more.
.
.TP
.B ".PT"
Print the header string.
Redefine this macro to get control of the header.
.
.TP
.B ".BT"
Print the footer string.
Redefine this macro to get control of the footer.
.
2000-12-05 18:49:44 +00:00
.PP
The following strings are defined:
.TP
.B \e*S
Switch back to the default font size.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.B \e*R
The `registered' sign.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.B \e*(Tm
The `trademark' sign.
2003-05-01 13:09:50 +00:00
.
2000-12-05 18:49:44 +00:00
.TP
.B \e*(lq
.TQ
.B \e*(rq
Left and right quote.
This is equal to `\e(lq' and `\e(rq', respectively.
2003-05-01 13:09:50 +00:00
.
.TP
.B \e*(HF
The typeface used to print headings and subheadings.
The default is `B'.
.
2000-12-05 18:49:44 +00:00
.PP
If a preprocessor like
.B @g@tbl
or
.B @g@eqn
is needed, it has become usage to make the first line of the man page look
like this:
.PP
.RS
.BI .\e"\ word
.RE
.PP
Note the single space character after the double quote.
.I word
consists of letters for the needed preprocessors: `e' for
.BR @g@eqn ,
`r' for
.BR @g@refer ,
and `t' for
.BR @g@tbl .
Modern implementations of the
.B man
program read this first line and automatically call the right
preprocessor(s).
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2001-04-17 12:12:05 +00:00
.SH FILES
.TP
.B man.tmac
.TQ
.B an.tmac
These are wrapper files to call
.BR andoc.tmac .
.TP
.B andoc.tmac
This file checks whether the
.B man
macros or the
.B mdoc
package should be used.
.TP
.B an-old.tmac
All
.B man
macros are contained in this file.
.TP
.B man.local
Local changes and customizations should be put into this file.
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-01-12 09:51:43 +00:00
.SH "SEE ALSO"
.
2001-04-17 12:12:05 +00:00
Since the
.B man
macros consist of groups of
.I groff
2000-01-12 09:51:43 +00:00
requests, one can, in principle, supplement the functionality of the
2001-04-17 12:12:05 +00:00
.B man
macros with individual
2000-01-12 09:51:43 +00:00
.I groff
requests where necessary.
2003-05-01 13:09:50 +00:00
See the groff info pages for a complete reference of all requests.
.
2000-12-05 18:49:44 +00:00
.PP
.BR @g@tbl (@MAN1EXT@),
.BR @g@eqn (@MAN1EXT@),
.BR @g@refer (@MAN1EXT@),
.BR man (1)
2000-01-12 09:51:43 +00:00
.
2003-05-01 13:09:50 +00:00
.
.\" -----------------------------------------------------------------
.
2000-01-12 09:51:43 +00:00
.SH AUTHOR
.
This manual page was originally written for the Debian GNU/Linux system by
2000-12-05 18:49:44 +00:00
Susan G. Kleinmann <sgk@debian.org>, corrected and updated by Werner Lemberg
2000-01-12 09:51:43 +00:00
<wl@gnu.org>, and is now part of the GNU troff distribution.
2001-07-10 17:09:00 +00:00
.
.\" Local Variables:
.\" mode: nroff
.\" End: