bugDatabase-driven manual pager suite - Bugs: bug #41867, Rendering error with man-db

 
 

bug #41867: Rendering error with man-db

Submitted by:  Michael Kerrisk <mkerrisk>
Submitted on:  Fri 14 Mar 2014 09:35:21 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 26 Mar 2014 01:39:35 PM UTC, comment #1: 

I agree that this looks like a glitch.  However, it doesn't appear to be a problem with man-db.  You can reproduce it with "nroff -mandoc -Tutf8 <ftm.7 | less -R"; or, at a more "raw" level that's reproducible with a build from groff.git:

  GROFF_NO_SGR=1 ./test-groff -mtty-char -mandoc -Tutf8 <~/ftm.7 | less -R

Looking at the raw output, we could debate whether this is a groff(1) bug or a less(1) bug.  With the backspace sequences made visible, "_both_ _BSD_SOURCE" reads as:

  ^Hb^Ho_^Ht_^Hh ^H_B^HBS^HSD^HD^H_S^HSO^HOU^HUR^HRC^HCE^HE

So "_^H_" is ambiguous: it could be either an underlined underline or a bolded underline.  It appears that less(1) takes its cue from the earlier underlined word, and only switches into bold mode once it sees text that's unambiguously bold.  You don't see this in SGR mode, which is semantically clearer; unfortunately a lot of people objected to SGR mode because it confuses some pagers, so in some places it's off by default.

I think it would be worth taking this up with the less(1) maintainer.

The remaining question (and the reason I haven't closed this bug against man-db quite yet) is exactly why you're not in SGR mode.  While Debian disables this by default, I'm not actually sure that Fedora does; if so I can't find it in their git repository.  Do you have GROFF_NO_SGR=1 in your environment?

Colin Watson <cjwatson>
Project Administrator
Fri 14 Mar 2014 09:35:21 AM UTC, original submission:  

In rendedering the attached file with "man -l", I see a what seems like a glitch in this output line

              ings, define both _BSD_SOURCE and _DEFAULT_SOURCE.

The word "both" is unerlined (italicized) as expected, but so too is the underscore at the start of "_BSD_SOURCE". The input source for that piece is

    .I both
    .B _BSD_SOURCE

I assume this a bug, since the behavior is otherwise surprising.

$ man --version
man 2.6.3

$ uname -o
GNU/Linux

$ lsb_release -i -r
Distributor ID: Fedora
Release: 19

Cheers,

Michael

Michael Kerrisk <mkerrisk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #30895:  ftm.7 added by mkerrisk (343B - application/x-troff-man)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cjwatson (Posted a comment)
  • -email is unavailable- added by mkerrisk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-17 cjwatson StatusNone => Need Info
    2014-03-14 mkerrisk Attached File- => Added ftm.7, #30895

    Back to the top


    Powered by Savane 3.5