Using Encapsulated Postscript (EPS) files in Lyx

LyX is packaged incorrectly under Ubuntu Hardy 8.04. Here is how to fix the problem with embedding EPS graphics.

1. Install “texlive-extra-utils” to get the epstopdf program:

sudo aptitude install texlive-extra-utils

2. Add a converter so that Lyx knows how to convert eps to pdf. You should be able to do this through Lyx (Tools->Preferences->Converters->Add), but my “Add” button is greyed out so I cannot use it. I edited my config file (~/.lyx/lyxrc.defaults) to add the following line:

\converter eps        pdf        "epstopdf $$i --outfile=$$o"   ""
I think it should probably go in (~/.lyx/preferences).

I kept getting errors because of a bad cached eps->pdf file. Clear the cache temporarily via Tools->Preferences->Converters->“EPS->PDF” and toggle off the “Converter File Cache Enabled” checkbox. After successful generation, you can turn it back on.