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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?


share|improve this question

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.

up vote 3 down vote accepted

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

share|improve this answer
@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.