Re: Postscript preview

2006-08-09 Thread Stephen Buonopane


On Aug 9, 2006, at 2:28 PM, TechTonics wrote:

LB wrote:
Having already generated the image files in MATLAB, try temporarily 
hiding all the Cygwin and Matlab copies of the GS executable (say by 
adding a $ to the start of their names, which is easy to undo 
afterward).  Then run LyX and see if the images load properly.

No they don't.
Leo




I haven't been following this thread so I'm not sure what the original 
problem was, but I saw Matlab and preview in the above posting.
Make sure you are saving your Matlab graphics as eps  _without_ the 
tiff preview. LyX makes its own preview with gs. The embedded tiff 
preview does not work with LyX, or plain old LaTeX.




Re: Postscript preview

2006-08-09 Thread Stephen Buonopane


On Aug 9, 2006, at 2:28 PM, TechTonics wrote:

LB wrote:
Having already generated the image files in MATLAB, try temporarily 
hiding all the Cygwin and Matlab copies of the GS executable (say by 
adding a $ to the start of their names, which is easy to undo 
afterward).  Then run LyX and see if the images load properly.

No they don't.
Leo




I haven't been following this thread so I'm not sure what the original 
problem was, but I saw Matlab and preview in the above posting.
Make sure you are saving your Matlab graphics as eps  _without_ the 
tiff preview. LyX makes its own preview with gs. The embedded tiff 
preview does not work with LyX, or plain old LaTeX.




Re: Postscript preview

2006-08-09 Thread Stephen Buonopane


On Aug 9, 2006, at 2:28 PM, TechTonics wrote:

LB wrote:
Having already generated the image files in MATLAB, try temporarily 
hiding all the Cygwin and Matlab copies of the GS executable (say by 
adding a $ to the start of their names, which is easy to undo 
afterward).  Then run LyX and see if the images load properly.

No they don't.
Leo




I haven't been following this thread so I'm not sure what the original 
problem was, but I saw Matlab and preview in the above posting.
Make sure you are saving your Matlab graphics as eps  _without_ the 
tiff preview. LyX makes its own preview with gs. The embedded tiff 
preview does not work with LyX, or plain old LaTeX.




Re: Postscript preview

2006-08-01 Thread Paul A. Rubin

LB wrote:
When I start lyx1.4.2 I see two black windows (shell windows???) pop-up 
and dissapear before Lyx actually appears.  Lyx1.4.1 only flashes one 
black window.

Does that mean anything?



Normal behavior.  The first window is lyx.bat; as soon as it starts 
lyx.exe, it exits.  The second window is lyx.exe, which has a DOS 
background window temporarily until it dismisses/kills that window.  I 
think.


/Paul





Re: Postscript preview

2006-08-01 Thread Paul A. Rubin

LB wrote:
When I start lyx1.4.2 I see two black windows (shell windows???) pop-up 
and dissapear before Lyx actually appears.  Lyx1.4.1 only flashes one 
black window.

Does that mean anything?



Normal behavior.  The first window is lyx.bat; as soon as it starts 
lyx.exe, it exits.  The second window is lyx.exe, which has a DOS 
background window temporarily until it dismisses/kills that window.  I 
think.


/Paul





Re: Postscript preview

2006-08-01 Thread Paul A. Rubin

LB wrote:
When I start lyx1.4.2 I see two black windows (shell windows???) pop-up 
and dissapear before Lyx actually appears.  Lyx1.4.1 only flashes one 
black window.

Does that mean anything?



Normal behavior.  The first window is lyx.bat; as soon as it starts 
lyx.exe, it exits.  The second window is lyx.exe, which has a DOS 
background window temporarily until it dismisses/kills that window.  I 
think.


/Paul





Re: Postscript preview

2006-07-31 Thread LB

Hello


I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

 PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly 
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the ly looks wrong.


This was not a typo. That's what my path is set to.  I'm not sure what sets 
the path to LyX but that clearly did not work although fixing this did not 
solve the problem with the figure.



As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.


I have GS 8.14 installed.


A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python.


I have Python 2.4.3 installed.  I put it in front of Path_prefix but that 
did not help.



Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...


This also did not make any difference.

Thanks
Leo




Re: Postscript preview

2006-07-31 Thread LB
When I start lyx1.4.2 I see two black windows (shell windows???) pop-up and 
dissapear before Lyx actually appears.  Lyx1.4.1 only flashes one black 
window.

Does that mean anything?

Leo 





Re: Postscript preview

2006-07-31 Thread LB

Hello


I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

 PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly 
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the ly looks wrong.


This was not a typo. That's what my path is set to.  I'm not sure what sets 
the path to LyX but that clearly did not work although fixing this did not 
solve the problem with the figure.



As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.


I have GS 8.14 installed.


A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python.


I have Python 2.4.3 installed.  I put it in front of Path_prefix but that 
did not help.



Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...


This also did not make any difference.

Thanks
Leo




Re: Postscript preview

2006-07-31 Thread LB
When I start lyx1.4.2 I see two black windows (shell windows???) pop-up and 
dissapear before Lyx actually appears.  Lyx1.4.1 only flashes one black 
window.

Does that mean anything?

Leo 





Re: Postscript preview

2006-07-31 Thread LB

Hello


I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

" PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly "
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the "ly" looks wrong.


This was not a typo. That's what my path is set to.  I'm not sure what sets 
the path to LyX but that clearly did not work although fixing this did not 
solve the problem with the figure.



As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.


I have GS 8.14 installed.


A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python.


I have Python 2.4.3 installed.  I put it in front of Path_prefix but that 
did not help.



Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...


This also did not make any difference.

Thanks
Leo




Re: Postscript preview

2006-07-31 Thread LB
When I start lyx1.4.2 I see two black windows (shell windows???) pop-up and 
dissapear before Lyx actually appears.  Lyx1.4.1 only flashes one black 
window.

Does that mean anything?

Leo 





Re: Postscript preview

2006-07-29 Thread LB

Thank you Paul for all your help.

Adding path to GS in lyx.bat did not solved the problem.

I have this feeling that the problem is somehow related to the postscript 
commands inside the figure...


I'm giving up and going back to use version 1.4.1.

Cheers
Leo

One other difference I notices is that I have the Ghostscript bin and lib 
directories on my system command path, and you don't.  You must have them 
(as do I) in LyX Tools-Preferences...-Paths-PATH prefix, which LyX 
attaches to the command path when it shells out to a script.  (In my case, 
they end up on the path twice, which is harmless.)  I don't suppose that 
adding them to your path fixes the bug?  (An easy way to try this on a 
temporary basis would be to add the line


SET PATH=C:\path to GS\bin;C:\path to GS\lib;%PATH%

to the lyx.bat file, prior to the start command.)

I have no idea how a couple of environment variables and the length of the 
path to the target file can be interacting, other than if they're both 
being written to a common buffer somewhere (which is overflowing), and 
that seems rather unlikely given that I would be putting more stuff in the 
buffer and not seeing the problem.


/Paul






Re: Postscript preview

2006-07-29 Thread Paul A. Rubin

LB wrote:

Thank you Paul for all your help.

Adding path to GS in lyx.bat did not solved the problem.

I have this feeling that the problem is somehow related to the 
postscript commands inside the figure...


I don't know much about Postscript, but I looked in your test.ps file a 
few days ago and did not see anything that looked like it had the 
potential to conflict with anything in the environment.


When you added the GS path in lyx.bat, did you add the path to the lib 
directory as well as to the bin directory?  The path to the bin 
directory would not seem to be an issue, since GS runs (enough to hang 
open, at any rate).  I thought maybe if the lib directory were not on 
the path, GS might have trouble finding a library file.  (Seems 
unlikely, but then the entire bug passed through 'unlikely' on its way 
to 'impossible' a while ago.)


I'm giving up and going back to use version 1.4.1.



Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I 
just hope this problem does not recur when we get to 1.5 and there is 
some must have new feature.


I'm going to post this to the developer list, just in case someone 
recognizes what's going on.


/Paul



Re: Postscript preview

2006-07-29 Thread LB
 When you added the GS path in lyx.bat, did you add the path to the lib
 directory as well as to the bin directory?

Yes I did.

  I'm giving up and going back to use version 1.4.1.

 Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I
 just hope this problem does not recur when we get to 1.5 and there is
 some must have new feature.

BTW, I generated another figure with Matlab that has the same problem.  It
looks like when I generate figures with Matlab I run into trouble with
previewing figure with 1.4.2 but not with any other versions.  I have tried
1.4.1, 1.3.7 and 1.3.5.

Cheers
Leo



Re: Postscript preview

2006-07-29 Thread Stephen Harris

LB wrote:

When you added the GS path in lyx.bat, did you add the path to the lib
directory as well as to the bin directory?


Yes I did.


I'm giving up and going back to use version 1.4.1.

Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I
just hope this problem does not recur when we get to 1.5 and there is
some must have new feature.


BTW, I generated another figure with Matlab that has the same problem.  It
looks like when I generate figures with Matlab I run into trouble with
previewing figure with 1.4.2 but not with any other versions.  I have tried
1.4.1, 1.3.7 and 1.3.5.

Cheers
Leo




I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

 PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly 
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the ly looks wrong.

As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.

A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python. Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...

Anyway replacing GS is a good idea, and if you already
have the full Python, it is easy to *_prepend_*
C:\Python243 to the LyX Path_prefix and have a fully
functioning Python, since the extent of the local
Python, mostly successful, may have other gaps. I've
had a problem with set environmental variables once
before. Another departed version of *tex had left
its value behind and conflicted with the new version
which wanted to set the same variable to a new place.
(Cygwin and TexLive2005). Well, that was just rambling.

--

An ambient confluence
of mapped coherence ~

Stephen


Re: Postscript preview

2006-07-29 Thread Jens Noeckel


On Jul 29, 2006, at 9:09 PM, Stephen Harris wrote:


LB wrote:
When you added the GS path in lyx.bat, did you add the path to  
the lib

directory as well as to the bin directory?

Yes I did.

I'm giving up and going back to use version 1.4.1.
Well, I can't say I blame you ... 1.4.1 worked pretty well for  
me.  I
just hope this problem does not recur when we get to 1.5 and  
there is

some must have new feature.
BTW, I generated another figure with Matlab that has the same  
problem.  It
looks like when I generate figures with Matlab I run into trouble  
with
previewing figure with 1.4.2 but not with any other versions.  I  
have tried

1.4.1, 1.3.7 and 1.3.5.
Cheers
Leo


I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

 PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly 
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the ly looks wrong.

As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.

A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python. Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...

