[texhax] File Not Found: Importing Graphics

Axel E. Retif axel.retif at mac.com
Tue Sep 23 06:31:28 CEST 2008


On  22 Sep, 2008, at 17:27, Sam Albers wrote:

> Hello all,
>
> I am trying to create my first LaTex document. I am using TexMaker  
> as a frontend, running Ubuntu 8.04 as my OS. I have created a few  
> figures using R with both the .eps and .png file format.

To complement Senthil Kumar's reply,

1) If you want to use png images, typeset with pdfLaTeX; there is a  
button for that in TeXmaker.

> \documentclass[12pt]{article}
> \usepackage{graphicx}[dvips]
                        ^
(And anyway, not like this, but \usepackage[dvips]{graphicx}.)

> \begin{figure}
> \centering
> \includegraphics[scale=1]{Graphs PNG/Color Contour SLI.png}

As Senthil Kumar said, don't use spaces; and better yet, put all your  
figures (EPS and PNG) in a single directory (say, Graphs) inside your  
working directory, and then,

2)
\documentclass[12pt]{article}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}         %<- To convert your EPS files to PDF
\epstopdfsetup{update,prepend}%<- This checks if your EPS file has
                               %   changed and, if so, updates the
                               %   the PDF file
\graphicspath{{./Graphs/}}    %<- Then no need to type the whole path
\begin{document}
\begin{figure}
\centering
\includegraphics[scale=1]{Color-Contour-SLI.png}
\caption{This is a test.}
\end{figure}
\end{document}

Best,

Axel



More information about the texhax mailing list