aboutsummaryrefslogtreecommitdiffstatshomepage
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
commita303f40898d21cb0d5552a2252710ddc741a1cec (patch)
treed38b1f7764118039b866dffbf2f2395e33241aff /roff.7
parent9e9da087dda5194812500db223832a351d496b16 (diff)
downloadmandoc-a303f40898d21cb0d5552a2252710ddc741a1cec.tar.gz
mandoc-a303f40898d21cb0d5552a2252710ddc741a1cec.tar.zst
mandoc-a303f40898d21cb0d5552a2252710ddc741a1cec.zip
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.715
1 files changed, 9 insertions, 6 deletions
diff --git a/roff.7 b/roff.7
index 99e44611..21dd474e 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.44 2013/10/22 20:38:00 schwarze Exp $
+.\" $Id: roff.7,v 1.45 2013/12/15 21:23:52 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 22 2013 $
+.Dd $Mdocdate: December 15 2013 $
.Dt ROFF 7
.Os
.Sh NAME
@@ -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