0

I'm typing an exam in the exam class and I would like to put a box, like the one produced by \fbox, around the correct letter in the choices environment (when \printanswers is used).

For example,

What is 2+2?
\begin{choices}
\choice 1
\choice 2
\choice 3
\correctchoice 4
\end{choices}

puts a box around the letter D, but not around the full question as this answer does.

Does anyone have a solution for this?

Kyle
  • 3

1 Answers1

3

EDIT: Work with exam-randomizechoices package.

documentclass[10pt,a4paper,answers]{exam}
\usepackage[T1]{fontenc}

\usepackage[randomize,overload]{exam-randomizechoices}

\newcommand{\correctchoicelabel}{\fbox{\thechoice}} \CorrectChoiceEmphasis{\renewcommand{\choicelabel}{\correctchoicelabel}}

\begin{document} \begin{questions} \question What is 2+2? \begin{choices} \choice 1 \choice 2 \choice 3 \CorrectChoice 4 \end{choices} \end{questions} \end{document}

enter image description here

Edson
  • 186