Tassilo Horn <[email protected]> writes:

> Julien Cubizolles <[email protected]> writes:

> There's a new customization option `reftex-label-regexps'.  It is a list
> of regexps that match labels.  The default value matches plain
> \\label{..} definitions, and keyval [..., label={...}, ...]
> definitions.  The regexp I've used previously was too lax, and the
> result was that also xlabel/ylabel etc. were matched.

> Of course, now your metalabels aren't matched anymore, too.  But you can
> easily add a new entry that is a copy of the default entry for keyval
> labels with "meta" prepended to "label".

I'm actually having trouble adding the following entry:

--8<---------------cut here---------------start------------->8---
\[[^]]*\<\(meta\)?label[[:space:]]*=[[:space:]]*{?\(?1:[^],}]+\)}?
--8<---------------cut here---------------end--------------->8---

I tested it with regexp-builder, it correctly matches the
metalabel={...} entries in my file.

But whether I add it through customize or with a (setq ...) command, it
doesn't seem to get picked up when I refresh the TOC buffer, either
through r or R.

Also, in tikz you can have label={...} keys, not only xlabel and
ylabel. They are currently picked by the latest version of your regexp
but I don't see how to exclude them without defining a list of
environments where reftex shouldn't look for labels which I imagine
would imply a lot of changes in the code.

Here is an example of such a tikzpicture label:

--8<---------------cut here---------------start------------->8---
\begin{tikzpicture}
   \node [label={\RayonArc:$\theta$}] at (\AngleMilieu:\RayonArc) {};
   \node [shape = vector out,label=left:$\vvEz $] {};
\end{tikzpicture}
--8<---------------cut here---------------end--------------->8---

Thanks for your help,

Julien.


_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to