I use the listings package to typeset listings. I define a new listing
environment like this:

\lstnewenvironment{code}[2]{ \vspace{1ex}\noindent
  \lstset{ caption={#1},
           label=#2
          } }{ }

This works when called like this:

\begin{code}{caption}{label}
  fac 1     = 1
  fac (n+1) = n * fac n
\end{code}

Now I'd like to have the label show up in RefTeX's TOC, so I customized
reftex-label-alist:

(custom-set-variables
...
 '(reftex-label-alist (quote (("code" 108 "lst:" "~\\ref{%s}"
"\\\\begin{code}{.*}{" ("Listing")))))
...)

This does not work, the labels do not show up in the TOC.
Any pointers on how to fix it?



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

Reply via email to