2

I am trying to insert an image into my document. I tried following formats: PNG, JPG, PDF, SVG (using inkscape) and BMP. No matter what I do I get following error:

LaTeX Error: Unknown graphics extension: .eps.

I do not want to include any eps file as I am using pdflatex!

What am I doing wrong? Why is LyX even mentioning eps files?

Edit:

When I try to insert PDF (for the first time) as graphic I get following error:

No information for converting pdf format files to eps. Define converter in the preferences

Edit: Win 7 x64 The latest: LyX 2.0.2-1 ImageMagick MikTeX Aspell Ghostscript GSview

I was able to compile my document using ps2pdf!

10
  • We need to know more. In the Document Settings, what is Default Output Format set to?
    – qubyte
    Jan 27, 2012 at 2:32
  • It's set to pdflatex.
    – Matt Kucia
    Jan 27, 2012 at 7:15
  • What document style are you using? Is it anything strange with images in?
    – qubyte
    Jan 27, 2012 at 7:42
  • article (Polish version by M.W.) Nothing strange until compile, images are visible in LyX. ps2pdf unlike pdflatex does work.
    – Matt Kucia
    Jan 27, 2012 at 8:18
  • If ps2pdf works then either you've got .eps files, or something is converting them on the fly. More likely the former. The error you quote in the question seems to indicate the former. What do you see if you try to open one of the images in a text editor?
    – qubyte
    Jan 27, 2012 at 9:52

2 Answers 2

3

I had the same problem and my solution was: in "Tools -> Preferences -> Converters" consider the "LaTeX (pdflatex) -> PDF (pdflatex)" converter and set

latex=pdflatex

in "Extra flag". If this will not work, delete the converters section in your ./lyx/preferences file (in Linux) and restart LyX.

1
  • This is the settings that I have in my Lyx now. any other ides? Nov 29, 2016 at 15:13
1

Perhaps Inkscape did not really convert the image to the other formats, but rather only renamed it to another extension. That means, your image.jpg is in fact an EPS file that has a JPG extension. You can verify this under linux if you have mogrify installed, using the command:

identify image.jpg

If the line reads "image PS .... " instead of "image JPEG ...", then this is indeed the case.

Another way to check if this is the case is by replacing your image for an image that you are sure about is a JPG file (just take a picture or something). If the error does not appear, this issue is most likely related to the image itself.

5
  • I work under windows but I am sure files are not EPS. Especially bitmap ones.
    – Matt Kucia
    Jan 26, 2012 at 23:12
  • @Tokamak Hmm OK. Are you trying with the same image, or have you tried a 'proven' image at some point (some other JPG file for instance)? And do you have the same issue with other TeX files, or just this one. I'm just taking shots here, but it can help to isolate where the problem originates exactly.
    – user
    Jan 27, 2012 at 4:00
  • I create files using Inkscape. PNG by export to image other as regular save as. I tried MS Paint for png too. I didn't really used TEX previously. And even if I did, only for some equations without graphics. I updated some information in other posts.
    – Matt Kucia
    Jan 27, 2012 at 7:14
  • If you create the files with Inkscape, export as PDF. Not only does this work with pdflatex (or at least it should), but you also keep it a vector image.
    – Psirus
    Jan 27, 2012 at 7:27
  • As is stated in question: I already tried PDF.
    – Matt Kucia
    Jan 27, 2012 at 8:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .