me, thinking out loud…

ditaa and Org mode

This post is a reply to a comment on my blog asking how to insert ascii-art in org-mode documents.

To simply get the diagram in ascii, put the text into your file as “code”.

:  +--------------+
:  |              |
:  |   Analysis   |
:  +------+-------+
:        |
:        |
:        |
:        v
:  +--------------+
:  |              |
:  |   Design     |
:  +------+-------+
:        |
:        |
:        v
:  +--------------+
:  |              |
:  | Programming  |
:  +--------------+
 +--------------+
 |              |
 |   Analysis   |
 +------+-------+
       |
       |
       |
       v
 +--------------+
 |              |
 |   Design     |
 +------+-------+
       |
       |
       v
 +--------------+
 |              |
 | Programming  |
 +--------------+

You can get beautiful images using org-mode. The present versions of org-mode comes along with ditaa.

To use ditaa, you will need to have java installed.

#+begin_ditaa communication.png -r -S
        +-----------+        +---------+
        |    PLC    |        |         |
        |  Network  +<------>+   PLC   +<---=---------+
        |    cRED   |        |  c707   |              |
        +-----------+        +----+----+              | 
                                  ^                   | 
                                  |                   | 
                                  |  +----------------|-----------------+
                                  |  |                |                 |
                                  v  v                v                 v
          +----------+       +----+--+--+      +-------+---+      +-----+-----+       Windows clients
          |          |       |          |      |           |      |           |      +----+      +----+
          | Database +<----->+  Shared  +<---->+ Executive +<-=-->+ Operator  +<---->|cYEL| . . .|cYEL|
          |   c707   |       |  Memory  |      |   c707    |      | Server    |      |    |      |    |
          +--+----+--+       |{d} cGRE  |      +------+----+      |   c707    |      +----+      +----+
             ^    ^          +----------+             ^           +-------+---+
             |    |                                   |                        
             |    +--------=--------------------------+                    
             v                                                             
    +--------+--------+                                                         
    |                 |                                                         
    | Millwide System |            -------- Data ---------                      
    | cBLU            |            --=----- Signals ---=--                      
    +-----------------+                                                         
#+end_ditaa

https://punchagan.files.wordpress.com/2010/08/communication_232b3e6564d46a9242668adfbfeddbf2b61cff941.png

Neat, ain’t it?

Comments on: "ditaa and Org mode" (4)

  1. cool. you are the man!!

  2. […] 这里使用的是ditaa,第一次听说ditaa这个玩意是在从punchagan的博客,即这里 6,当时我问了一个org-mode中怎样嵌入ASCII图的问题7,他就给了我这么大一个鱼杆!! […]

  3. […] 这里使用的是ditaa,第一次听说ditaa这个玩意是在从punchagan的博客,即这里 6,当时我问了一个org-mode中怎样嵌入ASCII图的问题7,他就给了我这么大一个鱼杆!! […]

  4. […] ditaa and Org mode July 20103 comments 4 […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: