Crate ctb_formats_troff

Crate ctb_formats_troff 

Source
Expand description

Man page to HTML conversion program. Based on https://github.com/michaelrsweet/mantohtml Not 100% equivalent to the above; there are a couple intentional differences where there appeared to be bugs (.in 17 gives 17em not 1em, and doubled </a>\n</a> only has one </a>); and it uses its own name/version.

Usage:

mantohtml [OPTIONS] MAN-FILE [… MAN-FILE] >HTML-FILE

Options:

–author ‘AUTHOR’ Set author metadata –chapter ‘CHAPTER’ Set chapter (H1 heading) –copyright ‘COPYRIGHT’ Set copyright metadata –css CSS-FILE-OR-URL Use named stylesheet –help Show help –subject ‘SUBJECT’ Set subject metadata –title ‘TITLE’ Set output title –version Show version

Converted to Rust with AI assistance Limitations: Supports a subset of macros, not all of roff and its packages.

Other implementations: https://github.com/plan9foundation/plan9/blob/main/sys/src/cmd/troff2html/troff2html.c https://github.com/plan9foundation/plan9/tree/main/sys/src/cmd/troff

Functions§

convert_man_troff_to_html