----- Original Message -----
From: "Marc D." <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 27, 2006 7:40 AM
Subject: Re: Latex error on graphics insert (LyX 1.3.7)
On 27 Jan 06, at 07:12, Herbert Voss wrote:
Stephen Harris wrote:
It seems my idea about converting the .eps file to .jpg format
was not the best way to proceed, but instead to use epstopdf.
eps to jpg is the wrong way, convert them _always_ to pdf with
epstopdf.
Yes, my sentence was correcting an earlier post which suggested
eps to jpg. "instead" meant I was suggesting epstopdf as you did.
I should have put a comma after "proceed, but instead,..."
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
using options pdftex _and_ dvips makes no sense, use
only one of it.
I'm back. Sleep is good!!
Any suggestions on how I can go about changing the behaviour
of lyx? I was unaware that I had control over the LaTeX that
LyX outputs. I'm more than willing and able to read documentation,
but I'd appreciate being pointed to the right chapter.
Under LyX1.3.7, under View, there are three different .pdf viewing
options, if your LyX is installed right. pdflatex is the recommended
one, but it doesn't handle image files in the .eps format. Which is
why epstopdf is used to change the file format from .eps to .pdf.
pdflatex works with image files of the .png, .jpg and .pdf formats.
ps2pdf does work with .eps graphical files, but not the .jpg format
So ps2pdf worked ok when you had one eps image within your
lyx document (and I presume within a (La)tex document). But then
you added another I think, .jpg image, which violated the boundaries
of the ps2pdf conversion capability.
On my system, I can view with a ghostscript viewer, gsview, or
Adobe Reader which reads .pdf files, save the file or print it out
on my printer. On Linux/Mac OS X the user .pdf viewer is xpdf
which I think you said you removed.
Also under Lyx->File if you have a file open there is an active
choice to Export to .pdf or dvi or postscript. I know less about
that since the only time I use that is to export as Latex and that
exported file is made, but there isn't any indication of it, and I
think it is stored in a temp directory.
Another place where the behavior of viewing files is controlled
is under LyX->Edit->Preferences, you will see File formats and
it displays the assigned Viewers for the different file formats.
Also you will see Converters which also lists three .pdf methods.
I've read the available documentation under "Help", but can't
recall any detailed documentation on exactly what LyX calls
to convert the LyX code to LaTeX and then to PDF. Once I understand
that process, I'll be able to see what might be broken on
my system, maybe even contribute a general-purpose script
(I'm very good at scripts) if necessary.
Thanks,
Marc
Usually the defaults work quite well and a user never has to fiddle
with the settings. Try loading your first file which I think had just
the .eps image; the one you said works with ps2pdf. This time
use the View windows and select ps2pdf and see if it still works.
Then try dvipdfm. I am not so sure you should have removed the
xpdf viewer, see how it works. If dvipdfm works with just the
one graphic image using View, then try it with the the file that has
two images (one eps and one jpg if I undertand you). You may
have to put xpdf back in as a viewer. You said you had pdflatex
working from the command line before, which would need your
jpg file and the image.pdf file (which you converted from image.eps)
using epstopdf (from the command line). Sometimes that epstopdf
conversion needs to have some bounding box (BB) work done on
the image.eps file depending on how it was constructed. Edit your
homework .lyx file appropriately for BBs and adding images.
Herbert is the expert in this area. If I made any mistakes in
explaining this I hope he corrects them. Perhaps part of the
problem so far is a lack of knowledge about LyX defaults.
http://wiki.lyx.org/ provides a searchable interface for some
topics. Google also contains a lot of information about (La)TeX
providing details about the pdf viewers which LyX relies upon,
but which come with the various (La)TeX versions and platforms.
Working instances of Ghostscript and Python are also needed.
I'll leave any further advice to more experienced users, Good luck,
Stephen