UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 12.7 Escape SequencesChapter 12
Nroff and Troff
Next: 12.9 Special Characters
 

12.8 Predefined Number Registers

There are two types of predefined registers: read-only and read-write.

12.8.1 Read-only Registers

.$

Number of arguments available at the current macro level.

.$$Process id of troff process (ditroff only).
.ASet to 1 in troff, if -a option used; always 1 in nroff.
.HAvailable horizontal resolution in basic units.
.T

Set to 1 in nroff, if -T option used; always 0 in troff; in ditroff, the string \*(.T contains the value of -T.

.VAvailable vertical resolution in basic units.
.aPost-line extra line-space most recently utilized using \x'n'.
.cNumber of lines read from current input file.
.d

Current vertical place in current diversion; equal to register nl when there is no diversion.

.f

Current font as physical quadrant (1 to 4 in otroff; 1 to 9 in ditroff).

.hText baseline high-water mark on current page or diversion.
.iCurrent indent.
.jCurrent adjustment mode.
.lCurrent line length.
.nLength of text portion on previous output line.
.oCurrent page offset.
.pCurrent page length.
.sCurrent point size.
.tDistance to the next trap.
.uEqual to 1 in fill mode and 0 in no-fill mode.
.vCurrent vertical line spacing.
.wWidth of previous character.
.xReserved version-dependent register.
.yReserved version-dependent register.
.zName of current diversion.

12.8.2 Read-write Registers

%Current page number.
ctCharacter type (set by width function).
dlWidth (maximum) of last completed diversion.
dnHeight (vertical size) of last completed diversion.
dwCurrent day of the week (1 to 7).
dyCurrent day of the month (1 to 31).
hpCurrent horizontal place on input line.
lnOutput line number.
moCurrent month (1 to 12).
nlVertical position of last printed text baseline.
sbDepth of string below baseline (generated by width function).
stHeight of string above base line (generated by width function).
yrLast two digits of current year.


Previous: 12.7 Escape SequencesUNIX in a Nutshell: System V EditionNext: 12.9 Special Characters
12.7 Escape SequencesBook Index12.9 Special Characters

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