source. If unspecified or
is taken to be standard input. Its arguments are as follows:
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, they're rendered with ‘In’.
Other lines starting with ‘#’ are rendered with ‘Fd’.
Function declarations are rendered with ‘Ft’, ‘Fo’, and ‘Fa’.
B<> format code is rendered as ‘Nm’.
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’.
] pairs are rendered as ‘Oo’ and ‘Oc’.
Thus, the input
B<foo> [B<-bar baz>]
is rendered as follows:
.Fl bar Ar baz
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:
Multiple names separated by a comma are properly handled.
In any section, the
format code is considered a ‘Lk’ link if beginning with
. If beginning with
, 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
. If only a section appears, such as in
, 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 don't match, they are marked up with ‘Xr’. Words not followed by “()” that match preprocessor macros #define'd in the SYNOPSIS section are marked up with ‘Dv’.
If the contents of a
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’.