#+STARTUP: align fold nodlcheck hidestars oddeven lognotestate hideblocks
#+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
#+TAGS: Write(w) Update(u) Fix(f) Check(c) noexport(n)
-#+TITLE: ditaa Source Code Blocks in Org Mode
+#+TITLE: =Ditaa= Source Code Blocks in Org Mode
#+AUTHOR: Thomas Dye
#+EMAIL: tsd[at]tsdye[dot]com
#+LANGUAGE: en
</p>
<p>
<a href="http://ditaa.sourceforge.net/">
- <img src="http://ditaa.sourceforge.net/images/logo.png"/>
+<img src="http://ditaa.sourceforge.net/images/logo.png"/>
</a>
</p>
</div>
- [X] Describe [[Other]] differences from supported languages
- [X] Provide brief [[Examples%20of%20Use][Examples of Use]]
* Introduction
-=ditaa= is a command-line utility that converts diagrams drawn using
+=Ditaa= is a command-line utility that converts diagrams drawn using
ASCII art into bitmap graphics.
* Requirements and Setup
-=ditaa= is distributed with =Org mode=. The file =ditaa.jar= can be found
+=Ditaa= is distributed with =Org mode=. The file =ditaa.jar= can be found
in =contrib/scripts=.
Activate evaluation of =ditaa= source code blocks by adding =ditaa= to
** Sessions
=ditaa= does not support sessions.
** Result Types
-=ditaa= source code blocks return a link to a [[http://www.libpng.org/pub/png/][png]] bitmap file.
+=Ditaa= source code blocks return a link to a [[http://www.libpng.org/pub/png/][png]] bitmap file.
* Examples of Use
+The obligatory Hello World! example in =ditaa=:
#+BEGIN_EXAMPLE
#+BEGIN_SRC ditaa :file images/hello-world.png
+--------------+
#+RESULTS:
[[file:images/hello-world.png]]
+Now, round all corners by passing =ditaa= the =-r,--round-corners=
+command line switch.
+
+#+BEGIN_EXAMPLE
+#+BEGIN_SRC ditaa :file images/hello-world-round.png :cmdline -r
++--------------+
+| |
+| Hello World! |
+| |
++--------------+
+#+END_SRC
+#+END_EXAMPLE
+
+#+header: :exports results
+#+BEGIN_SRC ditaa :file images/hello-world-round.png :cmdline -r
++--------------+
+| |
+| Hello World! |
+| |
++--------------+
+#+END_SRC
+
+#+RESULTS:
+[[file:images/hello-world-round.png]]
+