ImageMagick / Usage-Markdown

Base text document processed with pandoc
12 stars 13 forks source link

Pandoc filter execute #21

Open hdinkel opened 8 years ago

hdinkel commented 8 years ago

Adds filter to execute magick code.

All images are created in the '_images' directory (might need to be created first) Existing images will not be overwritten - we might want to add a command to the makefile like clean_images

The filter will not blindly execute any codeblock, but expects a key/value pair:

generate_image [True|False]

Another switch enables the automatic generation of HTML code including the tag for the generated image:

include_image [True|False]

Example CodeBlock:

~~~{generate_image=True include_image=False}
convert -size 40x20 xc:red xc:blue -append -rotate 90 append_rotate.gif
~~~

Note: Using fenced code blocks see http://pandoc.org/README.html#fenced-code-blocks and https://github.com/jgm/pandoc/issues/673

Current limitations: