% Preamble
\documentclass[11pt]{article}

% Packages
\usepackage{a4wide}
\def\imagepath{./resources/graphics}
\usepackage[imagepath=\imagepath]{ditaa}
\graphicspath{ {\imagepath/} }

\begin{document}
    This is a ditaa diagramm example.
    \begin{ditaa}{ditaa caption example}{ditaaexample}
        +--------+   +-------+    +-------+
        |        | --+ ditaa +--> |       |
        |  Text  |   +-------+    |diagram|
        |Document|   |!magic!|    |       |
        |     {d}|   |       |    |       |
        +---+----+   +-------+    +-------+
            :                         ^
            |       Lots of work      |
            +-------------------------+
    \end{ditaa}
    Enjoy!
    And you can even specify image width like this Figure.\ref{fig:ditaaexample2}.
     \begin{ditaa}[6cm]{ditaa caption example2}{ditaaexample2}
       +---------+
       | cBLU    |
       |         |
       |    +----+
       |    |cPNK|
       |    |    |
       +----+----+
    \end{ditaa}
\end{document}

