Hi, Alex! At 2021-11-02T19:07:05+0100, Alejandro Colomar (man-pages) wrote: > On 11/2/21 18:49, G. Branden Robinson wrote: > > printf '_\\fB_\\fI_\\f(BI_\n' | nroff | cat -s > > Yes, I see 4 different glyphs.
Okay, so that much is sane in our respective environments. :) > I was using xface termincal, but I tried on xterm after your email and > see the same result. IF you have a big enough font size and print > them almost together, you'll be able to see the difference: > > $ cat underscore.7test > .TH UNDERSCORE 7TEST today > .SH UNDERSCORE > .RB [ U ] INT \fIN\fP _WI_DTH RO_MAN > > There are 3 different underscores: italics, bold, and roman, > respectiely. At least with the less pager. more doesn't even > highlight, so I can't test with a different pager. > > I used `man ./underscore.7`. I get _visually_ identical output[1] dumping straight to the terminal with "nroff -man", piping through "less -R", piping through "more", and running "man" on the file. However, when I further pipe each of these through xxd, I get the same results for the first three--but "man" produces different output. I suppose this has something to do with the GROFF_SGR (N.B., not "GROFF_NO_SGR" [see grotty(1)]) feature that man-db man added in response to complaints from people who were nostalgic for the wire protocol of Western Electric Teletypes and simultaneously harassing Thomas Dickey for 24-bit direct color support in ncurses so they could "skin" Midnight Commander.[2][3] Anyway, I think what is happening with man is that it is forcing grotty into overstriking mode, calling less as the pager, and less is reconstructing SGR escape sequences based on its heuristic interpretation of the overstriking sequences. Mark Wooding did warn us[2] that this was theoretically possible. I can't get less(1) to reveal to me what SGR escape sequences it's constructing; when I try, apparently it calls isatty() on its output conceals them if it returns false. But it's absolutely munging its input because the overstriking sequences are not present. Can you confirm that you're getting the same output I shared earlier from running "nroff -man" directly on the file, with no pager? It's important for the troubleshooting process that we determine if our grotty(1)s are behaving the same. From there we can try to determine if a pager or man(1) is somehow corrupting things. Oh, also, I'm running a pretty new less(1). I compiled less 581.2 from source so I could test the new OSC 8 stuff in grotty(1)[4]. It could easily be behaving differently from your less(1); sid seems to have 551?[5] Regards, Branden [1] But like the rest of me, my eyes aren't as young as they used to be. [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963490 [3] https://invisible-island.net/ncurses/ncurses-slang.html [4] https://lists.gnu.org/archive/html/groff/2021-10/msg00000.html [5] http://ftp.au.debian.org/debian/pool/main/l/less/
signature.asc
Description: PGP signature