Possible Duplicate:
Resetting theorem counters: \sections and (missing) \subsections

I create a new counter as follow :


Thus at each new section thequestion is set to 1. If I do the following :


thequestion is not set to 1 when a new section begin (without subsection). Is it possible to link a counter to both section and subsection ?


marked as duplicate by Werner, lockstep, Torbjørn T., Stephan Lehmke, percusse Aug 31 '12 at 21:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You can use the chngcntr package, and then write

\counterwithin{question}{subsection} or section, the effect should be the same.

Otherwise, you can define the reset yourself

  • @addtoreset work perfectly, thanks – Ger Sep 3 '12 at 10:47

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