----- Original Message -----
From: "Herbert Voss" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, January 26, 2006 11:46 AM
Subject: Re: Latex error on graphics insert (LyX 1.3.7)
Marc D. wrote:
I have a file that processes fine using "PDF (ps to pdf)"
option.
When I insert a graphic, it then gives me a single error:
LaTeX Error: Cannot determine size of graphic in /tmp/
lyx_tmpdir7937ASk7yo/ly
...van_courses_current_320_assign_a1-3b.jpg}
you can not use ps2pdf and a jpeg file! ps2pdf converts a
PostScript file:
ps/eps : latex ->dvips -> ps2pdf
jpeg/png/pdf : pdflatex
you have to use pdflatex
Herbert
It seems my idea about converting the .eps file to .jpg format
was not the best way to proceed, but instead to use epstopdf.
http://mintaka.sdsu.edu/GF/bibliog/latex/LaTeXtoPDF.html
pdflatex method (details)
1. Convert all the figures to non-EPS form.
As pdflatex doesn't use EPS figures, we have to convert
them all to either JPEG, PNG, or PDF form. It makes no sense
to convert EPS to PNG, because that changes scalable graphics
to bulky rasterised form. JPEG would be even worse, because
of its lossy compression.
The way to go is to convert EPS to PDF:
epstopdf image.eps
which creates a file named image.pdf by default. (This has the
happy side-effect of compressing the actual PostScript text of
the original EPS file; if that file were longer than about 2 kB, the
compression would more than offset the added PDF headers,
and the PDF file could be smaller than its EPS parent.)
2. Tell LaTeX what to expect.
The preamble to the LaTeX source file now looks much like
the one used in the traditional method:
\documentclass[pdftex,...]{article} % the pdftex is essential
\usepackage[dvips]{graphicx} % to include images
\usepackage{pslatex} % to use PostScript fonts
% redefine float-placement parameters here
\begin{document}
Note that the package name to put in the argument list
is pdftex, not pdflatex.
3. Include the figures in the *.tex file.
Just as in the traditional method, we can omit the filename suffix:
\begin{figure}[htp]
\resizebox{\textwidth}{!}{
\includegraphics[width=\textwidth]{circle1}
}
\caption{circle1}
\end{figure}
But now, what's automatically found is the
file circle1.pdf, not circle1.eps."
Regards,
Stephen