형식이 다른 시험 수업에서 두 ​​가지 올바른 선택

형식이 다른 시험 수업에서 두 ​​가지 올바른 선택

해당 명령에 영향을 주지 않고 클래스 \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작동하지 않았습니다.

관련 정보