2

How can I change the numbering style of question parts in the exam class? Currently, I have

1.
 (a)
 (b)

but I would prefer

1.
 (1.1)
 (1.2)

I have already tried

\renewcommand{\thepartno}{\thecurrentpartno.\arabic{partno}}

but this results in

1.
 (.1)
 (.2)

What should I do?

1 Answer 1

4

I have read the manual examdoc.pdf and the source code exam.cls which can be found in LaTeX2e distribution. The increment 1, 2, 3, ... is actually done by the question counter. And the increment a, b, c, ... is done by the partno counter. It can be found in the source code that \partlabel is defined to be (\alpha{partno}). Thus, we can redefine it as in the code below:

\documentclass{exam}
\renewcommand\partlabel{(\thequestion.\arabic{partno})}
\begin{document}
    \begin{questions}
    \question
    \begin{parts}
        \part first
        \part second
    \end{parts}
    \end{questions}
\end{document}
2
  • A screenshot would and some explanations would improve this answer
    – user31729
    Jan 20, 2015 at 12:52
  • @ChristianHupfer Yes, it is a good idea :)
    – Say OL
    Jan 23, 2015 at 16:09

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.