# Alignment in cases with text outside the cases

How can we align text in nested cases within all cases?

\documentclass[12pt,a4paper]{article}
\usepackage[fleqn]{amsmath}

\begin{document}

\begin{align}
\begin{cases}
Equation 1 = 0 &\text{Align this 1} \\
\begin{cases}
Equation 2 = 0, &\text{ Align this 2 } \\
Equation 3 = 0, &\text{ Align this 3 } \\
\end{cases}\\
Equation 4 = 0, &\text{ Align this 4}
\end{cases}
\end{align}
\end{document}


This produces a "local" alignment within each case, but doesn't align through both cases, which I would like.

• Welcome to TeX.SE! – Mico Sep 29 '18 at 8:57

Something like this?

\documentclass[12pt,a4paper]{article}
\usepackage[fleqn]{amsmath} % for 'cases' environment

\begin{document}
$$\begin{cases} Equation 1 = 0 & \text{Align this 1 } \\ \left\{ \begin{array}{@{} l @{}} Equation2 = 0 \\ Equation3 = 0 \end{array} \right. & \begin{array}{@{}l} \text{Align this 2 } \\ \text{Align this 3 } \end{array} \\ Equation 4 = 0, & \text{Align this 4 } \end{cases}$$
\end{document}


A slightly different alignment with empheq and blkarray:

\documentclass[12pt,a4paper]{article}
\usepackage[fleqn]{empheq}
\usepackage{blkarray}

\begin{document}

\begin{empheq}[left=\empheqlbrace]{equation}
\raisebox{0pt}[\height][4ex]{ \begin{blockarray}{>{$}l<{$}l}
Equation 1 = 0 & Align this 1 \\
\begin{block}{\{>{$}l<{$}l}
Equation 2 = 0, & Align this 2 \\
Equation 3 = 0, & Align this 3 \\
\end{block}
Equation 4 = 0, & Align this 4
\end{blockarray}}
\end{empheq}

\end{document}