Anyway replacing GS is a good idea, and if you already
have the full Python, it is easy to *_prepend_*
C:\Python243 to the LyX Path_prefix and have a fully
functioning Python, since the extent of the local
Python, mostly successful, may have other gaps. I've
had a problem with set environmental variables once
before. Another departed version of *tex had left
its value behind and conflicted with the new version
which wanted to set the same variable to a new place.
(Cygwin and TexLive2005). Well, that was just rambling.




Hi,
one more idea: if this is really a PATH problem and things worked  
normally under lyx 1.4.1, then I would do the following simple steps  
(unless you already tried this and I didn't see it in the earlier  
messages):

(a)
Revert to LyX 1.4.1 and open the Preferences dialog to find out  
EXACTLY what your PATH setting is in that program.

(b)
Copy that string.
(c)
Re-install LyX 1.4.2 and open the Prefs dialog there to see its PATH  
settings. I would strongly suspect that this is somehow different  
from 1.4.1.

(d)
Enter the previously copied PATH from 1.4.1 into the PATH box in 1.4.2.
(e)
Restart LyX 1.4.2 (just to be safe), and see if the preview works now.

Hope that helps,
Jens



Re: Postscript preview

2006-07-29 Thread LB

Thank you Paul for all your help.

Adding path to GS in lyx.bat did not solved the problem.

I have this feeling that the problem is somehow related to the postscript 
commands inside the figure...


I'm giving up and going back to use version 1.4.1.

Cheers
Leo

One other difference I notices is that I have the Ghostscript bin and lib 
directories on my system command path, and you don't.  You must have them 
(as do I) in LyX Tools-Preferences...-Paths-PATH prefix, which LyX 
attaches to the command path when it shells out to a script.  (In my case, 
they end up on the path twice, which is harmless.)  I don't suppose that 
adding them to your path fixes the bug?  (An easy way to try this on a 
temporary basis would be to add the line


SET PATH=C:\path to GS\bin;C:\path to GS\lib;%PATH%

to the lyx.bat file, prior to the start command.)

I have no idea how a couple of environment variables and the length of the 
path to the target file can be interacting, other than if they're both 
being written to a common buffer somewhere (which is overflowing), and 
that seems rather unlikely given that I would be putting more stuff in the 
buffer and not seeing the problem.


/Paul






Re: Postscript preview

2006-07-29 Thread Paul A. Rubin

LB wrote:

Thank you Paul for all your help.

Adding path to GS in lyx.bat did not solved the problem.

I have this feeling that the problem is somehow related to the 
postscript commands inside the figure...


I don't know much about Postscript, but I looked in your test.ps file a 
few days ago and did not see anything that looked like it had the 
potential to conflict with anything in the environment.


When you added the GS path in lyx.bat, did you add the path to the lib 
directory as well as to the bin directory?  The path to the bin 
directory would not seem to be an issue, since GS runs (enough to hang 
open, at any rate).  I thought maybe if the lib directory were not on 
the path, GS might have trouble finding a library file.  (Seems 
unlikely, but then the entire bug passed through 'unlikely' on its way 
to 'impossible' a while ago.)


I'm giving up and going back to use version 1.4.1.



Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I 
just hope this problem does not recur when we get to 1.5 and there is 
some must have new feature.


I'm going to post this to the developer list, just in case someone 
recognizes what's going on.


/Paul



Re: Postscript preview

2006-07-29 Thread LB
 When you added the GS path in lyx.bat, did you add the path to the lib
 directory as well as to the bin directory?

Yes I did.

  I'm giving up and going back to use version 1.4.1.

 Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I
 just hope this problem does not recur when we get to 1.5 and there is
 some must have new feature.

BTW, I generated another figure with Matlab that has the same problem.  It
looks like when I generate figures with Matlab I run into trouble with
previewing figure with 1.4.2 but not with any other versions.  I have tried
1.4.1, 1.3.7 and 1.3.5.

Cheers
Leo



Re: Postscript preview

2006-07-29 Thread Stephen Harris

LB wrote:

When you added the GS path in lyx.bat, did you add the path to the lib
directory as well as to the bin directory?


Yes I did.


I'm giving up and going back to use version 1.4.1.

Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I
just hope this problem does not recur when we get to 1.5 and there is
some must have new feature.


BTW, I generated another figure with Matlab that has the same problem.  It
looks like when I generate figures with Matlab I run into trouble with
previewing figure with 1.4.2 but not with any other versions.  I have tried
1.4.1, 1.3.7 and 1.3.5.

Cheers
Leo




I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

 PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly 
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the ly looks wrong.

As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.

A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python. Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...

Anyway replacing GS is a good idea, and if you already
have the full Python, it is easy to *_prepend_*
C:\Python243 to the LyX Path_prefix and have a fully
functioning Python, since the extent of the local
Python, mostly successful, may have other gaps. I've
had a problem with set environmental variables once
before. Another departed version of *tex had left
its value behind and conflicted with the new version
which wanted to set the same variable to a new place.
(Cygwin and TexLive2005). Well, that was just rambling.

--

An ambient confluence
of mapped coherence ~

Stephen


Re: Postscript preview

2006-07-29 Thread Jens Noeckel


On Jul 29, 2006, at 9:09 PM, Stephen Harris wrote:


LB wrote:
When you added the GS path in lyx.bat, did you add the path to  
the lib

directory as well as to the bin directory?

Yes I did.

I'm giving up and going back to use version 1.4.1.
Well, I can't say I blame you ... 1.4.1 worked pretty well for  
me.  I
just hope this problem does not recur when we get to 1.5 and  
there is

some must have new feature.
BTW, I generated another figure with Matlab that has the same  
problem.  It
looks like when I generate figures with Matlab I run into trouble  
with
previewing figure with 1.4.2 but not with any other versions.  I  
have tried

1.4.1, 1.3.7 and 1.3.5.
Cheers
Leo


I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

 PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly 
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the ly looks wrong.

As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.

A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python. Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...

Anyway replacing GS is a good idea, and if you already
have the full Python, it is easy to *_prepend_*
C:\Python243 to the LyX Path_prefix and have a fully
functioning Python, since the extent of the local
Python, mostly successful, may have other gaps. I've
had a problem with set environmental variables once
before. Another departed version of *tex had left
its value behind and conflicted with the new version
which wanted to set the same variable to a new place.
(Cygwin and TexLive2005). Well, that was just rambling.




Hi,
one more idea: if this is really a PATH problem and things worked  
normally under lyx 1.4.1, then I would do the following simple steps  
(unless you already tried this and I didn't see it in the earlier  
messages):

(a)
Revert to LyX 1.4.1 and open the Preferences dialog to find out  
EXACTLY what your PATH setting is in that program.

(b)
Copy that string.
(c)
Re-install LyX 1.4.2 and open the Prefs dialog there to see its PATH  
settings. I would strongly suspect that this is somehow different  
from 1.4.1.

(d)
Enter the previously copied PATH from 1.4.1 into the PATH box in 1.4.2.
(e)
Restart LyX 1.4.2 (just to be safe), and see if the preview works now.

Hope that helps,
Jens



Re: Postscript preview

2006-07-29 Thread LB

Thank you Paul for all your help.

Adding path to GS in lyx.bat did not solved the problem.

I have this feeling that the problem is somehow related to the postscript 
commands inside the figure...


I'm giving up and going back to use version 1.4.1.

Cheers
Leo

One other difference I notices is that I have the Ghostscript bin and lib 
directories on my system command path, and you don't.  You must have them 
(as do I) in LyX Tools->Preferences...->Paths->PATH prefix, which LyX 
attaches to the command path when it shells out to a script.  (In my case, 
they end up on the path twice, which is harmless.)  I don't suppose that 
adding them to your path fixes the bug?  (An easy way to try this on a 
temporary basis would be to add the line


SET PATH=C:\\bin;C:\\lib;%PATH%

to the lyx.bat file, prior to the start command.)

I have no idea how a couple of environment variables and the length of the 
path to the target file can be interacting, other than if they're both 
being written to a common buffer somewhere (which is overflowing), and 
that seems rather unlikely given that I would be putting more stuff in the 
buffer and not seeing the problem.


/Paul






Re: Postscript preview

2006-07-29 Thread Paul A. Rubin

LB wrote:

Thank you Paul for all your help.

Adding path to GS in lyx.bat did not solved the problem.

I have this feeling that the problem is somehow related to the 
postscript commands inside the figure...


I don't know much about Postscript, but I looked in your test.ps file a 
few days ago and did not see anything that looked like it had the 
potential to conflict with anything in the environment.


When you added the GS path in lyx.bat, did you add the path to the lib 
directory as well as to the bin directory?  The path to the bin 
directory would not seem to be an issue, since GS runs (enough to hang 
open, at any rate).  I thought maybe if the lib directory were not on 
the path, GS might have trouble finding a library file.  (Seems 
unlikely, but then the entire bug passed through 'unlikely' on its way 
to 'impossible' a while ago.)


I'm giving up and going back to use version 1.4.1.



Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I 
just hope this problem does not recur when we get to 1.5 and there is 
some "must have" new feature.


I'm going to post this to the developer list, just in case someone 
recognizes what's going on.


/Paul



Re: Postscript preview

2006-07-29 Thread LB
> When you added the GS path in lyx.bat, did you add the path to the lib
> directory as well as to the bin directory?

Yes I did.

> > I'm giving up and going back to use version 1.4.1.
>
> Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I
> just hope this problem does not recur when we get to 1.5 and there is
> some "must have" new feature.

BTW, I generated another figure with Matlab that has the same problem.  It
looks like when I generate figures with Matlab I run into trouble with
previewing figure with 1.4.2 but not with any other versions.  I have tried
1.4.1, 1.3.7 and 1.3.5.

Cheers
Leo



Re: Postscript preview

2006-07-29 Thread Stephen Harris

LB wrote:

When you added the GS path in lyx.bat, did you add the path to the lib
directory as well as to the bin directory?


Yes I did.


I'm giving up and going back to use version 1.4.1.

Well, I can't say I blame you ... 1.4.1 worked pretty well for me.  I
just hope this problem does not recur when we get to 1.5 and there is
some "must have" new feature.


BTW, I generated another figure with Matlab that has the same problem.  It
looks like when I generate figures with Matlab I run into trouble with
previewing figure with 1.4.2 but not with any other versions.  I have tried
1.4.1, 1.3.7 and 1.3.5.

Cheers
Leo




I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

" PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly "
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the "ly" looks wrong.

As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.

A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python. Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...

