Remove footers from 'man' pages

Dec 01, '01 02:58:29AM

Contributed by: robg

If you view 'man' pages in the Terminal (or using something like ManOpen in the GUI), then you may be familiar with the footers that are inserted every so often, as shown in this snippet from "man tcsh":

       ......
......
Sets the environment variable name to value.
(Domain/OS only) (+)

Astron 6.10.00 19 November 2000 1

TCSH(1) TCSH(1)

-e The shell exits if any invoked command terminates
......
......
These footers are somewhat annoying in the terminal, and very annoying if you're trying to print the manual in ManOpen, as they do not align with 'real' page breaks.

Carl Lindberg, the author of ManOpen, went looking for a solution to this problem after I (annoyingly?) asked him why they appeared regardless of what kind of tweaking I did in the Terminal. It turns out that the version of 'groff' (a document formatting utility) installed with OS X is a bit out of date. Installing the new version (1.17.2) removes the page footers, making the man pages print quite nicely in ManOpen.

If you'd like to install the newest 'groff', read the rest of the article for the instructions.

You'll need the Developer Tools installed for this project, as it requires compiling from source.

The first step is to download 'groff' from one of the GNU software mirrors (listed here. Navigate into the 'groff' directory and download groff-1.17.2.tar.gz. Expand this archive, open a Terminal and 'cd' into the newly created folder.

groff compiles quite easily, with no special tweaks required. Simply type:

% ./configure
% sudo make
% sudo make install
This should compile and install the application for you. When it's done, type 'rehash' and you should be good to go! 'man' should no longer insert annoying footers at random spots in your output. If you're still seeing them, make sure that 'usr/local/bin' is in your path, ahead of '/usr/bin'. If that still fails, edit /etc/man.conf and change the references for 'nroff' to the /usr/local/bin directory.

Thanks to Carl for tracking this one down! I've been wanting to print the 100+ page tcsh manual, but the footers in the middle of the pages made it too annoying to read.

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20011201025829733