[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] RefTeX with lstnewenvironment
From: |
Jan Schaumloeffel |
Subject: |
[AUCTeX] RefTeX with lstnewenvironment |
Date: |
Tue, 2 Jun 2009 13:37:54 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
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] RefTeX with lstnewenvironment,
Jan Schaumloeffel <=