Anyway replacing GS is a good idea, and if you already
have the full Python, it is easy to *_prepend_*
C:\Python243 to the LyX Path_prefix and have a fully
functioning Python, since the extent of the local
Python, mostly successful, may have other gaps. I've
had a problem with set environmental variables once
before. Another departed version of *tex had left
its value behind and conflicted with the new version
which wanted to set the same variable to a new place.
(Cygwin and TexLive2005). Well, that was just rambling.

--

An ambient confluence
of mapped coherence ~

Stephen


Re: Postscript preview

2006-07-29 Thread Jens Noeckel


On Jul 29, 2006, at 9:09 PM, Stephen Harris wrote:


LB wrote:
When you added the GS path in lyx.bat, did you add the path to  
the lib

directory as well as to the bin directory?

Yes I did.

I'm giving up and going back to use version 1.4.1.
Well, I can't say I blame you ... 1.4.1 worked pretty well for  
me.  I
just hope this problem does not recur when we get to 1.5 and  
there is

some "must have" new feature.
BTW, I generated another figure with Matlab that has the same  
problem.  It
looks like when I generate figures with Matlab I run into trouble  
with
previewing figure with 1.4.2 but not with any other versions.  I  
have tried

1.4.1, 1.3.7 and 1.3.5.
Cheers
Leo


I didn't have any bright ideas. But since it seems you are close
to giving up, I thought I would toss out some longshots.

" PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly "
(from 7/28/2006  12:03 pm, PATH report)

SH: Maybe that is a typo the "ly" looks wrong.

As Jose mentions, upgrading Ghostscript might help,
because version 7.07 had a bug with paths with spaces.

A very longshot is that the local LyX Python is buggy
with utf8 support but those files don't cure it. Do
you have the full Python installed? If so put it at
the front of Path_prefix statement in LyX and it will
supersede the local partial version of Python. Vaguely,
the locale might connect to the set commands. I said
it was a longshot. The set command used to say
set lang=en_US if one used English. I couldn't find
info on what LC does...

Anyway replacing GS is a good idea, and if you already
have the full Python, it is easy to *_prepend_*
C:\Python243 to the LyX Path_prefix and have a fully
functioning Python, since the extent of the local
Python, mostly successful, may have other gaps. I've
had a problem with set environmental variables once
before. Another departed version of *tex had left
its value behind and conflicted with the new version
which wanted to set the same variable to a new place.
(Cygwin and TexLive2005). Well, that was just rambling.




Hi,
one more idea: if this is really a PATH problem and things worked  
normally under lyx 1.4.1, then I would do the following simple steps  
(unless you already tried this and I didn't see it in the earlier  
messages):

(a)
Revert to LyX 1.4.1 and open the Preferences dialog to find out  
EXACTLY what your PATH setting is in that program.

(b)
Copy that string.
(c)
Re-install LyX 1.4.2 and open the Prefs dialog there to see its PATH  
settings. I would strongly suspect that this is somehow different  
from 1.4.1.

(d)
Enter the previously copied PATH from 1.4.1 into the PATH box in 1.4.2.
(e)
Restart LyX 1.4.2 (just to be safe), and see if the preview works now.

Hope that helps,
Jens



Re: Postscript preview

2006-07-28 Thread LB

Hello

I added the echo line in convertDefault.sh script.  The following are the 
error message that I see:


filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
Token: 'filename'
Token: '\end_inset'
LoaderQueue: waking up
The font scaling factor is 129.6
LoaderQueue: 1 items in the queue
Recognised Fileformat: eps
[GrahicsCacheItem::convertToDisplayFormat]
   Attempting to convert image file: C:/path/test.ps
   with displayed filename: C:\path\test.ps
Recognised Fileformat: eps

   The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to jpg
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
   Converting it to ppm format.
Converter c-tor:
   from_file:  C:/path/test.ps
   to_file_base: C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372

   from_format:  eps
   to_format:ppm
build_script ... ready (edgepath.empty())
   No converter defined! I use convertDefault.sh
   sh C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh 
eps:C:/path/test.ps ppm:C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/pathtest.ps to ppm:C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm ...

AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

Any clues?

Thank you
Leo


LB wrote:

Hi

When the image does not preview, the last a few lines in the debug window 
are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

I need to quit Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `file name is 
here.ps'.

convert.exe: missing an image filename `ppm:file name is here.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of convert failed.

Whereas when the image previews ok the last few lines in the debug window 
are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that Image conversion succeeded does not appear when the 
image does not show in Lyx.  It also look like that having the file deep 
in a long tree of subdirectories contributes to this problem as the same 
file work fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.




When LyX needs to display your image, it calls the convertDefault.sh 
script, which in turn calls ImageMagick's convert.exe program to convert 
test.ps to test.ppm.  ImageMagick then uses Ghostscript to read the .ps 
file.  Judging by the fact that Ghostscript hangs open until you close 
it, and the missing filename bit later on, it looks to me as if the 
ImageMagick-to-Ghostscript call might somehow have lost or mangled the 
file name (?!).  There's some relevant output just above the first line 
you quoted that would help.


If you want to 

Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:

Hello

I added the echo line in convertDefault.sh script.  The following are 
the error message that I see:


filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
Token: 'filename'
Token: '\end_inset'
LoaderQueue: waking up
The font scaling factor is 129.6
LoaderQueue: 1 items in the queue
Recognised Fileformat: eps
[GrahicsCacheItem::convertToDisplayFormat]
   Attempting to convert image file: C:/path/test.ps
   with displayed filename: C:\path\test.ps
Recognised Fileformat: eps

   The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to jpg
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
   Converting it to ppm format.
Converter c-tor:
   from_file:  C:/path/test.ps
   to_file_base: C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372

   from_format:  eps
   to_format:ppm
build_script ... ready (edgepath.empty())
   No converter defined! I use convertDefault.sh
   sh C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh 
eps:C:/path/test.ps ppm:C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/pathtest.ps

  ^
There's a missing separator (/) here.  I'm guessing that's just a typo 
when you transcribed the output, but if not, it might be a clue.


 to ppm:C:/Documents and Settings/your

id here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm ...
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

Any clues?



Other than that one missing separator, everything looked good right up 
to the point where Ghostscript went stupid on you.  I'm assuming that 
the path is correct (i.e., that C:\path\test.ps is really where 
test.ps is located).  I don't know enough about ImageMagick and 
Ghostscript to know if there's any way to put either into a debug mode 
where we could see what was being passed to Ghostscript.


You said that commenting out the line in lyx.bat that set the aiksaurus 
environment variable fixed the problem, right?  What happens if you 
leave that line in, and use lyx.bat, but hide the Lyx\aiksaurus folder? 
 (An easy way to do this is to rename it to aiksaurus$.)  That would 
tell us whether the bug actually involved any files in the aiksaurus folder.


Also, have you experienced this with any other Postscript image files?

Very mysterious.

/Paul



Re: Postscript preview

2006-07-28 Thread LB

Hi

Other than that one missing separator, everything looked good right up to 
the point where Ghostscript went stupid on you.  I'm assuming that the 
path is correct (i.e., that C:\path\test.ps is really where test.ps is 
located).  I don't know enough about ImageMagick and Ghostscript to know 
if there's any way to put either into a debug mode where we could see what 
was being passed to Ghostscript.


The path is correct and the missing separator was my mistake made while 
editing the debug output.


You said that commenting out the line in lyx.bat that set the aiksaurus 
environment variable fixed the problem, right?  What happens if you leave 
that line in, and use lyx.bat, but hide the Lyx\aiksaurus folder? (An easy 
way to do this is to rename it to aiksaurus$.)  That would tell us whether 
the bug actually involved any files in the aiksaurus folder.


I mentioned that editing out aiksaurus line in lyx.bat fixed the problem. 
It turns out that removing SET LC_ALL=en_EN also fixes the problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this problem 
somehow.



Also, have you experienced this with any other Postscript image files?


Not yet.


Very mysterious.


Indeed.

Leo




Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:



I mentioned that editing out aiksaurus line in lyx.bat fixed the 
problem. It turns out that removing SET LC_ALL=en_EN also fixes the 
problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this 
problem somehow.




Ok, this makes me return to my theory that you are somehow running out 
of environment space.  That would be consistent with the batch file 
symptoms, although why it would affect just the one Postscript image is 
a mystery, as is why freeing space by eliminating some of the other 
environment variables did not fix things.  Is the path to test.ps fairly 
long?  If so, do you cure the problem by copying test.ps to a directory 
with a shorter path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it 
gives no information I can see about calls to Ghostscript, let alone 
what arguments are being passed.


/Paul





Re: Postscript preview

2006-07-28 Thread LB
Yes, moving the file test.lyx to C:\ solves the problem. The path to 
test.lyx is fairly long. It's located five directories deep.
The path consists of 68 characters, including C: and \, plus the file 
name.  I have changed figure name to be only one character long, but that 
did not help.


This is what I get when I run set from command line:

Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\DOCUME~1\LEOBEL~1set
COMSPEC=C:\WINDOWS\SYSTEM32\COMMAND.COM
ALLUSERSPROFILE=C:\DOCUME~1\ALLUSE~1
APPDATA=C:\DOCUME~1\LEOBEL~1\APPLIC~1
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\PROGRA~1\COMMON~1
COMPUTERNAME=LEO
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Leo
LOGONSERVER=\\LEO
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
PADS_PROGRAMS=Programs
PADS_ROOT=C:\Program Files\Mentor Graphics\PADS\2005_1
PATH=c:\lyx\IMAGEM~1;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\
PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 3 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0303
PROGRAMFILES=C:\PROGRA~1
PROMPT=$P$G
SESSIONNAME=Console
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
USERDOMAIN=LEO
USERNAME=Leo
USERPROFILE=C:\DOCUME~1\LEOBEL~1
BLASTER=A220 I5 D1 P330 T3

Does not look like a lot of variables?

Thank you
Leo

Ok, this makes me return to my theory that you are somehow running out of 
environment space.  That would be consistent with the batch file symptoms, 
although why it would affect just the one Postscript image is a mystery, 
as is why freeing space by eliminating some of the other environment 
variables did not fix things.  Is the path to test.ps fairly long?  If so, 
do you cure the problem by copying test.ps to a directory with a shorter 
path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it gives 
no information I can see about calls to Ghostscript, let alone what 
arguments are being passed.


/Paul








Re: Postscript preview

2006-07-28 Thread LB

BTW, Lyx 1.4.1 displays the figure correctly.

Leo




LB wrote:



I mentioned that editing out aiksaurus line in lyx.bat fixed the 
problem. It turns out that removing SET LC_ALL=en_EN also fixes the 
problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this 
problem somehow.




