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