[Tex/LaTex] How to configure WinEdt/MikTeX/ps2pdf to use a new version of Ghostscript when converting ps->pdf

animateghostscriptmiktexwinedt

System: Win7, WinEdt 7.0, MikTeX 2.9

In order to include animations into my powerdot slide sets I was instructed to use the animate package. Installing that was no problem. Also I have my animation in 64 .eps-files. LaTeX compiles it all right. DviPS does its magic all right (I think, see below).

However, whenever I click ps2pdf within WinEdt I get this error message

Ghostscript version >=9.15 required.

Can't say I was surprised to here about that as the animate package manual warns about this.

Ok, so I download and install a new version of Ghostscript. Doesn't help. I download and install a new version of Ghostview as well to be safe. This helped in the sense that in Ghostview preview I can see that the animation is shown correctly (ok, the box is a bit overfull, but RTFM should help with that). But ps2pdf still complains.

Time to start checking other things. WinEdt-> Options-> Execution Modes has a tab titled Ghostscript. WTF? that still has the old path? Fix that path. Go to control panel. Uninstall Ghostscript 8.63. Does not help!

Where does this old Ghostscript come from? Does MikTeX/ps2pdf have their private version of Ghostscript somewhere that I cannot uninstall? Why doesn't WinEdt step in? What's the point of it having this path configured, if the system does not use that version of GS?

I guess it shows that I'm mostly clueless about how WinEdt and MikTeX co-operate. Most of the time they work together splendidly, but now??

Should I have installed a 32-bit version of GS? Win 7 is 64-bit, but may be the rest of my LaTeX system needs the 32-bit version.

Can anyone diagnose the problem/shed any light on this?


Edit: I started checking out the MikTeX directory. There is program called "mgs.exe" in the folder "C:\Program Files (x86)\MikTeX2.9\miktex\bin". Clicking that opens a command prompt, where it says that it is GPL Ghostscript 9.05. Apparently that is the reason. But how to fix that?

I renamed that file to "mgs2.exe" for the purposes of testing. Now I get the error message "mgs.exe is not recognized as an internal…."

This seems to indicate that ps2pdf is calling that program. Time to delve into the animate manual?

Best Answer

The ps2pdf.exe in miktex/bin first sets an environment variable so that it points to mgs.exe and then calls the ps2pdf.bat in miktex/scripts/ghostscript/bat.

You can avoid the call to mgs.exe by using the .bat directly. On my machine this here tries to use gswin32c.exe (default) or whatever an environment variable GSC points to:

 D:\MiKTeX2.9\scripts\ghostscript\bat\ps2pdf.bat test-utf8

In winedt you can make the change from ps2pdf.exe to path/to/ps2pdf.bat in the execution modes.

Related Question