Problem when using grouping in choices (Bug #693)
Description
\correctchoice and \wrongchoice are not taken into account if they are in a subgroup (braces) in a choices environment.
See minimal example below. The compilation fails, complaining about a missing \item.
Removing the braces makes the code compile.
Note that this problem does not seem to appear when using grouping in an AMCOpen macro.
\documentclass{article}
\usepackage{automultiplechoice}
\begin{document}
\begin{copieexamen}[1]
\begin{question}{simple}
Just a simple test question.
\begin{choices}
{
\correctchoice{1}
\wrongchoice{2}
}
\end{choices}
\end{question}
\end{copieexamen}
\end{document}
For information, I encountered this bug while trying to generate many possible answers using a \foreach loop (from tikz), where I need to use braces, such as:
\foreach \ans in {1,2,...,18} {
\ifnum\ans=3
\correctchoice{\ans}
\else
\wrongchoice{\ans}
\fi
}
History
Updated by Alexis Bienvenüe over 4 years ago
Thanks for the report. This bug should be fixed with version 1.5.0~rc1 (see git:3dd11dbb).
- Status changed from New to Feedback
Updated by Alexis Bienvenüe about 4 years ago
- Status changed from Feedback to Closed
- % Done changed from 0 to 100