## \begin{figure}

I use the following tex code in LATEX which works perfect, while i open the tex file in SWP, I get the following error:

LaTeX Warning: File `missingsd.eps' not found on input line 1199.

!pdfTeX error: pdflatex.exe (file missingsd.pdf): cannot find image file
==> Fatal error occurred, no output PDF file produced!

The tex code is the following:

\begin{center}
\begin{figure}[!htbp] \vspace*{-10mm}
%\hspace*{2mm}
\begin{center}
%\epsfig{file=math42010.eps}%, scale=0.80,angle=0}\vspace*{-8mm}
\includegraphics[scale=0.75]{missingsd.eps}\vspace*{-8mm}
{\caption {All MISSING} \label{schdist}} \vspace*{0mm}
\end{center}
\end{figure}
\end{center}

Any thoughts are appreciated.

Thanks!

Wu

### When SW compiles a document

When SW compiles a document it creates a temporary copy of the document in the temporary directory.  If you are using \includegraphics statements in your document and bypass the SW interface, you must use the full path to the graphics file, or you must add a \graphicspath command to the document to point to the directory or directories containing the graphics.  For example, if your graphics are in the subdirectory c:\swp55\docs\graphics, add the command
"\graphicspath{{c:/swp55/docs/graphics/}}" (without the quotes) to the document preamble. Be careful to use forward slashes and not backslashes in the directory name and to end the path with a slash.  The \graphicspath command does allow adding several possible paths, so if you are moving a document to other computers you can add all the possible paths.  For example:
"\graphicspath{{c:/swp55/docs/graphics/}{c:/usr/docs/graphics/}}"
Include as many paths as needed, each inside a set of braces.  See the documentation for the graphics package for additional details.

There is a work around that does not require using the \graphicspath statement in the document preamble.  When processing master/subdocuments, SW uses the document directory as the temporary directory.  If you insert a subdocument into your document, and leave the contents of the subdocument empty, (and then save, close and open the document so SW will recognize it as a master document) SW will use the document directory as the temporary directory.  Since the subdocument is empty you will not actually be adding any typesetting information, so the only change is the location of the temporary directory.

### Hi John, I followed your

Hi John,

I followed your instruction, the previous error message is gone, but it only works for pictures with PDF format. So have to change eps files to PDF ones manually. You may not know that I have 20 charts to import, I am just wondering whether you have some easier way to deal with that problem.

Thank you very much!

Wu