I want to create an example environment with a counter which will be in sync with my subsections. So I'll have:
subsection 3.2
lemma 3.2
example 3.2
example 3.3
lemma 3.3subsection 3.3
example 3.3
example 3.4
I find it hard to understand the \newcounter
command and how it works. Plus, is there a command for \onsectionchange
- so I can do (in pseudo code):
\onsubsectionchange{
%example counter := subsection counter
}
\newcounter
and some of the things you can to to counters.