# [texworks] SCRIPT: Insert a new \label{key} - checks for potential duplicate conflict

Paul A Norman paul.a.norman at gmail.com
Fri May 21 14:27:20 CEST 2010

Will try and  look into that, sounds rellay useful.

Paul

On 21 May 2010 23:08, Stefan Löffler <st.loeffler at gmail.com> wrote:
> Hi Paul,
>
> thanks for all the useful scripts recently.
>
> Am 2010-05-21 11:01, schrieb Paul A Norman:
>> Insert a new \label{key}
>>
>> If text is selected first in the Tw editor, the script endeavours to
>> use this as the key to make a new \label{key}
>>
>> Checks through the current document, and offers a drop-down box with
>> either a blank area to type in, or if the user has selected some text,
>> that as the proposed label key. The drop-down shows any already
>> existing label keys in the document.
>>
>
> I wonder if it would be (easily) possible to investigate surrounding
> environments and suggest, e.g., a label of form "fig:" if inside a
> figure, "eq:" if inside an equation, etc.?
>
> -Stefan
>