[comp.sys.hp] Inverse Characters in man

rick@bnrunix.UUCP (Richard Johns X7191) (07/19/89)

Does anyone know how to turn off character highlighting for man?  It drives me 
nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.

Rick Johns

karish@forel.stanford.edu (Chuck Karish) (07/19/89)

In article <228@bnrunix.UUCP> rick@bnrunix.UUCP (Richard Johns X7191) wrote:

>Does anyone know how to turn off character highlighting for man?  It drives me 
>nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.

Find or modify a terminfo file to do what you want.  I'd figure out
my terminal type, copy the corresponding file from /usr/lib/terminfo,
convert it to ASCII with `untic', edit it, and compile it with `tic'.

Once this is done, the TERMINFO environment variable will select the
special version instead of the system's.

	Chuck Karish		{decwrl,hpda}!mindcrf!karish
	(415) 493-7277		karish@forel.stanford.edu

jk@hpfelg.HP.COM (John Kessenich) (07/19/89)

    Look up fixman and catman in the manuals.  I have not used these
    commands for years, I just remember their names.

    John Kessenich

stroyan@hpfcdc.HP.COM (Mike Stroyan) (07/20/89)

>>Does anyone know how to turn off character highlighting for man?  It drives
>>me nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.
>
>Find or modify a terminfo file to do what you want.  I'd figure out
>my terminal type, copy the corresponding file from /usr/lib/terminfo,
>convert it to ASCII with `untic', edit it, and compile it with `tic'.

The terminfo entries used by man are smso, "enter standout mode", and
rmso, "exit standout mode".  You could either turn them off or change
them to something besides inverse.  Depending on the terminal you are
using you may be able to substitute one of bold, half-brite, underline,
or color.  On a color hp display, I like to use color for standout.
I put "smso=\E&v3S, rmso=\E&v0S" in terminfo, which displays man
highlighting as yellow.

Mike Stroyan, stroyan@hpfcla.hp.com

paul@hpldola.HP.COM (Paul Bame) (07/20/89)

For ksh and sh, you can get non-highlighted stuff from man with

	$ TERM=dumb man ls

and one which should work for all shells:

	$ man ls | cat

but beware that there is enough stuff there that

	$ man ls | cat | more

may restore highlighting (it did when I just tried it).


		-Paul Bame

mck@hp-ptp.HP.COM (Doug_McKenzie) (07/20/89)

>Does anyone know how to turn off character highlighting for man?  It drives me 
>nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.

"man whatever | col -b | more" if you have the time.

Doug McKenzie

ken@hpclkms.HP.COM (Ken Sumrall) (07/20/89)

>Does anyone know how to turn off character highlighting for man?  It drives me 
>nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.
>
>Rick Johns

For what its worth, you could use:
     man $command | col -b | more

Anyone have any other suggestions?

Ken Sumrall                    |            To be is to do.
HP California Language Labs    |            To do is to be.
ken%hpclove@hplabs.hp.com      |            To be or not to be.
...!hplabs!hpclove!ken         |            Do be do be do.

rml@hpfcdc.HP.COM (Bob Lenk) (07/20/89)

The suggestion of building a new terminfo entry will change or stop
highlighting from all terminfo/curses programs, not just man.  If
you dislike highlighting, that may be what you want.

The suggestion of using fixman will remove the highlighting from the
man files, and thus affect all users of man on your system.  If that's
what you want, it also has the advantage of saving some disk space.

If you want to affect only the man command only when you run it, you
can do

	man <whatever> | col -b | more #or other pager

You can use an alias, shell function, or shell script to do this
(depending on your choice of shell).

		Bob Lenk
		rml@hpfcla.hp.com
		hplabs!hpfcla!rml

crd@otter.hpl.hp.com (Chris Dalton) (07/20/89)

> Does anyone know how to turn off character highlighting for man?  It drives
> me nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.

> Rick Johns

This is a "feature" (sigh) of `more', which is the default display
program for man:  it highlights characters which have been overstruck.
There are two easy things you could try before you resort to diddling
the terminfo files:

    1) Try setting the environment variable MORE to the value "-u", and
       exporting it.  MORE tailors more's default behaviour; -u means
       don't highlight overstruck characters.  See more(1).

    2) Less likely to work, but worth a try:  some versions of man allow
       you to set an environment variable called MANPAGER to name a
       display program to use instead of more.  I prefer pg to more,
       and it doesn't highlight things.  I can't remember if this is in
       6.2 though.

Dontcha just love them features...

Chris

ray@vantage.UUCP (Ray Liere) (07/20/89)

>Does anyone know how to turn off character highlighting for man?  It drives me 
>nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.


We are on a Series 500, HP-UX #5.21, so this may or may not work on your system.

But ... you might try
	$man xxx|col -b|more

This seems to work fine for us -- I ran a couple of tests ...

This method does have one of the famous "hidden assumptions" -- see the
man page (!) for col. I believe the assumption is that the first character
output in an overstrike zone is the one you actually want to see.

If you have the disk space, then catman+fixman will also solve the problem!

Good luck.

Ray Liere
Vantage Consulting and Research Corporation
voice: (503)657-7294
uucp: uunet!nwnexus!vantage!ray
       -or-
      hplabs!hpfcla!hpubvwa!vantage!ray
Internet: vantage!ray@nwnexus.WA.COM

kamat@uceng.UC.EDU (Govind N. Kamat) (07/20/89)

   >Does anyone know how to turn off character highlighting for man?  It drives me 
   >nuts.  For what it's worth, I'm using HP-UX 6.2.  Thanks.
   >
   >Rick Johns

   For what its worth, you could use:
	man $command | col -b | more
   Anyone have any other suggestions?


In /bin/sh:	MORE=-u; export MORE
In /bin/csh:	setenv MORE -u

I cannot understand why the man command doesn't use the pager
specified in the PAGER environment variable -- yet another
of HP's user-hostile programs, I guess.

--
Govind N. Kamat 			College of Engineering
kamat@uceng.UC.EDU			University of Cincinnati
					Cincinnati, OH 45221, USA

frank@hpuxa.ircc.ohio-state.edu (Frank G. Fiamingo) (07/21/89)

You could try sending it through a filter to remove
the control characters.  Here's a shell script that
I use to convert a man page to straight ascii.  If 
this doesn't work for you, you could probably modify
it such that it will.


Frank
frank@hpuxa.ircc.ohio-state.edu

#! /bin/sh
# Program to convert manual file to ascii printable form
#
case "$#" in
0)
# no command line parameters
# so obtain the file interactively
#
echo "Enter man command name: \c"
read file
;;
*)
# process the file from the command line parameters
#
file=$1
;;
esac
#
man - $file > /tmp/man.$$
sed -e 's/.//g' /tmp/man.$$ 
rm /tmp/man.$$

------------------------------------------
P.S. The controls characters may not show up on your screen.
The next ot last line should be:
sed -e 's/.^H//g' /tmp/man.$$
where      ^^  represents the appropriate control character.
 

puglia@cunixc.cc.columbia.edu (Paul Puglia) (07/21/89)

What about using the ul commmnd with the -t and a terminal setting 
of dumb. The command will go something like
man <whatever> | ul -t dumb

This will turn them off.