From a303f40898d21cb0d5552a2252710ddc741a1cec Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 15 Dec 2013 21:23:52 +0000 Subject: 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@. --- roff.7 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'roff.7') 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 .\" Copyright (c) 2010, 2011 Ingo Schwarze @@ -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 -- cgit v1.2.3-56-ge451