# Modifying \answerline in the exam class

When using the exam class, is there a way to change the formatting of the item answer blanks created by \answerline?

For a question, the label is 1.

For a part, the label is (a)

For a subpart, the label is i.

I would like them all to be (1), (a), and (i) respectively.

For example

\documentclass[answers]{exam}
\begin{document}
\begin{questions}
\question First one \answerline
\begin{parts}
\part first part \answerline
\begin{subparts}
\subpart A subpart \answerline
\end{subparts}
\end{parts}
\end{questions}
\end{document}

-
–  Peter Grill Mar 31 '12 at 1:46

You can redefine \questionlabel and \subpartlabel which control the decorations around the numbers corresponding to questions and subparts, respectively:

\documentclass[answers]{exam}

\renewcommand\questionlabel{(\thequestion)}
\renewcommand\subpartlabel{(\thesubpart)}

\begin{document}
\begin{questions}
\question First one \answerline
\begin{parts}
\part first part \answerline
\begin{subparts}
\subpart A subpart \answerline
\end{subparts}
\end{parts}
\end{questions}
\end{document}


-