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.
--css CSS-FILE-OR-URL
Sets the Cascading Style Sheet (CSS) for the HTML output.
Files are embedded inline with 'http:' and 'https:' URLs are referenced.
--help
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.
--version
Shows program version.
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 https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css \ --title "Alex Project Manual" *.[1-8] >alex-manual.html
Copyright © 2022-2023 by Michael R Sweet.
groff_man(7), man(1), man(7), man-pages(7).