gbranden pushed a commit to branch master
in repository groff.

commit 9dc97f3dc82b54e34d8f2270efbf57d1aa89d17f
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Thu Jan 30 07:22:02 2025 -0600

    [doc,man]: Clarify use of `0` in `\s` escape seqs.
    
    More clearly separate the discussion of the `ps` request from the `\s`
    escape sequence, _because_ they treat a zero argument differently.
---
 doc/groff.texi.in    | 24 ++++++++++++++++++------
 man/groff.7.man      |  3 +++
 man/groff_diff.7.man |  6 ++++++
 3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index eda412d9f..6211a415f 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -12195,8 +12195,7 @@ used lead metal (Latin @emph{plumbum}).}
 
 @DefreqList {ps, [@Var{size}]}
 @DefreqItem {ps, @t{+}@Var{size}}
-@DefreqItem {ps, @t{-}@Var{size}}
-@DefescItemx {\\s, , size, }
+@DefreqItemx {ps, @t{-}@Var{size}}
 @DefregListEndx {.s}
 @cindex changing type sizes (@code{ps}, @code{\s})
 @cindex type sizes, changing (@code{ps}, @code{\s})
@@ -12225,8 +12224,14 @@ size in points as a decimal fraction; it is associated 
with the
 environment (@pxref{Environments}).  To obtain the type size in scaled
 points, interpolate the @code{.ps} register instead (@pxref{Using
 Fractional Type Sizes}).
+@endDefreq
 
-The @code{\s} escape sequence supports a variety of syntax forms.
+@Defesc {\\s, , size, }
+The
+@code{\s}
+escape sequence also determines the type size,
+but handles a zero argument differently.
+It supports a variety of syntax forms.
 
 @table @code
 @item \s@var{n}
@@ -12234,6 +12239,7 @@ Set the type size to @var{n}@tie{}scaled points.  
@var{n}@tie{}must be a
 single digit.@footnote{In compatibility mode only, a non-zero @var{n}
 must be in the range 4--39.  @xref{Compatibility Mode}.}
 If @var{n}@tie{}is
+an unsigned
 @samp{0},
 restore the previous size.
 
@@ -12246,6 +12252,7 @@ Increase or decrease the type size by 
@var{n}@tie{}scaled points.
 Set the type size to @var{nn}@tie{}scaled points.  @var{nn} must be
 exactly two digits.
 If @var{n}@tie{}is
+an unsigned
 @samp{00},
 restore the previous size.
 
@@ -12267,7 +12274,7 @@ grin, grin,
 wink, wink, \s+2nudge, nudge,\s+8 say no more!
 .ps 10
 @endExample
-@endDefreq
+@endDefesc
 
 @cindex @code{\s} escape sequence, untokenized on input
 @cindex untokenized escape sequence, @code{\s}
@@ -12508,8 +12515,13 @@ numeric expression with a default scaling unit of 
@samp{z}.
 @itemx \s+'@var{n}'
 @itemx \s-'@var{n}'
 Increase or decrease the type size by @var{n}@tie{}scaled points;
-@var{n}@tie{}is a numeric expression (which may start with a minus sign)
-with a default scaling unit of @samp{z}.
+@var{n}@tie{}is
+a numeric expression with a default scaling unit of
+@samp{z}.
+If @var{n}@tie{}is
+an unsigned
+@samp{0},
+restore the previous size.
 @end table
 
 
diff --git a/man/groff.7.man b/man/groff.7.man
index 3533ee394..76f2f356a 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -5658,6 +5658,7 @@ must be a single digit.
 .
 If
 .IR n \~is
+an unsigned
 \[lq]0\[rq],
 restore the previous size.
 .
@@ -5684,6 +5685,7 @@ is a two-digit number \[>=]1.
 .
 If
 .IR n \~is
+an unsigned
 \[lq]00\[rq],
 restore the previous size.
 .
@@ -5707,6 +5709,7 @@ scaled points.
 .
 If
 .IR n \~is
+an unsigned
 \[lq]0\[rq]
 (with any number of leading zeroes),
 restore the previous size.
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 8ac178968..6b1d12f04 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -1101,6 +1101,12 @@ or increment or decrement it by,
 .I n
 scaled points.
 .
+If
+.IR n \~is
+an unsigned
+.RB \[lq] 0 \[rq],
+restore the previous size.
+.
 .
 .br
 .ne 5v

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

Reply via email to