Graphics, Figures & TablesTrouble with Graphics Inclusion

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
rizwan
Posts: 3
Joined: Wed Jan 13, 2010 2:53 pm

Trouble with Graphics Inclusion

Post by rizwan »

I am new to LaTeX and just a beginner. I am having a problem that I cannot find a clear answer to.

I am using TeXnicCenter on Windows XP. The output is set to PDF. I am using the graphicx package and my graphs (output from Stata using graph2tex, which produces an EPS extension) are in the same folder.

Each time I try to incorporate the graph, using commands below (I have used the package graphicx and package epsfig in the preamble):

Code: Select all

\begin{figure}[ht]
  \centering}
  \includegraphics[height=3in]{defaultgraphname}
  \label{fig:defaultgraph}
\end{figure}
I get the message:
! Latex error : File defaultgraphname not found.
I have tried the file with or without EPS extension.

Please advice.

R

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Trouble with Graphics Inclusion

Post by localghost »

The pdflatex compiler engine doesn't accept external graphics files in EPS format, but in JPG, PNG or PDF. Convert your files with the command line tool epstopdf or »on the fly« with the epstopdf package. You can find solutions via forum search.
rizwan wrote:I have used the package graphicx and package epsfig in the preamble
Since epsfig is superseded by graphicx, you only need the latter one.


Best regards and welcome to the board
Thorsten
Post Reply