1

I am used the exam class to create a multiple choice exam. When I create the answers, I would like the correct answer to have an asterisk at the beginning of the line, e.g., *a. Blue. My ultimate goal is create a PDF that I can convert to a Word document, which goes into Respondus, which allows Canvas to import them. If anyone knows of a shortcut to get my multiple choice questions into Canvas, that would be greatly appreciated.

\documentclass[answers]{exam}

\begin{document}

\begin{questions}   

\question What color is the sky?

\begin{choices}

\CorrectChoice Blue

\choice Green

\choice Black

\choice Grey

\end{choices}

\end{questions}

\end{document}
1

The following seems to work:

\documentclass[answers]{exam}

\makeatletter
\renewcommand{\choiceshook}{%
  \def\CorrectChoice{%
    \if@correctchoice
    \color@endgroup
    \endgroup
    \fi
    \ifprintanswers
    \ifhmode \unskip\unskip\unvbox\voidb@x \fi
    \begingroup \color@begingroup \@correctchoicetrue
    \renewcommand\choicelabel{*\thechoice.}%
%   \CorrectChoiceEmphasis{}% Uncomment to cancel boldface
    \CorrectChoice@Emphasis
    \fi
  \item
    \do@choice@pageinfo
  } % CorrectChoice
}% choiceshook
\makeatother


\begin{document}
  \begin{questions}
    \question What color is the sky?
    \begin{choices}

      \CorrectChoice Blue

      \choice Green

      \choice Black

      \choice Grey

    \end{choices}
  \end{questions}
\end{document}

I used choiceshook to alter the choices environment by changing the definition of \CorrectChoice. The change consisted of adding the two lines

    \renewcommand\choicelabel{*\thechoice.}%
%   \CorrectChoiceEmphasis{}% Uncomment to cancel boldface

The first of those two adds an asterisk to the choice label. The second one is commented out; if you uncomment it, then it will cancel the boldface in the correct choice.

2
  • Fantastic! Thank you very much! – AQFT Jun 5 '20 at 2:00
  • @AQFT: You're welcome. – Phil Hirschhorn Jun 5 '20 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.