Update of bug #67119 (group groff):

                Category:                    None => Preprocessor eqn
              Item Group:                    None => Rendering/Cosmetics
                  Status:                    None => Need Info
                 Summary: (Some) underlined warnings/diagnostics are not
readable when redirected => [eqn] nroff-mode output is pretty bad when setting
fractions

    _______________________________________________________

Follow-up Comment #1:

Hi Tim,

Your report confused me a little at first because I don't think the output
you're talking about has anything to do with warnings or diagnostics (apart
from provoking them).  _groff_ does not attempt any such styling in diagnostic
messages.

[comment #0 original submission:]
> While reporting a bug, I noticed that on a Konsole terminal "man glFrustum"
> with groff 1.23.0/Fedora shows:
> 

> ⎣right_left      0     A  0⎦
> 0     top_bottom B  0
> 0          0     C  D
> 0          0     −1 0
> 
> A=right_left
> 
> B=top_bottom
> 
> C=−far_val_near_val
> 
> D=−farrval_near_val


> 
> where "right_left", etc. are underlined.

Yes.  _eqn_ sets Latin letters in italics by default, and _grotty_ renders
italic text underscored by default.

> However, "man glFrustum | cat" shows:
> 

> ⎣__________      0     A  0⎦
> 0     __________ B  0
> 0          0     C  D
> 0          0     −1 0
> 
> A=__________
> 
> B=__________
> 
> C=−________________
> 
> D=−________________


> 
> I. e., most of the text underlined on a terminal gets replaced with
> underscores, but not "A", "B", "C", "D", "⎣" and "⎦".

Right.

> 
> Analyzing the output with od shows that really only underscores are output
> (in contrast to trying-underlining-with-ASCII à la "r^H_i^H_", etc.).

I see that too.
 
> This is not a bug, but it might be preferable to output the non-underscore
> version when redirected as well. :-)

I think it is a bug, and the same as bug #62298.

Here are some observations about Colin Watson's similar reduced reproducer.


$ cat ATTIC/bad-matrix.roff
The generated matrix is
.sp
.ce
.EQ
left ( ~~ down 130 { matrix {
   ccol { {f over "aspect"} above 0 above 0 above 0 }
   ccol { 0 above f above 0 above 0 }
   ccol { 0 above 0 above {{"zFar" + "zNear"} over {"zNear" - "zFar"}} above
-1 }
   ccol { 0 above 0 above {{2 * "zFar" * "zNear"} over {"zNear" - "zFar"}}
above 0}
}}  ~~~ right )
.EN


If we use "approximate output mode", we can see that the text of interest does
make it out of _eqn_ such that GNU _troff_ attempts to format it.


$ groff -ww -ae -T utf8 ATTIC/bad-matrix.roff
<beginning of page>
The generated matrix is
troff:ATTIC/bad-matrix.roff:184: error: division by zero
troff:ATTIC/bad-matrix.roff:185: warning: register '0temp' not defined
troff:ATTIC/bad-matrix.roff:230: error: division by zero
 <parenlefttp><parenleftbt>      f aspect    0 0 0   0  f  0  0    0 0  zFar
<pl> zNear zNear <mi> zFar    <mi>1   0 0  2 * zFar * zNear zNear <mi> zFar
0     <parenrighttp><parenrightbt> 


If we inspect GNU _troff_'s device-independent output, we can also see the "t"
commands that write this text.  But also a whole lot of "ru" (baseline rule)
special characters are being written.  I presume that these are the horizontal
fraction bars, and that _grotty_ is writing them into the same character cells
as the letter characters because _eqn_ didn't allocate enough vertical space
for the letters.


$ groff -e -T utf8 -Z ATTIC/bad-matrix.roff
x T utf8
x res 240 24 40
x init
p1
x font 1 R
f1
s10
V40
H0
md
DFd
tThe
wh24
tgenerated
wh24
tmatrix
wh24
tis
n40 0
troff:ATTIC/bad-matrix.roff:184: error: division by zero
troff:ATTIC/bad-matrix.roff:230: error: division by zero
x font 2 I
f2
V160
H360
Cparenlefttp
Cparenleftbt
h96
tf
H384
taspect
H384
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
f1
H456
v40
t0
H456
v40
t0
H456
v40
t0
h72
V160
t0
f2
H552
v40
tf
f1
H552
v40
t0
H552
v40
t0
h144
V160
t0
H720
v40
t0
f2
H600
v40
tzFar
f1
Cpl
f2
h24
tzNear
H600
tzNear
f1
Cmi
f2
h24
tzFar
H600
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
f1
H672
v40
Cmi
h24
t1
h288
V160
t0
H1008
v40
t0
H864
v40
t2*
f2
tzFar
f1
t*
f2
tzNear
H888
tzNear
f1
Cmi
f2
h24
tzFar
H864
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
h24
Cru
f1
H1008
v40
t0
f2
h144
V160
Cparenrighttp
Cparenrightbt
h24
n80 80
x trailer
V2640
x stop


Do you concur that this is a duplicate of bug #62298?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67119>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to