The pod2mdoc utility is a converter from POD into mdoc. It's meant to operate like pod2man; however, it doesn't require a Perl installation: pod2mdoc is a standalone ISC-licensed ISO C utility and should compile on any modern UNIX system.
Be aware, as stated in the manual:
By way of being a presentational language, POD is not well-represented by mdoc(7). Semantic content must be inferred and may be wrong.
The pod2mdoc utility is still under development. However, when translating the LibreSSL manuals, it has been shown that with some manual postprocessing, it is already very usable for real-world tasks.
Contact the mandoc developers with questions, but please make sure any formatting issue hasn't already been covered in the manual.
In addition to the release notes given below, a full ChangeLog is available.
New in version 0.2 (May 19, 2015)
SYNOPSIS preprocessor lines use Fd
.
Names found in the SYNOPSIS are remembered
using Marc Espie's ohash library (bundled
for compatibility with operating systems
lacking it); that information is used
subsequently to mark up
function names with Fn
,
function arguments with Fa
,
type names with Vt
,
preprocessor macros with Dv
.
Foreign function names are marked up
with Xr
.
Whitespace handling has been improved
in many respects (blank lines in literal
displays; re-wrap text lines; new sentence,
new line; better horizontal spacing;
no more whitespace at the end of lines).
Improved handling of closing punctuation.
Escaping of quotes at the beginning of
macro arguments.
New in version 0.1 (November 17, 2014)
Simple Ft/Fo/Fa/Fc
parser and formatter for the SYNOPSIS.
New in version 0.0.13 (July 19, 2014)
Proper translation of POD commands and formatting codes into mdoc macros, including correct whitespace handling. Only capital ASCII letters A-Z can start a formatting code. Do not skip the content of invalid formatting codes. Improved handling of filename extensions.
New in version 0.0.12 (July 11, 2014)
Render B<NULL>
as .Dv NULL
.
Correctly check the number of arguments.
Show the usage() message if there are too many arguments.
Mention the optional "file" argument in the usage() message.
New in version 0.0.11 (April 7, 2014)
Properly render #include
in the SYNOPSIS with In
.
Handle nested escape codes in L<>
links (and ignore them).
Properly consume whitespace following X<>
and N<>
.