I have already included graphicx package and include

% declare the path(s) where your graphic files are
 % and their extensions so you won't have to specify these with
 % every instance of \includegraphics

In the place that I want to insert the image I use the following example.

 \caption{A picture of the same gull
       looking the other way!}

I use the "LaTeX => DVI" option. I am a newbie to LATeX, so I do not know the difference between "LaTeX => PDF" and "LaTeX => PS => PDF" My ultimate goal is to convert the document into a pdf file. Any help will be much appreciated.

  • One immediate comment would be that the first line \ifCLASSINFOpdf is used to do stuff only when you are doing Latex=> pdf and be skipped elsewhere. And most probably it should be followed by a \fi if I remember correctly from the IEEE Transactions class file. So try to use the Latex=>PDF, as most of the commands you use are tailored towards PDF.
    – percusse
    May 27, 2011 at 0:08
  • 1
    I think you should always use forward slashes / in paths, even on Windows.
    – Caramdir
    May 27, 2011 at 0:48
  • Although I could see that a figure is formed due to its caption, I could not reach the image even if the directory is D://ImagesforProjectLatex/Example what could be the problem?
    – Hephaestus
    May 27, 2011 at 0:51
  • @Hephaestus: Look at the answer in: Paths and Linux/Windows slash conventions. It is also valid for \graphicspath.
    – Danie Els
    May 27, 2011 at 1:39
  • @Hephaestus --- What type of file is Example (i.e. eps/pdf/jpg, etc.)? Are any warning messages shown in the terminal when you compile the document? May 27, 2011 at 15:35

3 Answers 3


Various pieces of your preamble are superfluous. Just use:


That will take care of choosing the right driver whether you're using latex (it will automatically select a driver suitable for xdvi and dvips) or pdflatex. No \ifCLASSINFOpdf is needed. Also, it sets the valid extensions automatically, so you don't have to do that either. Lastly, if you put the pdf-compatible image files and the dvi-compatible image files in the same directory, then you don't need to use the \ifCLASSINFOpdf conditional to set the right \graphicspath.

The figure code later on when you actually insert the image is completely correct. It's exactly what I use when I write.


What I did: Convert any images to *.eps here: http://www.go2convert.com/ or with any commercial software you have for that. You also need two packages, one standard for dealing with images and another one for converting from eps to pdf file while compile.

\usepackage{epstopdf} %%package to overcome problem with eps in pdf files

    \caption{used by \citet[p.~4]{XXXXX}.}

or like that:

    \caption{used by \citet[p.~4]{XXXXX}.}

This is an alternative way you can insert graphics into a TeX file on windows.


\includegraphics{`File Name`.`File extension type`}

For Captions:


Figure 1: A picture of the same gull looking the other way! 


Hope thats something of what your looking for, if not, leave a comment and I will be more than gladly to update my response.

  • 8
    Note that you can skip the file name extension and a set of extension will be tried automatically. Also center is often the wrong way to center an image. It adds some vertical spacing before and after which might or might not be wanted. For figures \centering should be used instead. May 27, 2011 at 18:26
  • 4
    -1: What's wrong with the figure environment?
    – Ken Bloom
    Jun 26, 2011 at 17:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .