The user egreg has posted a nice approach on how to increase equation numbers within subequations
.
Minimum Working Example (MWE):
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\newcommand{\advanceparent}{%
\stepcounter{parentequation}%
\setcounter{equation}{0}%
\xdef\theparentequation{\arabic{parentequation}}%
}
\begin{document}
\begin{subequations}
\begin{alignat}{3}
\advanceparent
&& 1 & =1 &\quad & (\text{Example text}) \\
&& 2 & =2 & & (\text{Example text}) \\
\advanceparent
&& 3 & =3 & & (\text{Example text}) \\
&& 4 & =4 & & (\text{Example text})
\end{alignat}
\end{subequations}
\end{document}
Screenshot of the result:
Description of the issue:
As you can see in the screenshot, even the very first equation begins with no. 2 instead of no. 1. I have tried to repair this behavior, but I don't get the issue fixed.
How to fix the code so numbering will begin with no. 1 and does continue numbering order of the previous document?
\advanceparent
makes sense only in the middle ofsubequations
, not at the very beginning...\advanceparent
-part does not change the numbering scheme.\xdef
vs\gdef
issues @daleif meant in his answer to your previous question:-)