I have something like this:
\newcounter{Def}
\newcommand{\printDef}{\thechapter.\thesection.\theDef}
\newenvironment{Expl}
{\small\narrower\medskip\stepcounter{Def}\noindent\ignorespaces \textsc{Example \printDef.}}
{\par\normalsize\medskip}
And then:
\begin{Expl} \label{myref}
blahblahblah
\end{Expl}
Suppose the current section is 2.4, then it will print something like:
Example 2.4.1.
However, when I do \ref{myref}, it will just print 2.4. The 1 is totally gone! Could anyone please help? Thanks!
amsmathorntheorem). – Caramdir Mar 18 '11 at 23:02