Version: 1.1
Introduction
Mscgen (http://www.mcternan.me.uk/mscgen/) is a small program that parses Message Sequence Chart descriptions and produces PNG, SVG, EPS or server side image maps (ismaps) as the output. The program and the language it parses are similar to the Graphviz Dot tools.
Using the AsciiDoc mscgen filter, Message Sequence Chart descriptions can be embedded into AsciiDoc documents and processed into either PNG bitmap or SVG vector graphics.
Usage
-
The mscgen filter is invoked by setting the listing block or paragraph style (the first positional block attribute) to "mscgen".
-
The second positional attribute (named target) is optional, it sets the name of the generated image file. If this is not supplied a file name is automatically generated.
This AsciiDoc block:
["mscgen"] --------------------------------------------------------------------- msc { arcgradient = 8; a [label="Client"],b [label="Server"]; a=>b [label="data1"]; a-xb [label="data2"]; a=>b [label="data3"]; a<=b [label="ack1, nack2"]; a=>b [label="data2", arcskip="1"]; |||; a<=b [label="ack3"]; |||; } ---------------------------------------------------------------------
renders:

Installation
In addition to AsciiDoc you will need to have installed:
-
The mscgen command line utility (http://www.mcternan.me.uk/mscgen). mscgen must be excutable from the command line.
The filter was developed and tested on Windows using mscgen 0.21. and AsciiDoc 8.6.3.
Known Issues
If a version of mscgen earlier than 0.21 is used, SVGs are not sized correctly by FOP when producing PDFs as the width and height attribute are missing in the SVG file. Use PNG format with those earlier versions.
Examples
The following examples are taken from the mscgen distribution.


