NAME
Pandoc::Filter::ImagesFromCode - transform code blocks into images
DESCRIPTION
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_-
.
CONFIGURATION
- from
-
File extension of input files extracted from code blocks. Defaults to
code
. - to
-
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. - dir
-
Directory where to place input and output files.
- run
-
Command to transform input files to output files. Variable references
$...$
can be used to refer to$infile$
,$outfile$
,$dir$
,$from$
, and$to$
. Example:run => ['ditaa', '-o', '$infile$', '$outfile$'],