rgheck wrote:
On 11/03/2009 10:38 AM, Sebastian Guttenberg wrote:
Hi all
The following bug has the potential to destroy a lot of cross-references
of a document if one is not aware that lyx shows something different
than it does. My Bug-description has three parts. If you don't consider
the first as bug, then look also at the second which is more apparently
a bug and is based on the first.
1. Probably you know about the behavior described in part 1. and perhaps
even want it, but for a user who does not see what is going on inside
lyx, it clearly looks like a bug. And this misunderstanding can lead to
messing up your references):
* Open new document
* Insert equation in displaymode with<alt>-m-d and insert (<alt>-i-l)
the label "test"
* Below insert a reference to this label via<alt>-i-r
* A test compile shows that the reference correctly refers to (1)
* Now copy the display equation from above and paste it below the
reference.
* The new equation carries the label "DUPLICATE:test", while the
reference within lyx still refers to "test", so one should expect that
the same happens after compilation.
* However, if you compile, the reference refers to (2)!
Apparently lyx doesn't really give the copied equation the label
"DUPLICATE:test", but internally still uses the label "test" (why?).
I think this is a bug. If you do this kind of thing with ordinary
labels, then the pasted label gets changed to something new, e.g.,
"test-1". That same behavior should occur with math labels.
That said, I am pretty ignorant about mathed, so I am in no position
to fix this.
Hum, not sure about when I did this change (maybe it's only in trunk)
but mathed now uses proper InsetLabel instead of a homegrown one, so
this should be fixable...
Abdel.