[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird \s
G. Branden Robinson
Re: weird \s
Tue, 31 Mar 2020 12:32:04 +1100
At 2020-03-30T19:16:56-0400, Doug McIlroy wrote:
> Does anyone else see the following behavior?
> Version 1.22.4 handles \s correctly up to \s39, but
> truncates a size of 40 or greater to its first
> digit. Here are two screen shots, with ^D edited in
> to show where input ends and output begins.
This appears to be for backward compatibility. The 1992 revision of
CSTR #54 says in §2.3:
"Note that through an accident of history, a construction like \s39 is
parsed as size 39, and thus converted to size 36 (given the sizes
above), while \s40 is parsed as size 4 followed by 0. The syntax \s(nn
and \s±(nn permits specification of sizes that would otherwise be
As Robert Thorsby noted, this is documented in the groff Texinfo manual;
however, it is not noted in the groff(7) man page, something I'm
inclined to fix in the near term.
To the broader group, I would furthermore suggest that, being GNU roff,
it might behoove us to preserve the above "accident of history" only in
compatibility mode, and have the \sn form accept only a single-digit
argument for consistency with other escape forms. Doug still would have
gotten into trouble, but it would have been a more easily understood
What do folks think?
Description: PGP signature
Re: weird \s, Mike Bianchi, 2020/03/31