summaryrefslogtreecommitdiffstats
path: root/roff.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-15 21:23:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-15 21:23:52 +0000
commit281129cb0c7f8658dbddf1c3861189908a4b31a5 (patch)
treece62f9f0c1ce0befc4e905b6057f4426ab4eb703 /roff.7
parent1785eefc0e123397ec0468858110d9ed6ff815db (diff)
downloadmandoc-281129cb0c7f8658dbddf1c3861189908a4b31a5.tar.gz
The "value" argument to the roff(7) .nr requests ends right before
the first non-digit character. While here, implement and document an optional sign, requesting increment or decrement, as documented in the Ossanna/Kernighan/Ritter troff manual and supported by groff. Reported by bentley@ on discuss@.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.711
1 files changed, 7 insertions, 4 deletions
diff --git a/roff.7 b/roff.7
index d54dc47a..8b0592f3 100644
--- a/roff.7
+++ b/roff.7
@@ -814,19 +814,22 @@ the name of the request, macro or string to be undefined.
Currently, it is ignored including its arguments,
and the number of arguments is not checked.
.Ss \&nr
-Define a register.
+Define or change a register.
A register is an arbitrary string value that defines some sort of state,
which influences parsing and/or formatting.
Its syntax is as follows:
.Pp
-.D1 Pf \. Cm \&nr Ar name Ar value
+.D1 Pf \. Cm \&nr Ar name Oo +|- Oc Ns Ar value
.Pp
The
.Ar value
may, at the moment, only be an integer.
-So far, only the following register
+If it is prefixed by a sign, the register will be
+incremented or decremented instead of assigned to.
+.Pp
+The following register
.Ar name
-is recognised:
+is handled specially:
.Bl -tag -width Ds
.It Cm nS
If set to a positive integer value, certain