# Equation tags with subequations

Consider the following MWE:

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\begin{align}
\label{system}
&\left\{
\begin{aligned}
30^{2} &= h_{C}^{2} + y^{2};\\
40^{2} &= h_{C}^{2} + (50 - y)^{2};
\end{aligned}
\right.\\
\ArrowBetweenLines[\Downarrow]
&\left\{
\begin{aligned}
h_{C}^{2} &= 30^{2} - y^{2};\\
h_{C}^{2} &= 40^{2} - (50 - y)^{2}.
\end{aligned}
\right.
\end{align}

\end{document}


I have two problems that I don't know how to solve:

• The equation tags are obviously not placed properly.
• I would like to label all four equation using the subequation environment in order to get "(1a)", "(1b)", "(1c)", and "(1d)".

• I think using alignat already introduces a shift in numbering. – Raaja Dec 25 '18 at 15:35
• @Raaja Okay. If you figure out how to typeset it properly, please let me know. – Svend Tveskæg Dec 25 '18 at 15:37
• Yep I shall do! – Raaja Dec 25 '18 at 16:02

May be as a first try with my so-called null hack (of course not beautiful ;)), you can achieve what you want within a subequation environment by overloading the empheq package (of course along with the amsmath package).

\documentclass[10pt,a4paper]{article}
\usepackage{mathtools}
\usepackage{amsmath}
\begin{document}
\begin{subequations}\label{e1}
\begin{align}[left ={\empheqlbrace}]
a = 1 &\label{e1a}\\
b = 1 &\label{e1b}\\
c = 1 &\label{e1c}
\end{align}
% the poor man's NULL hack :D
\null\\
\begin{align*}
&\ArrowBetweenLines[\Downarrow]
\end{align*}
\begin{align}[left ={\empheqlbrace}]
d = 1 &\label{e1d}\\
e = 1 &\label{e1e}\\
f = 1 &\label{e1f}
\end{align}
\end{subequations}

\end{document}


which can give you with

• Nice first try. :-) The spacing between the two blocks of equations is too lange. Also, the \ArrowBetweenLines[\Downarrow] isn't moved enough to the left, relative to the equations blocks and the braces. – Svend Tveskæg Dec 25 '18 at 15:04
• @SvendTveskæg I will look into that :) – Raaja Dec 25 '18 at 15:14
• @SvendTveskæg Would a tikz based solution work for you? – Raaja Dec 25 '18 at 16:16
• No, thanks. I need a "pure" math environment solution. – Svend Tveskæg Dec 25 '18 at 16:22
\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{subequations}
\begin{align}[left = \empheqlbrace\,]
30^{2} &= h_{C}^{2} + y^{2};\\
40^{2} &= h_{C}^{2} + (50 - y)^{2};
\end{align}
\null\\[-5pt]
\begin{align*}
\\[-104pt]
&\phantom{sssssssssssssssssssssss}\ArrowBetweenLines[\Downarrow]
\\[-104pt]
\end{align*}
\null\\[-35pt]
\begin{align}[left = \empheqlbrace\,]
h_{C}^{2} &= 30^{2} - y^{2};\\
h_{C}^{2} &= 40^{2} - (50 - y)^{2}.
\end{align}
\end{subequations}

\end{document}


• Please do not post fragments of code but always a complete minimal compilable example (MWE) illustrating your solution. – TeXnician Dec 26 '18 at 8:58
• @TeXnician Hope now updated MWE is fine. – Saravanan Dec 26 '18 at 16:05