5

I write multiple-choice exams using the Exam class and I would like to be able to print the exam without printing the answer choices. At the moment, I manually comment out everything from \begin{choices} to \end{choices} for each of the questions. Can you suggest a more efficient way to do this?

Here's a MWE:

\documentclass[letterpaper,12pt,addpoints]{exam}
\title{MWE}
\begin{document}
\maketitle

\begin{questions}
\question What is your favorite color?
\begin{choices}
\CorrectChoice Green
\choice Yellow
\choice Red
\end{choices}
\end{questions}
\end{document}
5

Use the comment package:

\documentclass[letterpaper,12pt,addpoints]{exam}

\usepackage{comment}
\excludecomment{choices}

\title{MWE}
\begin{document}
\maketitle

\begin{questions}
\question What is your favorite color?
\begin{choices}
\CorrectChoice Green
\choice Yellow
\choice Red
\end{choices}
\end{questions}
\end{document}

You just need to comment out the \excludecomment line in order to print also the choices.

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.