www.delorie.com/gnu/docs/groff/groff_36.html   search  
 
Buy GNU books!


The GNU Troff Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1.2 Usage

This section describes the available macros for manual pages. For further customization, put additional macros and requests into the file `man.local' which is loaded immediately after the `man' package.

Macro: .TH title section [{extra1
Set the title of the man page to title and the section to section, which must have a value between 1 and 8. The value of section may also have a string appended, e.g. `.pm', to indicate a specific subsection of the man pages.

Both title and section are positioned at the left and right in the header line (with section in parentheses immediately appended to title. extra1 is positioned in the middle of the footer line. extra2 is positioned at the left in the footer line (or at the left on even pages and at the right on odd pages if double-sided printing is active). extra3 is centered in the header line.

For HTML output, headers and footers are completely suppressed.

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 TH macro at the beginning of the file.

Macro: .SH [{heading
Set up an unnumbered section heading sticking out to the left. Prints out all the text following SH up to the end of the line (or the text in the next line if there is no argument to SH) in bold face, one size larger than the base document size. Additionally, the left margin for the following text is reset to its default value.

Macro: .SS [{heading
Set up an unnumbered (sub)section heading. Prints out all the text following SS up to the end of the line (or the text in the next line if there is no argument to SS) in bold face, at the same size as the base document size. Additionally, the left margin for the following text is reset to its default value.

Macro: .TP [{nnn
Set up an indented paragraph with label. The indentation is set to nnn 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 the first line with text from the following input lines. Nevertheless, if the label is not as wide as the indentation, then the 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 has default font settings.

Macro: .LP
Macro: .PP
Macro: .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 specified by the PD macro. The font size and shape are reset to the default value (10pt roman if no `-rS' option is given on the command line). Finally, the current left margin is restored.

Macro: .IP [{designator
Set up an indented paragraph, using designator as a tag to mark its beginning. The indentation is set to nnn 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 their default values. To start an indented paragraph with a particular indentation but without a designator, use `""' (two double quotes) as the first argument of IP.

For example, to start a paragraph with bullets as the designator and 4 en indentation, write

 
.IP \(bu 4

Macro: .HP [{nnn
Set up a paragraph with hanging left indentation. The indentation is set to nnn if that argument is supplied (default unit is `n'), otherwise the default indentation value is used. Font size and face are reset to their default values.

Macro: .RS [{nnn
Move the left margin to the right by the value nnn if specified (default unit is `n'); otherwise the default indentation value is used. Calls to the RS macro can be nested.

Macro: .RE [{nnn
Move the left margin back to level 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.

To summarize, the following macros cause a line break with the insertion of vertical space (which amount can be changed with the PD macro): SH, SS, TP, LP (PP, P), IP, and HP.

The macros RS and RE also cause a break but do not insert vertical space.

Finally, the macros SH, SS, LP (PP, P), and RS reset the indentation to its default value.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003