Man Page - Converting Man Pages

Converting Man Pages

Besides viewing manual pages online (with man), man pages may also readily be converted to PDF format for immediate printing. In Mac OS X and GNU/Linux (with command replaced by the name of the desired command):

groff -mandoc command.1 >command.ps gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=command.pdf command.ps

The former command exports the manual page to PostScript format, while the latter then converts the resulting PostScript file to PDF. (The above works for both man- and mdoc-formatted manual pages.) In some cases, the hardcopy version of the manual page may be more readable if printed using a monospaced font; to do so, add the option -f C after the -mandoc option in the groff command above.

The mandoc formatter directly supports PDF among other filetypes:

mandoc -Tpdf command.1 >command.1.pdf mandoc -Tps command.1 >command.1.ps mandoc -Txhtml command.1 >command.1.xhtml

It is also possible to read pages as plain text with an external text editor by using the 'col' program with the '-b' option, with vim, with emacs-pipe, or with KWrite, part of KDE.

man sox | col -b | vim - man sox | col -b | emacs-pipe man sox | col -b | kwrite --stdin

Read more about this topic:  Man Page

Famous quotes containing the words converting, man and/or pages:

    A way of certifying experience, taking photographs is also a way of refusing it—by limiting experience to a search for the photogenic, by converting experience into an image, a souvenir. Travel becomes a strategy for accumulating photographs.
    Susan Sontag (b. 1933)

    The student who secures his coveted leisure and retirement by systematically shirking any labor necessary to man obtains but an ignoble and unprofitable leisure, defrauding himself of the experience which alone can make leisure fruitful.
    Henry David Thoreau (1817–1862)

    Mathematics may be compared to a mill of exquisite workmanship, which grinds your stuff of any degree of fineness; but nevertheless, what you get out depends upon what you put in; and as the grandest mill in the world will not extract wheat- flour from peascods, so pages of formulae will not get a definite result out of loose data.
    Thomas Henry Huxley (1825–95)