Discussion:
eps figures in lyx/pdfscreen
Nirmal Govind
2003-10-14 04:23:22 UTC
Permalink
Hi.. I'm trying to include a couple of eps figures in a presentation
using LyX and the pdfscreen documentclass. LyX doesn't seem to able to
convert the eps figures to pdf or any other format that pdflatex likes..
I thought this was possible (with Imagemagick in the background).. is
this not the case? Do I have to manually convert to jpg or pdf or so and
then include the images?

Thanks,
nirmal
Angus Leeming
2003-10-14 09:03:17 UTC
Permalink
Post by Nirmal Govind
Hi.. I'm trying to include a couple of eps figures in a presentation
using LyX and the pdfscreen documentclass. LyX doesn't seem to able
to convert the eps figures to pdf or any other format that pdflatex
likes.. I thought this was possible (with Imagemagick in the
background).. is this not the case? Do I have to manually convert to
jpg or pdf or so and then include the images?
There's nothing magic about this. You just need to define a converter
eps->pdf. The preferences dialog should make this trivially easy.

You could use Imagemagick's convert, Sebastian Rahtz's epstopdf or
even gs itself. Your call ;-)
--
Angus
Nirmal Govind
2003-10-14 08:59:43 UTC
Permalink
Post by Angus Leeming
There's nothing magic about this. You just need to define a converter
eps->pdf. The preferences dialog should make this trivially easy.
The converter is already defined.. it's epstopdf..
Post by Angus Leeming
You could use Imagemagick's convert, Sebastian Rahtz's epstopdf or
even gs itself. Your call ;-)
Well, there seem to be two problems:
1. My eps figure was in a different directory (i.e. not where the lyx
file was) and it looks like epstopdf converts and keeps the pdf in that
directory.. and pdflatex looks for the pdf file in the current directory
.. is this true?

2. The main problem was that the pdf generated by epstopdf is messed
up.. I get a message from epstopdf:

==> Warning: BoundingBox not found!

And b'cos of this the resulting pdf file of my presentation does not
open... and I tried viewing the pdf of the image file separately using
xpdf - it's just blank... so I guess epstopdf doesn't like the eps figure..

