auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Ignoring some non reference labels


From: Julien Cubizolles
Subject: Re: [AUCTeX] Ignoring some non reference labels
Date: Tue, 23 Apr 2013 13:25:42 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Tassilo Horn <address@hidden> writes:

> Julien Cubizolles <address@hidden> 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.




reply via email to

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