How to make nroff boldface on a terminal that can highlight?

Duane Morse duane at anasaz.UUCP
Fri Aug 4 01:42:56 AEST 1989


In article <20477 at adm.BRL.MIL>, justice at dao.nrc.ca (Gerald Justice) writes:
> I am writing some local man pages and was wondering if it was possible
> to have nroff pass information about boldfaced text to a user's terminal
> to have it appear as highlighted text.

There are a couple of approaches to this problem.

First, you can use the -T option of nroff when you format you man pages.
You would need to compile a translation table for the specified terminal;
there's public domain software to do this, by the way. The disadvantage
is that the escape sequences for one terminal don't necessarily apply
to the next. If you have more than one type of terminal at you're company,
you've got a problem. Further, you wouldn't be able to print that
version, either, because the printer probably has yet another idea of
how to do bold face and underlining.

Some terminals are smart enough to take the standard char-backspace-char
sequence and do boldface.  The public domain 'less' program is smart
enough to take these sequences and use inverse video for highlighting.

We keep formatted man pages under /usr/catman, like a lot of other
systems, to avoid the overhead of formatting the pages every time someone
wants to look something up. Using the standard 'man' command and piping
the stuff to 'less' works fine for us.

In order to print the formatted man pages, we have a locally-written
print filter program, and invoking that filter with the appropriate
printer-specific option is part of each lp interface script (we have
more than one type of printer and, with System V Rel 2, no convenient
way of doing printer control).
-- 

Duane Morse	...{asuvax or mcdphx}!anasaz!duane
(602) 861-7609



More information about the Comp.unix.questions mailing list