Up: man   [Contents][Index]


4.1.1 Optional man extensions

Use the file man.local for local extensions to the man macros or for style changes.

Custom headers and footers

In groff versions 1.18.2 and later, you can specify custom headers and footers by redefining the following macros in man.local.

Macro: .PT

Control the content of the headers. Normally, the header prints the command name and section number on either side, and the optional fifth argument to TH in the center.

Macro: .BT

Control the content of the footers. Normally, the footer prints the page number and the third and fourth arguments to TH.

Use the FT register to specify the footer position. The default is -0.5i.

Ultrix-specific man macros

The groff source distribution includes a file named man.ultrix, containing macros compatible with the Ultrix variant of man. Copy this file into man.local (or use the mso request to load it) to enable the following macros.

Macro: .CT key

Print ‘<CTRL/key>’.

Macro: .CW

Print subsequent text using a “constant-width” (monospaced) typeface (Courier roman).

Macro: .Ds

Begin a non-filled display.

Macro: .De

End a non-filled display started with Ds.

Macro: .EX [indent]

Begin a non-filled display using a monospaced typeface (Courier roman). Use the optional indent argument to indent the display.

Macro: .EE

End a non-filled display started with EX.

Macro: .G [text]

Set text in Helvetica. If no text is present on the line where the macro is called, then the text of the next line appears in Helvetica.

Macro: .GL [text]

Set text in Helvetica oblique. If no text is present on the line where the macro is called, then the text of the next line appears in Helvetica Oblique.

Macro: .HB [text]

Set text in Helvetica bold. If no text is present on the line where the macro is called, then all text up to the next HB appears in Helvetica bold.

Macro: .TB [text]

Identical to HB.

Macro: .MS title sect [punct]

Set a man page reference in Ultrix format. The title is in Courier instead of italic. Optional punctuation follows the section number without an intervening space.

Macro: .NT [C] [title]

Begin a note. Print the optional title, or the word “Note”, centered on the page. Text following the macro makes up the body of the note, and is indented on both sides. If the first argument is C, the body of the note is printed centered (the second argument replaces the word “Note” if specified).

Macro: .NE

End a note begun with NT.

Macro: .PN path [punct]

Set the path name in a monospaced typeface (Courier roman), followed by optional punctuation.

Macro: .Pn [punct] path [punct]

If called with two arguments, identical to PN. If called with three arguments, set the second argument in a monospaced typeface (Courier roman), bracketed by the first and third arguments in the current font.

Macro: .R

Switch to roman font and turn off any underlining in effect.

Macro: .RN

Print the string ‘<RETURN>’.

Macro: .VS [4]

Start printing a change bar in the margin if the number 4 is specified. Otherwise, this macro does nothing.

Macro: .VE

End printing the change bar begun by VS.

Simple example

The following example man.local file alters the SH macro to add some extra vertical space before printing the heading. Headings are printed in Helvetica bold.

.\" Make the heading fonts Helvetica
.ds HF HB
.
.\" Put more space in front of headings.
.rn SH SH-orig
.de SH
.  if t .sp (u;\\n[PD]*2)
.  SH-orig \\$*
..

Up: man   [Contents][Index]