IMHO the problem does not rely on MiKTeX, but in the required programs that dot2texi
relies on. The package has the following dependencies:
- GraphViz - A graph visualization software.
dot2tex
- A tool for converting graphs generated by GraphViz to formats suitable for use with LaTeX.
The first one is an easy-to-deploy .msi
file - just double-click and install it in Windows. If I'm not mistaken, GraphViz even adds itself to the system path. You can check if the GraphViz tools are available by running dot --help
in the command prompt:

If you get a similar output, GraphViz is added to the system path.
Now, the second tool - dot2tex
- is quite tricky for the average Windows user. This tool is actually a Python script and, well, relies on Python to run. Note that the script runs only in the 2.x
series (I have Python 3.x
in my development Windows machine and had to downgrade it in order to test the script). If you have Python 2.x
installed, I recommend you to use easy_install
or pip
to install dot2tex
. Besides of installing it, make sure to include the PYTHON_INSTALL/Scripts
directory to your system path in order to make the script available.
I have another option, in case you are not familiar with Python. I built an wrapper from the dot2tex
sources and generated a standalone batteries-included dot2tex.exe
file, available here. Unzip it and put dot2tex.exe
somewhere in your computer. Make sure that the directory where dot2tex.exe
rests is also in the system path. Testing dot2tex --help
in the command prompt:

With GraphViz and dot2tex
available in the system path, let's see this example from the package documentation:
\documentclass{article}
\usepackage{dot2texi}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\begin{dot2tex}[neato,mathmode]
digraph G {
node [shape="circle"];
a_1 -> a_2 -> a_3 -> a_4 -> a_1;
}
\end{dot2tex}
\end{document}
By running pdflatex --shell-escape myfile.tex
, we have the correct output:

The important parts from the .log
file:
...
Package dot2texi Info: Automatically converting dot/neato files on input line 1
48.
...
\openout3 = `teste148-dot2tex-fig1.dot'.
Opening dot2tex stream teste148-dot2tex-fig1.dot
runsystem(dot2tex --figonly -ftikz --prog=neato -tmath -o teste148-dot2te
x-fig1.tex teste148-dot2tex-fig1.dot)...executed.
Package dot2texo Info: teste148-dot2tex-fig1.dot converted on input line 11.
...
Hope it helps. :)
--shell-escape
flag, but a similar flag named--enable-write18
(or something along these lines). Could you try replacing the flag and tell us if it works?:)
– Paulo Cereda Jul 8 '12 at 19:48--shell-escape
works fine with miktex. But the package needs external tools (according the documentation dot2tex and Graphviz). Are you sure that they are installed, that they work and are on your path? – Ulrike Fischer Jul 9 '12 at 10:02--shell-escape
was an invalid flag with MiKTeX, but it's been a while since I migrated from it to TeX Live. Is--enable-write18
still valid? – Paulo Cereda Jul 9 '12 at 11:24