[texhax] Inserting Graphics in LaTex Documents
Peter Ragosch
peter.ragosch at t-online.de
Sun Feb 22 18:42:30 CET 2009
Hi Jean-Guy,
first your minimal example is not complete - not very helpful.
I take my own pic-include.tex compiled with 'latex pic-include':
\documentclass{article}
\usepackage{graphicx}
\begin{document}
Documents\LaTex\EPS Files}
\begin{figure}[thb]
\begin{center}
\includegraphics[width=.2\textwidth]{plot}
% plot.eps: 0x0 pixel, 600dpi, 0.00x0.00 cm, bb=152 480 372 735
\end{center}
\caption{Plot of the function $\sin x$}
\label{sineplot}
\end{figure}
\begin{figure}[thb]
\begin{center}
\includegraphics[width=.2\textwidth, bb=152 480 372 735]{%
images/plot.eps}
% plot.eps: 0x0 pixel, 600dpi, 0.00x0.00 cm, bb=152 480 372 735
\end{center}
\caption{Plot of the function $\sin x$ 2}
\label{sineplot2}
\end{figure}
\begin{figure}[thb]
\begin{center}
\includegraphics[width=.2\textwidth, bb=152 480 372 735]{%
images/my plot.eps}
% plot.eps: 0x0 pixel, 600dpi, 0.00x0.00 cm, bb=152 480 372 735
\end{center} \caption{Plot of the function $\sin x$ 3}
\label{sineplot2}
\end{figure}
\end{document}
The result is given in the pic-include.dvi, where you can see that tex
does not handle spaces in path or file name (third \includegraphics).
I'm on linux thus I can't check if tex will take a full qualified path
starting with hd (c:\....). Best practise is to put all pictures
into a subfolder (e.g. images) below your tex input folder, then they
will be always found as shown above, even without given path (first
\includegraphics).
For further info have a look on (given in a command line):
texdoc FAQ-graphicspath.html
texdoc FAQ-dvipsgraphics.html
Hope that helps.
Peter
Am Sun, 22 Feb 2009 10:05:33 -0500
schrieb "Jean-Guy Murray" <jg.murray at sympatico.ca>:
> I am new at Latex and I have a problem to insert graphics in my Latex
> Document.
>
> The problem is that I always get the "File not found" Latex Error
> message.
>
> Here is my input file:
>
> \documentclass{article}
> \usepackage{graphicx}
>
> \begin{document}
>
> \begin{figure}[tbh]
> \begin{center}
> \includegraphics[width=.8\textwidth]{My Plot}
> \graphicspath{c:\Documents and Settings\Jean-Guy\My
> Documents\LaTex\EPS Files} \end{center}
> \caption{Plot of the function $\sin x$}
> \label{sineplot}
>
> I am using LaTex-DVI. My graph is an EPS file generated with Maple 11.
>
> My output file shows the following:
>
> Plot.eps Plot.ps Plot.eps.gz Plot.ps.gz Plot.eps.Z
>
> Figure 1: Plot of the function sin x
>
> Can anyone tell me what I am doing wrong. I have reseach various
> documents obtained from searches on Internet , but so far I have
> been unable to find out why I am getting the LaTex Error: File 'My
> Plot' not found.
>
> Thank you for your kind assisance
>
> Jean-Guy Murray
>
> jgmurray85 at sympatico.ca.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic-include.dvi
Type: application/x-dvi
Size: 700 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20090222/756525d1/attachment-0001.dvi
More information about the texhax
mailing list