manpagez: man pages & more
info groff
Home | html | info | man

File: groff.info,  Node: Interpolating Registers,  Next: Auto-increment,  Prev: Registers.php">Setting Registers,  Up: Registers

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
     (*note 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.  *Note 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

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.