# How to temporarily change equation numbering depth?

I have numbers like (1.2.2.3), how do I get numbers like (1.2.2.3)' and (1.2.2.3.1)?

-
Should there really be a prime in the first option? Also, provide some context in terms of the equation numbers. For example, (1.2.2.3) is equation 3 in \subsubsection 1.2.2, right? Do you also have equations inside \subsections and \sections? – Werner Mar 8 '13 at 6:21
Yeah there is a prime for two very similar equations. I got subpoint under subsubsection, those are numbered as equations, and sometimes I need equations within subpoints. – hyh Mar 8 '13 at 7:13

Here you can find the information necessary to change equation numbering with or without amsmath in the sections "equation numbering".

Short summary:

• Without amsmath you need to change the command \theequation for the output and use the package remreset for the internal counting.
• With amsmath you need to change the command \theequation for the output and use the command \numberwithin for the internal counting.

\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{subsubsection}

\newcounter{mySubCounter}

\usepackage{ntheorem}
\theoremprework{\setcounter{mySubCounter}{0}}
\newtheorem{subpoint}[equation]{Teil}

\newcommand{\subpointequation}[1]{%
\refstepcounter{mySubCounter}
\begin{equation*}
#1 \tag{\theequation.\themySubCounter}
\end{equation*}
}

\newcommand{\similarequation}[1]{%
\begin{equation*}
#1\tag{\theequation'}
\end{equation*}
}

\newcommand{\similarsubpointequation}[1]{%
\begin{equation*}
#1\tag{\theequation.\themySubCounter'}
\end{equation*}
}

\begin{document}
\section{eins}
\subsection{eins eins}
\subsection{eins zwei}
\subsubsection{eins zwei eins}
\subsubsection{eins zwei zwei}
$$1+2=3$$
$$1\cdot2=2$$
$$1-2=-1$$
\begin{subpoint}
Hallo
\subpointequation{a+b=c}
\subpointequation{d+e=f\label{def}}
\similarsubpointequation{e+d=f\label{edf}}
\end{subpoint}
$$1\div 2=0.5$$
\similarequation{1\div 2=\frac{1}{2}\label{simequation}}
\begin{subpoint}
Tschuss
\subpointequation{g+h=i}
\end{subpoint}
$$d+e=f$$ is equation number \eqref{def}

$$1\div 2=\frac{1}{2}$$ is equation number \eqref{simequation}

$$e+d=f$$ is equation number \eqref{edf}
\end{document}

-
My other things are all numbered as equations, and I cannot do \numberwithin{equations}{equations}... – hyh Mar 8 '13 at 7:10

I've seen something like this in Dieudonné's "Treatise on Analysis" book series.

\documentclass[leqno]{book}
\usepackage{amsmath,amsthm,etoolbox}
\newtheoremstyle{dieudonne}
{}         % Space above, empty = usual value'
{}         % Space below
{\itshape} % Body font
{}         % Indent amount (empty = no indent, \parindent = para indent)
{}         % Punctuation after thm head
{ }        % Space after thm head: " " = normal interword space;
{(\thmnumber{#2})\thmnote{ -- (#3)}}% Thm head spec
\theoremstyle{dieudonne}
\newtheorem{thminn}[equation]{}
\newenvironment{thm}[1][]
{\endsubequations\endthminn}

\patchcmd{\subequations}{\alph{equation}}{.\arabic{equation}}{}{}
\numberwithin{equation}{section}

\makeatletter
\renewcommand\maketag@@@[1]{\hbox{\m@th\normalfont\bfseries#1}}

\begin{document}
\mainmatter
\chapter{First}
\section{A}
First, a theorem without equations.

\begin{thm}
Nothing.
\end{thm}

Now a theorem with an equation.

\begin{thm}
What's this?
$$a=b$$
\end{thm}

Here is an equation
$$1=1$$
with some text after it.

\begin{thm}[Mine]
Whose is this?
$$a\ne b$$
\end{thm}

\section{B}

Another theorem.

\begin{thm}
Something.
\end{thm}

\end{document}
`

-