Pandoc::Filter::ImagesFromCode - transform code blocks into images
This Pandoc::Filter transforms CodeBlock elements into images.
Content of transformed code section and resulting image files are written to files. Files are named after code block's id if given or based on the code content if no id is available or if the id contains characters other than a-z0-9_-.
id
a-z0-9_-
File extension of input files extracted from code blocks. Defaults to code.
code
File extension of created image files. Can be a fixed string or a code reference that gets the document output format (for instance latex or html) as argument to produce different image formats depending on output format.
html
Directory where to place input and output files.
Command to transform input files to output files. Variable references $...$ can be used to refer to $infile$, $outfile$, $dir$, $from$, and $to$. Example:
$...$
$infile$
$outfile$
$dir$
$from$
$to$
run => ['ditaa', '-o', '$infile$', '$outfile$'],
To install Pandoc::Elements, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pandoc::Elements
CPAN shell
perl -MCPAN -e shell install Pandoc::Elements
For more information on module installation, please visit the detailed CPAN module installation guide.