auctex-devel
[Top][All Lists]
Advanced

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

Re: reftex+catchfilebetweentags, reftex support for catchfilebetweentags


From: Uwe Brauer
Subject: Re: reftex+catchfilebetweentags, reftex support for catchfilebetweentags tags
Date: Thu, 01 Dec 2022 14:39:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "AE" == Arash Esbati <arash@gnu.org> writes:

Hi Arash
> Hi Uwe,
> Uwe Brauer <oub@mat.ucm.es> writes:

>> Reftex does not support tags like <*external-catches:1>
>> 
>> Any idea how this could be implemented?


Thanks for your answer, but....


> I assume you want to use a sort of \label/\ref-mechanism for this,
> right?  If true, you have to go through some hassle to teach RefTeX
> about this. 
Right, I first thought about something simple, like 

    1. I run (TeX-insert-macro "ExecuteMetaData") But leave the TAG  empty

    2. Then I place the cursor in the empty TAG entry and run reftex-reference

    3. I select the type of label
       but my setting is wrong
       
          ("ExecuteMetaData"   ?c "\\<*%f:\\>"  "\\<*{%s}\\>" nil 
("ExecuteMetaDate"))

    4. Then I should select e[x]tern


This did not work, as I already worked so I tried 
  (setq reftex-label-alist 
          ("ExecuteMetaData"   ?c "%f" "<\\*\\(?1:[^>]+\\)>"  nil
  ("ExecuteMetaDate")))

but it did not work

>  First, you would usually add \ExecuteMetaData to
> `reftex-include-file-commands', but the variable looks for a mandatory
> file argument, not optional.  So you have to define a new LaTeX macro
> for this:

>   \newcommand{\ExecuteExternalMetaData}[2]{%
>     \ExecuteMetaData[#1]{#2}%
>   }

I am not sure I understand this is a LaTeX command, but what is its
purpose with 


> Then you need to add <*TAG-NAME> to `reftex-label-regexps'.  Finally,
> you need to write a little lisp for your `ExecuteExternalMetaData' which
> asks for two arguments, file name and then runs `reftex-label' with the
> `no-insert' argument set to t in order to get only the label and insert
> that without \ref.  This is the first part I tried and it works in terms

This part I wanted to address after I understand the reftex-label logic
and I obviously don't


> of RefTeX sees the labels in an external file (note that they are
> commented out, you need to hit '%' to make them visible in RefTeX Select
> buffer)

Do you mean after running x of e[x]tern?

I am puzzled

>   (add-to-list 'reftex-include-file-commands
>                "ExecuteExternalMetaData" t)

>   (add-to-list 'reftex-label-regexps
>                "<\\*\\(?1:[^>]+\\)>" t)



>   (reftex-compile-variables)


I did all that, but it still does not work

What do I miss?

Thanks again for your time and help

Uwe 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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