I am trying to use dot2texi package in Lyx to generate graphs, and I include the following in the preamble of the document:

% recommended as of Pgfplots 1.3:

And I insert a block of Tex code inside my Lyx document:

digraph G 
    node [shape="circle"]; 
    a_1 -> a_2 -> a_3 -> a_4 -> a_1;

as taken from the example here: http://www.fauskes.net/code/dot2tex/documentation/#the-dot2texi-latex-package

However, when I view the document in PDF format, it doesn't show anything nor throw any error - nothing. Btw, I am using the latest Lyx 2.0.0. Any suggestion what could have gone wrong here. Thanks.


I also ran into this problem and managed to fix it in the following way: The preamble:


Not sure if the load order matters, but you need to include both the tikz the pgf packages or specify that you explicitly want to use tikz in your graphs.

The latter is done like this:


I'm not sure if it possible to specify this somewhere global for your whole document.

Also don't forget to enable -shell-escape in the call to pdflatex, this can be done in Preferences > File Handlers > Converters by changing the LaTeX (pdflatex) -> PDF (pdflatex) to pdflatex -shell-escape $$i.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.