pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
611 stars 166 forks source link

How to specify location for images created by diagram-generator.lua ? #72

Closed rnwolf closed 5 years ago

rnwolf commented 5 years ago

When I use the diagram-generator.lua filter for an output like sample.docx it works great.

But if I try to generate html output, it seems that the resulting images are not saved to the local disk.

A command such as

pandoc.exe sample.md -f markdown -t html --lua-filter=filters\diagram-generator.lua -o sample.html

produces html with refrence to svg file, but it is not to be found in the local directory.

<img src="d035718761b975cd37a9e2c839b3e3db27f6e8ab.svg" alt="" /><figcaption>This is an image, created by <strong>PlantUML</strong>.</figcaption>

How do I ensure images are saved?

tarleb commented 5 years ago

The images are saved in pandoc's "mediabag". You'll probably want to use either --self-contained or --extract-media.