texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] searching for an equation with a given label


From: Massimiliano Gubinelli
Subject: Re: [Texmacs-dev] searching for an equation with a given label
Date: Mon, 6 Jul 2020 14:06:18 +0200

I've done a bit of research into the source code. It seems that it is not 
possible to make surface the list of references easily, it has been coded in 
the C++ part, so thisl requires some changes there.  There is maybe some way to 
just look into the current document for all the possible labels and their 
location, but in general the matter is more complex since the document could be 
part of a project, so one has to scan other documents too...

Anyway, as I said, a better management of references is useful in everyday use 
(look for duplicate labels, etc...) and maybe it is worth to spend some time 
improving that.  Someone interested? :)

Max


> On 6. Jul 2020, at 11:45, Massimiliano Gubinelli <m.gubinelli@gmail.com> 
> wrote:
> 
> I hacked up an example of how to program this kind of macros.
> 
> You can run the following on a scheme prompt (inside TeXmacs)
> 
> (tm-widget (form-labels cmd)
>  (centered
>    (aligned
>      (item (text "Go to label:")
>        (form-input "Label" "string" '() "1w"))))
>  (bottom-buttons >> ("Ok" (go-to-label (car (form-values))) (cmd "Ok"))))
> 
> (show-form form-labels)
> 
> This will show you a prompt where you can ask to go to a definite label.
> 
> Not perfect but this is all I got in 5 min hacking... :)
> 
> Hope that this inspires better solutions. Ideally a nice solution could also 
> offer a list of the available labels.
> 
> Max
> 
> 
> 
> 
>> On 6. Jul 2020, at 10:58, Massimiliano Gubinelli <m.gubinelli@gmail.com> 
>> wrote:
>> 
>> Dear Slava,
>> there are features which I also miss a lot. Your questions just confirms me 
>> that we have something to do about them. At present I do not know any way to 
>> perform the operation you describe. (or for example to look for duplicate 
>> labels). You can always go into "source mode" and then look for the textual 
>> label, but I'm not sure it will work. Alternatively just open the file in a 
>> regular text editor (if you are desperate :)) and do a text search.
>> 
>> I'm sorry I cannot be more useful than that. I should say this is not a 
>> fundamental flaw, but all the operations involving label are very 
>> underdeveloped (looking for labels, having a list of labels, 
>> cross-referencing, etc...).
>> 
>> Max
>> 
>> 
>>> On 6. Jul 2020, at 10:35, Slava Rychkov <slava.rychkov@gmail.com> wrote:
>>> 
>>> Thanks for these answers, these are nice tricks.
>>> 
>>> I have another related question: how can I look for all places which refer 
>>> to an equation with a given label?
>>> In latex I would just search for `\eqref{label}'. Is there a TexMacs 
>>> analogue?
>>> 
>>> Thanks again, Slava Rychkov
>>> 
>>> On 6 Jul 2020, at 08:32, Massimiliano Gubinelli <m.gubinelli@gmail.com> 
>>> wrote:
>>> 
>>> That's a nice observation, and probably is the way is implemented (should 
>>> check), but anyway the interface to jump to an "immediate URL" is not there 
>>> to my knowledge, so one still has to write some code to allow it from the 
>>> GUI.
>>> 
>>> Max
>>> 
>>> 
>>>> On 6. Jul 2020, at 08:29, Frank <sci.frank@gmail.com> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I don't know whether it is possible to go to a URL in TeXmacs.
>>>> 
>>>> If that is supported, then going to label is a special case: #labelname
>>>> 
>>>> Going to URL seems more conceptual.
>>>> 
>>>> Best,
>>>> Frank
>>>> 
>>>> 于 July 6, 2020 6:24:26 AM UTC, Massimiliano Gubinelli 
>>>> <m.gubinelli@gmail.com> 写到:
>>>>> No, there is no way I know. But this trick is quite simple. There
>>>>> should be a way to come up with a macro which do the same job, i.e.
>>>>> open a window and ask a label and then moves to the label place. Maybe
>>>>> this could be a good exercise if somebody what to give a try.
>>>>> 
>>>>> 
>>>>> Max
>>>>> 
>>>>> 
>>>>>> On 5. Jul 2020, at 18:47, Félix Faisant <xcodexif@xif.fr> wrote:
>>>>>> 
>>>>>> It's not very practical, but you can insert a reference where you are
>>>>> and click on it, and delete the reference afterwards.
>>>>>> I don't know if there is a better way.
>>>>>> 
>>>>>> Le 5 juil. 2020 à 18:42, Slava Rychkov <slava.rychkov@gmail.com> a
>>>>> écrit :
>>>>>> 
>>>>>>> How can I look for an equation in texmacs if I know its label?
>>>>>>> 
>>>>>>> Thanks, Slava Rychkov
>>>>>> 
>>>>>> ----
>>>>>> Félix Faisant - PGP : 0x4e4fa7aff4648355
>>>>>> 
>>>> 
>>>> -- 
>>>> 使用 K-9 Mail 发送自我的Android设备。
>>> 
>>> 
>> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]