-----------------------------------------------------------------------
Description
man2html takes formatted nroff in standard input (STDIN) and outputs the
HTML to standard output (STDOUT). The formatted nroff output is
surrounded with <PRE> tags with the following exceptions/additions:
* Section heads are wrapped in HTML header tags. See Section Head Map
File for more information. This feature can be turned off with the
-noheads command-line option.
* Overstriken words designated with the "< char ><backspace>< char >"
sequences are wrapped in <STRONG> tags.
* Overstriken words designated with the "_<backspace>< char >"
sequences (ie. underlined words) are wrapped in <EM> tags.
man2html also does the following:
* Merges the multi-page formatted nroff into a single page. See Usage
for information on how to tell man2html the page size and margin
width/heights of the formatted nroff. Depagination can be turned
off with the -nodepage command-line option.
* Creates links to other manpages if the -cgiurl command-line option
is specified.
By default, man2html does not put a title, <TITLE>, in the HTML
file. However, one can specify a title via the -title command-line
option.
man2html also has support for processing output generated from manpage
keyword search, " man -k ". See Keyword Search for more information.
-----------------------------------------------------------------------
Usage
man2html is invoked from a Unix shell, with the following syntax:
% man2html [ options ] < infile > out.html
% man unix_command | man2html [ options ] > out.html
The following options are available:
-headmap file
Read file to determine which HTML header tags are used for various
section heading in the manpage. See Section Head Map File for
information on the format of the map file.
-helpPrint out a short usage message of man2html . No other action is
taken.
-k Process input as the results from a manpage keyword search. See
Keyword Search for more information.
-leftm #
Use # to be the character width of the left margin of the formatted
nroff input. The default value is 0.
-nodepage
Do not merge the manpage into one page. This will cause running
headers/footers in the formatted nroff to carry over into the HTML
output.
-noheads
Do not wrap manpage section heads in HTML header tags.
-pgsize #
Use # as the page size of the formatted nroff input. The default
value is 66.
-seealso
Only create links to other manpages in the SEE ALSO section. The
option is only valid if the -cgiurl option is specified.
-sun Do not require a section head to have bold overstriking in the
formatted nroff input. The option is called -sun because it was on
a Sun workstation that section heads in manpages were not
overstriked.
-title string
Set the title of the HTML output to string .
-topm #
what HTML header tags are used for any given section head.
In order to write a section head map file, you will need to know about
Perl associative arrays. You do not need to be an expert in Perl to
write a map file. However, having knowledge of Perl allows you to be
more clever when writing a map file.
Augmenting the Default Map
To add to the default mapping defined by man2html , your map file will
contain lines with the following syntax
$SectionHead{'<section head text>'} = '<html header tag>';
where,