summaryrefslogtreecommitdiff
path: root/tmac/groff_man.man
diff options
context:
space:
mode:
authorwlemb <wlemb>2000-03-06 10:15:38 +0000
committerwlemb <wlemb>2000-03-06 10:15:38 +0000
commitd270572873db642035b7a2e46ad2aba5949da9cb (patch)
treee6bf29cda0471ec99107bf819f45684115f834b3 /tmac/groff_man.man
parent86b61390948e71e64695eb7cae08771d5622ba55 (diff)
downloadgroff-d270572873db642035b7a2e46ad2aba5949da9cb.tar.gz
* tmac/groff_man.man: Completely revised to cover everything in
tmac.an. Adding a request `evc' to copy environments. * src/roff/troff/env.cc (environment::copy, environment_copy): Implement it. * src/roff/troff/env.h: Add prototype. Adding strsep() -- Solaris 8 doesn't have it. * configure.in: Test it. * src/devices/grolbp/lbp.cc: Add code. * NEWS, PROJECTS: Updated.
Diffstat (limited to 'tmac/groff_man.man')
-rw-r--r--tmac/groff_man.man209
1 files changed, 174 insertions, 35 deletions
diff --git a/tmac/groff_man.man b/tmac/groff_man.man
index 57eb9ec4..1048e43f 100644
--- a/tmac/groff_man.man
+++ b/tmac/groff_man.man
@@ -1,9 +1,16 @@
+.de TQ
+.br
+.ns
+.TP \\$1
+..
.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
.
.SH NAME
.
groff_man \- groff `an' macros to support generation of man pages
+.
.SH SYNOPSIS
+.
.B groff
.B \-m@TMAC_AN_PREFIX@an
[
@@ -22,8 +29,47 @@ macros used to generate man pages with
were written by James Clark.
This document provides a brief summary of the use of each macro in that
package.
+.
+.SH OPTIONS
+.
+The
+.B man
+macros understand the following command line options (which define various
+registers).
+.TP
+.B \-rC1
+If more than one manual page is given on the command line, number the
+pages continuously, rather than starting each at\ 1.
+.TP
+.B \-rD1
+Double-sided printing.
+Footers for even and odd pages look different.
+.TP
+.BI \-rP nnn
+Enumeration of pages will start with
+.I nnn
+rather than with\ 1.
+.TP
+.BI \-rX nnn
+After page
+.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.
+.
+.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
+which will be loaded immediately after
+.BR tmac.an .
.TP
-.BI .TP " title section " [ extra1 "] [" extra2 "] [" extra3 ]
+.BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ]
Sets the title of the man page to
.I title
and the section to
@@ -34,21 +80,28 @@ The value
may also have a string appended, e.g. `.pm', to indicate a specific
subsection of the man pages.
.TP
-.BI .SH " text for a heading"
-Sets up an unindented and unnumbered section heading.
-Prints out all the text following `.SH' up to the end of the line in bold
-face, with a size slightly smaller than that for indented section headings.
+.BI ".SH [" "text for a heading" ]
+Sets up an unnumbered section heading sticking out to the left.
+Prints out all the text following `.SH' up to the end of the line (resp. the
+text in the next line if there is no argument to `.SH') in bold face, at a
+default size of 9\ point.
+Additionally, the left margin for the following text is reset to its default
+value.
.TP
-.BI .SS " text for a heading"
-Sets up an indented section heading.
-Prints out all the text following `.SS' up to the end of the line in bold
-face, with a size slightly larger than that for unindented section headings.
+.BI ".SS [" "text for a heading" ]
+Sets up an unnumbered section heading.
+Prints out all the text following `.SS' up to the end of the line (resp. the
+text in the next line if there is no argument to `.SS') in bold face, at a
+default size of 10\ point.
+Additionally, the left margin for the following text is reset to its default
+value.
.TP
.BI ".TP [" nnn ]
-Sets up an indented paragraph.
+Sets up an indented paragraph with label.
The indentation is set to
.I nnn
-if that argument is supplied.
+if that argument is supplied (the default unit is `n' if omitted), otherwise
+it is set to the default indentation value.
The first line of text following this macro is interpreted as a string to be
printed flush-left, as it is appropriate for a label.
It is not interpreted as part of a paragraph, so there is no attempt to fill
@@ -58,26 +111,38 @@ paragraph starts at the same line (but indented), continuing on the
following lines.
If the label is wider than the indentation, then the descriptive part of the
paragraph begins on the line following the label, entirely indented.
+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.
The `.TP' macro is the macro used for the explanations you are just reading.
.TP
-.BR ".LP " or " .PP " or " .P"
+.B .LP
+.TQ
+.B .PP
+.TQ
+.B .P
These macros are mutual aliases.
Any of them causes a line break at the current position, followed by a
-vertical space downwards by the amount that is set in the `PD' counter.
+vertical space downwards by the amount specified by the `PD' macro.
+The font size and shape are reset to the default value (10pt resp. Roman).
+Finally, the current left margin is restored.
.TP
.BI ".IP [" designator "] [" nnn ]
Sets up an indented paragraph, using
.I designator
as a tag to mark its beginning.
-The indentation is permanently set to
+The indentation is set to
.I nnn
-if that argument is supplied.
-To set the indentation back to the previous level, one must call some other
-macro that uses indented paragraphs, and explicitly provide it with the
-value of the previous indentation.
+if that argument is supplied (default unit is `n'), otherwise the default
+indentation value is used.
+Font size and face of the paragraph (but not the designator) are reset to
+its default values.
+To start an indented paragraph with a particular indentation but without a
+designator, use `""' (two doublequotes) as the second argument.
.IP
For example, the following paragraphs were all set up with bullets as the
-designator, using `.IP \\(bu 4':
+designator, using `.IP\ \\(bu\ 4':
+.RS
.IP \(bu 4
`IP' is one of the three macros used in
.B tmac.an
@@ -87,43 +152,69 @@ to format lists.
This macro produces a paragraph with a left hanging indentation.
.IP \(bu 4
`TP' is another.
-This macro produces an unindented label (given by the text on the first line
-following `TP'), followed by an indented paragraph with appropriately
-descriptive text.
+This macro produces an unindented label followed by an indented paragraph.
+.RE
.TP
.BI ".HP [" nnn ]
-Sets up paragraphs with hanging left indentation.
+Sets up a paragraph with hanging left indentation.
The indentation is set to
.I nnn
-if that argument is supplied.
-The following pargraph illustrates the effect of this macro with the hanging
-indentation set to\ 2:
-.HP 2
-This is a pagraph following an invocation of the `.HP' macro.
+if that argument is supplied (default unit is `n'), otherwise the default
+indentation value is used.
+Font size and face are reset to its default values.
+The following paragraph illustrates the effect of this macro with hanging
+indentation set to\ 4:
+.RS
+.HP 4
+This is a paragraph following an invocation of the `.HP' macro.
As you can see, it produces a paragraph where all lines but the first are
flushed right and are shorter than the preceding lines.
+.RE
+.TP
+.BI ".RS [" nnn ]
+This macro moves the left margin to the right by the value
+.I nnn
+if specified (default unit is `n'); otherwise the default indentation value
+is used.
+Calls to the `RS' macro can be nested.
+.TP
+.BI ".RE [" nnn ]
+This macro moves the left margin back to level
+.IR nnn ;
+if no argument is given, it moves one level back.
+The first level (i.e., no call to `RS' yet) has number\ 1, and each call to
+`RS' increases the level by\ 1.
.
.SH "MACROS TO SET FONTS"
.
+The standard font is Roman; the default text size is 10 point.
.TP
-.BI .SM
+.BI ".SM [" text ]
Causes the text on the same line or the text on the next line to appear in a
font that is one point size smaller than the default font.
.TP
-.BI .SB
+.BI ".SB [" text ]
Causes the text on the same line or the text on the next line to appear in
-small boldface font.
+boldface font, one point size smaller than the default font.
.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.
-Thus `.BI this word and that' would cause `this' and `and' to appear in bold
-face, while `word' and `that' appear in italics.
+Thus `.BI this "word and" that' would cause `this' and `that' to appear in
+bold face, while `word and' appears in italics.
.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.
.TP
+.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.
+.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.
+.TP
.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.
@@ -139,16 +230,64 @@ of the next line appears in roman.
This is the default font to which text is returned at the end of processing
of the other macros.
.TP
-.BI ".B " text
+.BI ".B [" text ]
Causes text to appear in bold face.
If no text is present on the line where the macro is called, then the text
of the next line appears in bold face.
.TP
-.BI ".I " text
+.BI ".I [" text ]
Causes text to appear in italic.
If no text is present on the line where the macro is called, then the text
of the next line appears in italic.
.
+.SH "MISCELLANEOUS"
+.
+The default indentation is 7.2n for all output devices except for
+.B grohtml
+which uses 1.2i instead.
+.TP
+.B .DT
+Sets tabs every 0.5 inches.
+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.
+.TP
+.BI ".PD [" nnn ]
+Adjusts the empty space before a new paragraph (resp. section).
+The optional argument gives the amount of space (default units are `v');
+without parameter, the value is reset to its default value (1 line for tty
+devices, 0.4v otherwise).
+This affects the macros
+.BR SH ,
+.BR SS ,
+.BR TP ,
+.B LP
+(resp.\&
+.B PP
+and
+.BR P ),
+.BR IP ,
+and
+.BR HP .
+.PP
+The following strings are defined:
+.TP
+.B \e*S
+Switch back to the default font size.
+.TP
+.B \e*R
+The `registered' sign.
+.TP
+.B \e*(Tm
+The `trademark' sign.
+.TP
+.B \e*(lq
+.TQ
+.B \e*(rq
+Left and right quote.
+This is equal to `\e(lq' and `\e(rq', respectively.
+.
.SH "SEE ALSO"
.
Since the