Previous: , Up: Registers   [Contents][Index]


5.8.5 Built-in Registers

Predefined registers whose identifiers start with a dot are read-only. Many are Boolean-valued, interpolating a true or false value testable with the if, ie, or while requests.

Caution: Built-in registers are subject to removal like others; once removed, they can be recreated only as normal writable registers and will not otherwise reflect the configuration of the formatter.

A register name is often associated with a request of the same name (without the dot). A complete listing of all built-in registers can be found in Register Index.

We present here a few built-in registers that are not described elsewhere in this manual; they have to do with invariant properties of GNU troff, or obtain information about the formatter’s command-line options or processing progress.

\n[.A]

Approximate output is being formatted (Boolean-valued); see groff’s -a option (Groff Options).

\n[.c]
\n[c.]

Input line number. ‘c.’ is a writable synonym, affecting subsequent interpolations of both ‘.c’ and ‘c.’.

\n[.F]

Name of input file (string-valued).

\n[.g]

Always true in GNU troff (Boolean-valued). Documents can use this to ask the formatter if it claims groff compatibility.

\n[.P]

Output page selection status (Boolean-valued); see groff’s -o option (Groff Options).

\n[.R]

Count of available unused registers; in GNU troff this register always interpolates the maximum representable integer.77 Favor its use over numeric literals with many zeroes or nines to indicate an arbitrary large quantity.

\n[.T]

Indicator of output device selection (Boolean-valued); see groff’s -T option (Groff Options).

\n[.U]

Unsafe mode enablement status (Boolean-valued); see groff’s -U option (Groff Options).

\n[.x]

Major version number of the running GNU troff formatter. For example, if the version number is 1.23.0, then .x contains ‘1’.

\n[.y]

Minor version number of the running GNU troff formatter. For example, if the version number is 1.23.0, then .y contains ‘23’.

\n[.Y]

Revision number of the running GNU troff formatter. For example, if the version number is 1.23.0, then .Y contains ‘0’.


Previous: , Up: Registers   [Contents][Index]