Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
add comment

3 Answers

up vote 13 down vote accepted

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}
share|improve this answer
    
Many thanks for this! Loading mathtools and changing cases to drcases works perfectly! –  Harry Macpherson Mar 10 '12 at 21:14
add comment

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

share|improve this answer
    
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
    
@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
add comment

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}
share|improve this answer
    
Did you read my answer? :-) –  Gonzalo Medina Mar 10 '12 at 21:26
    
@Gonzalo yes I did now, you were faster than I. I saw your solution after having formatted my answer. Sorry. –  Peter Breitfeld Mar 10 '12 at 21:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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