Including images in LaTeX files

Here are the rules for including images in LaTeX files as far as I can tell.

Near the top of your document, use \usepackage{graphicx} to load the graphicx package. Then at the point where you want to include your image, use \includeimage{...} where … is the path to your file.

If you want to create a PDF file with pdflatex, your image must be in PDF, PNG, or JPEG format.

If you want to create a DVI file with latex or a PS file with dvips, your image must be in PS or EPS format.

There’s no way to include a GIF file without first converting it to another file format.

If you use \usepackage{pgf} rather thanĀ  \usepackage{graphics} at the top of the file, nothing changes except that you must chop the file extensions off image file names.

Related post:

Watch what you name graphics files in LaTeX

6 thoughts on “Including images in LaTeX files

  1. Thank you. That has been very helpful. I used LaTeX for my MPhil thesis a few years ago and have not used it since. I am giving a talk in January and thought I would revisit LaTeX. For my thesis I did a lot of faffing around with EPS and I was looking to avoid that. I have recently discovered the Beamer package and have been trying to make it work. It worked beautifully apart from problem with the images and you have just fixed that problem.

  2. I want to ask a queation please. What’s the meaning of “the path to your file”?
    My program give an error at that point! Thanks…

  3. I am using Latex beamer presentation for my talk. I would like to know how I can have a slide in which 3 figures(*.eps) keeps changing automatically until I change that slide. Some kind of timer to change pictures automatically. Can you please help me with latex code for this.

  4. I think you must give a try to Lyx editor for using beamer or documenting anything using latex. Its more than an editor. And reading this blog was very useful to get the right perspective about beamer over powerpoint. I do require a lot of presentation for my mathematics class lectures. Thanks!

  5. I was wondering is there anyway to include both PNG (PDF, JPEG ) and EPS files together without conversion. Anyone clues ?

  6. Dear Sir,
    I want to add an image (png) in latex . I want you to kindly put an example of the sytax u mention about path

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>