I'm having some trouble using the dot2texi package. I'm using the Sublime Text 2 editor to compile my LaTeX files, and I have LaTeXTools installed. I'm running this on Mac OSX, Mountain Lion.
The problem is simply that the dot conversion to tex is failing. I have all necessary packages installed, and if I manually run dot2tex from command line, it produces the figure all well and fine. So I'm guessing this is some problem from the Sublime end? I did a debug log output, and here's the relevant snippet from the log:
\openout3 = `test_latex-dot2tex-fig1.dot'.
Opening dot2tex stream test_latex-dot2tex-fig1.dot
runsystem(dot2tex --figonly -ftikz --debug --prog=neato -tmath -o test_lat
ex-dot2tex-fig1.tex test_latex-dot2tex-fig1.dot)...executed.
Package dot2texi Warning: Conversion of test_latex-dot2tex-fig1.dot failed..
Package dot2texi Warning: Please convert test_latex-dot2tex-fig1.dot manually.
The LaTeX code I'm trying to compile is the simple example from the tutorial:
\documentclass{article}
\usepackage[debug]{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}
Earlier, I had enabled -shell-escape in my LaTeXTools build file, and debugged some _nocomma error out from running dot2tex (Python related). After all those issues were resolved, I could compile dot files from command line using dot2tex without any issues. I can't figure out why it fails in Sublime Text 2 and would like to resolve this for ease-of-use purposes. Any help would be greatly appreciated! Thanks!
P.S. I have an inkling it might be something to do with the command being run from the wrong directory, so it can't find the dot file… I have no idea how to confirm that or fix it.
Best Answer
Ah I finally found the answer, thanks to the Readme over at master builder. The problem description and solution can be found under the Troubleshooting > Path Issues section. For convenience, I'll copy-paste the relevant portion here:
This worked like a charm for me, all I had to do was replace whatever was after the
"path":
declaration with the shell output fromecho $PATH
. Hope that helps anyone having this problem.