[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Point Size II: Electric Boogaloo (.ps 0)
From: |
G. Branden Robinson |
Subject: |
Point Size II: Electric Boogaloo (.ps 0) |
Date: |
Mon, 6 Apr 2020 18:38:09 +1000 |
User-agent: |
NeoMutt/20180716 |
Or: Have You TRIED ".ps 0" Lately?
I'll bet you haven't.
CSTR #54 (1992) says:
.ps ±N Point size set to ±N. Alternatively embed \sN or ±N. Any
positive size value may be requested; if invalid, the next
larger valid size will result, with a maximum of 36.
Does this imply that a zero value cannot be requested?
If it cannot be requested, does that make it "invalid"? And if so,
should the "next larger valid size" result?
The groff Texinfo manual says:
The size 0 (for both '.ps' and '\s'), or no argument (for '.ps'
only), goes back to the previous size.
But check this out:
$ sed -n '/^void point_size/,/^}/p' src/roff/troff/env.cpp
void point_size()
{
int n;
if (has_arg() && get_number(&n, 'z', curenv->get_requested_point_size())) {
if (n <= 0) // <--------- ****** THIS RIGHT HERE ******
n = 1;
curenv->set_size(n);
}
else
curenv->set_size(0);
skip_line();
}
Checking "git blame" on the highlighted conditional, I find:
71e9155c3 troff/env.cc (James Clark 1993-03-03 13:14:51 -0500 1241)
So what do y'all wanna do?
Fix the documentation, or fix the test?
Regards,
Branden
signature.asc
Description: PGP signature
- Point Size II: Electric Boogaloo (.ps 0),
G. Branden Robinson <=