Ok, this makes me return to my theory that you are somehow running out 
of environment space.  That would be consistent with the batch file 
symptoms, although why it would affect just the one Postscript image is 
a mystery, as is why freeing space by eliminating some of the other 
environment variables did not fix things.  Is the path to test.ps fairly 
long?  If so, do you cure the problem by copying test.ps to a directory 
with a shorter path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it 
gives no information I can see about calls to Ghostscript, let alone 
what arguments are being passed.


/Paul







Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:
Yes, moving the file test.lyx to C:\ solves the problem. The path to 
test.lyx is fairly long. It's located five directories deep.
The path consists of 68 characters, including C: and \, plus the file 
name.  I have changed figure name to be only one character long, but 
that did not help.


Hmm.  I moved it to a directory seven levels below C:\ with a total path 
length of 159 characters, and it worked for me.


This is what I get when I run set from command line:


[...]


Does not look like a lot of variables?



No.  In fact, it's about 935 characters total; my environment (also Win 
XP) is over 1800 characters.


I saw your other post that this worked in 1.4.1 (presumably from the 
same deep directory).  So there is something in the way LyX 1.4.2 shells 
to the graphics conversion script that has changed and is related to the 
problem.  We also know that it works on my system and not on yours, and 
my environment and command path are both a lot messier than yours.


One other difference I notices is that I have the Ghostscript bin and 
lib directories on my system command path, and you don't.  You must have 
them (as do I) in LyX Tools-Preferences...-Paths-PATH prefix, which 
LyX attaches to the command path when it shells out to a script.  (In my 
case, they end up on the path twice, which is harmless.)  I don't 
suppose that adding them to your path fixes the bug?  (An easy way to 
try this on a temporary basis would be to add the line


SET PATH=C:\path to GS\bin;C:\path to GS\lib;%PATH%

to the lyx.bat file, prior to the start command.)

I have no idea how a couple of environment variables and the length of 
the path to the target file can be interacting, other than if they're 
both being written to a common buffer somewhere (which is overflowing), 
and that seems rather unlikely given that I would be putting more stuff 
in the buffer and not seeing the problem.


/Paul



Re: Postscript preview

2006-07-28 Thread LB

Hello

I added the echo line in convertDefault.sh script.  The following are the 
error message that I see:


filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
Token: 'filename'
Token: '\end_inset'
LoaderQueue: waking up
The font scaling factor is 129.6
LoaderQueue: 1 items in the queue
Recognised Fileformat: eps
[GrahicsCacheItem::convertToDisplayFormat]
   Attempting to convert image file: C:/path/test.ps
   with displayed filename: C:\path\test.ps
Recognised Fileformat: eps

   The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to jpg
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
   Converting it to ppm format.
Converter c-tor:
   from_file:  C:/path/test.ps
   to_file_base: C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372

   from_format:  eps
   to_format:ppm
build_script ... ready (edgepath.empty())
   No converter defined! I use convertDefault.sh
   sh C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh 
eps:C:/path/test.ps ppm:C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/pathtest.ps to ppm:C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm ...

AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

Any clues?

Thank you
Leo


LB wrote:

Hi

When the image does not preview, the last a few lines in the debug window 
are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

I need to quit Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `file name is 
here.ps'.

convert.exe: missing an image filename `ppm:file name is here.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of convert failed.

Whereas when the image previews ok the last few lines in the debug window 
are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that Image conversion succeeded does not appear when the 
image does not show in Lyx.  It also look like that having the file deep 
in a long tree of subdirectories contributes to this problem as the same 
file work fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.




When LyX needs to display your image, it calls the convertDefault.sh 
script, which in turn calls ImageMagick's convert.exe program to convert 
test.ps to test.ppm.  ImageMagick then uses Ghostscript to read the .ps 
file.  Judging by the fact that Ghostscript hangs open until you close 
it, and the missing filename bit later on, it looks to me as if the 
ImageMagick-to-Ghostscript call might somehow have lost or mangled the 
file name (?!).  There's some relevant output just above the first line 
you quoted that would help.


If you want to 

Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:

Hello

I added the echo line in convertDefault.sh script.  The following are 
the error message that I see:


filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
Token: 'filename'
Token: '\end_inset'
LoaderQueue: waking up
The font scaling factor is 129.6
LoaderQueue: 1 items in the queue
Recognised Fileformat: eps
[GrahicsCacheItem::convertToDisplayFormat]
   Attempting to convert image file: C:/path/test.ps
   with displayed filename: C:\path\test.ps
Recognised Fileformat: eps

   The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to jpg
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
   Converting it to ppm format.
Converter c-tor:
   from_file:  C:/path/test.ps
   to_file_base: C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372

   from_format:  eps
   to_format:ppm
build_script ... ready (edgepath.empty())
   No converter defined! I use convertDefault.sh
   sh C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh 
eps:C:/path/test.ps ppm:C:/Documents and Settings/your id 
here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/pathtest.ps

  ^
There's a missing separator (/) here.  I'm guessing that's just a typo 
when you transcribed the output, but if not, it might be a clue.


 to ppm:C:/Documents and Settings/your

id here/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm ...
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

Any clues?



Other than that one missing separator, everything looked good right up 
to the point where Ghostscript went stupid on you.  I'm assuming that 
the path is correct (i.e., that C:\path\test.ps is really where 
test.ps is located).  I don't know enough about ImageMagick and 
Ghostscript to know if there's any way to put either into a debug mode 
where we could see what was being passed to Ghostscript.


You said that commenting out the line in lyx.bat that set the aiksaurus 
environment variable fixed the problem, right?  What happens if you 
leave that line in, and use lyx.bat, but hide the Lyx\aiksaurus folder? 
 (An easy way to do this is to rename it to aiksaurus$.)  That would 
tell us whether the bug actually involved any files in the aiksaurus folder.


Also, have you experienced this with any other Postscript image files?

Very mysterious.

/Paul



Re: Postscript preview

2006-07-28 Thread LB

Hi

Other than that one missing separator, everything looked good right up to 
the point where Ghostscript went stupid on you.  I'm assuming that the 
path is correct (i.e., that C:\path\test.ps is really where test.ps is 
located).  I don't know enough about ImageMagick and Ghostscript to know 
if there's any way to put either into a debug mode where we could see what 
was being passed to Ghostscript.


The path is correct and the missing separator was my mistake made while 
editing the debug output.


You said that commenting out the line in lyx.bat that set the aiksaurus 
environment variable fixed the problem, right?  What happens if you leave 
that line in, and use lyx.bat, but hide the Lyx\aiksaurus folder? (An easy 
way to do this is to rename it to aiksaurus$.)  That would tell us whether 
the bug actually involved any files in the aiksaurus folder.


I mentioned that editing out aiksaurus line in lyx.bat fixed the problem. 
It turns out that removing SET LC_ALL=en_EN also fixes the problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this problem 
somehow.



Also, have you experienced this with any other Postscript image files?


Not yet.


Very mysterious.


Indeed.

Leo




Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:



I mentioned that editing out aiksaurus line in lyx.bat fixed the 
problem. It turns out that removing SET LC_ALL=en_EN also fixes the 
problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this 
problem somehow.




Ok, this makes me return to my theory that you are somehow running out 
of environment space.  That would be consistent with the batch file 
symptoms, although why it would affect just the one Postscript image is 
a mystery, as is why freeing space by eliminating some of the other 
environment variables did not fix things.  Is the path to test.ps fairly 
long?  If so, do you cure the problem by copying test.ps to a directory 
with a shorter path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it 
gives no information I can see about calls to Ghostscript, let alone 
what arguments are being passed.


/Paul





Re: Postscript preview

2006-07-28 Thread LB
Yes, moving the file test.lyx to C:\ solves the problem. The path to 
test.lyx is fairly long. It's located five directories deep.
The path consists of 68 characters, including C: and \, plus the file 
name.  I have changed figure name to be only one character long, but that 
did not help.


This is what I get when I run set from command line:

Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\DOCUME~1\LEOBEL~1set
COMSPEC=C:\WINDOWS\SYSTEM32\COMMAND.COM
ALLUSERSPROFILE=C:\DOCUME~1\ALLUSE~1
APPDATA=C:\DOCUME~1\LEOBEL~1\APPLIC~1
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\PROGRA~1\COMMON~1
COMPUTERNAME=LEO
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Leo
LOGONSERVER=\\LEO
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
PADS_PROGRAMS=Programs
PADS_ROOT=C:\Program Files\Mentor Graphics\PADS\2005_1
PATH=c:\lyx\IMAGEM~1;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\
PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 3 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0303
PROGRAMFILES=C:\PROGRA~1
PROMPT=$P$G
SESSIONNAME=Console
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
USERDOMAIN=LEO
USERNAME=Leo
USERPROFILE=C:\DOCUME~1\LEOBEL~1
BLASTER=A220 I5 D1 P330 T3

Does not look like a lot of variables?

Thank you
Leo

Ok, this makes me return to my theory that you are somehow running out of 
environment space.  That would be consistent with the batch file symptoms, 
although why it would affect just the one Postscript image is a mystery, 
as is why freeing space by eliminating some of the other environment 
variables did not fix things.  Is the path to test.ps fairly long?  If so, 
do you cure the problem by copying test.ps to a directory with a shorter 
path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it gives 
no information I can see about calls to Ghostscript, let alone what 
arguments are being passed.


/Paul








Re: Postscript preview

2006-07-28 Thread LB

BTW, Lyx 1.4.1 displays the figure correctly.

Leo




LB wrote:



I mentioned that editing out aiksaurus line in lyx.bat fixed the 
problem. It turns out that removing SET LC_ALL=en_EN also fixes the 
problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this 
problem somehow.




Ok, this makes me return to my theory that you are somehow running out 
of environment space.  That would be consistent with the batch file 
symptoms, although why it would affect just the one Postscript image is 
a mystery, as is why freeing space by eliminating some of the other 
environment variables did not fix things.  Is the path to test.ps fairly 
long?  If so, do you cure the problem by copying test.ps to a directory 
with a shorter path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it 
gives no information I can see about calls to Ghostscript, let alone 
what arguments are being passed.


/Paul







Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:
Yes, moving the file test.lyx to C:\ solves the problem. The path to 
test.lyx is fairly long. It's located five directories deep.
The path consists of 68 characters, including C: and \, plus the file 
name.  I have changed figure name to be only one character long, but 
that did not help.


Hmm.  I moved it to a directory seven levels below C:\ with a total path 
length of 159 characters, and it worked for me.


This is what I get when I run set from command line:


[...]


Does not look like a lot of variables?



No.  In fact, it's about 935 characters total; my environment (also Win 
XP) is over 1800 characters.


