In order to make the regular man pages available, a
directory tree containing directories man, man/man1, etc. (for
all of the man page extensions used) needs to be created.
In addition, a ``whatis'' database should be built within the primary man
directory so that man -k topic
will find the command or routines with topic in their description.
This is done with the program /usr/etc/catman or makewhatis. If
either of these programs is not
available, the ``whatis'' database cannot be created.
The following C-shell code will create the database:
unalias cd if (-e /usr/etc/catman) then (cd man ; /usr/etc/catman -w -M . ) else if (-e `which makewhatis`) then (cd man ; makewhatis -M `pwd`) endifSome catman programs may behave erroneously; at least one system, instead of using the .SH NAME entry, looks for .SH NAME ... .SH. What this means is that if the first text after the routine's description is not a section title (i.e., a line ending with a colon), the catman program will generate an incorrect whatis database.
It is easy to provide an X11 interface to the man pages by using xman and the MANPATH variable. Here is a simple shell script that provides access to the man pages in /home/me/man:
#! /bin/sh MANPATH=/home/me/man export MANPATH xman -notopbox -helpfile /home/me/man/me.help "$@" &In order to get man and xman to display the correct names for the various sections (corresponding to the directories man/man1, man/man2, etc.), a file man/mandesc is required. Here is the man/mandesc for the PETSc package:
r(r)Introduction 1(1)Sparse Matrix Routines 2(2)Vector Routines 3(3)Simplified Solvers 4(4)Iterative Methods 5(5)High Level Communications 6(6)Low Level Communications 7(7)System Calls 8(8)Miscellaneous 9(9)Domains and Grids b(b)BLAS x(x)X Window System Tools n(n)Nonlinear Solvers no default sectionsFinally, xman displays a help page when it starts. To change the file, use the -helpfile argument and provide a simple text file (not a man) page.