Graphics, Figures & TablesUnknown Graphics Extension for EPS File

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jerryf
Posts: 3
Joined: Sun Sep 08, 2013 12:30 am

Unknown Graphics Extension for EPS File

Post by jerryf »

I get this error message when trying to include an EPS graphics.

Code: Select all

LaTeX Error: Unknown graphics extension: .eps.
This is a sample document.

Code: Select all

\documentclass{article}
\usepackage{graphics}

\begin{document}
  \includegraphics{sears1a.eps}
\end{document}
What can I do?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
jerryf
Posts: 3
Joined: Sun Sep 08, 2013 12:30 am

Unknown Graphics Extension for EPS File

Post by jerryf »

I found the answer using a search engine.
It seems you're using graphics in the EPD format. A relatively easy way of solving this problem is loading \usepackage{epstopdf} in your preamble and compiling with pdfLaTeX as usual. This will convert any EPS graphics to PDF first, you'll see the actual PDF files in your directory.
An it worked!
Last edited by localghost on Sun Sep 08, 2013 10:51 am, edited 2 times in total.
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Unknown Graphics Extension for EPS File

Post by kaiserkarl13 »

Are you using LaTeX or PDFLaTeX? LaTeX should accept either PS or EPS files (and you can omit the extension, by the way), but PDFLaTeX accepts PDF, JPG, PNG, and possibly one other I'm forgetting (I think JPEG may be acceptable, too).
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Unknown Graphics Extension for EPS File

Post by Johannes_B »

That is, latex compiles to DVI, which you can convert afterwards to PS and PDF. pdflatex directly compiles to a PDF, no need for converting anymore.

Recent LaTeX distributions (like TeX Live or MiKTeX) come with scripts to convert EPS files to PDF (epstopdf) during compilation. TeX Live should do this on the fly out of the box. It is worth mentioned, that you need -shell-escape enabled.

Which distribution are you using?

Best regards
Johannes
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
joxaal
Posts: 1
Joined: Wed May 21, 2014 3:39 pm

Unknown Graphics Extension for EPS File

Post by joxaal »

I'm having a similar problem, and although adding the

Code: Select all

\usepackag{epstopdf}
line fixed it, I would like some clarification. I'm new to Latex, and I'm using Tex Studio 4.8.5, and I downloaded an example IEEE paper here http://www.findthatzip-file.com/search- ... ex.tar.htm

This example worked right off the bat without adding the extra package. It has a \usepackage{epsfig}, which may do something similar to epstopdf. After fiddling with the paper and settings, I started getting this error. I'm just confused because I did not mess with the compiler and the file used to work without adding the new epstopdf package.
Post Reply