I tried to solve the follwing problem for a while but couldn't find a solution yet. I would like to align two \rbraces vertically. This code

  L = &\left. \text{short eq} \right\rbrace &&\text{description 1} \\
      &\left. \begin{aligned}
                \text{very long equation}\\
                \text{over multiple lines}
       \right\rbrace &&\text{description 2}


enter image description here

However, I would like to adjust the braces that they are below each other

enter image description here

I hope someone can help me here. Thank you!

  • 1
    Welcome to TeX.SE!
    – Mico
    Feb 28 '19 at 18:12

Something like this?

enter image description here

\usepackage{amsmath} % for 'align' environment and '\text' macro
\newlength\mylen     % create a "length" variable
\settowidth\mylen{very long equation} % calculate default width of '\mybox'
\newcommand\mybox[2][\mylen]{\parbox{#1}{\raggedright #2}}

L = &\left.\mybox{short eq}\right\rbrace &&
     \text{description 1} \\
    &\left.\mybox{very long equation over multiple lines}\right\rbrace &&
     \text{description 2}
  • Thank you, this looks already a lot better! Is it also possible to have a similar style of the braces? So far, the larger one is wider than the smaller one.
    – jani
    Feb 28 '19 at 18:28
  • @jani - The \right\rbrace is designed to increase in size both vertically and horizontally as the material to its left "grows". You have two cases of \right\rbrace: In the first, the material to the left occupies only one row, but in the second the material is two rows tall. The only sane way to make the two curly braces equally wide is to make them equally tall as well. (Well, one could "squish" a two-row curly brace into the height of just a "normal-height" curly brace, but the result would be even worse!) Do ask yourself: Do you really need those ugly curly braces to begin with?
    – Mico
    Feb 28 '19 at 20:28
  • The reason why they have different width is clear. I just thought there might be another way to define them. I agree that the curly braces are far from looking perfect but I need them for a better understanding in this case. Thanks again!
    – jani
    Mar 1 '19 at 7:08

How about something like this?


 L = & \text{short eq } && \left. \text{ }  \right\rbrace  && \qquad \text{description 1} \\
         &\text{22244 very long equation 5555}\\
         &\text{over multiple lines }
      \end{aligned} && \left. 
           \text{ }\\
           \text{ }
      \end{aligned}  \right\rbrace && \qquad \text{description 2}


It looks like this enter image description here

All the lines are treated as one equation. I borrowed the idea from the following post.

vertical alignment of multiline equations

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.