On 02/11/2012 03:19 PM, Andrew Parsloe wrote:
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{}.
I came across this working on my spreadtab module for LyX. Instant
preview allows interactive spreadsheeting (of the spreadsheet-lite
variety) in LyX. But storing values from the tables gave this
confusing divergence between preview and pdf.
Please file a bug about this.
Richard