mantohtml - convert man page source to html


mantohtml [ --author AUTHOR ] [ --chapter CHAPTER ] [ --copyright COPYRIGHT ] [ --css CSS-FILE-OR-URL ] [ --help ] [ --subject SUBJECT ] [ --title TITLE ] [ --version ] MAN-FILE [ ... MAN-FILE ] > HTML-FILE


mantohtml converts man(1) source files to HTML and writes the result to the standard output.


The following options are recognized by mantohtml:

--author AUTHOR
Sets the author metadata of the HTML output.

--chapter CHAPTER
Sets the chapter (H1 heading) of the HTML output. If specified, each man page starts with a second-level (H2) heading with third-level (H3) sections and fourth-level (H4) sub-sections. If not specified, each man page starts with a first-level (H1) heading with second-level (H2) sections and third-level (H3) sub-sections.

--copyright COPYRIGHT
Sets the copyright metadata of the HTML output.

Sets the Cascading Style Sheet (CSS) for the HTML output. Files are embedded inline with 'http:' and 'https:' URLs are referenced.

Shows program help.

--section SECTION
Sets the section metadata of the HTML output.

--subject SUBJECT
Sets the subject metadata of the HTML output.

--title TITLE
Sets the title of the HTML output.

Shows program version.

Exit Status

mantohtml returns a non-zero exit status when an error occurs.


Convert the man page source file example.1 to HTML with the default stylesheet, author, and title, with the output sent to the file example.html:

    mantohtml example.1 >example.html

Convert all man pages in the current directory to HTML using the Bootstrap stylesheet:

    mantohtml --author "Alex the Author" \
        --css \
        --title "Alex Project Manual" *.[1-8] >alex-manual.html


Copyright © 2022-2023 by Michael R Sweet.

See Also

groff_man(7), man(1), man(7), man-pages(7).