The
man library parses lines of
man(7) input into an abstract syntax tree (AST).
In general, applications initiate a parsing sequence with
man_alloc(), parse each line in a document with
man_parseln(), close the parsing session with
man_endparse(), operate over the syntax tree returned by
man_node() and
man_meta(), then free all allocated memory with
man_free(). The
man_reset() function may be used in order to reset the parser for another input sequence. See the
EXAMPLES section for a full example.
Beyond the full set of macros defined in
man(7), the
man library also accepts the following macros:
PD
Has no effect. Handled as a current-scope line macro.
Sp
A synonym for ‘sp 0.5v' (part of the standard preamble for Perl documentation). Handled as a line macro.
Vb
A synonym for ‘nf' (part of the standard preamble for Perl documentation). Handled as a current-scope line macro.
Ve
A synonym for ‘fi', closing ‘Vb' (part of the standard preamble for Perl documentation). Handled as a current-scope line macro.
Furthermore, the following escapes are accepted to allow
pod2man(1) documents to be correctly formatted: \*(-- (dash), \*(PI (pi), \*(L" (left double-quote), \*(R" (right double-quote), \*(C+ (C++), \*(C` (left single-quote), \*(C' (right single-quote), \*(Aq (apostrophe), \*^ (hat), \*, (comma), \*~ (tilde), \*/ (forward slash), \*: (umlaut), \*8 (beta), \*o (degree), \*(D- (Eth), \*(d- (eth), \*(Th (Thorn), and \*(th (thorn).