baron / ob-nwdiag.el

Org-babel blockdiag support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ob-blockdiag.el

An extension for org-babel to support blockdiag.

Installation

This package is availaple in MELPA.

How to enable 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))
)

Example

Blockdiag in Fedora installed from python3-blockdiag package which has unusual executable name. Output file name is ololo.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

Arguments

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)
- `:font` if you want the `:tool` to use provided font
- `:size` if you want the `:tool` to use custom size

Errors and output

It recreates a buffer with name *ob-blockdiag* every time you evaluating something.

There will be errors and output.

About

Org-babel blockdiag support

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%