1

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
1

Something like this?

enter image description here

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

\begin{document}
\begin{equation}
\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{equation}
\end{document}
1

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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.