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?
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Metafile to EPS converter: should it work from within LY
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
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
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?
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
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?
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