On 03/06/2011 4:02 PM, Uwe Stöhr wrote:
Am 23.05.2011 17:30, schrieb Julien Rioux:

I have two versions of a graphic, one is an eps the other a pdf. How
can I instruct LyX to use the
eps version when compiling to DVI and the pdf version when compiling
to PDF (pdflatex)?

The usual trick in latex to omit file extension does not work here.
LyX displays "No file found!",

Then you found a bug. This must work.
Take for example the CV class examples files that come with LyX. In the
modernCV file we use an image file named CV-image. You can see in LyX's
messages window that the PNG-version is used when a PDF is compiled (no
image conversion). For a DVI or Postscript output, the EPS-version of
the image is used.

If the problem persists, can you please provide a _small_ LyX file and
the image files to have a closer look?

regards Uwe

In the modernCV document you put the image file in the preamble, which to me is the same as using ERT. So you seem to suggest that there is no way to use the includegraphics GUI, which offers many advantages, to specify alternate versions of an image. Yo suggest instead that I should use ERT. That's fine and it will work, using either .eps or .pdf where needed.

The other option is using branches, as Jürgen suggested. That also works of course, and would be great if there was a notion of output-specific branches, which get automatically activated and deactivated according to output.

Cheers,
Julien

Reply via email to