Hi,

I have a LaTeX file in which I add some listings "inline" with `C-c C-e
lstlisting RET caption=abc RET`, This works good and RefTeX can find these
labels. However, I also have some listings which refer to rather big files,
which I include in the following way:

    \lstinputlisting[float=tbp,caption=Nondeterminism in
    Modest,label=lst:{mdp/nondet}]{code/nondet.modest}

I can refer to this listing via `\ref{lst:mdp/nondet}` just fine, but RefTeX
unfortunately does not find and autocomplete this listing when I do `C-c ) RET
l`.

The closest thing I could find in the archives was
https://lists.gnu.org/r/auctex-devel/2022-01/msg00012.html, but that is not my
problem:

    \begin{lstlisting}[caption=test,label={lst:test}]
    \end{lstlisting}

works just fine: it's specifically the \lstinputlisting macro that doesn't work.
Is there a way for RefTeX to find out about these listings?

Best,
Rens

Reply via email to