So now, for a solution - I converted the eps to pdf manually using
convert, that cuts off a good 1 in on the right side of the figure.. so
I converted it to jpg instead and everything seems to be fine.. I'm not
sure why there's a problem with the eps figure - I generated it using
Adobe Illustrator.. (and maybe that's it ;-)) ... is there a way I can
specify that while running pdflatex, I want the eps images to be
converted to jpg instead of pdf? Then I can define a converter for eps
to jpg in lyx and all should be well I hope...

Thanks,
nirmal
Angus Leeming
2003-10-14 10:11:01 UTC
Permalink
Post by Nirmal Govind
Post by Angus Leeming
There's nothing magic about this. You just need to define a
converter eps->pdf. The preferences dialog should make this
trivially easy.
The converter is already defined.. it's epstopdf..
Post by Angus Leeming
You could use Imagemagick's convert, Sebastian Rahtz's epstopdf or
even gs itself. Your call ;-)
1. My eps figure was in a different directory (i.e. not where the
lyx file was) and it looks like epstopdf converts and keeps the pdf
in that directory.. and pdflatex looks for the pdf file in the
current directory .. is this true?
2. The main problem was that the pdf generated by epstopdf is messed
==> Warning: BoundingBox not found!
And b'cos of this the resulting pdf file of my presentation does not
open... and I tried viewing the pdf of the image file separately
using xpdf - it's just blank... so I guess epstopdf doesn't like the
eps figure..
So now, for a solution - I converted the eps to pdf manually using
convert, that cuts off a good 1 in on the right side of the figure..
so I converted it to jpg instead and everything seems to be fine..
I'm not sure why there's a problem with the eps figure - I generated
it using Adobe Illustrator.. (and maybe that's it ;-)) ... is there
a way I can specify that while running pdflatex, I want the eps
images to be converted to jpg instead of pdf? Then I can define a
converter for eps to jpg in lyx and all should be well I hope...
Thanks,
nirmal
You could try running your figure through GhostScript's epstoeps
utility. This will ensure that the eps file is well formed.
Unfortunately, it also converts it to a bitmap file.

As for the rest.
"pdflatex looks for the pdf file in the current directory". To be
honest, I don't know, but this sounds probable. Look at your latex
file: what are the '...' in the \includegraphics{...} command?

Angus
Nirmal Govind
2003-10-14 10:52:24 UTC
Permalink
Post by Angus Leeming
You could try running your figure through GhostScript's epstoeps
utility. This will ensure that the eps file is well formed.
Tried this but I still get an error while using epstopdf..
Post by Angus Leeming
"pdflatex looks for the pdf file in the current directory". To be
honest, I don't know, but this sounds probable. Look at your latex
file: what are the '...' in the \includegraphics{...} command?
I think this works fine.. I checked and the tex file created by lyx when
calling on pdflatex does have the full path to the file (without the
file's extension of course) and so pdflatex checks for the
<filename>.pdf which currently doesn't exist cos epstopdf didn't work..

nirmal
Angus Leeming
2003-10-14 12:00:14 UTC
Permalink
Post by Nirmal Govind
Post by Angus Leeming
You could try running your figure through GhostScript's epstoeps
utility. This will ensure that the eps file is well formed.
Tried this but I still get an error while using epstopdf..
Well try using gs itself then. I attach my_pstoppm, a shell script
wrapper showing how to do this. You'd need the pdfwrite option to gs
I guess.
$ gs --help
--
Angus
Herbert Voß
2003-10-14 09:42:17 UTC
Permalink
Post by Nirmal Govind
So now, for a solution - I converted the eps to pdf manually using
convert, that cuts off a good 1 in on the right side of the figure.. so
convert is not a good choice for eps files.
Post by Nirmal Govind
I converted it to jpg instead and everything seems to be fine.. I'm not
sure why there's a problem with the eps figure - I generated it using
Adobe Illustrator.. (and maybe that's it ;-)) ... is there a way I can
specify that while running pdflatex, I want the eps images to be
converted to jpg instead of pdf? Then I can define a converter for eps
to jpg in lyx and all should be well I hope...
eps to jpg makes only sense for _real_ pictures, but not for
drawings.

you can try to install VTeX/Free, which is very easy

http://www.micropress-inc.com/linux/

instead of latex you choose as converter for dvi vlatex.
It understand ps,eps,gif,pdf,jpg and any PsotScript stuff
from pstricks and generates by default a PDF file.

Herbert
Nirmal Govind
2003-10-14 10:53:32 UTC
Permalink
Post by Herbert Voß
convert is not a good choice for eps files.
I see..
Post by Herbert Voß
eps to jpg makes only sense for _real_ pictures, but not for
drawings.
you can try to install VTeX/Free, which is very easy
I believe they don't have a version for powerpc yet.. :-(

Thanks,
nirmal
Herbert Voß
2003-10-14 13:52:16 UTC
Permalink
Post by Nirmal Govind
Post by Angus Leeming
There's nothing magic about this. You just need to define a converter
eps->pdf. The preferences dialog should make this trivially easy.
The converter is already defined.. it's epstopdf..
only a question: did you run
pdflatex --shell-escape

otherwise epstopdf cannot work

Herbert
Katrin Pietzsch
2003-10-14 14:08:02 UTC
Permalink
Post by Nirmal Govind
So now, for a solution - I converted the eps to pdf manually using
convert, that cuts off a good 1 in on the right side of the figure..
so I converted it to jpg instead and everything seems to be fine.. I'm
not sure why there's a problem with the eps figure - I generated it
using Adobe Illustrator.. (and maybe that's it ;-)) ...
hi nirmal,

no solution for you from my side, but i also had problems with
eps-files created by Adobe Illustrator (and Photoshop). I saved it in
an other format and used convert to create the eps-file, which then
worked fine with lyx.

btw. Herbert, why is convert a bad choice?

regards,
Katrin
Herbert Voß
2003-10-14 14:23:28 UTC
Permalink
Post by Katrin Pietzsch
btw. Herbert, why is convert a bad choice?
_bad_ maybe the wrong word here. If you have a vector graphic file
then convert creates a bitmap from the vector source.
So convert should be the last choice.

Herbert
Katrin Pietzsch
2003-10-14 14:55:00 UTC
Permalink
Post by Herbert Voß
Post by Katrin Pietzsch
btw. Herbert, why is convert a bad choice?
_bad_ maybe the wrong word here. If you have a vector graphic file
then convert creates a bitmap from the vector source.
So convert should be the last choice.
okay, that i understand - thanks :). seems I have to get a bit deeper
in imagemagick and convert, etc.

Angus Leeming
2003-10-14 15:27:09 UTC
Permalink
Post by Katrin Pietzsch
btw. Herbert, why is convert a bad choice?
Because it generates a bitmap file from your nice vector graphics one.
Prefer to generate a pdf file from eps (using epstopdf) because this
will retain the vector graphics nature of the file, meaning that it
will scale flawlessly.
--
Angus
Loading...