異なる形式の試験クラスにおける 2 つの正しい選択肢

異なる形式の試験クラスにおける 2 つの正しい選択肢

\CorrectChoiceクラスに含まれているコマンドに影響を与えずに、クラスに含まれているコマンドとは異なる形式で新しい正解コマンドを定義しようとしていますexam。たとえば、正解を赤で表示し、部分的な得点の回答を青で表示したいとします。次のことを試しました。

\documentclass[10pt,answers]{exam}
\usepackage{xcolor}
\CorrectChoiceEmphasis{\color{red}}
\newcommand{\PartialCorrectChoice}[1]{
    \ifprintanswers
\CorrectChoice \textcolor{blue}{#1}
\else
\CorrectChoice #1
\fi
}

\begin{document}
\begin{questions}
\question
First question.
    \begin{choices}
    \choice Wrong
    \CorrectChoice Right
    \PartialCorrectChoice{Points for trying}
    \end{choices}
\question
Second question.
\begin{choices}
    \choice Wrong
    \CorrectChoice Right
    \choice No partial credit here
\end{choices}
\end{questions}
\end{document}

そして私はこう得ます:

ここに画像の説明を入力してください

これはあまりきれいではありません。オプションの文字も青にするにはどうしたらよいかわかりません。\CorrectChoiceEmphの内部を使用してみました\ifprintanswersが、うまくいきませんでした。

関連情報