LyX ⇒ Metafile to EPS converter: should it work from within LYX?
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
Metafile to EPS converter: should it work from within LYX?
Hello
I'm very new to LYX, so I hope this is not all too "dumb": I have drawings, made with MS powerpoint (I work on a MS Windows 7-machine). I can export these drawings to .emf format quite easily. I then can convert them to .eps with the standalone metafile-to-EPS-converter, provided n the LYX website. But should this also be possible "from within" LYX? If so, how? If I import the .emf directly (by "copy-paste", or by using a saved version), there seem to be problems....
Thanks,
Stef
I'm very new to LYX, so I hope this is not all too "dumb": I have drawings, made with MS powerpoint (I work on a MS Windows 7-machine). I can export these drawings to .emf format quite easily. I then can convert them to .eps with the standalone metafile-to-EPS-converter, provided n the LYX website. But should this also be possible "from within" LYX? If so, how? If I import the .emf directly (by "copy-paste", or by using a saved version), there seem to be problems....
Thanks,
Stef
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Metafile to EPS converter: should it work from within LY
Hi Stef,
Are there problems with the display on LyX or the PDF output or both? Note that they are not necessarily the same, so if the PDF output works then that is the most important.
Since the stand-alone converter works you should be able to automate the process. First, try going to Tools > Reconfigure. This might take a few minutes. After that, exit and restart LyX. Does it work now? If not, make sure the converter is in you PATH on Windows (not sure how to do that since I'm on Ubuntu).
Are there problems with the display on LyX or the PDF output or both? Note that they are not necessarily the same, so if the PDF output works then that is the most important.
Since the stand-alone converter works you should be able to automate the process. First, try going to Tools > Reconfigure. This might take a few minutes. After that, exit and restart LyX. Does it work now? If not, make sure the converter is in you PATH on Windows (not sure how to do that since I'm on Ubuntu).
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
Re: Metafile to EPS converter: should it work from within LY
If I try to include a .emf or .wmf file directly, LyX tells me that there is a problem with converting to a useable format (Sorry, translation from a dutch message).
I tried both tips you gave me, but even adding the dir to the windows-path doesn't solve the problem.
Anything else I can try? Are there windows-people where it works automatically? I use windows 7.
(Maybe this is a symptom too: if I try to open a .emf file by rightclicking it, and then choosing the converter, it does nothing - the converter doesn't even seem to start. But if I open the converter, and I drag the file to it, then is opens the file without problems...)
Also: LyX gives me the message about the conversion problem in the editor. But if I try to show the .pdf nevertheless, I get a message like this: "an error occurred while running convert -density 300 "3C__Users_stef_pillaert_desktop_testemffile.emf" ""3C__Users_stef_pillaert_desktop_testemffile.eps"
I tried both tips you gave me, but even adding the dir to the windows-path doesn't solve the problem.
Anything else I can try? Are there windows-people where it works automatically? I use windows 7.
(Maybe this is a symptom too: if I try to open a .emf file by rightclicking it, and then choosing the converter, it does nothing - the converter doesn't even seem to start. But if I open the converter, and I drag the file to it, then is opens the file without problems...)
Also: LyX gives me the message about the conversion problem in the editor. But if I try to show the .pdf nevertheless, I get a message like this: "an error occurred while running convert -density 300 "3C__Users_stef_pillaert_desktop_testemffile.emf" ""3C__Users_stef_pillaert_desktop_testemffile.eps"
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Metafile to EPS converter: should it work from within LYX?
Yes this is a problem. First you must be able to convert from a command. Once you can do that, then we can figure things out in LyX.Stef Pillaert wrote: (Maybe this is a symptom too: if I try to open a .emf file by rightclicking it, and then choosing the converter, it does nothing - the converter doesn't even seem to start.
convert is from ImageMagick. Can you use the 'convert' command to try converting from the command line? If you get an error, please paste the output here.Stef Pillaert wrote: Also: LyX gives me the message about the conversion problem in the editor. But if I try to show the .pdf nevertheless, I get a message like this: "an error occurred while running convert -density 300 "3C__Users_stef_pillaert_desktop_testemffile.emf" ""3C__Users_stef_pillaert_desktop_testemffile.eps"
By the way, which LyX version are you using?
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
Re: Metafile to EPS converter: should it work from within LY
(I have LyX 2.2.2, and installed afterwards the standalone version of the converter)
hmmm.... it has been 30 years since I used MSDos, so I hope this isn't too silly
I tried this (in a command-prompt-DOS-window, in the dir C:\Users\stef.pillaert):
*just typing "convert" gives me the message "U moet een bestandssysteem opgeven" (transl.: "You should give a file system")
*I placed a file "testemffile.emf" in the directory c:\Users\stef.pillaert
*Then I tried this from the command line: "convert -density 300 "testemffile.emf" "testemffile.eps"
*I get this: ongeldige parameter -300 (transl.: unvalid parameter, but you probably guessed that...)
Should I do this in another directory?
(Note: when I type "convert" straight in the "run command" in windows from the start menu, the window of the (stand alone?) converter program pops up.)
Stef
hmmm.... it has been 30 years since I used MSDos, so I hope this isn't too silly

I tried this (in a command-prompt-DOS-window, in the dir C:\Users\stef.pillaert):
*just typing "convert" gives me the message "U moet een bestandssysteem opgeven" (transl.: "You should give a file system")
*I placed a file "testemffile.emf" in the directory c:\Users\stef.pillaert
*Then I tried this from the command line: "convert -density 300 "testemffile.emf" "testemffile.eps"
*I get this: ongeldige parameter -300 (transl.: unvalid parameter, but you probably guessed that...)
Should I do this in another directory?
(Note: when I type "convert" straight in the "run command" in windows from the start menu, the window of the (stand alone?) converter program pops up.)
Stef
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Metafile to EPS converter: should it work from within LYX?
Strange, the convert command you gave should work. Try it again the same way as you did but without the "-density" argument. So just do:
Does that work?
Code: Select all
convert "testemffile.emf" "testemffile.eps"
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
Re: Metafile to EPS converter: should it work from within LY
No, sorry. I get this:
Ongeldige parameter - "testemffile.eps"
When I just do
convert "testemffile.emf"
I get this:
Ongeldige stationsspecificatie (transl: unvalid station (or drive?) specification)
[I just did a complete new install on another PC, this time windows10, with exactly the same problems...]
Ongeldige parameter - "testemffile.eps"
When I just do
convert "testemffile.emf"
I get this:
Ongeldige stationsspecificatie (transl: unvalid station (or drive?) specification)
[I just did a complete new install on another PC, this time windows10, with exactly the same problems...]
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Metafile to EPS converter: should it work from within LYX?
Dang, sorry for the frustration. It is not surprising that LyX doesn't work given that the command doesn't work. I have no idea why that command doesn't work though.Stef Pillaert wrote:No, sorry. I get this:
Ongeldige parameter - "testemffile.eps"
When I just do
convert "testemffile.emf"
I get this:
Ongeldige stationsspecificatie (transl: unvalid station (or drive?) specification)
[I just did a complete new install on another PC, this time windows10, with exactly the same problems...]
We can try a different approach. You can install Inkscape, which supposedly is able to do conversion of wmf. Once you install Inkscape, run the following command (I'm not sure what the inkscape command is on Windows):
Code: Select all
inkscape_command_name --file=your_wmf_filename --export-area-drawing --without-gui --export-eps=newfile.eps
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
Metafile to EPS converter: should it work from within LYX?
I discovered that the command line "convert" is something completely different on my system? E.g. see https://technet.microsoft.com/en-us/lib ... 51683.aspx?
When I do "convert /?" in the command line, I get a message that seems to confirm this...
Do you still want me to try the "Inkscape"-solution? Or is the above mentioned problem solveable, you think?
(Thanks, many thanks for all your time!)
When I do "convert /?" in the command line, I get a message that seems to confirm this...
Do you still want me to try the "Inkscape"-solution? Or is the above mentioned problem solveable, you think?
(Thanks, many thanks for all your time!)
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Metafile to EPS converter: should it work from within LY
Ah yes that is helpful! Does the command 'magick' work? It appears that ImageMagick changed the name of the command (perhaps because of the conflict with the convert command you saw).