>>> "AE" == Arash Esbati <[email protected]> writes:

> Hi Uwe,
> Uwe Brauer <[email protected]> writes:

I think I understand some of the structure but still the workflow is not
entirely reliable.



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


I now understand the purpose of this macro and added it to my LaTeX
file.

I also added to catchfilebetweentags.el the macro

;; New macro to provide basic RefTeX support for inserting the label.
    '("ExecuteExternalMetaData"
      (TeX-arg-input-file  "File-name" t) "Tag")



> 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
> 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)

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

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

>   (reftex-compile-variables)


Indeed that works in the current Emacs session.

However,  even after putting these lines in
my reftex_init.el file and byte-compiling it, after a restart of Emacs,  the 
reftex
did not add the correct reference/label to ExecuteExternalMetaData!

I had explicitly to eval these lines again, to make it work. I am sort
of puzzled.

Regards

Uwe 

Reply via email to