|For compatibility with pod2man(1). Ignored.|
Set the document date
"Month Day, Year"
If unspecified or if
is the literal string
uses the file modification date or the current date if reading from
is the literal string
to the date and appends a dollar sign, producing the format used by
|Set the document title ('Dt') to title. If unspecified, pod2mdoc uses the suffix-stripped filename part of file as a document title or STDIN if reading from standard input (you probably dont want that).|
|Set the document section ('Dt') to section. If unspecified, pod2mdoc uses 1 or, if the input file suffix is .pm, uses 3p.|
Since mdoc(7) is semantic and perlpod(1) is not, pod2mdoc tries to figure out semantic context for some terms. Specifically, within each paragraph of the SYNOPSIS section, the following occur:
- If any number of #include <foo.h> lines are found at the start of a verbatim paragraph, theyre rendered with 'In'.
- Other lines starting with '#' are rendered with 'Fd'.
- Function declarations are rendered with 'Ft', 'Fo', and 'Fa'.
- An initial B<> format code is rendered as 'Nm'.
- Subsequent B<> format codes are rendered as 'Ar'. However, if the leading character of a B<> format code is '-', it is rendered as 'Fl'. Subsequent space-separated terms without leading hyphens, e.g., B<-foo bar>, are rendered as 'Ar'.
- Matching [ and ] pairs are rendered as 'Oo' and 'Oc'.
Thus, the input B<foo> [B<-bar baz>] is rendered as follows:.Nm foo .Oo .Fl bar Ar baz .Oc
In the NAME section, 'Nm' and 'Nd' macros are inferred from text leading and trailing the last hyphen followed by a space (there may be any number of hyphens preceding the space). The space may occur on either side of the hyphen. Thus, B<foo> - bar will be rendered as follows:.Nm foo .Nd bar
Multiple names separated by a comma are properly handled.
In any section, the L<> format code is considered a 'Lk' link if beginning with http:, https:, ftp:, sftp:, smb:, or afs:. If beginning with mailto:, it is considered a 'Mt' link. Otherwise, it is considered a 'Xr' manpage in section 3P if containing double-colons or section 1 otherwise. The section may be overriden as L<foo(5)>. If only a section appears, such as in </section>, the link is rendered with 'Sx'.
Words followed by "()" that match function names listed in the SYNOPSIS section are marked up with 'Fn'. If they dont match, they are marked up with 'Xr'. Words not followed by "()" that match preprocessor macros #defined in the SYNOPSIS section are marked up with 'Dv'.
If the contents of a B<> or I<> format code matches a type name mentioned in the SYNOPSIS section, it is rendered as 'Vt'. If it matches a function argument name mentioned there, it is rendered as 'Fa'.
To pipe a POD document foo.pod through mandoc(1) and a pager:
% pod2mdoc foo.pod | mandoc | more
If -s is not specified and the suffix for file is .pm, pod2mdoc infers a manual section of 3p, not 3 as stipulated in perlpod(1). Furthermore, all links in the format of L<Foo::Bar> are assumed to be in section 3p.
If pod2mdoc encounters an =item without the necessary =over, it will pretend that a prior =over was invoked. However, it will do so silently and not, as pod2man(1) does, append a POD ERRORS section in the output manpage saying so.
pod2mdoc was written by
.An Kristaps Dzonsons Aq Mt firstname.lastname@example.org .
By way of being a presentational language, POD is not well-represented by mdoc(7). Semantic content must be inferred and may be wrong.
pod2mdoc only supports the named E<xxx> escapes. HTML names and numbers are silently discarded.
Although most white-space requests in character encodings are properly carried to output, adjacent character escapes with the specific whitespace sequence "B<2>B< 3>" will cause the second space to be lost.
The S<> escape is discarded.
Unless solely a section link, the text and section parts of L<text|link/section> are discarded.