[Tex/LaTex] Numbering subsections and subsubsections with the equation counter

numbering

I would like to number everything within a section with the same counter: theorems, definitions, equations, subsections, etc. Everything that's numbered for reference (except for floats, since they are "out of sequence".) I am using the amsbook class.

I have made a beginning to this by putting most things on the equation counter like so:

\documentclass{amsbook}

\numberwithin{section}{chapter}
\numberwithin{equation}{section}

\newtheorem{thm}[equation]{Theorem}
\newtheorem{crl}[equation]{Corollary}

\theoremstyle{definition}
\newtheorem{dfn}[equation]{Definition}

\begin{document}
\chapter{Introduction}
\section{Foo} % 1.1
\begin{thm} % 1.1.1
Some sets are finite.
\end{thm}
\begin{crl} % 1.1.2
Not all sets are infinite.
\end{crl}

\subsection{Bar} % 1.1.1
We find that
\begin{equation} % 1.1.3
2 = 1 + 1.
\end{equation}

\subsubsection{Baz} % 1.1.1.1
Furthermore,
\begin{equation} % 1.1.4
1 + 1 = 2.
\end{equation}

\section{Quux} % 1.2
Open questions remain.

\end{document}

In the example, I want subsection Bar to be numbered 1.1.3, its equation to be 1.1.4,
subsubsection Baz to be 1.1.5, and its equation to be 1.1.6. Then everything resets with the new section.

Best Answer

You can make equation an alias for the subsection counter and the same for subsubsection, but you also need to remove this counter from the reset list of subsection.

\documentclass{amsbook}
\usepackage{chngcntr}

\renewcommand{\thesection}{\thechapter.\arabic{section}}
\counterwithout{subsubsection}{subsection}
\makeatletter
\let\c@equation\c@subsection
\let\theequation\thesubsection
\let\c@subsubsection\c@subsection
\let\thesubsubsection\thesubsection
\makeatother

\newtheorem{thm}[subsection]{Theorem}
\newtheorem{crl}[subsection]{Corollary}

\theoremstyle{definition}
\newtheorem{dfn}[subsection]{Definition}

\begin{document}
\chapter{Introduction}
\section{Foo} % 1.1
\begin{thm} % 1.1.1
Some sets are finite.
\end{thm}
\begin{crl} % 1.1.2
Not all sets are infinite.
\end{crl}

\subsection{Bar} % 1.1.1
We find that
\begin{equation} % 1.1.3
2 = 1 + 1.
\end{equation}

\subsubsection{Baz} % 1.1.1.1
Furthermore,
\begin{equation} % 1.1.4
1 + 1 = 2.
\end{equation}

\section{Quux} % 1.2
Open questions remain.

\end{document}

enter image description here