1 #+OPTIONS: H:3 num:nil toc:2 \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
2 #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate hideblocks
3 #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
4 #+TAGS: Write(w) Update(u) Fix(f) Check(c) noexport(n)
5 #+TITLE: ditaa Source Code Blocks in Org Mode
7 #+EMAIL: tsd[at]tsdye[dot]com
9 #+STYLE: <style type="text/css">#outline-container-introduction{ clear:both; }</style>
10 #+LINK_UP: ../languages.html
11 #+LINK_HOME: http://orgmode.org/worg/
12 #+EXPORT_EXCLUDE_TAGS: noexport
16 <div id="subtitle" style="float: center; text-align: center;">
18 Org Mode support for <a href="http://ditaa.sourceforge.net//">ditaa</a>
21 <a href="http://ditaa.sourceforge.net/">
22 <img src="http://ditaa.sourceforge.net/images/logo.png"/>
28 * Template Checklist [12/12] :noexport:
30 - [X] Indicate #+AUTHOR:
32 - [X] Revise banner source block [3/3]
33 - [X] Add link to a useful language web site
34 - [X] Replace "Language" with language name
35 - [X] Find a suitable graphic and use it to link to the language
37 - [X] Write an [[Introduction]]
38 - [X] Describe [[Requirements%20and%20Setup][Requirements and Setup]]
39 - [X] Replace "Language" with language name in [[Org%20Mode%20Features%20for%20Language%20Source%20Code%20Blocks][Org Mode Features for Language Source Code Blocks]]
40 - [X] Describe [[Header%20Arguments][Header Arguments]]
41 - [X] Describe support for [[Sessions]]
42 - [X] Describe [[Result%20Types][Result Types]]
43 - [X] Describe [[Other]] differences from supported languages
44 - [X] Provide brief [[Examples%20of%20Use][Examples of Use]]
46 =ditaa= is a command-line utility that converts diagrams drawn using
47 ASCII art into bitmap graphics.
48 * Requirements and Setup
49 =ditaa= is distributed with =Org mode=. The file =ditaa.jar= can be found
52 Activate evaluation of =ditaa= source code blocks by adding =ditaa= to
53 =org-babel-load-languages=.
55 #+BEGIN_SRC emacs-lisp
56 (org-babel-do-load-languages
57 'org-babel-load-languages
58 '((ditaa . t))) ; this line activates ditaa
61 * Org Mode Features for =ditaa= Source Code Blocks
63 - file :: =ditaa= source code blocks require that an output file
65 - cmdline :: specify [[http://ditaa.sourceforge.net/#usage][command line arguments]] for =ditaa=
66 - java :: arguments for the =java= runtimes (JRE)
68 =ditaa= does not support sessions.
70 =ditaa= source code blocks return a link to a [[http://www.libpng.org/pub/png/][png]] bitmap file.
73 #+BEGIN_SRC ditaa :file images/hello-world.png
82 #+header: :exports results
83 #+BEGIN_SRC ditaa :file images/hello-world.png
92 [[file:images/hello-world.png]]