考虑以下代码:
\documentclass[addpoints,12pt]{exam}
\usepackage{environ}
\makeatletter
\NewEnviron{sol}{%
\def\@currentlabel{\BODY}\label{solt:\thequestion}%
\begin{solution}%
\BODY
\end{solution}%
}
\makeatother
\begin{document}
\begin{questions}
\question This is a question
\begin{sol}
My solution
\end{sol}
\begin{choices}
\choice 8
\choice 1
\choice 3
\choice 4
\end{choices}
\end{questions}
The first solution is:\\
\ref{solt:1}
\end{document}
如何才能使 sol 不可见并且仅根据自动标签使用它?