# Images on latex not appearing

I cannot seem to get the images to appear on latex. I get no error messages and, it has no problems compiling. However, the produced (.pdf) which is what I am using, does not have the image. Essentially, everything I am using is in

\documentclass[12pt,a4paper,epsf,portrait,times,epsfig]{article}

\usepackage[dvips]{graphics}
\usepackage{amsmath}
\usepackage{xspace}
\usepackage{fancybox}
\usepackage{hyperref}
\usepackage{amsfonts}
\usepackage{graphicx}

\renewcommand{\baselinestretch}{1.5}
\setlength{\parskip}{0.2cm}
\setlength{\parindent}{0.0cm}
\setlength{\textheight}{8.5in}
\setlength{\textwidth}{16.0cm}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{0in}

\pagenumbering{arabic}
\numberwithin{equation}{subsection}

\begin{document}

\begin{figure}
\centering
\includegraphics{C:/Users/Reza/Desktop/Test/Untitled.jpg}
\label{fig:Untitled}
\end{figure}

\end{document}


I am using Texniccenter, and using LaTeX=>PDF. Help please!

-
Welcome to TeX.SE. I took the liberty to format your post a little. See this link for more details on available formatting. Please, try to make your example minimal, i.e. remove every line from your preamble that is not necessary. As a solution suggestion, try to move file Untitled.jpg to the folder where you .tex file is, and use \includegraphics{Untitled.jpg}. As well notice that LaTeX might be case-sensitive and Untitled.jpg is different from untitled.jpg. –  yo' May 10 '12 at 17:17
Also take a look at your .log file to see if there's a warning or error message. –  Jake May 10 '12 at 17:18
The epsf and epsfig options in the \documentclass statement are obsolete. To auto-convert image files in .jpg format to .pdf -- the preferred format of the graphicx package -- be sure to load the epstopdf package. By the way, the \label instruction inside the figure environment won't have any desired effects unless you precede it with a \caption statement. (The "label" is associated by hyperref and other packages with the closest "label-able" item. In the case of your MWE, there is no such item so far. Hence, be sure to provide a \caption statement before the \label. –  Mico May 10 '12 at 19:55

You use the packages graphics and graphix. Only one is needed. In addition, you specify the dvips driver for graphics. This is not the correct driver if you are using pdflatex (which is what I think you are using).

In addition, you are better off not using complete paths, but rather relative paths. This is what tohecz was suggesting with the \includegraphics{<filename>} and placing your picture in the same folder as your .tex file.

As an example, the following file (by the way, this is what tohecz meant by minimal example) works:

\documentclass[]{article}

\usepackage[]{graphics}
%\usepackage{graphicx}

\begin{document}

\begin{figure}
\includegraphics{Untitled.jpg}
\end{figure}

\end{document}


If you really want to use the dvips and the other options, then your images must be in .eps format. This means you must convert your .jpg image to .eps. In addition, you will have to compile with something of the form latex -> dvi -> pdf.

-