3

I'm trying to make an array of equations where some of them are marked with right braces. For the right braces I have used the rcases command from the solution offered at: https://tex.stackexchange.com/a/47563/131192. I want the equations to be aligned at the equal sign, but I can't manage to do so. Here is an example of what I'm trying to do, but it doesn't give me good results:

\documentclass{article}
\usepackage{amsmath}

\newenvironment{rcases}
  {\left.\begin{aligned}}
  {\end{aligned}\right\rbrace}

\begin{document}

\begin{align*}
&\begin{rcases}
    a &= b + c \\
    d &= e + f + g \\
    h &= i + j + k + l
\end{rcases}
\text{ three equations}\\
&\begin{rcases}
    \implies m &= n \\
    o &= p*q
\end{rcases}
\text{another two equations}
\end{align*}

\end{document}

aligning eqns

Thanks for any help!

1
  • BTW, mathtools already has an ' rcases' environment with a slightly different definition. Apr 21, 2017 at 14:56

2 Answers 2

3

This falls into the general category of aligning things in different (aligned) environments. One solution is to use \hphantom to compensate for the differences. The other is to put them all into one environment and try to align the right braces to the corresponding text using (for example) \vphantom.

\documentclass{article}
\usepackage{amsmath}

\newenvironment{rcases}
  {\left.\begin{aligned}}
  {\end{aligned}\right\rbrace}

\begin{document}

This uses \verb$\hphantom$.
\begin{align*}
&\begin{rcases}
    \hphantom{\implies m}\llap{$a$} &= b + c \\
    d &= e + f + g \\
    h &= i + j + k + l
\end{rcases}
\text{ three equations}\\
&\begin{rcases}
    \implies m &= n \\
    o &= p*q
\end{rcases}
\text{another two equations}.
\end{align*}

This uses \verb$\vphantom$
\begin{equation*}
\begin{aligned}
    a &= b + c \\
    d &= e + f + g \\
    h &= i + j + k + l\\
    \implies m &= n \\
    o &= p*q
\end{aligned}
\begin{aligned}
&\left.\vphantom{\begin{aligned}
    a &= b + c \\
    d &= e + f + g \\
    h &= i + j + k + l
  \end{aligned}}\right\rbrace\quad\text{three equations}\\
&\left.\vphantom{\begin{aligned}
    \implies m &= n \\
    o &= p*q
  \end{aligned}}\right\rbrace\quad\text{another two equations}
\end{aligned}
\end{equation*}

\end{document}

demo

1
  • Thank you, I tried to use \phantom earlier but with no success. This is great.
    – tex_newbee
    Apr 21, 2017 at 17:41
1

Like this:

enter image description here

or this (with simpler code)

enter image description here

The first case:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{align*}
&\
   \left.\begin{aligned}
     a & = b + c \\
     d & = e + f + g \\
     h & = i + j + k + l
\end{aligned}\right\}       \text{ three equations}   \\
\raisebox{1.75ex}{$\implies$}
&
    \left.\begin{aligned}
    m & = n \\
    o & = p*q
    \end{aligned}\right\}   \text{another two equations}
\end{align*}
\end{document}

The second case:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{align*}
\begin{align*}
&\
   \left.\begin{aligned}
     a & = b + c \\
     d & = e + f + g \\
     h & = i + j + k + l
\end{aligned}\right\}       \text{ three equations}   \\
\implies
&
    \left.\begin{aligned}
    m & = n \\
    o & = p*q
    \end{aligned}\right\}   \text{another two equations}
\end{align*} 
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .