# How to align multiple rows after right brace

I want my text, which I wrote after right brace, to be aligned right next to the brace. But they keep going far right and align with the longest line's end, vertically.

  \begin{align*}
\left.
\begin{aligned}
x=ab\\
y=ab\\
z=ab\\
\end{aligned}
\right\}
\begin{aligned}
something in 1st row\\
something in 2nd row which is super long and causes some\\
something in 3rd row\\
something in 4th row\\
something in 5th row
\end{aligned}
\end{align*}


Welcome to TeX.SE!

You need to insert ampersands before text in the second aligned (and also before equal signs in the first one, if you like to have expression there aligned at them) :

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
\left.
\begin{aligned}
x & =ab\\
y & =ab\\
z & =ab\\
\end{aligned}
\right\}
\begin{aligned}
&   something in 1st row\\
&   something in 2nd row which is super long and causes some\\
&   something in 3rd row\\
&   something in 4th row\\
&   something in 5th row
\end{aligned}
\end{align*}

\end{document}


• Thanks so much. I was pretty sure missing something essential and fairly easy (not that experienced in Latex as you can see). Appreciated for the effort. – nope May 22 '20 at 18:45
• @nope, you are welcome! with time your (La)TeX skills will improve! Happy (La)TeXing! – Zarko May 22 '20 at 18:50