Sven Schreiber wrote:
Paul A. Rubin wrote:
Sven Schreiber wrote:
How can I force lyx to run a latex cycle when only an included graphics
file has changed?
Lyx doesn't seem to notice the change (which I understand) and therefore
only offers the output from the buffer with the old graphic.
Workaround is to close and reopen the lyx-file, but surely this is not
really necessary?
Thanks, Sven
I've experienced this myself. Easier workaround: insert a space
(anywhere) and then delete it, so that LyX thinks the document has changed.
Paul, that was the first thing I tried, but it didn't work (although
normally I agree it works). At least in this situation, Lyx apparently
understands that nothing has changed. Instead of closing the file,
however, I can also 1. insert a word, 2. update, 3. delete the word, 4.
update, and all is as it should be.
Actually it is difficult to construct a simple test case, so this seems
to be a rather subtle bug that is triggered only in special
circumstances. Maybe it helps to describe the situation where it occurred:
1. I have a lyx document with pdf graphics included (lyx 1.3.6 on win
2000, could also try xp, haven't tried yet)
2. I edit one graph by updating the .eps, and then running it through
eps2pdf.exe (a wrapper around ghostscript, I believe) which updates the
.pdf.
3. Then I try "update" in lyx and... no latex run, so nothing changes.
I could do more testing if somebody tells me in which direction.
-Sven
Ok, I think I see the problem, though not the solution. The first time
you view the document, LyX copies the graphics files into the temp
directory (which also houses any transformations of them done by
ImageMagick). When you perform step 2, I assume that you're performing
it on the original image file, not the copy in the temp buffer. LyX
does not know the image has changed. Also, although I'm not sure of
this, I think View->Update may only run latex unless it sees a change to
the list of graphic files.
I experimented with this. Oddly, changing the name of the image file in
LyX, then changing it back, then doing either View or View->Update did
not cause LyX to update the image file. Changing the name of the image,
viewing it, then changing the image file name back and executing View
again did update the image. (But doing View->Update in the second step,
rather than View, did not update the image, again a bit surprising.)
I made the mistake of experimenting with a rather large beamer
presentation. When I did get LyX to initiate a new pdflatex run, it was
rather time consuming, and in the situation you describe I don't think
it should be necessary. Assuming that the image widget in the LyX
document specifies dimensions for the image, I don't think the document
flow can be affected by the image edit, so a new latex/pdflatex run
should not be required.
Perhaps we should suggest a modification that adds a button to the image
widget that tells LyX to update the copy in the temp buffer, preparatory
to a View->Update.
Paul