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}

2 Answers 2

2

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!
    – user107025
    Commented Jun 5, 2020 at 2:00
  • @AQFT: You're welcome. Commented Jun 5, 2020 at 2:53
0

The proposed solution doesn`t work with the exam-ramdomizechoices package. My dirty hack:

\documentclass[answers]{exam}

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

\CorrectChoiceEmphasis{%
    \bfseries%
    \renewcommand{\choicelabel}{*\thechoice.}%
}

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .