Labels in Notes regression
Andrew Parsloe
ajparsloe at gmail.com
Sun May 29 00:38:43 UTC 2022
On 27/05/2022 1:18 am, racoon wrote:
> On 2022-05-26 10:39, Andrew Parsloe wrote:
>>
>> On 26/05/2022 4:05 pm, Daniel wrote:
>>> On 2022-05-25 23:27, Andrew Parsloe wrote:
>>>>
>>>> On 26/05/2022 6:04 am, Daniel wrote:
>>>>> On 2022-05-24 23:53, Andrew Parsloe wrote:
>>>>>> (LyX 2.4.0-alpha3 on windows 10)
>>>>>>
>>>>>> If I copy text containing a label (e.g. of an equation) and paste
>>>>>> into a (yellow) Note, the label is pasted unchanged. There is no
>>>>>> warning message about the label being changed to label-1. The label
>>>>>> in the Note can be referenced from within the Note or from within
>>>>>> another Note, but not from the text which gives a BROKEN Ref
>>>>>> message. I've just tried with LyX 2.3.5, and this is a regression.
>>>>>>
>>>>>> Andrew
>>>>>
>>>>> I can reproduce. I guess a question is what would be the best thing
>>>>> to do here. What is the exact issue with how it is in LyX 2.4.0dev?
>>>>> What would be a better way? Renaming? Showing as "Duplicate"? What
>>>>> is your use case?
>>>>>
>>>>> That the reference is marked as BROKEN when referenced from outside
>>>>> of the Note seems right, or?
>>>>>
>>>>> Daniel
>>>>
>>>> Looking at how labels are used in notes and branches across 2.3.5 and
>>>> 2.4.0dev, I can see that this can get complicated. The 2.3.5
>>>> behaviour (renaming) seems clearest to me (and a little pedantic).
>>>>
>>>> Andrew
>>>
>>> I have never used branches, so pardon my ignorance. But isn't it there
>>> where being able to use duplicates might come in handy? Couldn't you
>>> have two branches with the same labels that are referenced outside of
>>> the branches? But as I said, I am not using branches, so maybe that is
>>> not a good use case.
>>>
>>> Daniel
>>
>> Sorry, I wasn't clear in my answer. I meant for *notes* the 2.3.5
>> behaviour seems best. Branches are another matter. I haven't used them
>> enough to form an opinion.
>>
>> Andrew
>
> I am still unsure why the behavior seems best to you. Could you provide
> a use case where your preferred way comes in handy?
When I'm extensively revising a block of text I find it convenient to
put the old version into a note as the new version gets worked on. The
text in the note is there to be mined -- copied & pasted from -- but is
clearly distinct (the yellow background) from the new text. The problem
wth labels arises when the old text contains a label which now sits in a
note. The label is still recorded in the Cross-reference dialogue. If
the text with the label gets copied & pasted from the note into the new
text there are now two, identical labels recorded in the Cross-reference
dialogue. Either removing the note label or distinguishing it in some
way would be acceptable, but the 2.3.5 behaviour seemed best because it
treats note labels in the same way as in the text, and therefore makes
fewest assumptions about how notes are or can be or should be used.
> (Did you post in private on purpose?)
No, in error.
>
> Daniel
Andrew
More information about the lyx-devel
mailing list