[Top][All Lists]

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

Re: reftex+catchfilebetweentags, reftex support for catchfilebetweentags

From: Arash Esbati
Subject: Re: reftex+catchfilebetweentags, reftex support for catchfilebetweentags tags
Date: Thu, 01 Dec 2022 10:46:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50

Hi Uwe,

Uwe Brauer <> writes:

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

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.  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:


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

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

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


Best, Arash

reply via email to

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