I saw your other post that this worked in 1.4.1 (presumably from the 
same deep directory).  So there is something in the way LyX 1.4.2 shells 
to the graphics conversion script that has changed and is related to the 
problem.  We also know that it works on my system and not on yours, and 
my environment and command path are both a lot messier than yours.


One other difference I notices is that I have the Ghostscript bin and 
lib directories on my system command path, and you don't.  You must have 
them (as do I) in LyX Tools-Preferences...-Paths-PATH prefix, which 
LyX attaches to the command path when it shells out to a script.  (In my 
case, they end up on the path twice, which is harmless.)  I don't 
suppose that adding them to your path fixes the bug?  (An easy way to 
try this on a temporary basis would be to add the line


SET PATH=C:\path to GS\bin;C:\path to GS\lib;%PATH%

to the lyx.bat file, prior to the start command.)

I have no idea how a couple of environment variables and the length of 
the path to the target file can be interacting, other than if they're 
both being written to a common buffer somewhere (which is overflowing), 
and that seems rather unlikely given that I would be putting more stuff 
in the buffer and not seeing the problem.


/Paul



Re: Postscript preview

2006-07-28 Thread LB

Hello

I added the "echo" line in convertDefault.sh script.  The following are the 
error message that I see:


filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
Token: 'filename'
Token: '\end_inset'
LoaderQueue: waking up
The font scaling factor is 129.6
LoaderQueue: 1 items in the queue
Recognised Fileformat: eps
[GrahicsCacheItem::convertToDisplayFormat]
   Attempting to convert image file: C://test.ps
   with displayed filename: C:\\test.ps
Recognised Fileformat: eps

   The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to jpg
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
   Converting it to ppm format.
Converter c-tor:
   from_file:  C://test.ps
   to_file_base: C:/Documents and Settings/here>/Temp/lyx_tmpdir2744a03372/test2744a03372

   from_format:  eps
   to_format:ppm
build_script ... ready (edgepath.empty())
   No converter defined! I use convertDefault.sh
   sh "C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh" 
"eps:C://test.ps" "ppm:C:/Documents and Settings/here>/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm"

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/test.ps to ppm:C:/Documents and Settings/here>/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm ...

AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>

Any clues?

Thank you
Leo


LB wrote:

Hi

When the image does not preview, the last a few lines in the debug window 
are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>

I need to "quit" Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `here>.ps'.

convert.exe: missing an image filename `ppm:.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of "convert" failed.

Whereas when the image previews ok the last few lines in the debug window 
are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that "Image conversion succeeded" does not appear when the 
image does not show in Lyx.  It also look like that having the file deep 
in a long tree of subdirectories contributes to this problem as the same 
file work fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.




When LyX needs to display your image, it calls the convertDefault.sh 
script, which in turn calls ImageMagick's convert.exe program to convert 
test.ps to test.ppm.  ImageMagick then uses Ghostscript to read the .ps 
file.  Judging by the fact that Ghostscript "hangs open" until you close 
it, and the "missing filename" bit later on, it looks to me as if the 
ImageMagick-to-Ghostscript call might somehow have lost or mangled the 
file name (?!).  There's some relevant output just above the first line 
you quoted that would help.


If you want to investigate this possibility, try the following.  In the 

Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:

Hello

I added the "echo" line in convertDefault.sh script.  The following are 
the error message that I see:


filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
filetools(getFormatFromContents)
   File type not recognised before EOF!
filetools(getFormatFromContents)
   Couldn't find a known format!
Token: 'filename'
Token: '\end_inset'
LoaderQueue: waking up
The font scaling factor is 129.6
LoaderQueue: 1 items in the queue
Recognised Fileformat: eps
[GrahicsCacheItem::convertToDisplayFormat]
   Attempting to convert image file: C://test.ps
   with displayed filename: C:\\test.ps
Recognised Fileformat: eps

   The file contains eps format data.
Unable to convert from eps to bmp
Unable to convert from eps to jpg
Unable to convert from eps to pbm
Unable to convert from eps to pgm
Unable to convert from eps to png
Unable to convert from eps to ppm
Unable to convert from eps to xbm
Unable to convert from eps to xpm
   Converting it to ppm format.
Converter c-tor:
   from_file:  C://test.ps
   to_file_base: C:/Documents and Settings/here>/Temp/lyx_tmpdir2744a03372/test2744a03372

   from_format:  eps
   to_format:ppm
build_script ... ready (edgepath.empty())
   No converter defined! I use convertDefault.sh
   sh "C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh" 
"eps:C://test.ps" "ppm:C:/Documents and Settings/here>/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm"

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/test.ps

  ^
There's a missing separator (/) here.  I'm guessing that's just a typo 
when you transcribed the output, but if not, it might be a clue.


 to ppm:C:/Documents and Settings/
id here>/Temp/lyx_tmpdir2744a03372/test2744a03372.ppm ...
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>

Any clues?



Other than that one missing separator, everything looked good right up 
to the point where Ghostscript went stupid on you.  I'm assuming that 
the path is correct (i.e., that C:\\test.ps is really where 
test.ps is located).  I don't know enough about ImageMagick and 
Ghostscript to know if there's any way to put either into a debug mode 
where we could see what was being passed to Ghostscript.


You said that commenting out the line in lyx.bat that set the aiksaurus 
environment variable fixed the problem, right?  What happens if you 
leave that line in, and use lyx.bat, but hide the Lyx\aiksaurus folder? 
 (An easy way to do this is to rename it to aiksaurus$.)  That would 
tell us whether the bug actually involved any files in the aiksaurus folder.


Also, have you experienced this with any other Postscript image files?

Very mysterious.

/Paul



Re: Postscript preview

2006-07-28 Thread LB

Hi

Other than that one missing separator, everything looked good right up to 
the point where Ghostscript went stupid on you.  I'm assuming that the 
path is correct (i.e., that C:\\test.ps is really where test.ps is 
located).  I don't know enough about ImageMagick and Ghostscript to know 
if there's any way to put either into a debug mode where we could see what 
was being passed to Ghostscript.


The path is correct and the missing separator was my mistake made while 
editing the debug output.


You said that commenting out the line in lyx.bat that set the aiksaurus 
environment variable fixed the problem, right?  What happens if you leave 
that line in, and use lyx.bat, but hide the Lyx\aiksaurus folder? (An easy 
way to do this is to rename it to aiksaurus$.)  That would tell us whether 
the bug actually involved any files in the aiksaurus folder.


I mentioned that editing out aiksaurus line in lyx.bat fixed the problem. 
It turns out that removing "SET LC_ALL=en_EN" also fixes the problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this problem 
somehow.



Also, have you experienced this with any other Postscript image files?


Not yet.


Very mysterious.


Indeed.

Leo




Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:



I mentioned that editing out aiksaurus line in lyx.bat fixed the 
problem. It turns out that removing "SET LC_ALL=en_EN" also fixes the 
problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this 
problem somehow.




Ok, this makes me return to my theory that you are somehow running out 
of environment space.  That would be consistent with the batch file 
symptoms, although why it would affect just the one Postscript image is 
a mystery, as is why freeing space by eliminating some of the other 
environment variables did not fix things.  Is the path to test.ps fairly 
long?  If so, do you cure the problem by copying test.ps to a directory 
with a shorter path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it 
gives no information I can see about calls to Ghostscript, let alone 
what arguments are being passed.


/Paul





Re: Postscript preview

2006-07-28 Thread LB
Yes, moving the file test.lyx to C:\ solves the problem. The path to 
test.lyx is fairly long. It's located five directories deep.
The path consists of 68 characters, including C: and "\", plus the file 
name.  I have changed figure name to be only one character long, but that 
did not help.


This is what I get when I run "set" from command line:

Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\DOCUME~1\LEOBEL~1>set
COMSPEC=C:\WINDOWS\SYSTEM32\COMMAND.COM
ALLUSERSPROFILE=C:\DOCUME~1\ALLUSE~1
APPDATA=C:\DOCUME~1\LEOBEL~1\APPLIC~1
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\PROGRA~1\COMMON~1
COMPUTERNAME=LEO
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Leo
LOGONSERVER=\\LEO
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
PADS_PROGRAMS=Programs
PADS_ROOT=C:\Program Files\Mentor Graphics\PADS\2005_1
PATH=c:\lyx\IMAGEM~1;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\
PROGRA~1\MENTOR~1\PADS\2005_1\Programs;c:\lyx\ly
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 3 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0303
PROGRAMFILES=C:\PROGRA~1
PROMPT=$P$G
SESSIONNAME=Console
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
USERDOMAIN=LEO
USERNAME=Leo
USERPROFILE=C:\DOCUME~1\LEOBEL~1
BLASTER=A220 I5 D1 P330 T3

Does not look like a lot of variables?

Thank you
Leo

Ok, this makes me return to my theory that you are somehow running out of 
environment space.  That would be consistent with the batch file symptoms, 
although why it would affect just the one Postscript image is a mystery, 
as is why freeing space by eliminating some of the other environment 
variables did not fix things.  Is the path to test.ps fairly long?  If so, 
do you cure the problem by copying test.ps to a directory with a shorter 
path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it gives 
no information I can see about calls to Ghostscript, let alone what 
arguments are being passed.


/Paul








Re: Postscript preview

2006-07-28 Thread LB

BTW, Lyx 1.4.1 displays the figure correctly.

Leo




LB wrote:



I mentioned that editing out aiksaurus line in lyx.bat fixed the 
problem. It turns out that removing "SET LC_ALL=en_EN" also fixes the 
problem.
Renaming aiksaurus directory however does not fix it. Starting Lyx.exe 
directly also fixes the problem.  It the lyx.bat that causes this 
problem somehow.




Ok, this makes me return to my theory that you are somehow running out 
of environment space.  That would be consistent with the batch file 
symptoms, although why it would affect just the one Postscript image is 
a mystery, as is why freeing space by eliminating some of the other 
environment variables did not fix things.  Is the path to test.ps fairly 
long?  If so, do you cure the problem by copying test.ps to a directory 
with a shorter path (say C:\temp) and pointing test.lyx at the copy?


I tried the -debug All option in ImageMagick.  Amazingly enough, it 
gives no information I can see about calls to Ghostscript, let alone 
what arguments are being passed.


/Paul







Re: Postscript preview

2006-07-28 Thread Paul A. Rubin

LB wrote:
Yes, moving the file test.lyx to C:\ solves the problem. The path to 
test.lyx is fairly long. It's located five directories deep.
The path consists of 68 characters, including C: and "\", plus the file 
name.  I have changed figure name to be only one character long, but 
that did not help.


