5.8.2 Interpolating Registers

Register contents are interpolated with the \n escape sequence.

Escape sequence: \ni
Escape sequence: \n(id
Escape sequence: \n[ident]

Interpolate register with name ident (one-character name i, two-character name id). \n is interpreted even in copy mode (see Copy Mode). If the register is undefined, it is created and assigned a value of ‘0’, that value is interpolated, and a warning in category ‘reg’ is emitted. See Warnings, for information about the enablement and suppression of warnings.

.nr a 5
.nr as \na+\na
\n(as
    ⇒ 10
.nr a1 5
.nr ab 6
.ds str b
.ds num 1
\n[a\n[num]]
    ⇒ 5
\n[a\*[str]]
    ⇒ 6