<div>Creating diagrams for documentation can be a pain, and more critically it interrupts the flow of writing. There&#39;s a way to create these diagrams in AsciiDoc without having to open a separate application. Actually, there are a few ways, I&#39;ll just give the most well-known example: ditaa - diagrams through Ascii art.</div>

<div><br></div><div>ditaa is a small command-line utility written in Java, that can convert diagrams drawn using ascii art (&#39;drawings&#39; that contain characters that resemble lines like | / - ), into proper bitmap graphics.</div>

<div><br></div><div>There is a filter available for AsciiDoc that will process blocks of text that are marked as ditaa diagrams using ditaa and insert the result as an image.</div><div><br></div><div>Here&#39;s how you could create the first diagram from the TicketMonster tutorial using ditaa within AsciiDoc.</div>

<div><br></div><div><div>[ditaa, single-page-app.png, 2]</div><div>----</div><div><font face="courier new, monospace">/--------------\      /--------------\</font></div><div><font face="courier new, monospace">| Single HTML5 |      |     REST     |</font></div>

<div><font face="courier new, monospace">|              |-----&gt;|              |</font></div><div><font face="courier new, monospace">|     page     |      |   services   |</font></div><div><font face="courier new, monospace">\--------------/      \--------------/</font></div>

<div>----</div></div><div><br></div><div>You might be thinking that getting all those pipes lined up is a bit of a pain. The first trick is to enable arbitrary positing of the cursor so you don&#39;t have to hit the space bar a zillon times. But even better than that, there&#39;s AsciiFlow -&gt; <a href="http://asciiflow.com">http://asciiflow.com</a>.</div>

<div><br></div><div>Just thought I&#39;d give you a heads up.</div><div><br></div>-Dan<div><br></div><div>p.s. The ditaa-AsciiDoc integration could be useful for the CDI specification as well.<br clear="all"><div><br></div>

-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><div><a href="http://google.com/profiles/dan.j.allen" target="_blank">http://google.com/profiles/dan.j.allen</a><br>

<a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br></div><br>
</div>