3

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*}

I need these rows to be aligned right next to the brace]

3

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}

enter image description here

  • 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
  • 1
    @nope, you are welcome! with time your (La)TeX skills will improve! Happy (La)TeXing! – Zarko May 22 '20 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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