Graphics, Figures & TablesProblems with width of included image file

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
PhDP
Posts: 2
Joined: Tue Nov 09, 2010 12:41 am

Problems with width of included image file

Post by PhDP »

I have a figure in eps format and I'm trying to add it to a PDFLaTeX project. The first part was easy, adding the figure:

Code: Select all

\begin{figure}
	\centering
	\includegraphics{Fig/MyFig.eps}
	\caption{Blah blah}
	\label{fig:1}
\end{figure}
I use the following packages:

Code: Select all

\usepackage{color,hyperref,lineno,setspace,amsmath,graphics,epstopdf}
And everything works fine. But the figure is too large, so I tried to resize it;

Code: Select all

\begin{figure}
	\centering
	\includegraphics[width=5cm]{Fig/MyFig.eps}
	\caption{Blah blah}
	\label{fig:1}
\end{figure}
But it just won't work. It throws the error; Paragraph ended before \Gin@iii was complete.

Recommended reading 2024:

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

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Problems with width of included image file

Post by frabjous »

I don't think the graphics package is compatible with the width= option. Try using graphicx instead. (In other words, just change graphics to graphicx in your list of packages.)
PhDP
Posts: 2
Joined: Tue Nov 09, 2010 12:41 am

Re: Problems with width of included image file

Post by PhDP »

It works !

Thank you very much.
Post Reply