Hmm.  I moved it to a directory seven levels below C:\ with a total path 
length of 159 characters, and it worked for me.


This is what I get when I run "set" from command line:


[...]


Does not look like a lot of variables?



No.  In fact, it's about 935 characters total; my environment (also Win 
XP) is over 1800 characters.


I saw your other post that this worked in 1.4.1 (presumably from the 
same deep directory).  So there is something in the way LyX 1.4.2 shells 
to the graphics conversion script that has changed and is related to the 
problem.  We also know that it works on my system and not on yours, and 
my environment and command path are both a lot messier than yours.


One other difference I notices is that I have the Ghostscript bin and 
lib directories on my system command path, and you don't.  You must have 
them (as do I) in LyX Tools->Preferences...->Paths->PATH prefix, which 
LyX attaches to the command path when it shells out to a script.  (In my 
case, they end up on the path twice, which is harmless.)  I don't 
suppose that adding them to your path fixes the bug?  (An easy way to 
try this on a temporary basis would be to add the line


SET PATH=C:\\bin;C:\\lib;%PATH%

to the lyx.bat file, prior to the start command.)

I have no idea how a couple of environment variables and the length of 
the path to the target file can be interacting, other than if they're 
both being written to a common buffer somewhere (which is overflowing), 
and that seems rather unlikely given that I would be putting more stuff 
in the buffer and not seeing the problem.


/Paul



Re: Postscript preview

2006-07-27 Thread LB

Hi

I tried that with no success. When starting LyX.exe without the lyx.bat, the 
figure works every time though.


How do I display the shell windows that shows the debug messages? So I can 
see if there are any.


Leo

- Original Message - 
From: Paul A. Rubin [EMAIL PROTECTED]

To: lyx-users@lists.lyx.org
Sent: Wednesday, July 26, 2006 6:42 PM
Subject: Re: Postscript preview



LB wrote:
I think I'm getting somewhere with this.  It turns out that when I start 
lyx by using lyx.bat file from bin directory I get the problem with the 
figure. However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start LyX C:\LyX\LyX1.4.2\bin\lyx.exe %*

When I comment out line SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus the 
figure gets displayed fine.

Why is this line causing the problem?



It shouldn't be (and on my system it doesn't).  I have the same directory 
and the same batch file (give or take the exact path to the LyX 
directories), and when I load your test document the image previews just 
fine.  Aiksaurus is the thesaurus program used by LyX 1.4.2 (and new to 
this version), and on my system the aiksaurus folder contains two data 
files and nothing else.  Given their names (meanings.dat, words.dat), I'm 
hard-pressed to believe that ImageMagick would be mistaking them for some 
sort of input to the graphic conversion process.


One possibility comes to mind, but it's a real long-shot.  Windows has 
some overall character limit for the environment.  Back in the days of Win 
3.x, this was a royal PITA, although there were ways to tweak it.  I 
haven't had to mess with it in years, so my impression is that XP and 2K 
have gobs of environment space.  However, if you have enough environment 
variables set (and a long enough command path), maybe possibly conceivably 
you're pushing the character limit.  If you're maxed out, maybe the line 
you're commenting out ate up so enough space that the command line for 
converting your image ran out of room.  (For this to make sense, given 
your ability to display other images, I suspect this particular image 
would need to have a longer than usual name+path.)


Off-hand, the easiest way I can see to test this theory is as follows: 
Revert to the original batch file (i.e., don't comment out the aiksaurus 
line).  Open a command shell and type 'set' to see all the environment 
variables.  Pick a few that don't have anything to do with LyX or 
ImageMagick and get rid of them (by executing 'set variablename=' with 
nothing to the right of the equal sign).  Then run lyx.bat, load your 
document and see if the image displays.


To repeat myself, this is a bit of a grope in the dark.

/Paul






Re: Postscript preview

2006-07-27 Thread Paul A. Rubin

LB wrote:
I tried that with no success. When starting LyX.exe without the lyx.bat, 
the figure works every time though.


How do I display the shell windows that shows the debug messages? So I 
can see if there are any.



Make a copy of lyx.bat, change the last line to

lyx.exe -dbg graphics

and then run the new batch file.  (You can try -dbg any to get every 
message LyX spews, but be warned that is spews quite a few.)


/Paul



Re: Postscript preview

2006-07-27 Thread LB

Hi

When the image does not preview, the last a few lines in the debug window 
are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

I need to quit Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `file name is 
here.ps'.

convert.exe: missing an image filename `ppm:file name is here.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of convert failed.

Whereas when the image previews ok the last few lines in the debug window 
are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that Image conversion succeeded does not appear when the image 
does not show in Lyx.  It also look like that having the file deep in a long 
tree of subdirectories contributes to this problem as the same file work 
fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.


Leo



LB wrote:
I tried that with no success. When starting LyX.exe without the lyx.bat, 
the figure works every time though.


How do I display the shell windows that shows the debug messages? So I 
can see if there are any.



Make a copy of lyx.bat, change the last line to

lyx.exe -dbg graphics

and then run the new batch file.  (You can try -dbg any to get every 
message LyX spews, but be warned that is spews quite a few.)


/Paul






Re: Postscript preview

2006-07-27 Thread Paul A. Rubin

LB wrote:

Hi

When the image does not preview, the last a few lines in the debug 
window are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

I need to quit Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `file name is 
here.ps'.

convert.exe: missing an image filename `ppm:file name is here.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of convert failed.

Whereas when the image previews ok the last few lines in the debug 
window are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that Image conversion succeeded does not appear when the 
image does not show in Lyx.  It also look like that having the file deep 
in a long tree of subdirectories contributes to this problem as the same 
file work fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.




When LyX needs to display your image, it calls the convertDefault.sh 
script, which in turn calls ImageMagick's convert.exe program to convert 
test.ps to test.ppm.  ImageMagick then uses Ghostscript to read the .ps 
file.  Judging by the fact that Ghostscript hangs open until you close 
it, and the missing filename bit later on, it looks to me as if the 
ImageMagick-to-Ghostscript call might somehow have lost or mangled the 
file name (?!).  There's some relevant output just above the first line 
you quoted that would help.


If you want to investigate this possibility, try the following.  In the 
LyX Resources\scripts, find convertDefault.sh and open it with a text 
editor (e.g., notepad).  Find the lines


# converts an image from $1 to $2 format
convert -depth 8 $1 $2 || {

and insert

echo Converting $1 to $2 ...

between them.  Then run with -dbg graphics again.  You should get output 
similar to what I got (albeit with different paths):


No converter defined! I use convertDefault.sh
sh C:/Program 
Files/LyX142/Resources/scripts/convertDefault.sh eps:C:
/Documents and Settings/your id here/Desktop/test.ps 
ppm:C:/Temp/lyx_tmpdir5

620a03976/test5620a03976.ppm
ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/Documents and Settings/your id here/Desktop/test.ps 
to ppm:C

:/Temp/lyx_tmpdir5620a03976/test5620a03976.ppm ...
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.

Do the file names and paths look right when you do this?

/Paul



Re: Postscript preview

2006-07-27 Thread LB

Hi

I tried that with no success. When starting LyX.exe without the lyx.bat, the 
figure works every time though.


How do I display the shell windows that shows the debug messages? So I can 
see if there are any.


Leo

- Original Message - 
From: Paul A. Rubin [EMAIL PROTECTED]

To: lyx-users@lists.lyx.org
Sent: Wednesday, July 26, 2006 6:42 PM
Subject: Re: Postscript preview



LB wrote:
I think I'm getting somewhere with this.  It turns out that when I start 
lyx by using lyx.bat file from bin directory I get the problem with the 
figure. However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start LyX C:\LyX\LyX1.4.2\bin\lyx.exe %*

When I comment out line SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus the 
figure gets displayed fine.

Why is this line causing the problem?



It shouldn't be (and on my system it doesn't).  I have the same directory 
and the same batch file (give or take the exact path to the LyX 
directories), and when I load your test document the image previews just 
fine.  Aiksaurus is the thesaurus program used by LyX 1.4.2 (and new to 
this version), and on my system the aiksaurus folder contains two data 
files and nothing else.  Given their names (meanings.dat, words.dat), I'm 
hard-pressed to believe that ImageMagick would be mistaking them for some 
sort of input to the graphic conversion process.


One possibility comes to mind, but it's a real long-shot.  Windows has 
some overall character limit for the environment.  Back in the days of Win 
3.x, this was a royal PITA, although there were ways to tweak it.  I 
haven't had to mess with it in years, so my impression is that XP and 2K 
have gobs of environment space.  However, if you have enough environment 
variables set (and a long enough command path), maybe possibly conceivably 
you're pushing the character limit.  If you're maxed out, maybe the line 
you're commenting out ate up so enough space that the command line for 
converting your image ran out of room.  (For this to make sense, given 
your ability to display other images, I suspect this particular image 
would need to have a longer than usual name+path.)


Off-hand, the easiest way I can see to test this theory is as follows: 
Revert to the original batch file (i.e., don't comment out the aiksaurus 
line).  Open a command shell and type 'set' to see all the environment 
variables.  Pick a few that don't have anything to do with LyX or 
ImageMagick and get rid of them (by executing 'set variablename=' with 
nothing to the right of the equal sign).  Then run lyx.bat, load your 
document and see if the image displays.


To repeat myself, this is a bit of a grope in the dark.

/Paul






Re: Postscript preview

2006-07-27 Thread Paul A. Rubin

LB wrote:
I tried that with no success. When starting LyX.exe without the lyx.bat, 
the figure works every time though.


How do I display the shell windows that shows the debug messages? So I 
can see if there are any.



Make a copy of lyx.bat, change the last line to

lyx.exe -dbg graphics

and then run the new batch file.  (You can try -dbg any to get every 
message LyX spews, but be warned that is spews quite a few.)


/Paul



Re: Postscript preview

2006-07-27 Thread LB

Hi

When the image does not preview, the last a few lines in the debug window 
are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

I need to quit Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `file name is 
here.ps'.

convert.exe: missing an image filename `ppm:file name is here.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of convert failed.

Whereas when the image previews ok the last few lines in the debug window 
are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that Image conversion succeeded does not appear when the image 
does not show in Lyx.  It also look like that having the file deep in a long 
tree of subdirectories contributes to this problem as the same file work 
fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.


Leo



LB wrote:
I tried that with no success. When starting LyX.exe without the lyx.bat, 
the figure works every time though.


How do I display the shell windows that shows the debug messages? So I 
can see if there are any.



Make a copy of lyx.bat, change the last line to

lyx.exe -dbg graphics

and then run the new batch file.  (You can try -dbg any to get every 
message LyX spews, but be warned that is spews quite a few.)


