.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Pod::Simple::Pandoc 3pm" .TH Pod::Simple::Pandoc 3pm "2017-01-10" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Pod::Simple::Pandoc \- convert Pod to Pandoc document model .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Pod::Simple::Pandoc; \& \& my $parser = Pod::Simple::Pandoc\->new; \& my $doc = $parser\->parse_file( $filename ); \& \& # result is a Pandoc::Document \& print $doc\->to_json; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module converts \s-1POD\s0 format documentation (perlpod) to the document model used by Pandoc . The result can be accessed with methods of Pandoc::Element and emitted as \s-1JSON\s0 for further processing to other document formats (\s-1HTML,\s0 Markdown, LaTeX, \s-1PDF, EPUB,\s0 docx, \s-1ODT,\s0 man...). .PP The command line script pod2pandoc makes use of this module, for instance to directly convert to \s-1PDF:\s0 .PP .Vb 1 \& pod2pandoc input.pod | pandoc \-f json \-t output.pdf .Ve .SH "METHODS" .IX Header "METHODS" .ie n .SS "parse_file( $filename | *INPUT )" .el .SS "parse_file( \f(CW$filename\fP | *INPUT )" .IX Subsection "parse_file( $filename | *INPUT )" Reads Pod from file or filehandle and convert it to a Pandoc::Document. .ie n .SS "parse_string( $string )" .el .SS "parse_string( \f(CW$string\fP )" .IX Subsection "parse_string( $string )" Reads Pod from string and convert it to a Pandoc::Document. .SH "MAPPING" .IX Header "MAPPING" Pod elements are mapped to Pandoc elements as following: .SS "Formatting codes" .IX Subsection "Formatting codes" Formatting codes for \fIitalic text\fR (\f(CW\*(C`I<...>\*(C'\fR), \fBbold text\fR (\f(CW\*(C`B<...>\*(C'\fR), and \f(CW\*(C`code\*(C'\fR (\f(CW\*(C`C<...>\*(C'\fR) are mapped to Emphasized text (\f(CW\*(C`Emph\*(C'\fR), strongly emphasized text (\f(CW\*(C`Strong\*(C'\fR), and inline code (\f(CW\*(C`Code\*(C'\fR). Formatting code for \&\fIfilenames\fR (\f(CW\*(C`F<...>\*(C'\fR) are mapped to inline code with class \&\f(CW\*(C`filename\*(C'\fR (\f(CW\*(C`\`...\`{.filename}\*(C'\fR in Pandoc Markdown). Formatting codes inside code and filenames (e.g. \f(CW\*(C`code with \f(CBbold\f(CW\*(C'\fR or \fI\fR as filename) are stripped to unformatted code. Character escapes (\f(CW\*(C`E<...>\*(C'\fR) and \f(CW\*(C`S<...>\*(C'\fR are directly mapped to Unicode characters. The special formatting code \f(CW\*(C`X<...>\*(C'\fR is ignored. .SS "Links" .IX Subsection "Links" Some examples of links of different kinds: .PP .PP pod2pandoc .PP \&\*(L"\s-1OPTIONS\*(R"\s0 in pod2pandoc .PP \&\fIperl\fR\|(1) .PP \&\*(L"\s-1ENVIRONMENT\*(R"\s0 in \fIcrontab\fR\|(5) .PP hell itself! .PP Link text can contain formatting codes: .PP the \f(CW\*(C`pod2pandoc\*(C'\fR script .PP Internal links are not supported yet: .PP \&\*(L"\s-1MAPPING\*(R"\s0 .PP mapping from PoD to Pandoc .ie n .SS "Titles \fImay contain formatting \fP\f(CI""codes""\fP\fI\fP!" .el .SS "Titles \fImay contain formatting \fP\f(CIcodes\fP\fI\fP!" .IX Subsection "Titles may contain formatting codes!" .SS "Lists" .IX Subsection "Lists" .IP "1." 4 Numbered lists are .IP "2." 4 converted to \f(CW\*(C`NumberedList\*(C'\fR and .RS 4 .IP "\(bu" 4 Bulleted lists are .IP "\(bu" 4 converted to .Sp \&\f(CW\*(C`BulletList\*(C'\fR .RE .RS 4 .RE .IP "Definition" 4 .IX Item "Definition" .PD 0 .IP "Lists" 4 .IX Item "Lists" .IP "are" 4 .IX Item "are" .PD \&\fIalso\fR supported. .SS "=over/=back" .IX Subsection "=over/=back" .RS 4 An \f(CW\*(C`=over\*(C'\fR...\f(CW\*(C`=back\*(C'\fR region containing no \f(CW\*(C`=item\*(C'\fR is mapped to \f(CW\*(C`BlockQuote\*(C'\fR. .RE .SS "Verbatim sections" .IX Subsection "Verbatim sections" .Vb 2 \& verbatim sections are mapped \& to code blocks .Ve .SS "Data sections" .IX Subsection "Data sections" Data sections with target \f(CW\*(C`html\*(C'\fR or \f(CW\*(C`latex\*(C'\fR are passed as \f(CW\*(C`RawBlock\*(C'\fR. \&\f(CW\*(C`HTML\*(C'\fR, \f(CW\*(C`LaTeX\*(C'\fR, \f(CW\*(C`TeX\*(C'\fR, and \f(CW\*(C`tex\*(C'\fR are recognized as alias. .SH "LIMITATIONS" .IX Header "LIMITATIONS" Sure there are bugs. Please send bug reports ! .PP Configuration will be added in a later version. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is based on Pod::Simple (Pod::Simple::SimpleTree). It makes obsolete several specialized \f(CW\*(C`Pod::Simple::...\*(C'\fR modules such as Pod::Simple::HTML, Pod::Simple::XHTML, Pod::Simple::LaTeX, Pod::Simple::RTF Pod::Simple::Text, Pod::Simple::Wiki, Pod::WordML, Pod::Perldoc::ToToc etc.