# subequations: How to continue numbering within subequation?

Let's assume we want to create one subequation including four aligned single equations. The first two single equations should be numbered as 1a and 1b while the third and fourth one should continue the numbering of the previous one, but with new equation number as 2a and 2b.

Minimum Working Example (MWE):

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{subequations}
\begin{align}
1   &=  1\\
2   &=  2\\
3   &=  3\\% from here a new equation number should begin
4   &=  4
\end{align}
\end{subequations}
\end{document}


Screenshot of the result: Questions:

1. How can I automatically continue numbering of the previous equation numbers without cheating around by manually assigning numbers/tags?
2. Would it be possible to increase the vertical space between the equation 1-pair and the equation 2-pair?
• I have removed my answer :-). – Sebastiano Apr 1 '19 at 12:21
• Should (2)s and (1)s be aligned? I don't think they should. – user156344 Apr 1 '19 at 12:22
• Split into two subequations. – ferahfeza Apr 1 '19 at 12:23
• @Sebastiano: I am very sorry for this! :-( But thank you very much for your efforts! – Dave Apr 1 '19 at 12:23
• I think it's a duplicate. Does tex.stackexchange.com/a/445115/4427 help? – egreg Apr 1 '19 at 12:26

I could not find the duplicate, so here is my attempt:

\documentclass{article}
\usepackage{amsmath}
\newcommand\StepSubequations{
\stepcounter{parentequation}
\gdef\theparentequation{\arabic{parentequation}}
\setcounter{equation}{0}
}
\begin{document}
\begin{subequations}
\begin{align}
1   &=  1\\
2   &=  2\\
\StepSubequations
3   &=  3\\% from here a new equation number should begin
4   &=  4
\end{align}
\end{subequations}

\begin{equation}
\label{eq:1}
a=b
\end{equation}

\end{document}

• Approved your code. :-) – Sebastiano Apr 1 '19 at 12:29
• Note that in egregs duplicated answer, \xdef is used, where I here use \gdef, so look out for differences. – daleif Apr 1 '19 at 12:33
• @daleif: I think there is some little issue when using \documentclass{scrbook}: In scrbook all equation numbers will follow the format chapternumber.equationnumber, but your example does not include the chapternumber before equationnumber. Is there an option to fix that? – Dave Apr 1 '19 at 14:27
• @Dave see if you can guess what to change in the definition of \StepSubequations, it is not that hard. Hint, you may want to add \thechapter somewhere. – daleif Apr 1 '19 at 14:39
• @daleif: Unfortunately I don't get it. :-( I am very sorry for my bad coding skills. Maybe you can have a look at this one here: tex.stackexchange.com/questions/482595/… – Dave Apr 1 '19 at 14:46