6

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}
6

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}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.