I've used the wonderful LTXexample environment defined by showexpl to illustrate some LaTeX basics. However, the following code confuses it: the reference remains ?? no matter how many times I recompile...
\documentclass{article}
\usepackage{showexpl}
\begin{document}
\begin{LTXexample}[frame=none]
\begin{enumerate}
\item No need to manually number items here!
\item\label{second} Number two added automatically
\item Third item
\end{enumerate}
And here is a reference to item number \ref{second}
\end{LTXexample}
\end{document}
I've managed references inside LTXexample in equation environments, so this is something specific to enumerate... Any ideas how to fix it? (I can't even cheat and just put "2" because the code is shown side-by-side with it...)
UPDATE: I emailed the author of showexpl but I've had no reply. Does anyone feel like delving into the code to see if it's obvious how to fix this?
\label? I just can't see what this feature is good for. – Hendrik Vogt Dec 15 '10 at 18:21\label{second}in another example without conflict. Or perhaps he copied simply the list of commands from latex.ltx:\labelis deactivated in other commands too. Btw: The list contains a tipo\let\tableofcontens\relax. – Ulrike Fischer Dec 15 '10 at 18:34