Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
    
We need to know more. In the Document Settings, what is Default Output Format set to? –  qubyte Jan 27 '12 at 2:32
    
It's set to pdflatex. –  Maciej Kucia Jan 27 '12 at 7:15
    
What document style are you using? Is it anything strange with images in? –  qubyte Jan 27 '12 at 7:42
    
article (Polish version by M.W.) Nothing strange until compile, images are visible in LyX. ps2pdf unlike pdflatex does work. –  Maciej Kucia Jan 27 '12 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 '12 at 9:52

2 Answers 2

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.

share|improve this answer
    
I work under windows but I am sure files are not EPS. Especially bitmap ones. –  Maciej Kucia Jan 26 '12 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 '12 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. –  Maciej Kucia Jan 27 '12 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 '12 at 7:27
    
As is stated in question: I already tried PDF. –  Maciej Kucia Jan 27 '12 at 8:17

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.