Graphics, Figures & TablesDifferent graphics formats -- which to choose?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kelp
Posts: 9
Joined: Thu Apr 16, 2009 8:59 am

Different graphics formats -- which to choose?

Post by kelp »

Hi community,

can someone give me some guidance or point me in a direction where I can read about the differences between the graphics formats that can be included in a TeX file? Like, is one better than the others (in certain contexts)? If I produce a graphic that I wish to include in a TeX file should I always go for EPS? Or ...?

Thanks,
kelp

Recommended reading 2024:

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

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

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

Different graphics formats -- which to choose?

Post by Stefan Kottwitz »

Hi kelp,

have look here: Including images with optimal quality. There's an explanation of differences of formats and recommendations which one to use for which purpose.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Different graphics formats -- which to choose?

Post by Johannes_B »

If you have taken a phot or a screenshot, you have a raster format. Using jpg or png will be fine.

If you have control about the actual content of the graphic, i.e. a diagram or arrows, be sure to use a program that can save your stuff as a vector image, i.e. eps or pdf.

If the latter is the case, you can probably generate the same things with LaTeX alone.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
kelp
Posts: 9
Joined: Thu Apr 16, 2009 8:59 am

Different graphics formats -- which to choose?

Post by kelp »

Hi guys,

thanks for the input!

From this https://en.wikibooks.org/wiki/LaTeX/Imp ... ge_formats I understand that for pdftex the best option is to use the pdf format, if possible, right?

–kelp
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Re: Different graphics formats -- which to choose?

Post by Stefan Kottwitz »

Hi kelp,

if the images are already in png or jpg, you can keep it and include with pdfLaTeX, don't convert to pdf before including. That saves space. pdfLaTeX does already wrap it in pdf code, no need to do it before, so twice.

If you produce an image with a software such as Inkscape, yes, choose pdf as output format for later including with pdfLaTeX, as pdf is scalable.

Stefan
LaTeX.org admin
kelp
Posts: 9
Joined: Thu Apr 16, 2009 8:59 am

Re: Different graphics formats -- which to choose?

Post by kelp »

Hi Stefan,

thanks for your reply.

Sorry, I wasn't being clear enough. I was only talking about scaleable formats, and whether I should be using EPS or not. (PDF seems to be the way to go.)

–kelp
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Different graphics formats -- which to choose?

Post by Stefan Kottwitz »

Yes, that's correct! pdf is perfect for pdfLaTeX. eps would work with automatic conversion or using epstopdf. Recently I used epstopdf very often to convert Cisco networks symbols in eps format to pdf for using with TikZ.

Stefan
LaTeX.org admin
kelp
Posts: 9
Joined: Thu Apr 16, 2009 8:59 am

Re: Different graphics formats -- which to choose?

Post by kelp »

Ok. Thanks for the confirmation!
Post Reply