[comp.windows.x] How to get *bold* with nroff in an xterm-window?

rcpt@rw7.urc.tue.nl (Piet Tutelaers) (02/04/91)

Can somebody explain how nroff (the `device independant'-version) can
generate bold in an xterm window? I use `nroff -man manual' but on my NCD
Xterminal I don't get a nice bold. Does there exist a tab.xterm file for
putting it in /usr/local/lib/nterm? Or is there another method?

uucp:   rcpt@urc.tue.nl       | Piet Tutelaers        Room  RC 1.90
bitnet: rcpt@heithe5.BITNET   | Eindhoven University of  Technology
phone:  +31 (0)40 474541      | P.O. Box 513, 5600 MB Eindhoven, NL

stolcke@ICSI.Berkeley.EDU (Andreas Stolcke) (02/05/91)

In article <399@rc6.urc.tue.nl>, rcpt@rw7.urc.tue.nl (Piet Tutelaers) writes:
|> Can somebody explain how nroff (the `device independant'-version) can
|> generate bold in an xterm window? I use `nroff -man manual' but on my NCD
|> Xterminal I don't get a nice bold. Does there exist a tab.xterm file for
|> putting it in /usr/local/lib/nterm? Or is there another method?

Some nroff version won't even generate boldface via backspacing, I think.
For example, Sun's nroff won't do it,  but when we compiled the BSD source
of nroff and using the very same tables for the standard lpr terminal,
boldface came out just fine with overprinting using backspaces.  The
output can be fed through a pager like less to translate boldfacing into the
right terminal controls.  Works beautifully with xterm.  BTW, if your
nroff is broken and you don't have access to the source you might want to
use groff.  The -Tascii options generates both underlining and boldfacing
correctly.
-- 
Andreas Stolcke					stolcke@icsi.berkeley.edu
International Computer Science Institute	stolcke@ucbicsi.bitnet
1957 Center St., Suite 600, Berkeley, CA 94704	(415) 642-4274 ext. 126

fenn@wpi.WPI.EDU (Brian Fennell) (02/05/91)

In article <399@rc6.urc.tue.nl> rcpt@urc.tue.nl writes:
>Can somebody explain how nroff (the `device independant'-version) can
>generate bold in an xterm window? I use `nroff -man manual' but on my NCD
>Xterminal I don't get a nice bold. Does there exist a tab.xterm file for
>putting it in /usr/local/lib/nterm? Or is there another method?
>
funny you should ask this, I was just answering a simmilar question.

nroff generates x^Hx for bold and x^H_ for underlined text.
ul and less handle this very well.

nroff -man manual | less -s
or
nroff -man manual | cat -s | ul 
I don't suggest puting a more at the end of the second example unless
you make your xterm (about) 132 cols wide.  more can't handle the
invisable characters ul adds.

Brian Fennell == fenn@wpi.wpi.edu

barnett@grymoire.crd.ge.com (Bruce Barnett) (02/06/91)

In article <1991Feb4.184204.23859@agate.berkeley.edu> stolcke@ICSI.Berkeley.EDU (Andreas Stolcke) writes:

>   Some nroff version won't even generate boldface via backspacing, I think.
>   For example, Sun's nroff won't do it.

nroff does. The problem is the character handling in cmdtool.
cmdtool has never provided a complete emulation of a tty. 

Disable scrollbars and it should work.
--
Bruce G. Barnett	barnett@crd.ge.com	uunet!crdgw1!barnett

barnett@grymoire.crd.ge.com (Bruce Barnett) (02/06/91)

In article <BARNETT.91Feb5165635@grymoire.crd.ge.com> I wrote :

>nroff does. The problem is the character handling in cmdtool.

My mistake. I was discussing the handling of italics, which cmdtool
will not display in reverse video if scrollbars are enabled.

Sun's nroff uses italics style output for bold as well as italics.
That is, instead of outputing <letter><backspace><letter> - it outputs
<underscore><backspace><letter>. Andreas Stolcke is right about Sun's
nroff being buggy. And all this time I blamed Open Windows! :-)

--
Bruce G. Barnett	barnett@crd.ge.com	uunet!crdgw1!barnett