Hi Arash,
Arash Esbati <[email protected]> writes:
>> \lstinputlisting[float=tbp,caption=Nondeterminism in
>> Modest,label=lst:{mdp/nondet}]{code/nondet.modest}
> label={lst:mdp/nondet} ?
You're right, thanks for catching that.
> Thanks for raising this issue. This is sort of shortcoming in
> `reftex-label-regexps' which you can fix yourself easily. Enter
>
> M-x customize-variable RET reftex-label-regexps RET
>
> and add '\|lstinputlisting' after 'ctable', it should then look like
> this:
> x
> And then hit 'Apply and Save' and you should be done.
Thanks, but I can't get this to work. I hit Apply and Save, but also after
restarting Emacs and calling (reftex-compile-variables), RefTeX can't find the
lstinputlistings. For good measure, here's the screenshot of my current
customize buffer:
And this is now the value of reftex-label-regexps:
'("\\\\label{\\(?1:[^}]*\\)}"
"\\\\\\(?:begin[[:space:]]*{\\(?:d\\(?:array\\|group\\|math\\|series\\)\\|frame\\|lstlisting\\)}[[:space:]]*\\|\\(?:ctable\\|lstinputlisting\\)\\)\\[[^][]*\\(?:{[^}{]*\\(?:{[^}{]*\\(?:{[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^][]*\\)*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^]
,}
\n %]+\\)[^]]*\\]")
Still, (reftex-reference) can't find the other label, also after a rescan.
Best,
Rens