6

I am using exsheets to type questions and answers. When I start a new section, the question number continues from the previous one. How do I reset it it and make it start from number 1 again? Here is an MWE:

\documentclass{article}
\usepackage{exsheets}
\begin{document}
\section{One}
\begin{question}
    This is question number 1 in section 1.
\end{question}
\section{two}
\begin{question}
    This is question number 1 in section 2. But it is numbered as "Exercise 2" how do  I make it 1?
\end{question}
\end{document}
1
  • 2
    Please add the documentclass and the relevant packages to your 'MWE'
    – user31729
    Dec 27, 2014 at 5:36

1 Answer 1

7

Use the package option counter-within=section in order to get a reset of the question counter each time a section starts (See chapter 8 of the exsheets documentation)

\documentclass{article}

\usepackage[counter-within=section]{exsheets}


\begin{document}
\section{One}
\begin{question}
    This is question number 1 in section 1.
\end{question}
\section{two}
\begin{question}
    This is question number 1 in section 2. But it is numbered as "Exercise 2" how do  I make it 1?
\end{question}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .