How to align equations when some inside are gathered

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?

-
Replace gather* with aligned. Remark: NO *. –  zeroth Apr 24 '12 at 12:48
possible duplicate [how-do-i-put-a-side-brace-around-several-lines-in-the-align-environment/](http:‌​//tex.stackexchange.com/questions/51847/how-do-i-put-a-side-brace-around-several-‌​lines-in-the-align-environment/51852#51852) –  cmhughes Apr 24 '12 at 12:53
@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

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}


-
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