An extension for org-babel to support blockdiag.
This package is availaple in MELPA.
With "MELPA enabled emacs" you could install this package by typing this sequence:
M-x
package-install
ob-blockdiag
⏎
Now you could enable this package in your Emacs config with:
(org-babel-do-load-languages 'org-babel-load-languages
'((blockdiag . t))
)
Blockdiag in Fedora installed from
python3-blockdiag
package which has unusual executable name. Output file name isololo.png
#+BEGIN_SRC blockdiag :tool blockdiag-3.5 :file ololo.png
blockdiag {
A [label = "foo"];
B [label = "bar"];
C [label = "baz"];
A -> B [label = "click bar", textcolor="red"];
B -> C [label = "click baz"];
C -> A;
}
#+END_SRC
There are some things you could customize:
- `:tool` if you have blockdiag in unusual location or want to use seqdiag or [others](http://blockdiag.com/en/#table-of-contents)
- `:transparency t` to make transparent background of diagram (PNG only)
- `:antialias t` pass diagram image to anti-alias filter
- `:font` if you want the `:tool` to use provided font
- `:size` if you want the `:tool` to use custom size
- `:type` if you want the `:tool` to use different file format type, e.g. pdf, svg
It recreates a buffer with name *ob-blockdiag*
every time you evaluating something.
There will be errors and output.