Graphics, Figures & TablesInclusion of JPG Files fails

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
texlearner
Posts: 1
Joined: Mon Nov 14, 2011 12:23 pm

Inclusion of JPG Files fails

Post by texlearner »

I am a newbie LaTeX user. I am trying to import a JPG file into my report but I am getting the following error:
Package pdflatex.def Error: File 'filename.jpg' not found \includegraphicsfilename.jpg}
The source I am using is as follows:

Code: Select all

\begin{figure}[ht]
\centering
\includegraphics{filename.jpg}
\label{fig:fig1}
\end{figure}
I also tried a variant of the above code in which gave the full path of the JPG file. But the error persists.

Code: Select all

\begin{figure}[ht]
\centering
\includegraphics{/home/.../Desktop/filename.jpg}
\label{fig:fig1}
\end{figure}
I am compiling it using PDFLaTeX. I am using Kile under Ubuntu 11.04. I have the .tex file as well as the image in my desktop folder.

Can somebody help me out with this?

Recommended reading 2024:

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

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Inclusion of JPG Files fails

Post by kaiserkarl13 »

I suspect this is a problem with your editor / IDE. If you open a shell with the working directory on your desktop, what happens when you run PDFLaTeX?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Inclusion of JPG Files fails

Post by Stefan Kottwitz »

Hi,

perhaps post your .log file here as attachment to your post. Besides errors and warnings it contains information which often help to investigate problems.

Stefan
LaTeX.org admin
nofatchx
Posts: 1
Joined: Fri Nov 25, 2011 5:05 am

Inclusion of JPG Files fails

Post by nofatchx »

I'm using MikTeX 2.9(64bit) on Win7(64bit). I've got the problem with including graphic in jpg format. Command:

Code: Select all

\includegraphics{sym1.jpg}
is enlarging the picture.
Even putting parameter [scale=1.0] doesn't input image in oryginal size. I have to use for example [scale=0.8], but it makes picture looking worse then oryginal.

My second problem is with this code:

Code: Select all

\begin{figure}[h]
	\centering
	\includegraphics[scale=0.8]{sym2_2.jpg}
	\caption{Description of the imgae, description of the image \newline(more description of the image etc(2 lines of the discription)}
	\label{sym2_2}
\end{figure}

Discription of the image is align to the left, but i want it to center. Was trying

Code: Select all

\center{\caption{Descr..}}
Doesn't work.
Could someone help me figure this out?
Thanks.
Post Reply