83

How can I get a brace on the right, not the left, to group cases, using cases? (I know actual cases look better with the brace on the left, but the items I need to group are not literally cases. They are a set of steps in an algorithm which I want to consider as an item.)

The following puts the brace on the left. All I need to do is to flip it to the right.

\begin{align}
\begin{cases}
a&=bbb\\
c&=ddddddd\\
e&=ffffffffff
\end{cases}
\end{align}

Thanks for any help with this!

David Carlisle
  • 757,742

3 Answers3

75

With the help of the aligned environment from amsmath, you can define your own environment:

\documentclass{article}
\usepackage{amsmath}

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

\begin{document}

\begin{equation*}
\begin{rcases}
  a &= b + c \\
  d &= e + f + g \\
  h &= i + j + k + l
\end{rcases}
\text{ three equations}
\end{equation*}

\end{document} 

enter image description here

gernot
  • 49,614
Gonzalo Medina
  • 505,128
  • 2
    Hi. What can I do to have the brace on the left instead? What changed should I make? Thanks. – Steeven Nov 11 '12 at 14:09
  • 3
    @Steeven in that case, you don't need anything special; you can use the cases environment from the amsmath package. – Gonzalo Medina Nov 13 '12 at 22:33
  • What if I wan to write a text in body. I have wrote a text in different font ($ \begin{rcases} ${\sffamily {to love}}$ \ \end{rcases}$ ) and compiler has written me 'Missing }'. Why and where? Thanks. – Ľubomír Masarovič Oct 04 '16 at 21:27
66

use package mathtools. There is also a drcases environment

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

\[
\begin{rcases*}
E = m c^2 & foo \\
\int x-3\, dx & barbaz
\end{rcases*} y=f(x)
\]

\end{document}
gernot
  • 49,614
23

Maybe something like this:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{equation}
  \left.\begin{aligned}
  a&=bbb\\
  c&=ddddddd\\
  e&=ffffff
\end{aligned}\right\} = stuff
\end{equation}
\end{document}

enter image description here

alhelal
  • 2,451