Paul A. Rubin wrote:
LB wrote:
Ok, it tried this. I commented out SET LC_ALL=en_EN. This resulted
in a different image having the preview problem.
I placed SET XXXXXX=YYYYY in lyx.bat and the preview problem moved
back to the original image. The same happens when I comment out the
other line in the lyx.bat.
I also added extra lines in lyx.bat such as SET XXXXXX=YYYYY this
however did not make any difference as far as image preview is
concerned.
This is again confusing, though perhaps no more confusing than the
fact that deleting unneeded environment variables (other than LC_ALL
and the aiksaurus one) did not help.
Another puzzling thing is that the preview problem jumps between two
specific figures eventhough I have many figures in the document and
many of them are generated with Matlab. The preview problem however
never affects figures generated with other programs.
Is there anything that the names/paths of the two affected figures
have in common which is not shared by the other files. For instance,
are they the longest paths, do they lie deeper in the directory tree
than other figures, ... ?
Stephen's idea of a second Ghostscript installation strikes me as
possible but unlikely (and unlikely to be the culprit), since there
would need to be something causing ImageMagick to alternate between
the two GS installations on a figure-by-figure basis within the
document (meaning that something in the figure names/paths would have
to be triggering the switching). Also, Mathematica exports EPS
without using GS and without installing its own GS, so I suspect the
same might be true of MATLAB. Still, the whole bug is unlikely, so we
shouldn't presume anything.
It would be nice if we could intercept the call from IM to GS and see
what's being passed, but so far I have not figured out how.
/Paul
-------------------------------------------------------------
http://www.mathworks.com/support/solutions/data/1-ZBALJ.html?solution=1-ZBALJ
"The MATLAB Component Runtime (MCR) 7.0 and 7.1 do not contain a
copy of the GhostScript program included with MATLAB. Therefore,
applications deployed on a target machine rely on a locally-
installed version of GhostScript, if one exists, for exporting
some graphics. Since the version of GhostScript installed on the
target machine may be different than the one included with MATLAB,
the command line parameters potentially may be different as well.
This difference causes an error in some instances."
----------------------------------------------------------------
I think this supports the possibility of a Ghostscript conflict and that
Matlab comes with its own version of Gs. With an earlier distro of
LyX I also had XemTeX installed which comes with its own Gs.
It had a different version of Gs and the .dlls conflicted with LyX
which was solved by moving Xemtex to the end of Windows Path.
I'm pretty sure that lyx.exe checks the LyX directory for various
executables because Enrico's batfiles seem to use this principle.
I'm not so sure about lyx.bat because I thought it was possible
that those set commands could change which Gs was invoked.
I don't know what they do, the consequences of their mechanism.
One major difference in the our environments and Leo's is that
he has Matlab installed and we don't. I'm pretty sure that Matlab
has Gs installed since I've googled and seen it listed as a sub-dir
of Matlab's directory structure (though only for Linux). It should
take Leo less than thirty seconds to find out with Win Explorer.
I 've a hunch that his Matlab Gs version is earlier than his system
Gs, supposing that there are two instances.
My troubleshooting idea was to eliminate both ways a Gs version
conflict could happen and to use lyx.exe first before lyx.bat to see
if the .eps file itself (command line parameters used) perhaps had
a version glitch and I thought it would take about 5 minutes
(without Matlab running) to see if this affected the problem. I
think the Matlab doc I just reported upon supports this possibility.
We also have a more recent version of system Ghostscript.
My Sherlock Holmes sig, (inmates on death row tell jokes by #)
Stephen