I have some code behaving like this:
Chapter 1
Section 1.1
Subsection 1.1.1
Definition 1.1.2
Theorem 1.1.3
Equation 1.1.1
I would like it to behave in this way:
Chapter 1
Section 1.1
Subsection 1.1.1
Definition 1.1.1.1
Theorem 1.1.1.2
Equation 1.1.1.3
Subsection 1.1.2
Equation 1.1.2.1
Theorem 1.1.2.2
Section 1.2
Equation 1.2.1
Definition 1.2.2
Here's my code
\counterwithin{equation}{subsection}
\newtheoremstyle{break}
{\topsep}{\topsep}%
{\upshape}{}%
{\bfseries}{}%
{\newline}{}%
\theoremstyle{break}
\newtheorem{teor}[subsection]{MyThm}
\newtheorem{cor}[subsection]{MyCor}
\newtheorem{defn}[subsection]{MyDefinition}
To wrap it up I'd like:
- the section counter to be dependent only on the chapter counter
- the subsection counter to be dependent only on the section counter
- equations, theorems... to share a same counter, which only depends on the section/subsection counter
Do you have any advice in regard?
amsthm
) are described in this answer: Theorem/Definition/Lemma problem — Numbering. Essentially, you should set\newtheorem{teor}{MyThm}[subsection]
and then number the others by reference to[teor]
.