[comp.unix.questions] The BOLD entries in manpages

rg@msel.unh.edu (Roger Gonzalez) (02/07/91)

I just wrote an automatic manpage generating program, and in the process
I was forced to learn a little nroff, or at least nroff's -man macro
package.  Through this I discovered that I could not get anything in
bold to come out on the screen, even though its defined in the termcap
and in the manpage.  The italic entries come out underlined.  I seem to
remember that on a Vaxen telnetted tp a Gould PN all the entries came
out as expected.  Right now I'm running SunOS 4.1.  I looked at the output
from nroff -man with a hex dumper, and the underline codes are there, but
not anything where the bold should be!  I had previously assumed that the
'more' command was eating it, but its not even getting that far!

I've got a good terminal that can do underlining, bold, dim, reverse,
overlining, flash, etc. etc. and it would be nice to use some of these.

-Roger

-- 
"The question of whether a computer can think is no more interesting
 than the question of whether a submarine can swim" - Edsgar W. Dijkstra 
rg@[msel|unhd].unh.edu        |  UNH Marine Systems Engineering Laboratory
r_gonzalez@unhh.bitnet        |  Durham, NH  03824-3525

shwake@raysnec.UUCP (Ray Shwake) (02/09/91)

rg@msel.unh.edu (Roger Gonzalez) writes:

>          Through this I discovered that I could not get anything in
>bold to come out on the screen, even though its defined in the termcap
>and in the manpage. 

Termcap and terminfo references to bold, underline, etc. define the codes
to be sent to the terminal to invoke these characteristics, but nroff does
not generate these codes. It does not, after all, generate for the terminal.

>                     The italic entries come out underlined.  

On the several systems I've used, "italic" generates character-backspace-
underline (or is it underline-backspace-char?), while "bold" generates
char-backspace-char-backspace-char-backspace-char. Only on some terminals
I've used will italic appear as underline, while the bold appears as a
standard character.

>                                                    I looked at the output
>from nroff -man with a hex dumper, and the underline codes are there, but
>not anything where the bold should be!  I had previously assumed that the
>'more' command was eating it, but its not even getting that far!

This "underline code" sounds more like a troff code, since (see above) it
shouldn't be generating terminal-specific code.

>I've got a good terminal that can do underlining, bold, dim, reverse,
>overlining, flash, etc. etc. and it would be nice to use some of these.

What you might want to do is post process the nroff output into the
'less' pager, which is smart enough to interpret the character stream and,
based on your terminal definition, generate the terminal-specific code to
invoke underline, bold, etc.

-----------  
uunet!media!ka3ovk!raysnec!shwake				shwake@rsxtech

ahh@glyph.kingston.ny.us (Andy Heffernan) (02/10/91)

In article <1991Feb7.154751.18616@unhd.unh.edu> rg@msel.unh.edu (Roger Gonzalez) writes:
[...]
>out as expected.  Right now I'm running SunOS 4.1.  I looked at the output
>from nroff -man with a hex dumper, and the underline codes are there, but
>not anything where the bold should be!  I had previously assumed that the
>'more' command was eating it, but its not even getting that far!

Your man macros are probably checking that they are being processed
by troff before doing the emboldening.

Something like:
	.deB
	.ift .ft3


-- 
-------------------------------------------------------------------------
  Andy Heffernan		$BJ8;z(J		uunet!glyph!ahh

gwyn@smoke.brl.mil (Doug Gwyn) (02/10/91)

In article <241@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes:
>Termcap and terminfo references to bold, underline, etc. define the codes
>to be sent to the terminal to invoke these characteristics, but nroff does
>not generate these codes. It does not, after all, generate for the terminal.

Actually, nroff does generate appropriate control codes as described
for the terminal type specified to nroff by its -T option.  If you
omit the -T option you get some default, probably Teletype Model 37.
nroff's terminal descriptions are not obtained from termcap/terminfo,
but rather from its own (small) database of terminal/printer
descriptions.  For further details RTFM.