mailing-list for TeXmacs Users

Text archives Help


Re: searching for an equation with a given label


Chronological Thread 
  • From: Frank <address@hidden>
  • To: Basile Audoly <address@hidden>
  • Cc: address@hidden
  • Subject: Re: searching for an equation with a given label
  • Date: Tue, 7 Jul 2020 09:26:14 +0200

Hi,

I meant that you cannot search out "hlink" through the pattern "reference". Then to search for a document, one needs to enumerate all possible referencing commands (reference, hlink, etc). Some macros would make this complicated. For example,

(concat "Let's look at the footnote" (rsup (hlink "*" "#footnote-test")) (label "footnr-test") (render-footnote* "*" "test" "A footnote here!") ".")

How would you search out the reference to footnr-test in the footnote, by clicking the asterisk (which is involved in the internal render-footnote* macro) ?

By the way, I did not know that searching (hlink "" "#thm:main") will work. I don't understand how the searching works. I don't understand why that pattern matches (hlink "The main theorem" "#thm:main"). The matching rules are not clear in my eyes.

Best wishes,

Frank

On 07/07/2020, Basile Audoly wrote:
Hi Frank,
I don't see what you mean. For me it seems to work (note the tiny red bar next to the blue flag in the second screenshot).
Basile.







Basile

Le 7 juil. 2020 à 09:01, Frank <address@hidden> a écrit :

Hello,

Thanks for this trick. However, it does not work perfectly. The problem is that, the searching is lexical, so for example,

(document (theorem (document (concat (label "thm:main") "We have " (math (concat "<mathi>" (rsup "2") "=-1")) "."))) (concat "Look at Theorem" (nbsp) (reference "thm:main") ".") (concat "Look at " (hlink "The main theorem" "#thm:main") "."))

It won't hit that reference generated by hlink ("Look at The main theorem").

Best wishes,

Frank

On 07/07/2020, Basile Audoly wrote:
Hi Slava,

I think both your questions can be solved by using the detached search window, which turns out to be powerful than the default search textfield appearing at the bottom of the TeXmacs window. The detached search window is available by using the standard Edit > Search… menu item, and then by clicking on the second icon to the right of the search field, depicting a popping window.

To search for a label, initiate the search while your cursor is within an equation as this (silently) sets the search to be in math mode. To search for a reference, initiate the search while your cursor is within standard text.

In the detached search window, type \ R E F <enter> or \ L A B E L <enter> followed by your citation keys. Ignore any warning reporting references not found which may show up.

I learnt this from Joris, this should really appear in the manual.

Basile

Le 6 juil. 2020 à 10:35, Slava Rychkov <address@hidden> a écrit :

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 <address@hidden> 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 <address@hidden> 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 <address@hidden> 写到:
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 <address@hidden> 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 <address@hidden> 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设备。



-- 
Best wishes!
Yours,

-- 
Best wishes!
Yours,

PNG image

PNG image




Archive powered by MHonArc 2.6.19.

Top of page