NetBSD-Users archive

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

Re: Italic display in less



Christopher Berardi wrote:
> when I view manpages, those words that are meant to be ITALIC come out
> as reversed video with a brown background. 

It's more than less(1).  The color is a function of the bytestream sent to
the terminal, and the terminal's capabilities.  You can adjust quite a few
things about color and boldface with xterm options; it might be
interesting to experiment with.  But see below.  

When I press 'v' to invoke vi while reading the man page for less(1), I
see:

         _^HL_^He_^Hs_^Hs is a program similar

which is pretty clearly a series of underscore-backspace-letter, just like
overtyping on a paper terminal.  Boldface is similar:

        N^HNA^HAM^HME^HE

just overstriking.  Is yours the same?  

nroff(1) converts your mdoc man page source code into something
displayable on a tty.  Its manual says:

        "Only ascii, latin1, utf8, and cp1047 are valid arguments for the -T
option, selecting the output encoding emitted by grotty, groff's TTY
output device."

Thence to grotty(1):

        "grotty emits SGR escape sequences (from ISO 6429, also called ANSI 
color
escapes) to change text attributes (bold, italic, colors)."

Ah ha.  Now we're talking.  I think you'll find a lot to chew on there.  

What I don't understand is how man(1) tells nroff/grotty what options to
use....

HTH.  

--jkl


Home | Main Index | Thread Index | Old Index