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: Tassilo Horn
Subject: Re: [AUCTeX] Ignoring some non reference labels
Date: Tue, 23 Apr 2013 17:30:43 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Julien Cubizolles <address@hidden> writes:

Hi Julien,

>> 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:
>
> \[[^]]*\<\(meta\)?label[[:space:]]*=[[:space:]]*{?\(?1:[^],}]+\)}?
>
> 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.

Oh, yes.  You have to call (reftex-compile-variables) afterwards to make
the change effective.  So in Lisp, this works for me.

  (add-to-list 'reftex-label-regexps
               
"\\[[^]]*\\<metalabel[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
  (reftex-compile-variables)

I've just committed a fix in emacs bzr.  With that, if you change the
variable with customize, then `reftex-compile-variables' will be called
automatically.

> 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:
>
> \begin{tikzpicture}
>    \node [label={\RayonArc:$\theta$}] at (\AngleMilieu:\RayonArc) {};
>    \node [shape = vector out,label=left:$\vvEz $] {};
> \end{tikzpicture}

Ah, that's unfortunate.  reftex actually doesn't know anything about
environments, so it's not even possible to skip some of them right
now...

Bye,
Tassilo




reply via email to

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