2

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?

  • After changing path in winedt, did you press OK? May be a restart will help? Did you change path in PATH tab too? (that is next to Ghostscript tab in Execution Modes? – user11232 Nov 29 '14 at 23:32
  • Thanks for the suggestions, @HarishKumar. The new path to gs9.15 is in the PATH -tab. Yes, I rebooted my laptop after installation. And restarted WinEdt after path edits. Didn't help :-( – Jyrki Lahtonen Nov 29 '14 at 23:38
  • Hmm. 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? – Jyrki Lahtonen Nov 29 '14 at 23:48
  • 2:10 am here. Time for my beauty sleep. – Jyrki Lahtonen Nov 30 '14 at 0:11
  • May be you can update your miktex. I don't have any trouble like that with latest miktex. – user11232 Nov 30 '14 at 0:28
2

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.

  • Thanks Ulrike, this is certainly a cleaner way of fixing things. I will test this later. – Jyrki Lahtonen Nov 30 '14 at 11:03
  • Unfortunately I get the error message gswin32c is not recognized as an internal or external command... – Jyrki Lahtonen Jan 31 '15 at 13:35
  • Well gswin32c.exe must naturally exists and be in the PATH. – Ulrike Fischer Jan 31 '15 at 13:48
  • I think I need to figure out a way for ps2pdf.exe to set that environment variable to point at the updated Ghostscript. I suspect that these problems may be related. – Jyrki Lahtonen Jan 31 '15 at 13:49
  • I used to know how to access "path" and all the environment variables in the DOS era, but nowadays I cannot do that. Windows does such a good job hiding those bits from me :-( And the update is called gsview64.exe so I need to go edit the bat-file, right? – Jyrki Lahtonen Jan 31 '15 at 13:50
1

The problem apparently is that an older version of Ghostscript (9.05) came with the MikTeX2.9 installation. The executable is named "mgs.exe" and located in the folder "C:\Program Files (x86)\MiKTeX\miktex\bin"

A quick and dirty way to fix my problem seems to be

  1. to locate the executable of the freshly installed Ghostscript "C:\Program Files\gs\gs9.15\bin\gswin64.exe" and copy/paste that to the above folder, and
  2. to rename that copy "mgs.exe".

An old DOS-veteran like myself had the sense to rename the existing copy of mgs.exe to something else. Just in case :-). Frankly, I am surprised that something simple like this worked well into Windows era. Some problems may come later, but at least this problem is now gone.


So my heartfelt thanks to the developers of MiKTeX and the relevant packages (animate, powerdot,...). This is good engineering! There was an old component. Pull it out, put a new one in. Problem solved! This is in sharp contrast to my experience at the computer shop, when my old laptop had a malfunctioning USB-port: "Hmm. That port is integrated to your motherboard. You need a new one. But for the same money you could get a new laptop (not as good as this but...)"

  • Sorry about the luddite rant... – Jyrki Lahtonen Dec 1 '14 at 7:48
  • 1
    The tip to rename gswin32c.exe to mgs.exe and copy it to the folder \MIKTEX\miktex\bin worked fine! In fact, all the options of ps2pdf like -dPDFSETTINGS#/prepress work perfect now! Thanks a lot – user109152 Jun 30 '16 at 8:02
1

System: Win10 x64bits, WinEdt 5.0, MikTeX 2.9

I found a similar problem

(ps2pdf within WinEdt I get this error message:

"Error starting gswin32c.exe!

See WinEdt's Accessories| TeX Configuration Wizard for detailed diganosis of your TeX system."

) expecting the file gswin32c.exe, which was not found.

I was able to fix the problem following the solution suggested by Jyrki Lahtonen. The file gswin32c.exe cannot be found because my System is 64bits.

So the "dirty way" was to find the file gswin64c.exe at the gs9.20 ghostscript installed subdirectory: ...\gs9.20\bin

Then copy/paste gswin64c.exe, and then rename this new file as gswin32c.exe

Now ps2pdf within WinEdt recognizes this executable file.

  • WinEdt 5.0 ?????? It is more than 10 years old..... – Arzigoglu Feb 13 '17 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.