UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: .nnChapter 12
nroff and troff
Next: Reference: .ns
 

.nr

.nr r n [m]

Assign value n to number register r and optionally set auto-increment to m.

Examples

Set the "box width" register to line length minus indent:

.nr BW \n(.l-\n(.i

Set page layout values for ms macros:

.nr LL 6i                         Line length
.nr PO ((8.25i-\n(LLu)/2u)        Page offset
.nr VS \n(PS+2                    Vertical spacing

In groff, auto-increment a footnote-counter register:

.nr footcount 0 1                  Reset to zero on each page

Note: inside a macro definition, \n should be \\n.


Previous: Reference: .nnUNIX in a Nutshell: System V EditionNext: Reference: .ns
Reference: .nnBook IndexReference: .ns

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System