I want to store the number of Exam in collect
environment.
The counter is alway store with final value. PLease help me correct my code with collect package.
Thank you in advance!
\documentclass{article}
\usepackage{collect}
\definecollection{excol}
\newcounter{excout}
\newenvironment{exam}{
\refstepcounter{excout}
\begin{center}
THE EXAM \theexcout
\end{center}
\begin{collect}{excol}{}{}{}{}
The exam {\Large \theexcout}
\end{collect}
}{}
\begin{document}
\begin{exam}
Content 1
\end{exam}
\begin{exam}
Content 1
\end{exam}
\bigskip
\includecollection{excol}
\end{document}