/Paul






Re: Postscript preview

2006-07-27 Thread Paul A. Rubin

LB wrote:

Hi

When the image does not preview, the last a few lines in the debug 
window are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS

I need to quit Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `file name is 
here.ps'.

convert.exe: missing an image filename `ppm:file name is here.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of convert failed.

Whereas when the image previews ok the last few lines in the debug 
window are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that Image conversion succeeded does not appear when the 
image does not show in Lyx.  It also look like that having the file deep 
in a long tree of subdirectories contributes to this problem as the same 
file work fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.




When LyX needs to display your image, it calls the convertDefault.sh 
script, which in turn calls ImageMagick's convert.exe program to convert 
test.ps to test.ppm.  ImageMagick then uses Ghostscript to read the .ps 
file.  Judging by the fact that Ghostscript hangs open until you close 
it, and the missing filename bit later on, it looks to me as if the 
ImageMagick-to-Ghostscript call might somehow have lost or mangled the 
file name (?!).  There's some relevant output just above the first line 
you quoted that would help.


If you want to investigate this possibility, try the following.  In the 
LyX Resources\scripts, find convertDefault.sh and open it with a text 
editor (e.g., notepad).  Find the lines


# converts an image from $1 to $2 format
convert -depth 8 $1 $2 || {

and insert

echo Converting $1 to $2 ...

between them.  Then run with -dbg graphics again.  You should get output 
similar to what I got (albeit with different paths):


No converter defined! I use convertDefault.sh
sh C:/Program 
Files/LyX142/Resources/scripts/convertDefault.sh eps:C:
/Documents and Settings/your id here/Desktop/test.ps 
ppm:C:/Temp/lyx_tmpdir5

620a03976/test5620a03976.ppm
ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/Documents and Settings/your id here/Desktop/test.ps 
to ppm:C

:/Temp/lyx_tmpdir5620a03976/test5620a03976.ppm ...
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.

Do the file names and paths look right when you do this?

/Paul



Re: Postscript preview

2006-07-27 Thread LB

Hi

I tried that with no success. When starting LyX.exe without the lyx.bat, the 
figure works every time though.


How do I display the shell windows that shows the debug messages? So I can 
see if there are any.


Leo

- Original Message - 
From: "Paul A. Rubin" <[EMAIL PROTECTED]>

To: <lyx-users@lists.lyx.org>
Sent: Wednesday, July 26, 2006 6:42 PM
Subject: Re: Postscript preview



LB wrote:
I think I'm getting somewhere with this.  It turns out that when I start 
lyx by using lyx.bat file from bin directory I get the problem with the 
figure. However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start "LyX" "C:\LyX\LyX1.4.2\bin\lyx.exe" %*

When I comment out line "SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus" the 
figure gets displayed fine.

Why is this line causing the problem?



It shouldn't be (and on my system it doesn't).  I have the same directory 
and the same batch file (give or take the exact path to the LyX 
directories), and when I load your test document the image previews just 
fine.  Aiksaurus is the thesaurus program used by LyX 1.4.2 (and new to 
this version), and on my system the aiksaurus folder contains two data 
files and nothing else.  Given their names (meanings.dat, words.dat), I'm 
hard-pressed to believe that ImageMagick would be mistaking them for some 
sort of input to the graphic conversion process.


One possibility comes to mind, but it's a real long-shot.  Windows has 
some overall character limit for the environment.  Back in the days of Win 
3.x, this was a royal PITA, although there were ways to tweak it.  I 
haven't had to mess with it in years, so my impression is that XP and 2K 
have gobs of environment space.  However, if you have enough environment 
variables set (and a long enough command path), maybe possibly conceivably 
you're pushing the character limit.  If you're maxed out, maybe the line 
you're commenting out ate up so enough space that the command line for 
converting your image ran out of room.  (For this to make sense, given 
your ability to display other images, I suspect this particular image 
would need to have a longer than usual name+path.)


Off-hand, the easiest way I can see to test this theory is as follows: 
Revert to the original batch file (i.e., don't comment out the aiksaurus 
line).  Open a command shell and type 'set' to see all the environment 
variables.  Pick a few that don't have anything to do with LyX or 
ImageMagick and get rid of them (by executing 'set =' with 
nothing to the right of the equal sign).  Then run lyx.bat, load your 
document and see if the image displays.


To repeat myself, this is a bit of a grope in the dark.

/Paul






Re: Postscript preview

2006-07-27 Thread Paul A. Rubin

LB wrote:
I tried that with no success. When starting LyX.exe without the lyx.bat, 
the figure works every time though.


How do I display the shell windows that shows the debug messages? So I 
can see if there are any.



Make a copy of lyx.bat, change the last line to

lyx.exe -dbg graphics

and then run the new batch file.  (You can try -dbg any to get every 
message LyX spews, but be warned that is spews quite a few.)


/Paul



Re: Postscript preview

2006-07-27 Thread LB

Hi

When the image does not preview, the last a few lines in the debug window 
are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>

I need to "quit" Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `here>.ps'.

convert.exe: missing an image filename `ppm:.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of "convert" failed.

Whereas when the image previews ok the last few lines in the debug window 
are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that "Image conversion succeeded" does not appear when the image 
does not show in Lyx.  It also look like that having the file deep in a long 
tree of subdirectories contributes to this problem as the same file work 
fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.


Leo



LB wrote:
I tried that with no success. When starting LyX.exe without the lyx.bat, 
the figure works every time though.


How do I display the shell windows that shows the debug messages? So I 
can see if there are any.



Make a copy of lyx.bat, change the last line to

lyx.exe -dbg graphics

and then run the new batch file.  (You can try -dbg any to get every 
message LyX spews, but be warned that is spews quite a few.)


/Paul






Re: Postscript preview

2006-07-27 Thread Paul A. Rubin

LB wrote:

Hi

When the image does not preview, the last a few lines in the debug 
window are:

ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>

I need to "quit" Ghostscript at this time to get:
convert.exe: no decode delegate for this image format `here>.ps'.

convert.exe: missing an image filename `ppm:.ppm'.
C:/LyX/LyX1.4.2/Resources/scripts/convertDefault.sh ERROR
Execution of "convert" failed.

Whereas when the image previews ok the last few lines in the debug 
window are:


ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.
Loading image.
Image loading succeeded.
GraphicsImage::getScaledDImensions()
   params.scale   : 100
   width  : 497
   height : 404


It appears that "Image conversion succeeded" does not appear when the 
image does not show in Lyx.  It also look like that having the file deep 
in a long tree of subdirectories contributes to this problem as the same 
file work fine when placed in C:\ directory.


Why I only have this problem with one particular figure is still very 
puzzling.




When LyX needs to display your image, it calls the convertDefault.sh 
script, which in turn calls ImageMagick's convert.exe program to convert 
test.ps to test.ppm.  ImageMagick then uses Ghostscript to read the .ps 
file.  Judging by the fact that Ghostscript "hangs open" until you close 
it, and the "missing filename" bit later on, it looks to me as if the 
ImageMagick-to-Ghostscript call might somehow have lost or mangled the 
file name (?!).  There's some relevant output just above the first line 
you quoted that would help.


If you want to investigate this possibility, try the following.  In the 
LyX Resources\scripts, find convertDefault.sh and open it with a text 
editor (e.g., notepad).  Find the lines


# converts an image from $1 to $2 format
convert -depth 8 "$1" "$2" || {

and insert

echo "Converting $1 to $2 ..."

between them.  Then run with -dbg graphics again.  You should get output 
similar to what I got (albeit with different paths):


No converter defined! I use convertDefault.sh
sh "C:/Program 
Files/LyX142/Resources/scripts/convertDefault.sh" "eps:C:
/Documents and Settings//Desktop/test.ps" 
"ppm:C:/Temp/lyx_tmpdir5

620a03976/test5620a03976.ppm"
ForkedCallQueue: waking up
LoaderQueue: I'm going to sleep
Converting eps:C:/Documents and Settings//Desktop/test.ps 
to ppm:C

:/Temp/lyx_tmpdir5620a03976/test5620a03976.ppm ...
ForkedCallQueue: I'm going to sleep
Image conversion succeeded.

Do the file names and paths look right when you do this?

/Paul



Re: Postscript preview

2006-07-26 Thread LB
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others figures 
work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



Bo Peng wrote:

The Lyx document and the postscript file are attached.


I can view the figure (converted successfully) under windows, using lyx 
1.4.2.


Bo



Same here (LyX 1.4.2, WinXP).  It takes a couple of seconds on my laptop 
for the image to convert, but convert it does.


/Paul







Re: Postscript preview

2006-07-26 Thread Wolfgang Engelmann
Am Mittwoch, 26. Juli 2006 15:51 schrieb LB:
 Ok, this means it has something to do with my setup.  I'm just surprised
 that this one particular figure causes the problem while all others figures
 work just fine.
 How can I run Lyx in debug mode to see what is happening?

export a .tex file and run it 2-3 times with

latex your name.tex

Wolfgang


Re: Postscript preview

2006-07-26 Thread Paul A. Rubin

LB wrote:
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others 
figures work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



From a command shell (either in the LyX bin directory or with it on 
your command path) run 'lyx.exe -dbg any'.  (That produces a ton of 
output -- you might want to try just 'lyx.exe -dbg graphics' first.) 
Adjust 'lyx.exe' to whatever the binary is called on your system.


/Paul



Re: Postscript preview

2006-07-26 Thread LB
I think I'm getting somewhere with this.  It turns out that when I start lyx 
by using lyx.bat file from bin directory I get the problem with the figure. 
However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start LyX C:\LyX\LyX1.4.2\bin\lyx.exe %*

When I comment out line SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus the 
figure gets displayed fine.

Why is this line causing the problem?

Leo



LB wrote:
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others 
figures work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



From a command shell (either in the LyX bin directory or with it on your 
command path) run 'lyx.exe -dbg any'.  (That produces a ton of output --  
you might want to try just 'lyx.exe -dbg graphics' first.) Adjust 
'lyx.exe' to whatever the binary is called on your system.


/Paul






Re: Postscript preview

2006-07-26 Thread Paul A. Rubin

LB wrote:
I think I'm getting somewhere with this.  It turns out that when I start 
lyx by using lyx.bat file from bin directory I get the problem with the 
figure. However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start LyX C:\LyX\LyX1.4.2\bin\lyx.exe %*

When I comment out line SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus the 
figure gets displayed fine.

Why is this line causing the problem?



It shouldn't be (and on my system it doesn't).  I have the same 
directory and the same batch file (give or take the exact path to the 
LyX directories), and when I load your test document the image previews 
just fine.  Aiksaurus is the thesaurus program used by LyX 1.4.2 (and 
new to this version), and on my system the aiksaurus folder contains two 
data files and nothing else.  Given their names (meanings.dat, 
words.dat), I'm hard-pressed to believe that ImageMagick would be 
mistaking them for some sort of input to the graphic conversion process.


