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.

I have a set of equations where some are coupled with a brace and some text. I want all the equations aligned. Something like the following ASCII art:

 S = LR

 L = Ls  \
          |  for s in {a, b}
Rs = sR  /

I tried this:

\begin{align*}
S &= LR \\
\left.
\begin{gather*}
L &= L_s\\
R_s &= sR
\end{gather*}
\;\;\right\}\;\;\text{for } s \in \{a, b\}\\
\end{align*}

But it doesn't compile (because & is not expected inside a gather* environment). Is it possible to do this?

share|improve this question
    
Replace gather* with aligned. Remark: NO *. –  zeroth Apr 24 '12 at 12:48
    
    
@zeroth: if I do that, the equations outside the aligned don't align with the ones inside. –  Max Apr 25 '12 at 8:44
    
@cmhughes: thanks, I'll take a look at that –  Max Apr 25 '12 at 8:45
    
@Max, yes that is correct, sorry for my misguiding. –  zeroth Apr 25 '12 at 8:56

1 Answer 1

up vote 10 down vote accepted

A simple way would be:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
S &= LR \\
\begin{split}
L &= L_s\\
R_s &= sR
\end{split}\quad\Bigg\}\,\,\text{for } s \in \{a, b\}
\end{align*}

\end{document}

enter image description here

share|improve this answer
    
The only thing I'd change is to use \bigg instead of \Bigg. Of course, that's entirely subjective. :-) –  Mico Apr 24 '12 at 13:39
    
In my actual document, there are more than two equations inside the brace, so \Bigg is not big enough. I guess I have to mess around with vphantoms and the like to get bigger? –  Max Apr 25 '12 at 8:43
    
@Max: you can then use stretchable delimiters and a rule with no width and desired height: \begin{align*} S &= LR \\begin{split} L &= L_s\R_s &= sR\T_s &= sT \end{split} \quad\left.\rule{0pt}{1.5\baselineskip}\right\rbrace\,\,\text{for } s \in \{a, b\} \end{align*} (sorry about the poor code formatting, but comments are not the best place to write code). –  Gonzalo Medina Apr 25 '12 at 13:35
    
Is there any way where the size of the brace is automatically calculated? –  Wauzl Apr 29 at 18:49

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.