gbranden pushed a commit to branch master
in repository groff.

commit 38d0469b547e24d62b2d4037e1e0b90f5d8cac12
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Sat Jul 12 11:39:42 2025 -0500

    doc/*,man/*: Sync negative reg assignment stuff.
    
    Parallelize our Texinfo and man page presentations thereof.
    
    This is at some cost in extra wording for groff(7), but since the matter
    is a notorious toe-stubber for *roff novices, it seems excusable here.
---
 doc/groff.texi.in | 23 +++++++++++++++++------
 man/groff.7.man   | 22 +++++++++++++++++-----
 2 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 5042e8d4e..7c2756e35 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -8021,12 +8021,23 @@ apostrophe; see @ref{Delimiters}.
 @endExample
 
 @cindex negating register values
-A leading minus sign in @var{value} is always interpreted as a
-decrementation operator, not an algebraic sign.  To assign a register a
-negative value or the negated value of another register, you can
-force GNU @code{troff} to interpret @samp{-} as a negation or minus,
-rather than decrementation, operator: enclose the @samp{-} with its
-operand in parentheses or subtract the expression of interest from zero.
+A
+@code{roff}
+formatter always interprets a leading minus sign in
+@var{value}
+as a decrementation operator,
+not an algebraic sign.
+To assign a register a negative value
+or the negated value of another register,
+you must force the formatter to interpret
+@samp{-}
+as a negation or minus,
+rather than decrementation,
+operator:@:
+enclose the
+@samp{-}
+with its operand in parentheses
+or subtract the expression of interest from zero.
 
 @Example
 .nr a 7
diff --git a/man/groff.7.man b/man/groff.7.man
index 339dca459..bfcf22d30 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -2505,12 +2505,24 @@ Without a sign,
 .I N
 replaces any existing value.
 .
-A leading minus sign
+A
+.I roff
+formatter always interprets a leading minus sign
 .RI in\~ N
-is always interpreted as a decrementation operator,
-not an algebraic sign;
-section \[lq]Numeric expressions\[rq] above describes how to override
-its meaning.
+as a decrementation operator,
+not an algebraic sign.
+.
+To assign a register a negative value
+or the negated value of another register,
+you must force the formatter to interpret
+.RB \[lq] \- \[rq]
+as a negation or minus,
+rather than decrementation,
+operator:
+enclose the
+.RB \[lq] \- \[rq]
+with its operand in parentheses
+or subtract the expression of interest from zero.
 .
 If a prior value does not exist
 (the register was undefined),

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to