[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3

macref Command

Purpose

Produces a cross-reference listing of macro files.

Syntax

macref [ -n ] [ -s ] [ -t ] [ -- ] [ File ... ]

Description

The macref command reads the named English-language files (which are assumed to be nroff or troff command input) and produces a cross-referenced listing of the symbols in the input.

The default output is a list of the symbols found in the input, each accompanied by a list of all references to that symbol. The macref command lists the symbols alphabetically in the left column, with references following to the right. Each reference is given in the following form:


[ [( NMName ) ]
MName- ]
Type LNumber
[ # ]

Generated names are listed under the artificial symbol name ~sym.

Input Parameters

File Specifies the nroff or troff file from which the macref command produces output containing a list cross-referencing macros.

Output Parameters

NMName The name of the macro within which MName is defined.
MName The name of the macro within which the reference occurs. This field is not present if the reference occurs outside a macro.
Type The type associated, by context, with this occurrence of the symbol. The types can be the following:
r
Request
m
Macro
d
Diversion
s
String
n
Number register
p
Parameter. For instance, \$x is a parameter reference to x.

Note: Parameters are never modified, and the only valid parameter symbol names are 1, 2, . . . 9.
LNumber The line number on which the reference occurred.
# This reference modifies the value of the symbol.

Flags

-n Causes one line to be printed for each reference to a symbol.
-s Causes symbol-use statistics to be printed.
-t Causes a macro table of contents to be printed.

The flags can be grouped behind one - (minus sign). Use a -- (dash) to delimit the end of flags.

Note: The macref command does not accept - as standard input.

Files

/tmp/macref.tXXXXXX Contains a temporary file.
/tmp/macref.sXXXXXX Contains a temporary file.
/tmp/macref.cXXXXXX Contains a temporary file.

Related Information

The mm command, mmt command, mvt command, nroff command, troff command.

The man macro package, mm macro package, mv macro package.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]