Convert EPS to PDF on the fly with pdflatex on the fly

latexpdflatex

I'm trying to include an EPS figure in a document that will be compiled using pdflatex. Of course, the picture can be converted to pdf using epstopdf (which comes with the MikTeX distribution). Is there any way to do this on the fly, that is, make pdflatex do the conversion?

I'm looking for such a solution because I want to set up an easy-to-learn environment for students. Ideally, the converted picture is placed in the directory that also contains the original .eps, and the .pdf is used if available.

Best Solution

The relevant answer in the TeX FAQ points to epstopdf.sty, included with Heiko Oberdiek's packages.

Related Question