delorie.com/djgpp/faq/docs/man.html
|
search
|
Some docs files are called foo.1 or bar.man or baz.nroff, and they
seem to be written in some weird format which is very difficult to
read. How can I convert them to readable text files?
That weird format is the troff format which is used for formatting
Unix manual pages. The Unix command man converts them to
formatted text files which are usually displayed with a program like
more or less (and here less is considered
to be more than more :-). The formatted file includes bold
and underlined letters produced by overtyping using backspace
characters. To format these files, you can choose one of these
methods:
- Get and install a DOS port of the groff package, or port
it yourself (a very difficult task). One port of groff to
djgpp can be found on
omnigate.clarkson.edu:/pub/msdos/djgpp/pub. The latest
groff distribution can be found on the GNU ftp archive and
any of its mirrors.
- Get and install cawf, a DOS program which knows about
most of the troff formatting commands. cawf can be
found on any SimTel mirror.
- Format the file on any Unix machine, and download the results to
your PC. Under Unix, typing catman -p will print the
commands which are required to do this; you can then run those
commands on your .1 troff source files.
No matter which of the above methods you chose, you will need some
kind of browser which understands how to show bold and underlined
letters instead of backspace-overtyped characters. I suggest to
download a DOS port of GNU less, which uses colors to show
bold and underlined letters. You can find it as less177e.zip
on any SimTel mirror in the textutil directory. Another
possibility is to get the latest official GNU less
distribution which can be compiled out of the box with the Microsoft C
compiler (but I didn't try to do so).
Another possibility to read formatted man pages would be with an
Emacs editor, if you use one.