Path: utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: iapsd!hopi!glenn@uunet.uu.net (Glenn Herteg) Newsgroups: comp.sys.sun Subject: Re: man pages and highlighting etc Keywords: Miscellaneous Message-ID: <2540@brchh104.bnr.ca> Date: 18 Apr 91 15:30:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 59 Approved: Sun-Spots@rice.edu X-Original-Date: Thu, 18 Apr 91 01:00:09 PDT X-Refs: Original: v10n69 X-Sun-Spots-Digest: Volume 10, Issue 86, message 1 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu In Sun-Spots v10n69, pearmana@prl.philips.co.uk writes: [... bold and underlining from nroff don't show up ...] I have modified my local copies of "man" and "catman" in the following ways, by appropriate use of a binary editor: The version of "man" differs from the standard SunOS 4.x version in that it invokes "nroff -Tsun" instead of "nroff -Tlpr" when it formats manual pages for a terminal device. This terminal specification is used in conjunction with a user-written "nroff" terminal-driving table called "/usr/lib/term/tabsun", written for the SunView environment. Use of this table forces "nroff" to insert the correct escape sequences so boldface characters appear as such in a SunView tty window, such as the one used by "shelltool". This version of "man" also changes the "-t" flag given to troff (or the command specified with the TROFF environment variable) to "-p", the equivalent flag accepted by eroff. The version of "catman" differs from the standard SunOS 4.x version in that, like the local "man", it invokes "nroff -Tsun" instead of "nroff -Tlpr". These fixes are used in conjunction with setenv PAGER "more -c -f -s" in my .login or .cshrc file, and modifications to the -man macros to change the page width to 7.5i for nroff-formatted documents, and to change the page length for nroff-formatted documents to 100i. These changes to the standard -man macros allow more of the manual page to fit across a standard window, and they get rid of almost all those annoying header and footer lines appearing in the middle of your screen. Why Sun never thought of this I'll never know; certainly the only reason to use nroff is for terminal display, not for actual printing. Finally, I have /Tty/Bold_style "Offset_X" in my .defaults file. This allows boldface to actually show up as such. Italics show up as underlined text automatically, as long as you have /Tty/Underline_mode Enabled (this seems to be the default if you have no similar line in your .defaults file). This solution is not perfect, but it comes close. It lets me preview my manual pages on the screen as I write them, so I don't waste lots of paper to get most formatting and fonts right. There are a number of minor glitches I wish Sun would fix, but there's not a snowball's ... well, they've moved on to OpenWindows and other pursuits. I haven't yet tried to set up the equivalent structure there. Once this was all set up, I ran catman on all the standard Sun manual pages, so everybody gets to take advantage of these improvements. Also, any new manual pages I write automatically get formatted cleanly, and stored away in the cat? directories for future reference. I wish I could coax Sun into supporting ditroff, -mm, man, and kin in a completely clean way, to avoid all this trouble. They are way behind the current versions of these programs. Does no one within Sun ever look at on-line manual pages?