[Tex/LaTex] Customise label in align environment

alignamsmathequationslabels

I'd like to slightly customise the label in the align environment. The need arises when I have two equations on the same line, and I would like to label them (1a,b) or similar. The example below works as expect when I use the equation environment, in that it labels the equations (1a,b) and (2a,b) which is what I want. However, if I replace the equation environment by the align environment my customisations have no effect. My customisations in equation environment are:

\renewcommand{\theequation}{\arabic{equation}a,b}

and

\renewcommand{\theequation}{\arabic{\theparentequation{a,b}} 

But these have no effect in align environment. What are their equivalents? Specifically, in the last example below, using align within the subequations environment, I'd like to label the equations (4a,b) and (4c,d) and (4e) where '4' is the automatically supplied equation number and 'a,b' and 'c,d' and 'e' are my manual additions. Here is the MWE:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\subsubsection*{Using equation}
\textit{Case 1:}  works as expected
\begin{equation}
\renewcommand{\theequation}{\arabic{equation}a,b}
a = b, \qquad b = c
\end{equation}
\textit{Case 2:} still works, but the alignment cannot be adjusted.
\begin{subequations}
\begin{equation}
\renewcommand{\theequation}{\theparentequation{a,b}}
a = b, \qquad b = c
\end{equation}
\begin{equation}
\renewcommand{\theequation}{\theparentequation{c,d}}
d = f = h, \qquad f = g     
\end{equation}
\end{subequations}

\subsubsection*{Using align}
The following cases do not work in the same way using the align environment. \\
\textit{Case 3:} This case is fine, but doesn't 
help as I could do the same thing with the equation environment. 
\begingroup
\renewcommand{\theequation}{\arabic{equation}a,b}
\begin{align}
a = b, \qquad b = c
\end{align}
\endgroup
\textit{Case 4:} Now here is the case that I want to work, but it does not. 
I would like it to label the three equations (4a,b), (4c,d) and (4e)
\begin{subequations}
\begingroup
\renewcommand{\theequation}{\theparentequation{a,b}}
\begin{align}
a = b, \qquad & b = c \\
\renewcommand{\theequation}{\theparentequation{c,d}}
d = f = h, \qquad & f = g \\
\renewcommand{\theequation}{\theparentequation{e}}
& g = h
\end{align}
\endgroup
\end{subequations}
\end{document}

Best Answer

I suggest to use subequations, together with a new command:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\newcommand{\subtag}[1]{\tag{\theparentequation#1}}

Here is first a single equation
\begin{subequations}
\begin{equation}
a = b, \qquad b = c \subtag{a,b}
\end{equation}
and then an alignment
\begin{gather}
\begin{align}
a &= b,     & b = c \subtag{c,d}\\
d &= f = h, & f = g \subtag{e,f}
\end{align}\\
g = h \subtag{g}
\end{gather}
\end{subequations}

\end{document}

enter image description here

Related Question