sphinxcontrib-actdiag is sphinx extension for embedding actdiag diagrams. You can embed block diagrams with actdiag directive.
.. actdiag::
actdiag admin {
A -> B -> C;
}
You can get archive file at http://bitbucket.org/birkenfeld/sphinx-contrib/
$ sudo easy_install sphinxcontrib-actdiag
To enable this extension, add sphinxcontrib.actdiag module to extensions option at conf.py.
# Enabled extensions
extensions = ['sphinxcontrib.actdiag']
# Fontpath for actdiag (truetype font)
actdiag_fontpath = '/usr/share/fonts/truetype/ipafont/ipagp.ttf'
This directive insert a actuence diagram into the generated document. If filename is specified, sphinx reads external file as source script of blockfile. In another case, actdiag directive takes code block as source script.
Examples:
.. actdiag:: foobar.diag
.. actdiag::
actdiag {
// some diagrams are here.
}
This directive is able to generate thumbnail images using maxwidth option. maxwidth option takes pixel-size of image’s width.
Examples:
.. actdiag::
:maxwidth: 240
actdiag {
// some diagrams are here.
}
New in version 0.2.0.
This directive is able to generate description table using desctable option and description attribute
Input:
.. actdiag::
:desctable:
actdiag {
A -> B -> C;
A [description = "first action"];
B [description = "second action"];
C [description = "third action"];
lane {
A; B;
}
lane {
C;
}
}
Output
| Name | Description |
|---|---|
| A | first action |
| B | second action |
| C | third action |
This is a path for renderring fonts. You can use truetype font (.ttf) file path. You can specify single path with string, or multiple paths using array.
New in version 0.1.1.
If actdiag_antialias: is True, actdiag generates images with anti-alias filter.
You can specify image format on converting docs to HTML using actdiag_html_image_format . actdiag_html_image_format accepts ‘PNG’ or ‘SVG’ .
You can specify image format on converting docs to TeX using actdiag_html_image_format . actdiag_html_image_format accepts ‘PNG’ or ‘PDF’ .
If you set PDF, you will get clear diagram images as vector format. (*) reportlab is needed .