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!

  • 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
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.

  • This is the settings that I have in my Lyx now. any other ides? – bobsacameno Nov 29 '16 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.

  • 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
-1
  1. open the .tex file and go to the location of your image
  2. In the \includegraphics thing remove the string command they both before and after image file name [\string" symbols]
  3. to be sure just rename your source image without having space (I don't know if it absolutely necessary to do this).
  4. I am using the latexmk compiler. But should work for its subset pdflatex, too.
  • 1
    Note that the OP is using LyX, which is not a traditional latex efite, the user never sees the code, so your suggestion is not really applicable here. – daleif Jul 28 '18 at 11:07
  • Efite=editor (....., darn requirements) – daleif Jul 28 '18 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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