On 02/16/2017 04:05 AM, Niklas Huldén wrote:
On 15.2.2017 20:55, Paul A. Rubin wrote:
I suspect there's a problem with the programs used to convert PDF or EPS
images to the format LyX uses for display. Start by going to Tools >
Preferences... > File Handling > Converters, highlight the EPS -> PNG
converter, and look at the command in the "Converter:" box. Using a
command window, make sure that program is installed and executes. If
that checks out, repeat for the PDF (graphics) -> EPS converter.

Hi!

I just checked this now. The EPS -> PNG converter command is "magick $$i $$o" and it executes fine from command line. The PDF (graphics) -> EPS converter is "pdftops -eps -f 1 -l 1 $$i $$o" and it also works from command line.

If the PNG -> EPS converter command is "convert $$i $$o", there was a
second issue back when I used Windows that might still be in play. (I'm
not sure, as I switched off Windows a long time ago.) IIRC, Windows had
a "convert" program that did something unrelated to graphics.

I can't find any PNG -> EPS converter in my file handling preferences at all. Is this converter necessary? If you meant EPS -> PNG in the above section
Yes, sorry, that was my fingers typing faster than my brain was thinking. :-)
there was the "magick" command which worked as explained. In addition to the LyX-installed imagemagick I also do have a stand alone copy of ImageMagick installed.
As I said, it's been a while since I used Windows. On Linux, I don't find a "magick" command (and I do have ImageMagick installed). It's possible they renamed the "convert" command to "magick" to avoid collisions with the system "convert" command.

The "convert" command indeed calls the windows command for converting filesystems, but I can't find any reference to "convert" in the preferences. Maybe "magick" calls something?

The one
used by LyX for image converges is part of ImageMagick. So you not only
need to verify that ImageMagick is properly installed, you also need to
verify that the ImageMagick convert program appears ahead of the Windows
convert program on the system command path. If not, I think you can
remedy it by putting the ImageMagick directory in Tools > Preferences...
Paths > PATH prefix. (Back in my day, I see to recall having to edit
the system command path, which is not too hard.)

ImageMagick is in the paths prefix. Have to check the system command path still.
That's probably unnecessary. When LyX goes to run outside programs, it should see the prefix before the system path, and in any case it's looking for "magick" and not "convert".

You said that "magick" works at the command line. Did you try actually converting a PDF graphic file (i.e., running "magick somegraphic.pdf somegraphic.eps" and then verifying that the EPS file displays correctly in ImageMagick)?

One thing I should have mentioned before. You could run "lyx -dbg graphics" from a command line and then open a LyX file containing a PDF image. In the command window, you'll see a bunch of output relating to the conversion process. That should (hopefully) tell you which step in the process fails. I'd do this next.

Paul


Reply via email to