Include Macro to insert Astah Diagrams into a Markdown document using Pandoc.
``` {.astah file="designs/Sample.asta" caption="This is the caption" index=1 format="png"}
```
All parameters are required:
- file: name of the asta file name
- caption: caption to put under the image
- index: normally a astah-file contains more than one diagram, use the index to point to the n-th diagram in the file
- format: png or svg
pandoc --filter astah.py astah-sample.md -o astah.pdf
Assuming you have pandoc and python 2 installed, I suggest you the following options:
- Copy
astah.py
and the astah-folder with the astah JARs to the directory where your markdown files are. Makeastah.py
executable.
Additionally the Python code makes use of
pandocfilters
which can be installed as pip install pandocfilters
.