Graphics, Figures & TablesJPEG or EPS figures in a Latex document?

Information and discussion about graphics, figures & tables in LaTeX documents.
Sam
Posts: 62
Joined: Fri Nov 30, 2007 1:43 pm

JPEG or EPS figures in a Latex document?

Post by Sam »

Hello,

I am looking to include figures in JPEG format into my report...which accepts only .EPS figures..

Which command should I add...

\usepackage{graphicx}

otherwise, if you have any Latex report template, that would be very helpful...

Many Thanks

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: JPEG or EPS figures in a Latex document?

Post by Stefan Kottwitz »

Hi Sam,

pdfLaTeX supports inclusion of jpeg files directly. \usepackage{graphicx} would be sufficient, but choose compilation to pdf, not to dvi/ps.

Stefan
LaTeX.org admin
Sam
Posts: 62
Joined: Fri Nov 30, 2007 1:43 pm

Re: JPEG or EPS figures in a Latex document?

Post by Sam »

Hi Steph,

Thanks for the advice!

I have included
\usepackage{graphicx}

but still latex do not like it.

I would be grateful if you could send me a template of a latex report...

I am quite novice...

Thanks
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

JPEG or EPS figures in a Latex document?

Post by Stefan Kottwitz »

I remember that you're using TeXnicCenter. So, choose the output profile LaTeX => PDF instead of LaTeX => DVI or LaTeX => PS.

Stefan
LaTeX.org admin
Sam
Posts: 62
Joined: Fri Nov 30, 2007 1:43 pm

Re: JPEG or EPS figures in a Latex document?

Post by Sam »

Thanks Stef for teh prompt response.

I tried for a JPEG file but it did not work... is there a trick?

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

JPEG or EPS figures in a Latex document?

Post by frabjous »

Sam wrote:Thanks Stef for teh prompt response.

I tried for a JPEG file but it did not work... is there a trick?

Thanks

JPEG should work with pdflatex. Are you using latex not pdflatex?

When you say "it does not work", that is not very helpful. How does it not work? Post your log file if need be.
Sam
Posts: 62
Joined: Fri Nov 30, 2007 1:43 pm

Re: JPEG or EPS figures in a Latex document?

Post by Sam »

Hello,

Thanks for ur help!

Yep I am using Latex ==> PDF
Attached is the log file..

I guess I can t use both EPS and PDF/JPEG in the same document?

Thanks for ur help!
Attachments
log.JPG
log.JPG (65.85 KiB) Viewed 5279 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: JPEG or EPS figures in a Latex document?

Post by Stefan Kottwitz »

Yes, if you're using pdf/jpg you cannot use eps. That's the reason of the error message in the log: unknown graphics extension: eps.
Convert the eps to pdf, it's possible in perfect quality with the tool epstopdf. Use it on the command prompt.
Or try \usepackage{epstopdf} in your document.

Stefan
LaTeX.org admin
Sam
Posts: 62
Joined: Fri Nov 30, 2007 1:43 pm

Re: JPEG or EPS figures in a Latex document?

Post by Sam »

Thanks Stef, you area STAR! but it still did not work!

I get a void figure with just the frame ...

see attached please.

Thanks,
Attachments
log1.JPG
log1.JPG (10.26 KiB) Viewed 5277 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

JPEG or EPS figures in a Latex document?

Post by Stefan Kottwitz »

That may be caused by a draft Option to \documentclass or the graphicx package. Check those two lines.

Stefan
LaTeX.org admin
Post Reply