Graphics, Figures & TablesIncluding JPG in .tex file error

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
djinty
Posts: 3
Joined: Sat May 29, 2010 10:58 am

Including JPG in .tex file error

Post by djinty »

Hello community,

I would like to include a jpg file in a .tex file.
I'm using MikTex and TeXnicCenter on Windows 7 x64.

I use the following commands:
\usepackage{graphicx}
\rohead[{\includegraphics[scale=0.3]{fhlogo.JPG}}]{\includegraphics[scale=0.3]{fhlogo.JPG}}

The file "fhlogo.JPG" is located in the same directory of the .tex File.

When I start the command line as an Administrator and navigate to the Directory where "pdflatex.exe" is located I use the following command:
C:\PATH>pdflatex.exe C:\PathToTexFile\file.tex

Aftere somme procedures I receive the following error:
"! Package pdftex.def Error: File `fhlogo.JPG' not found."

First I had included the grapics without the .JPG in the command, same Error occured.

I hope that you can help.

Thanks a lot.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

djinty
Posts: 3
Joined: Sat May 29, 2010 10:58 am

Re: Including JPG in .tex file error

Post by djinty »

Does no one has an answer? I really don't know what to do... please help.
A friend told me that it must have something to do with MikTex. Has anyone got a solution?

greetings
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Including JPG in .tex file error

Post by josephwright »

You need to run pdfLaTeX where the .tex file is, as it looks in the current folder for files to include.
Joseph Wright
djinty
Posts: 3
Joined: Sat May 29, 2010 10:58 am

Re: Including JPG in .tex file error

Post by djinty »

so you mean, that I should copy the pdflatex.exe into the Folder where the .tex file is located?

greetings
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Including JPG in .tex file error

Post by josephwright »

No. If you've installed TeX properly (I assume you probably have MiKTeX), then it will add the appropriate places to the file path. So you can then use "pdflatex" anywhere. It would be very inefficient if you always had to copy files to the same place as the program in order to use it.
Joseph Wright
Post Reply