From d318611dd6f23fcfedd50e9b9e24620b102ba96a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:44:05 +0200 Subject: Adding upstream version 1.23.0. Signed-off-by: Daniel Baumann --- doc/groff.html.node/Auto_002dincrement.html | 124 ++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 doc/groff.html.node/Auto_002dincrement.html (limited to 'doc/groff.html.node/Auto_002dincrement.html') diff --git a/doc/groff.html.node/Auto_002dincrement.html b/doc/groff.html.node/Auto_002dincrement.html new file mode 100644 index 0000000..2680f67 --- /dev/null +++ b/doc/groff.html.node/Auto_002dincrement.html @@ -0,0 +1,124 @@ + + + + + + +Auto-increment (The GNU Troff Manual) + + + + + + + + + + + + + + + + + + + + +
+ +
+

5.8.3 Auto-increment

+ + + + +

Registers can also be incremented or decremented by a configured amount +at the time they are interpolated. The value of the increment is +specified with a third argument to the nr request, and a special +interpolation syntax is used to alter and then retrieve the register’s +value. Together, these features are called +auto-increment.51 +

+
+
Request: .nr ident value incr
+
+ +

Set register ident to value and its auto-incrementation +amount to to incr. The \R escape sequence doesn’t support +an incr argument. +

+ +

Auto-incrementation is not completely automatic; the \n +escape sequence in its basic form never alters the value of a register. +To apply auto-incrementation to a register, interpolate it with +‘\n±’. +

+
+
Escape sequence: \n+i
+
+
Escape sequence: \n-i
+
Escape sequence: \n+(id
+
Escape sequence: \n-(id
+
Escape sequence: \n+[ident]
+
Escape sequence: \n-[ident]
+

Increment or decrement ident (one-character +name i, two-character name id) by the register’s +auto-incrementation value and then interpolate the new register value. +If ident has no auto-incrementation value, interpolate as with +\n. +

+ +
+
.nr a 0 1
+.nr xx 0 5
+.nr foo 0 -2
+\n+a, \n+a, \n+a, \n+a, \n+a
+.br
+\n-(xx, \n-(xx, \n-(xx, \n-(xx, \n-(xx
+.br
+\n+[foo], \n+[foo], \n+[foo], \n+[foo], \n+[foo]
+    ⇒ 1, 2, 3, 4, 5
+    ⇒ -5, -10, -15, -20, -25
+    ⇒ -2, -4, -6, -8, -10
+
+ + + +

To change the increment value without changing the value of a register, +assign the register’s value to itself by interpolating it, and specify +the desired increment normally. Apply an increment of ‘0’ to +disable auto-incrementation of the register. +

+ +
+
+ + + + + + -- cgit v1.2.3