LyXMetafile to EPS converter: should it work from within LYX?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

Metafile to EPS converter: should it work from within LYX?

Post by Stef Pillaert »

scottkosty wrote: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).
When I type that at the command prompt, I get a message that this is not recognised as an internal or external command, program nor batchfile (translated from dutch).
Sorry,
Stef

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Metafile to EPS converter: should it work from within LY

Post by scottkosty »

If you find the directory where ImageMagick is installed, which executables are there?

When you open ImageMagick (from the GUI), what version is it?
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

Re: Metafile to EPS converter: should it work from within LY

Post by Stef Pillaert »

In folder "C:\Program Files (x86)\LyX 2.2\imagemagick", the only executable I can see there, is "magick.exe". (Double-clicking on it shows a black terminal window that disappears immediately).
I don't understand exactly what you mean by "opening ImageMagick from the GUI": do you mean from within LyX? How do I do that?
Stef
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Metafile to EPS converter: should it work from within LY

Post by scottkosty »

I see. I guess it doesn't work on your command prompt because it is not in your system path because it is within LyX's folder.

Let's try this: in LyX, go to Tools > Preferences > File Handling > Converters and find the entry that says EPS -> PNG. Click on that. What is in the "Converter" box?
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

Metafile to EPS converter: should it work from within LYX?

Post by Stef Pillaert »

scottkosty wrote:I see. I guess it doesn't work on your command prompt because it is not in your system path because it is within LyX's folder.

Let's try this: in LyX, go to Tools > Preferences > File Handling > Converters and find the entry that says EPS -> PNG. Click on that. What is in the "Converter" box?
"magick $$i $$o"
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Metafile to EPS converter: should it work from within LYX?

Post by scottkosty »

Stef Pillaert wrote:
"magick $$i $$o"
OK, copy that command to the command for the converter that is not working. Then restart LyX. Does it work now?
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

Re: Metafile to EPS converter: should it work from within LY

Post by Stef Pillaert »

