1

Total newbie here ...

I'm trying to program an assignment with "Question 1" (header) followed by 5 sub questions in a list "(a),(b),(c)" and so on. I coded Question 1 and the sub questions correctly, but how do I reset the counter so that for the next "Question 2", it's not starting on (e) but starting on (a) again?

My initial thought process was to code

\end{enumerate}

at the end of Q1 and then simply do

\begin{enumerate}[label=(\alph*)] 

before i begin Q2.

but this is bringing up a lot of errors for me, how do I fix this?

  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Heiko Oberdiek Dec 10 '16 at 2:10
  • 1
    Welcome! Can you please post a minimal example showing what you've tried? The counter normally resets by default, so it is hard to know exactly what you've done. – cfr Dec 10 '16 at 2:10
1

The counter resets by default. Additional work is required to prevent it doing so.

Hence, anything which ends the enumerate environment and then restarts it will do, whether that environment is nested in an enclosing list or not.

For example,

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\arabic*]
  \item First one
  \begin{enumerate}[label=(\alph*)]
    \item a
    \item b
    \item c
    \item d
    \item e
  \end{enumerate}
  \item Second two
  \begin{enumerate}[label=(\alph*)]
    \item a
    \item b
    \item c
    \item d
    \item e
  \end{enumerate}
\end{enumerate}
\newlist{subqns}{enumerate}{1}
\setlist[subqns]{label=(\alph*)}
\section{Question First of Two}
\begin{subqns}
  \item a
  \item b
  \item c
  \item d
  \item e
\end{subqns}
\section{Question Second of Two}
\begin{subqns}
  \item a
  \item b
  \item c
  \item d
  \item e
\end{subqns}
\end{document}

default resets

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.