# Special subnumbering for equation

I would like to display two seperate equations with the same generated number and then the letter 'a' added to the first and the letter 'b' to the second.

Some text.
x=y                       (2a)
Some text.
y=z                       (2b)
Some text.


Then, later on, I will have to reference (2a) and (2b).

• Also, the amsmath package provides \intertext for placing text between adjacent equations. – Steven B. Segletes May 16 '16 at 11:54

The amsmath package provides the subequations environment exactly for that purpose. Just enclosed the whole block in \begin{subequations} ... \end{subequations}. See section 3.11.3 of the documentation for more details.

• This works perfectly. – Gerard May 16 '16 at 13:38

A combination of subequations and \intertext, employed in the right combination.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent some text
\begin{subequations}
\begin{gather}
x = y\\
\intertext{some text}
x = y
\end{gather}
\end{subequations}
some text
\end{document}


If the intertext is very short, one can compress the vertical space by using the \shortintertext macro from the mathtools package:

\documentclass{article}
\usepackage{amsmath,mathtools}
\begin{document}
\noindent some text
\begin{subequations}
\begin{gather}
x = y\\
\shortintertext{some text}
x = y
\end{gather}
\end{subequations}
some text
\end{document}


• Great answer, I will use it in the future. For now, I will user the other answer. – Gerard May 16 '16 at 13:39