OK, I did that for both emf and wmf to eps, now it works (though it takes quite a while the first time; also seems slow the first time I generate a pdf).
But OK, it seems fine now. Thanks a lot for your time!!!
(Just out of curiosity: did I do something wrong while installing? Or does this happen on every Windows-machine when installing the latest version? I'm going to encourage my students to use LyX for their texts, and since most of them will be using Windows-machines...)
(Thanks also for pointing me to Inkspace: I discovered this as a great tool the last few days!)
Stef
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Metafile to EPS converter: should it work from within LYX?

Post by scottkosty »

Stef Pillaert wrote:OK, I did that for both emf and wmf to eps, now it works (though it takes quite a while the first time; also seems slow the first time I generate a pdf).
But OK, it seems fine now. Thanks a lot for your time!!!
Great! Sorry it took so long. Thanks for your patience.
Stef Pillaert wrote: (Just out of curiosity: did I do something wrong while installing? Or does this happen on every Windows-machine when installing the latest version? I'm going to encourage my students to use LyX for their texts, and since most of them will be using Windows-machines...)
It is a good question. I doubt it was anything you did wrong. There are a few tricky things that caused this situation:

- LyX is a cross-platform tool so it works well with formats that are "cross-platform" (i.e. common on all platforms), such as SVG, EPS, PDF, PNG, JPG, TIF.
- ImageMagick recently changed the name of its binary on Windows. It used to be "convert" and as of ImageMagick 7, it is now called magick. I don't think LyX has made the transition completely
- There is only one LyX developer who uses Windows. Most use Linux. The developer on Windows does what he can and dedicates a lot of time, but it is hard when he is the only one.

In summary, things like this should ideally "just work" and it is LyX's fault if something like this goes wrong. But it is hard to get every little thing (e.g. every format on every platform) working seamlessly. I think I know how to fix this particular issue. I will check with the LyX developers if what I have in mind is indeed correct.
Stef Pillaert wrote: (Thanks also for pointing me to Inkspace: I discovered this as a great tool the last few days!)
Stef
It is a great tool! It takes me a while to get what I want with it, but it is very powerful. Speaking of Inkscape, I want to mention one thing: apparently EMF can contain both raster and vector parts. If your EMF contains a vector part, when you convert with magick those parts will be converted to raster. If you don't notice the difference in the PDF, then you have nothing to worry about. But if things look pixelated (fuzzy) when you zoom in, you might want to look into using Inkscape to do the conversion because it would preserve the vector parts.

If you are looking for more LyX users on Windows, there are many and they hang out on the lyx-users mailing list. We often exchange tips and help each other on the list. See the following to join:
https://www.lyx.org/MailingLists#toc2
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

Metafile to EPS converter: should it work from within LYX?

Post by Stef Pillaert »

- There is only one LyX developer who uses Windows. Most use Linux. The developer on Windows does what he can and dedicates a lot of time, but it is hard when he is the only one.
Ah OK, I see. This is a bit a pitty, since I strongly believe that what LyX does with LateX is exactly what "Windows"-people want/need: something "easy"/"user-friendly"/"working-out-of-the-box"/"easy-GUI"/WYSIWYM.
I've always been convinced that LaTeX is great, but only when I seriously gave LyX a try (and now also inkscape), I actually made the step to LaTeX, away from MS-Office. I am (and always will be, almost out of principle!) a LaTeX-dummy: but I make very good looking texts now, including good looking figures (thanks to your help!). And all this in a very short time, with a quick learning curve (apart from the -emf-wmf-eps-thing :-)).
(To be honest: the only true thing that I (really!) miss from my workflow in MS Office: in MSOffice/Word, the figures that you make in MSOffice are in the document itself, and still can be edited in MS Word itself. Now I have to arrange all my figures as seperate files in some folder: for "Windows-Office-people", this is really a "why-oh-why?" :-))
Anyway: if you need someone to help testing things on a Windows-machine: feel free to ask me!
Again: many, many thanks for the support!
Stef
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Metafile to EPS converter: should it work from within LYX?

Post by scottkosty »

Stef Pillaert wrote: Ah OK, I see. This is a bit a pitty, since I strongly believe that what LyX does with LateX is exactly what "Windows"-people want/need: something
"easy"/"user-friendly"/"working-out-of-the-box"/"easy-GUI"/WYSIWYM.
Yes it is too bad we do not have more developers on Windows interested in helping. But it is nice that since we use cross-platform tools every
improvement we make is also available in Windows (when the platform allows).
Stef Pillaert wrote: I've always been convinced that LaTeX is great, but only when I seriously gave LyX a try (and now also inkscape), I actually made the step to LaTeX,
away from MS-Office. I am (and always will be, almost out of principle!) a LaTeX-dummy:
Great! I would still encourage you to learn LaTeX. You will get more out of LyX if you know LaTeX. You could put this on your summer reading list:
https://www.amazon.com/LaTeX-Beginners- ... n+Kottwitz
But I understand that time is limited.
Stef Pillaert wrote: (To be honest: the only true thing that I (really!) miss from my workflow in MS Office: in MSOffice/Word, the figures that you make in MSOffice are in
the document itself, and still can be edited in MS Word itself. Now I have to arrange all my figures as seperate files in some folder: for
"Windows-Office-people", this is really a "why-oh-why?" :-))
Yeah I can understand why it would be nice to have everything in one. As to your question of "why" it is that way, it is so that LyX can focus on one
thing and be good at it. If we try to build-in a figure editor and add other bells and whistles, LyX will be worse at producing good LaTeX and good
PDFs. Instead, we make it easy so that you can right-click on the image and go to "open in editor". This way you can set your favorite editor (after
all, everyone has a different one) to open easily. Although having a built-in editor is not likely, it would be possible to embed images. You can make
this and other feature requests at http://www.lyx.org/trac.
Stef Pillaert wrote: Anyway: if you need someone to help testing things on a Windows-machine: feel free to ask me!
Again: many, many thanks for the support!
Stef
If you send me an email I'd be happy keep that in mind in the future. That will be useful. My address is: skostysh at lyx.org.

Scott
Post Reply