groff
[Top][All Lists]
Advanced

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

the warning scaling unit on nroff devices (was: device-dependent warning


From: G. Branden Robinson
Subject: the warning scaling unit on nroff devices (was: device-dependent warnings)
Date: Tue, 23 May 2023 14:49:41 -0500

[self-follow-up]

At 2023-05-06T20:59:22-0500, G. Branden Robinson wrote:
> So I have a change pending for groff-next that will make the foregoing
> look more like:
> 
> troff:man3/unlocked_stdio.3:123: warning [page 2, 1.8i (diversion '3tbd1,0', 
> 0.3i)]: cannot break line
> 
> What would build upon this nicely would be:
> 
> 1. For the man(7) and mdoc(7) packages to set the warning scaling
>    indicator to "n" when formatting for terminals.  It's pretty
>    useless to give terminal users a measurement in inches.  They'll
>    need to learn that "n" is in screen lines, but once they have that,
>    they stand some change of locating the position on the page being
>    griped about.

I had two brain farts here.  I meant to say that I'd change the warning
scaling UNIT (terminological reform) to "v" (a more appropriate unit for
discussing screen _lines_).

But then I looked into things.

At first I thought that it was a problem that only one warning scaling
unit can be selected, when having separate ones for horizontal and
vertical measurements might be useful sometimes.  Except the only units
that qualify for that are relative ones: m, M, n, V.  And the
`warnscale` request doesn't accept those, for the perfectly valid reason
that these don't meaningfully identify a location on a page (in
general).

Then I remembered that these units aren't variable on nroff devices.

Then I took step back and realized that reporting measurements like this
for nroff output devices is silly.  We can just ignore `warnscale` on
those devices and report the problems in terms of lines.  Like this.

$ ./build/test-groff -ww -t -z -man -Tutf8 ../man-pages/man3/unlocked_stdio.3
troff:../man-pages/man3/unlocked_stdio.3:123: warning [p 2, line 11, div 
'3tbd1,0', line 2]: cannot break line

I'll bet man page troubleshooters would much rather see "line" than
inscrutable floating point numbers in inches that invite them to hold a
ruler up to their monitor.

Scrutability is still an issue here, because when continuously
rendering, the page number is meaningless.  Hence:

> 2. Revising continuous rendering to use the "infinite"[1] page length
>    approach with sudden death truncation at the end of the document.

More to look forward to for groff-next.

I hope Bertrand's all right.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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