Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
Welcome to TeX.SE. –  Peter Grill Mar 31 '12 at 1:46
add comment

1 Answer

up vote 6 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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