Op 11-2-2012 21:19, Andrew Parsloe schreef:
Inside a preview inset in ERT put
\global\let\a=A
In 'real life' there would be some intermediary text here. Later one
wants to refer to the value stored in \a, so, in a new preview inset
write in ERT
\a
Write some more text. A new value is assigned to \a: in a third
preview inset write in ERT
\global\let\a=B
Again some more text, when reference to the new value is wanted: in a
preview inset write in ERT
\a
Close the document and reopen it. Both the previews of \a will show A.
The pdf as expected shows A and B, so the preview is giving a false
view of what is in the pdf. I can get the second instance of \a to
show B by making some small change like {\a} or \a{}.
Yes, the instant previews are cached. LyX does not know that "\a"
produces different output each time. Moreover, this doesn't work
properly anyway, because you _need_ to reopen the document to get it
right after changes.
So, we need:
* a per-inset indication whether the inset preview may be cached ?
* a global option to disable caching ?
Vincent