This site is now 100% read-only, and retired.

Manual pages: not just for the console anymore

Posted by JoshTriplett on Thu 26 Oct 2006 at 14:21

You probably know about man, and how to read manual pages in the console. But did you know that man can display manual pages many other ways, such as in a browser, or in a printer-friendly form?

Manual pages use a typesetting format called roff (specifically, the man macros) to include some semantic structure to a document. This structure defines paragraphs, lists, headings, and manual page metadata. For more information on this format, read man 7 man.

Debian uses a Free Software implementation of roff from the GNU project, called groff. The Debian base system includes the package man-db, which contains (among other things) the man binary. This package Depends on the groff-base package, which includes some minimal functionality for rendering manual pages in a terminal, as formatted text. However, if you install the groff package (suggested by man-db), you get many additional output formats from man.

You can format a manual page as HTML by using the -Thtml option to man. By default, this will output the HTML-formatted manual page on standard output. As a shortcut, you can use man -H to format the manual page as HTML and open it in a web browser.

For easy printing, you can output a manual page as PostScript with -Tps. Again, this will output the PostScript-formatted manual page on standard output. You can capture it in a file, use a PostScript viewer which can view standard input, or pipe it straight to lpr to print it.

 

 


pinfo
Posted by grimoire (149.9.xx.xx) on Thu 26 Oct 2006 at 15:26
It's also worth noting that pinfo allows you to view GNU info pages using a lynx-style interface, which is much easier than trying to use info itself. Info should be burned, but for when you have no other option, pinfo makes it bearable.

[ Parent ]

Re: pinfo
Posted by Anonymous (199.111.xx.xx) on Tue 31 Oct 2006 at 23:51
You'll find info familiar if you do Emacs.

[ Parent ]

Re: Manual pages: not just for the console anymore
Posted by Anonymous (88.152.xx.xx) on Thu 26 Oct 2006 at 16:29
If you use KDE you can read man and info pages from Konqueror.
For exemple you can see the man page for 'ls' by entering "#ls" in Konqueror's address bar or to use "##ls" for the info page.

[ Parent ]

Re: Manual pages: not just for the console anymore
Posted by Anonymous (61.246.xx.xx) on Thu 26 Oct 2006 at 17:13
thanks for the tip

[ Parent ]

Re: Manual pages: not just for the console anymore
Posted by wuzzeb (64.5.xx.xx) on Thu 26 Oct 2006 at 21:22
If you use Gnome, you can view man pages in Yelp. Just type "man:whatever" or "info:whatever" into the search bar. (If you don't prefix it with man:, it will do a search and the man page will show up in the list.

You can also type "man:whatever" or "info:whatever" after pressing F2. Lastly, if you install http://eduffy.net/deskbar-plugins/index.html#man you can open man pages from the deskbar (opens in yelp). This last one is the one I use all the time... really slick.

[ Parent ]

Re: Manual pages: not just for the console anymore
Posted by Anonymous (64.142.xx.xx) on Fri 27 Oct 2006 at 02:46
I'm sad that Konqueror _lost_ support for man: and info: after KDE 1.x

##foo fails my usability test.

[ Parent ]

Re: Manual pages: not just for the console anymore
Posted by Anonymous (70.149.xx.xx) on Fri 27 Oct 2006 at 04:34
Not sure what you mean... man: and info: URLs work fine for me in Konq 3.5.3.

the ## is just a shortcut, I guess.

[ Parent ]

Re: Manual pages: not just for the console anymore
Posted by Anonymous (165.89.xx.xx) on Fri 27 Oct 2006 at 17:51
I like dwww - http://packages.debian.org/stable/doc/dwww - all the man pages searchable from your browser

[ Parent ]

Re: Manual pages: not just for the console anymore
Posted by Anonymous (86.108.xx.xx) on Thu 2 Nov 2006 at 18:42
Great tips!

apt-get install man2html , reading manpages was never better ;)

[ Parent ]