[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #59424] tmac/groff_mdoc.7.man: one table is wider than the line wid
From: |
G. Branden Robinson |
Subject: |
[bug #59424] tmac/groff_mdoc.7.man: one table is wider than the line width (80) |
Date: |
Fri, 6 Nov 2020 17:59:16 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Update of bug #59424 (project groff):
Status: None => Confirmed
Assigned to: None => gbranden
_______________________________________________________
Follow-up Comment #1:
[comment #0 original submission:]
> Subject: tmac/groff_mdoc.7.man: one table is wider than the line width (80)
>
> "man -l tmac/groff_mdoc.7.man"
I can't reproduce this, but as a point of general advice I don't recommend
running man directly on man pages in the groff source tree, because they
haven't gone through sed substitution (and, in groff_man(7)'s case, digestion
by m4).
Preview development groff pages by doing a build first. You can then examine
their generated forms, whose file names end in ".1", ".5", and ".7".
Even then, previewing with man(1) must be done with caution, because groff--it
should go without saying--provides much of the infrastructure that man(1) uses
for page rendering. I came to learn this lesson myself after I started making
changes to the "an" macro package.
> (using "test-nroff -mandoc -rF=0 -P-i -dAD=l -rHY=0")
This information is only partially helpful; "test-nroff" is not something that
is in public distribution or that anyone can be expected to have (as far as I
know, you're the only person on the planet with such a script). When
reporting bugs, be sure you can reproduce the problem exclusively using tools
in general distribution.
Furthermore, the -rF=0 flag is spurious for this report. I realize that this
option may be standard procedure for you to work around other, less fastidious
man pages, but when reporting a bug, a _minimal_ reproducing case is of
greater value.
> and with environment
>
> MANWIDTH=80
> MAN_KEEP_STDERR=yes
Hmm, yes, I can't reproduce the problem even with -rLL=78n, the line length
man-db man(1) uses by default, and it is even shorter.
> shows on standard error:
>
> warning: file '<standard input>', around line 4108:
> table wider than line width
The above reveals that the tbl(1) you're using is not from groff Git, because
it lacks commit f75e156b621d3743368c58425f357e6cd52372a0.
When I look at line 4108 of build/tmac/groff_mdoc.7, I see:
Ge >= >= \*[Ge] \[rs](>= greater than or equal to
(where sequences of 2 or more spaces are actually tabs).
This still fits within the 78n limit.
> This can be avoided by reducing all column gutters by one en.
I don't believe this is necessary. When I render the page, the table comes
out as follows:
Predefined strings
The following strings are predefined for compatibility with legacy -mdoc
documents. Contemporary ones should use the alternatives shown in the
‘Prefer’ column below.
String 7-bit 8-bit UCS Prefer Meaning
<= <= <= ≤ \(<= less than or equal to
>= >= >= ≥ \(>= greater than or equal to
Rq " " ” \(rq right double quote
Lq " " “ \(lq left double quote
ua ^ ^ ↑ \(ua vertical arrow up
aa ' ´ ´ \(aa acute accent
ga ` ` ` \(ga grave accent
q " " " \(dq neutral double quote
Pi pi pi π \(*p lowecase pi
Ne != != ≠ \(!= not equals
Le <= <= ≤ \(<= less than or equal to
Ge >= >= ≥ \(>= greater than or equal to
Lt < < < < less than
Gt > > > > greater than
Pm +- ± ± \(+- plus or minus
If infinity infinity ∞ \(if infinity
Am & & & & ampersand
Na NaN NaN NaN NaN not a number
Ba | | | | bar
Piping the above through "wc -L" tells me "77".
You should try reproducing this problem using tools from within the groff
build as much as possible. Here's what I did. You'll note that I retained
your rendering parameters in case they provoked the problem. (In fact, I am
being even stricter, with -rLL=78n, which works with recent tmac/an-old.tmac
files.)
$ ./build/test-groff -Tutf8 -P-i -dAD=l -rHY=0 -rLL=78n -t -z -mdoc
./build/tmac/groff_mdoc.7
I have suppressed output with -z, to make sure I don't miss any diagnostic
messages. None result.
To actually view the rendered page, I need only do this:
$ ./build/test-groff -Tutf8 -P-i -dAD=l -rHY=0 -rLL=78n -t -mdoc
./build/tmac/groff_mdoc.7 | less -R
For what it's worth, I can't reproduce the problem using man(1) either. I
have to squeeze the page to a non-standardly narrow width to provoke the
problem:
$ MANWIDTH=76n man -l ./build/tmac/groff_mdoc.7
warning: file '<standard input>', around line 4101:
table wider than line width
MANWIDTH=77 and higher produce no diagnostic. (The "n" is optional and
supplied by man(1) itself if omitted. I'm in the habit of typing it because
it's necessary for direct register setting, as in "-rLL=77n".)
Thanks for keeping an eye peeled from problems. I hope my advice above will
help you find them without spurious results.
Closi--
Wait. After writing all that, I realized the problem.
You're not rendering to -Tutf8, but -Tascii or -Tlatin1. Those encodings lack
an infinity sign and make the UCS column much wider, which in turn causes the
>= and <= rows to overrun.
I stand by most of the above advice, regardless, and would add: always tell us
which device you're rendering for.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59424>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/