在多项选择题考试中仅显示正确答案

在多项选择题考试中仅显示正确答案

我正在使用考试类。我有许多多项选择题,正确答案用 \CorrectChoice 指定。例如:

\question[2]
What fruit is yellow?
\begin{choices}
    \choice apple
    \choice orange
    \CorrectChoice banana
    \choice papaya
\end{choices}

默认情况下,打印答案时会显示正确和错误的答案:

在此处输入图片描述

这在答案指南中浪费了很多空间,特别是当您有很多问题时。有什么办法可以让它只显示正确的答案吗?

也许像这样的事情会很有效:

  1. C

根据要求,这是一份完整的最小文档:

\documentclass[%
    % 11pt,
     answers,
    addpoints]{exam}

    \usepackage{graphicx}

    \pagestyle{head}
    \firstpageheader{
        Title \\
        Date
    }{}{
        \ifprintanswers \textbf{Answer Key}
        \else Full name:\enspace\makebox[2in]{\hrulefill} \fi \\
        This quiz is worth a total of \textbf{\numpoints\ marks}.
    }



\runningheader{}{}{}

\frenchspacing
\unframedsolutions
\SolutionEmphasis{\sffamily}
\renewcommand{\solutiontitle}{}

\boxedpoints
\pointsinrightmargin
\marginbonuspointname{\textsc{up}}
\makeatletter% rewrite setup@point@toks assuming right margins
\def\clap#1{\hbox to 0pt{\hss#1\hss}}% define \clap as per https://www.tug.org/TUGboat/tb22-4/tb72perlS.pdf
\def\setup@point@toks{%
\point@toks={%
\rlap{\hskip-\@totalleftmargin
\hskip\textwidth
\hskip\@rightmargin
\hskip-\rightpointsmargin
\clap{\padded@point@block}% change \llap to \clap
}%
\global \point@toks={}%
}%
}% end setup@point@toks
\setlength{\rightpointsmargin}{.5in}% assuming the default 1 inch margins
\makeatother
% - adjust the top and bottom margins
\extraheadheight{.25in}
\extrafootheight{-.5in}
\setlength{\marginparwidth}{1.5in}
% NB: remember to use \newpage after the last question

\begin{document}

% Quiz instructions
\begin{center}
%   \parbox{5.5in}{\centering\itshape Be sure to read each question carefully and answer fully.}
\fbox{\fbox{\parbox{5.5in}{\centering
Be sure to read each question carefully and answer fully.}}}
\end{center}

% Quiz questions
\begin{questions}


\question[2]
What fruit is yellow?
\begin{choices}
    \choice apple
    \choice orange
    \CorrectChoice banana
    \choice papaya
\end{choices}

\end{questions}
\end{document}

相关内容