One possibility comes to mind, but it's a real long-shot.  Windows has 
some overall character limit for the environment.  Back in the days of 
Win 3.x, this was a royal PITA, although there were ways to tweak it.  I 
haven't had to mess with it in years, so my impression is that XP and 2K 
have gobs of environment space.  However, if you have enough environment 
variables set (and a long enough command path), maybe possibly 
conceivably you're pushing the character limit.  If you're maxed out, 
maybe the line you're commenting out ate up so enough space that the 
command line for converting your image ran out of room.  (For this to 
make sense, given your ability to display other images, I suspect this 
particular image would need to have a longer than usual name+path.)


Off-hand, the easiest way I can see to test this theory is as follows: 
Revert to the original batch file (i.e., don't comment out the aiksaurus 
line).  Open a command shell and type 'set' to see all the environment 
variables.  Pick a few that don't have anything to do with LyX or 
ImageMagick and get rid of them (by executing 'set variablename=' with 
nothing to the right of the equal sign).  Then run lyx.bat, load your 
document and see if the image displays.


To repeat myself, this is a bit of a grope in the dark.

/Paul



Re: Postscript preview

2006-07-26 Thread LB
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others figures 
work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



Bo Peng wrote:

The Lyx document and the postscript file are attached.


I can view the figure (converted successfully) under windows, using lyx 
1.4.2.


Bo



Same here (LyX 1.4.2, WinXP).  It takes a couple of seconds on my laptop 
for the image to convert, but convert it does.


/Paul







Re: Postscript preview

2006-07-26 Thread Wolfgang Engelmann
Am Mittwoch, 26. Juli 2006 15:51 schrieb LB:
 Ok, this means it has something to do with my setup.  I'm just surprised
 that this one particular figure causes the problem while all others figures
 work just fine.
 How can I run Lyx in debug mode to see what is happening?

export a .tex file and run it 2-3 times with

latex your name.tex

Wolfgang


Re: Postscript preview

2006-07-26 Thread Paul A. Rubin

LB wrote:
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others 
figures work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



From a command shell (either in the LyX bin directory or with it on 
your command path) run 'lyx.exe -dbg any'.  (That produces a ton of 
output -- you might want to try just 'lyx.exe -dbg graphics' first.) 
Adjust 'lyx.exe' to whatever the binary is called on your system.


/Paul



Re: Postscript preview

2006-07-26 Thread LB
I think I'm getting somewhere with this.  It turns out that when I start lyx 
by using lyx.bat file from bin directory I get the problem with the figure. 
However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start LyX C:\LyX\LyX1.4.2\bin\lyx.exe %*

When I comment out line SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus the 
figure gets displayed fine.

Why is this line causing the problem?

Leo



LB wrote:
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others 
figures work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



From a command shell (either in the LyX bin directory or with it on your 
command path) run 'lyx.exe -dbg any'.  (That produces a ton of output --  
you might want to try just 'lyx.exe -dbg graphics' first.) Adjust 
'lyx.exe' to whatever the binary is called on your system.


/Paul






Re: Postscript preview

2006-07-26 Thread Paul A. Rubin

LB wrote:
I think I'm getting somewhere with this.  It turns out that when I start 
lyx by using lyx.bat file from bin directory I get the problem with the 
figure. However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start LyX C:\LyX\LyX1.4.2\bin\lyx.exe %*

When I comment out line SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus the 
figure gets displayed fine.

Why is this line causing the problem?



It shouldn't be (and on my system it doesn't).  I have the same 
directory and the same batch file (give or take the exact path to the 
LyX directories), and when I load your test document the image previews 
just fine.  Aiksaurus is the thesaurus program used by LyX 1.4.2 (and 
new to this version), and on my system the aiksaurus folder contains two 
data files and nothing else.  Given their names (meanings.dat, 
words.dat), I'm hard-pressed to believe that ImageMagick would be 
mistaking them for some sort of input to the graphic conversion process.


One possibility comes to mind, but it's a real long-shot.  Windows has 
some overall character limit for the environment.  Back in the days of 
Win 3.x, this was a royal PITA, although there were ways to tweak it.  I 
haven't had to mess with it in years, so my impression is that XP and 2K 
have gobs of environment space.  However, if you have enough environment 
variables set (and a long enough command path), maybe possibly 
conceivably you're pushing the character limit.  If you're maxed out, 
maybe the line you're commenting out ate up so enough space that the 
command line for converting your image ran out of room.  (For this to 
make sense, given your ability to display other images, I suspect this 
particular image would need to have a longer than usual name+path.)


Off-hand, the easiest way I can see to test this theory is as follows: 
Revert to the original batch file (i.e., don't comment out the aiksaurus 
line).  Open a command shell and type 'set' to see all the environment 
variables.  Pick a few that don't have anything to do with LyX or 
ImageMagick and get rid of them (by executing 'set variablename=' with 
nothing to the right of the equal sign).  Then run lyx.bat, load your 
document and see if the image displays.


To repeat myself, this is a bit of a grope in the dark.

/Paul



Re: Postscript preview

2006-07-26 Thread LB
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others figures 
work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



Bo Peng wrote:

The Lyx document and the postscript file are attached.


I can view the figure (converted successfully) under windows, using lyx 
1.4.2.


Bo



Same here (LyX 1.4.2, WinXP).  It takes a couple of seconds on my laptop 
for the image to convert, but convert it does.


/Paul







Re: Postscript preview

2006-07-26 Thread Wolfgang Engelmann
Am Mittwoch, 26. Juli 2006 15:51 schrieb LB:
> Ok, this means it has something to do with my setup.  I'm just surprised
> that this one particular figure causes the problem while all others figures
> work just fine.
> How can I run Lyx in debug mode to see what is happening?

export a .tex file and run it 2-3 times with

latex .tex

Wolfgang


Re: Postscript preview

2006-07-26 Thread Paul A. Rubin

LB wrote:
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others 
figures work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



From a command shell (either in the LyX bin directory or with it on 
your command path) run 'lyx.exe -dbg any'.  (That produces a ton of 
output -- you might want to try just 'lyx.exe -dbg graphics' first.) 
Adjust 'lyx.exe' to whatever the binary is called on your system.


/Paul



Re: Postscript preview

2006-07-26 Thread LB
I think I'm getting somewhere with this.  It turns out that when I start lyx 
by using lyx.bat file from bin directory I get the problem with the figure. 
However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start "LyX" "C:\LyX\LyX1.4.2\bin\lyx.exe" %*

When I comment out line "SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus" the 
figure gets displayed fine.

Why is this line causing the problem?

Leo



LB wrote:
Ok, this means it has something to do with my setup.  I'm just surprised 
that this one particular figure causes the problem while all others 
figures work just fine.

How can I run Lyx in debug mode to see what is happening?

Leo



From a command shell (either in the LyX bin directory or with it on your 
command path) run 'lyx.exe -dbg any'.  (That produces a ton of output --  
you might want to try just 'lyx.exe -dbg graphics' first.) Adjust 
'lyx.exe' to whatever the binary is called on your system.


/Paul






Re: Postscript preview

2006-07-26 Thread Paul A. Rubin

LB wrote:
I think I'm getting somewhere with this.  It turns out that when I start 
lyx by using lyx.bat file from bin directory I get the problem with the 
figure. However if I run lyx.exe the problem disappears.


This is what my lyx.bat looks like:
@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus
start "LyX" "C:\LyX\LyX1.4.2\bin\lyx.exe" %*

When I comment out line "SET AIK_DATA_DIR=C:\LyX\LyX1.4.2\aiksaurus" the 
figure gets displayed fine.

Why is this line causing the problem?



It shouldn't be (and on my system it doesn't).  I have the same 
directory and the same batch file (give or take the exact path to the 
LyX directories), and when I load your test document the image previews 
just fine.  Aiksaurus is the thesaurus program used by LyX 1.4.2 (and 
new to this version), and on my system the aiksaurus folder contains two 
data files and nothing else.  Given their names (meanings.dat, 
words.dat), I'm hard-pressed to believe that ImageMagick would be 
mistaking them for some sort of input to the graphic conversion process.


One possibility comes to mind, but it's a real long-shot.  Windows has 
some overall character limit for the environment.  Back in the days of 
Win 3.x, this was a royal PITA, although there were ways to tweak it.  I 
haven't had to mess with it in years, so my impression is that XP and 2K 
have gobs of environment space.  However, if you have enough environment 
variables set (and a long enough command path), maybe possibly 
conceivably you're pushing the character limit.  If you're maxed out, 
maybe the line you're commenting out ate up so enough space that the 
command line for converting your image ran out of room.  (For this to 
make sense, given your ability to display other images, I suspect this 
particular image would need to have a longer than usual name+path.)


Off-hand, the easiest way I can see to test this theory is as follows: 
Revert to the original batch file (i.e., don't comment out the aiksaurus 
line).  Open a command shell and type 'set' to see all the environment 
variables.  Pick a few that don't have anything to do with LyX or 
ImageMagick and get rid of them (by executing 'set =' with 
nothing to the right of the equal sign).  Then run lyx.bat, load your 
document and see if the image displays.


To repeat myself, this is a bit of a grope in the dark.

/Paul



Re: Postscript preview

2006-07-25 Thread Paul A. Rubin

Bo Peng wrote:

The Lyx document and the postscript file are attached.


I can view the figure (converted successfully) under windows, using lyx 
1.4.2.


Bo



Same here (LyX 1.4.2, WinXP).  It takes a couple of seconds on my laptop 
for the image to convert, but convert it does.


/Paul




Re: Postscript preview

2006-07-25 Thread Paul A. Rubin

Bo Peng wrote:

The Lyx document and the postscript file are attached.


I can view the figure (converted successfully) under windows, using lyx 
1.4.2.


Bo



Same here (LyX 1.4.2, WinXP).  It takes a couple of seconds on my laptop 
for the image to convert, but convert it does.


/Paul




Re: Postscript preview

2006-07-25 Thread Paul A. Rubin

Bo Peng wrote:

The Lyx document and the postscript file are attached.


I can view the figure (converted successfully) under windows, using lyx 
1.4.2.


Bo



Same here (LyX 1.4.2, WinXP).  It takes a couple of seconds on my laptop 
for the image to convert, but convert it does.


/Paul