
我使用 Exam 類別編寫多項選擇題考試,我希望能夠列印考試而不列印答案選擇。目前,我手動註解掉每個問題從\begin{choices}
到 的所有內容。\end{choices}
您能建議一種更有效的方法來做到這一點嗎?
這是一個 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}
答案1
使用該comment
包:
\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}
您只需註解掉該\excludecomment
行即可列印選項。