I'm using LyX. After adding this gv file using Insert->Graphics, LyX automatically generated a perfect preview of the file, as expected. Automatic preview of GraphViz in LyX However, when I try to export or get a preview using dvi (Ctrl+D) or pdflatex (Ctrl+R), I get the following LaTeX error:

Package pdftex.def Error: File `1_home_user_Documents_PATH_TO_FOLDER_fsm.png' not found.

and the following LyX error (message box):

No information for converting format files to png. Define a converter in the preferences.

Background info:

  1. After installing GraphViz I did Tools->Reconfigure.
  2. The GraphViz Dot -> PNG converter is defined as dot -Tpng $$i -o $$o.
  3. Converting the gv file manually to png doesn't help (unless of course if I use the png file directly as the graphics...).

Use dot -Tsvg foo.dot > foo.svg to export your graph in vector format, then embed that.

  • 1
    I'm not sure why LyX would choose to export the graph to PNG format to begin with... – badp Nov 25 '14 at 2:41
  • 1
    Please add a little more detail (including accompanying theoretical knowledge) to improve the answer. – Masroor Nov 25 '14 at 3:11
  • @badp a probably reason for why LyX would export the graph to PNG is because no one has reported this bug. Please help us fix it by reporting it with a minimal example at lyx.org/trac – scottkosty Nov 25 '14 at 5:24
  • @badp, if I understand correctly, your suggestion is manual convertion to a different format. Is there a way to avoid this? i.e. if LyX is doing fine with generating a preview, the export to PDF should work as well... – Sparkler Nov 25 '14 at 6:02
  • @scottkosty On my Ubuntu system, LyX seems to embed a .dot file in vector format (EPS, perhaps?). I'm not entirely sure I'm the right person to file this bug report. – badp Nov 25 '14 at 13:06

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.