Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'No reason to specify the path to the man page' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
No reason to specify the path to the man page
Authored by: mzs on Jul 26, '04 12:26:49PM
To get nice postscript output from man use the -t option. It is better to do it this way than piping through troff directly because there are lines in man files that specify to use other preprocessors such as tbl and eqn that you will not use unless you specify them in your pipeline as well. If you want a man page that turns-out not to be the first one and you use a Bourne-style shell, just do the appropriate MANPATH=... before your pipeline. Also, ps2pdf is not installed by default on MacOS X, but pstppdf appeared with 10.2 or so. So for example to get the man page as a pdf file for the man command itself, you could do:

man -t man | pstopdf -i -o man.pdf
Although there really is no reason for the pstopdf step as with 10.3 at least I can open postscript files in Preview.app.

I personally dislike the 'pretty-printing' of typeset man pages. I personally like to use something like this:


man man | col -bx >man.txt
The col command strips away the escapes used for underlines and bold characters.

[ Reply to This | # ]