groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 06/12: [doc,man]: Revise discussion of registers.


From: G. Branden Robinson
Subject: [groff] 06/12: [doc,man]: Revise discussion of registers.
Date: Tue, 19 Nov 2024 20:33:11 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit e8c81124bd82f8f5fc1ed0aaeca345ce91b23810
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Nov 19 12:33:04 2024 -0600

    [doc,man]: Revise discussion of registers.
    
    Improve sync between our Texinfo manual and man pages.
---
 doc/groff.texi.in | 38 +++++++++++++++++++-------------------
 man/groff.7.man   | 42 ++++++++++++++++++++++++++++++------------
 2 files changed, 49 insertions(+), 31 deletions(-)

diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index c3952deef..eb0c458d2 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -7471,17 +7471,23 @@ the call of its end macro.
 
 @c =====================================================================
 
-@c BEGIN Keep (roughly) parallel with subsection "Registers" of
-@c groff(7).
+@c BEGIN Keep (roughly) parallel with section "Registers" of groff(7).
 @node Registers, Manipulating Filling and Adjustment, Formatter Instructions, 
GNU troff Reference
 @section Registers
 @cindex registers
 
-In the @code{roff} language, numbers can be stored in @dfn{registers}.
-Many built-in registers exist, supplying anything from the date to
-details of formatting parameters.  You can also define your own.
-@xref{Identifiers}, for information on constructing a valid name for a
-register.
+In the @code{roff} language, numbers and measurements can be stored in
+@dfn{registers}.  Many built-in registers exist, supplying anything from
+the date to details of formatting parameters; some of these are
+read-only.  You can also define your own.  @xref{Identifiers}, for
+information on constructing a valid name for a register.
+
+@cindex format, register
+@cindex register format
+Each register (except read-only ones) can be assigned a @dfn{format},
+causing its value to interpolate with leading zeroes, in Roman numerals,
+or alphabetically.  Some read-only registers are string-valued, meaning
+that they interpolate text and lack a format.
 
 @menu
 * Setting Registers::
@@ -7585,8 +7591,8 @@ 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 it with its operand in
-parentheses or subtract it from zero.
+rather than decrementation, operator: enclose the @samp{-} with its
+operand in parentheses or subtract the expression of interest from zero.
 
 @Example
 .nr a 7
@@ -7644,7 +7650,7 @@ of warnings.
 To remove a register alias, invoke @code{rr} on its name.  A register's
 contents do not become inaccessible until it has no more names.
 @endDefreq
-@c END Keep (roughly) parallel with subsection "Registers" of groff(7).
+@c END Keep (roughly) parallel with section "Registers" of groff(7).
 
 @c ---------------------------------------------------------------------
 
@@ -7885,22 +7891,16 @@ desirable to test the page number independently of its 
format.
 Predefined registers whose identifiers start with a dot are read-only.
 Many are Boolean-valued, interpolating a true or false value testable
 with the @code{if}, @code{ie}, or @code{while} requests.
-@cindex format, register
-@cindex register format
-Each register can be assigned a @dfn{format}, causing its value to
-interpolate with leading zeroes, in Roman numerals, or alphabetically.
-Some read-only registers are string-valued, meaning that they
-interpolate text and lack a format.
 
 @cindex removing a built-in register
 @cindex register, built-in, removing
 @cindex built-in register, removing
 @strong{Caution:@:} Built-in registers are subject to removal like
 others; once removed, they can be recreated only as normal writable
-registers and will not reflect formatter state.
+registers and will not reflect the configuration of the formatter.
 
-A register name (without the dot) is often associated with a request of
-the same name.  A complete listing of all built-in registers can be
+A register name is often associated with a request of the same name
+(without the dot).  A complete listing of all built-in registers can be
 found in @ref{Register Index}.
 
 We present here a few built-in registers that are not described
diff --git a/man/groff.7.man b/man/groff.7.man
index 21ec25842..910973c88 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -2385,12 +2385,9 @@ replaces any existing value.
 A leading minus sign
 .RI in\~ N
 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,
-enclose it with its operand in
-parentheses or subtract it from zero.
+not an algebraic sign;
+section \[lq]Numeric expressions\[rq] above describes how to override
+its meaning.
 .
 If a prior value does not exist
 (the register was undefined),
@@ -6204,11 +6201,12 @@ request on its name first.
 In the
 .I roff
 language,
-numbers can be stored in
+numbers and measurements can be stored in
 .I registers.
 .
 Many built-in registers exist,
-supplying anything from the date to details of formatting parameters.
+supplying anything from the date to details of formatting parameters;
+some of these are read-only.
 .
 You can also define your own.
 .
@@ -6217,6 +6215,19 @@ a valid name for a register.
 .
 .
 .P
+Each register
+(except read-only ones)
+can be assigned a
+.IR format ,
+causing its value to interpolate with leading zeroes,
+in Roman numerals,
+or alphabetically.
+.
+Some read-only registers are string-valued,
+meaning that they interpolate text and lack a format.
+.
+.
+.P
 Define registers and update their values with the
 .B nr
 request or the
@@ -6277,12 +6288,19 @@ Predefined registers whose identifiers start with a dot 
are read-only.
 .
 Many are Boolean-valued.
 .
-Some are string-valued,
-meaning that they interpolate text.
 .
+.P
+.I Caution:
+Built-in registers are subject to removal like others;
+once removed,
+they can be recreated only as normal writable registers and will not
+reflect the configuration of the formatter.
+.
+.
+.P
 A register name
-(without the dot)
-is often associated with a request of the same name;
+is often associated with a request of the same name
+(without the dot);
 exceptions are noted.
 .
 .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]