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.
-
You need to have ditaa installed. (Need to be able to run
ditaafrom your command line). Fortunately, recent package managers such asaptallow you to install it with a single command linesudo apt install ditaa.brewlet me do similarsudo brew isntall ditaaon my mac. For windows, sorry, please let me know how to do that… -
You need to give an option
--shell-escapeto your LaTeX compiler (such aspdflatex,latex, etc) command whichever you use.
-
Place the
ditaa.styfile at the same directory as your.texfile. (This step will not be necessary, iflatex-ditaais available from CTAN) -
Create
ditaadirectory under the directory you have for the other non-ditaa images. This package will create.ditaaand.pngfiles here. -
Do
usepackage[imagepath=IMAGEPATH]{ditaa}beffore\begin{document}. The IMAGEPATH is the directory you have images. -
Compile your
.texfiles as usual, but giving--shell-escapeoption to your(pdf)latexcommand.
Typically, run mkdir ./resources/graphics and do following in your .tex file.
\def\imagepath{./resources/graphics}
\usepackage[imagepath=\imagepath]{ditaa}
\graphicspath{ {\imagepath/} }
Then compile your file with pdflatex --shell-escape.
-
Use https://github.com/stathissideris/ditaa that support SVG
Its supported options are as follow (summed up) :
% Turns anti-aliasing off -A,--no-antialias % The background colour of the image -b,--background <BACKGROUND> % Renders the debug grid -d,--debug % Prevents the separation of common edges -E,--no-separation % The encoding of the input file -e,--encoding <ENCODING> % The input is an HTML file -h,--html % Prints usage help --help % Image file is overwriten -o,--overwrite % All corners to be rendered as round corners -r,--round-corners % Turns off the drop-shadow effect -S,--no-shadows % Size of the rendered image -s,--scale <SCALE> % SVG image as destination file --svg % SVG font URL --svg-font-url <FONT> % Diagram rendered on a transparent background -T,--transparent % Tabs interpreted as x spaces -t,--tabs <TABS> % Makes ditaa more verbose -v,--verbose % Sides of parallelograms as fixed slope -W,--fixed-slope
Cannot be specified on a group basis, only in the preamble.
Just add the requested parameters without the leading/separator dash(es).
\usepackage[S]{ditaa}or :
\usepackage[noshadows, svgfonturl={carlito-regular-webfont.svg}]{ditaa}Online sites such as ascii-flow will be your friends!
-
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.
