CTAN Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/ditaa

README
= The LaTeX ditaa package

With this, you will not need to bring your diagrams outside your  ```.tex``` file and not to worry about wiring such files for diagrams, and tools (Microsoft Visio, PowerPoint, Libre Office tools, as such) from which they are created.

```
\begin{ditaa}{ditaa caption example}{ditaaexample}
    +-----+     +----+     +---+
    |Store+---->|This+---->|One|
    +--+--+     +----+     +---+
       |
       V
    +-----+
    |THIS |
    +--+--+
       |
       V
    +-----------+     +--+
    |another one+---->|Hi|
    +-----------+     +--+
\end{ditaa}

```

The source above will be converted into a following diagram and incorporated in your final PDF.

.Figure Rendered Ascii Art
[#img-sunset]
[caption="Figure 1: ",link=resources/rendered.png]
image::resources/rendered.png[Rendered Ascii Art,480,300]

== Prerequisites
https://github.com/asciidoctor[Asciidoctor @ *GitHub*]

* You need to have http://ditaa.sourceforge.net/[ditaa] installed. (Need to be able to run ```ditaa``` from your command line). Fortunately, recent package managers such as ```apt``` allow you to install it with a single command line ```sudo apt install ditaa```. ```brew``` let me do similar ```sudo brew isntall ditaa``` on my mac. For windows, sorry, please let me know how to do that...
* You need to give an option ```--shell-escape``` to your LaTeX compiler (such as ```pdflatex```, ```latex```, etc) command whichever you use.


== How to use

* Place the ```ditaa.sty``` file at the same directory as your ```.tex``` file.
* Create ```ditaa``` directory under the directory you have for the other non-ditaa images. This package will create ```.ditaa``` and ```.png``` files.
* Do ```usepackage[imagepath=IMAGEPATH]{ditaa}``` beffore ```\begin{document}```. The IMAGEPATH is the directory you have images.
* Compile your  ```.tex``` files as usual, but giving  ```--shell-escape``` option to your ```(pdf)latex``` command.

== Tips
Online sites such as [ascii-flow](http://stable.ascii-flow.appspot.com/#Draw) will be your friends!

== Future Works
* Make it possible to define caption and filename independently.
* ~~Improve the way to define resource directory.~~
* ~~Make it possible to specify image size.~~ (Now you can specify image width. See the example)
* I want to use this in OverLeaf. Publish in CTAN? Help me. I'm a LaTeX newbie.

== References
* https://github.com/deselaers/latex-beamerposter[latex-beamerposter]: I learned a lot from this; such as how to package my .sty, how to organize directories under my repo for LaTeX style package, etc.

Down­load the con­tents of this pack­age in one zip archive (111.6k).

di­taa – Use di­taa di­a­grams within doc­u­ments

With this pack­age di­taa (DIa­grams Through Ascii Art) di­a­grams can be em­bed­ded di­rectly into files.

Pack­agedi­taa
Home pagehttps://github.com/dakusui/la­tex-di­taa
Bug trackerhttps://github.com/dakusui/la­tex-di­taa/is­sues
An­nounce­mentshttps://github.com/dakusui/la­tex-di­taa/wiki/An­nounce­ments
Re­pos­i­toryhttps://github.com/dakusui/la­tex-di­taa.git
Devel­op­ershttps://github.com/dakusui/la­tex-di­taa/is­sues/1
Ver­sion0.9
Li­censesThe Project Public Li­cense
Copy­right2018 Hiroshi Ukai
Main­tainerHiroshi Ukai
Con­tained inTeX Live as di­taa
MiKTeX as di­taa
TopicsDi­a­grams
...
Guest Book Sitemap Contact Contact Author