timm danker wrote: > This is really beatifull, thanks a lot! > Though, to get it working, I had to do some things different: > > It did not work from my .lyx directory (because this is located > under "Dokumente und Einstellungen", so the path contains spaces > which seems to cause problems). > This is wad I had to do instead: > 1.) copy the shell wrapper into share/lyx/scripts and changed it to: > > #! /bin/sh > python lyxpreview2ppm.py $@
Ok, that's because you don't have the unix utility 'dirname' installed. I could probably hack together a work-around using sed, but really don't want to. It's difficult to get right and, anyway, the script is a temporary hack that won't be needed in lyx 1.3.5. > 2.) copy the python script into /bin Because of the change (1) above I presume. Ie, python can't find the script .lyx/scripts/lyxpreview2ppm.py but does search the /bin directory and therefore finds it there. Could you try putting the python script back in your .lyx/scripts directory and changing the wrapper script to: #! /bin/sh type dirname > /dev/null 2>&1 && { python `dirname $0`/lyxpreview2ppm.py $@ } || { # Comment out these three lines to proceed... echo "Either install 'dirname' or" echo "hard-wire the location of the script..." exit 1 python C:/Dokumente\ und\ Einstellungen/.lyx/scripts/lyxpreview2ppm.py $@ } (Adjust the actual path to suir of course...) > 3.) remove python.exe from /bin (otherwise the stripped down > version is used). Naturally. When upgrading any software, you should always think about what is going to happen to the old version. Usually, as here, removing it is the correct option. > 4.) set the paths to python and gswin32 manually. Windows has a PATH environment variable that is used to list the directories that should be searched for executables. See, eg: http://www.stat.auckland.ac.nz/~kwan022/pub/R/WinBook/node16.html for the correct way to set it on your machine. > Now it works. Dont know why things where different for me, but maybe > this should be put on the wiki? I'm sure that some of this info is useful, but in modified form. Angus