My question is quite similar to a previous question on inserting a right brace around a set of equations. However, I do not wish to wrap the brace around the entire aligned environment yet I would like to maintain the same alignment throughout.

I would like to avoid a tikz-based solution if possible.

Any help would be appreciated.

Edit: This example demonstrates that I lose the alignment I would like once I attempt to span some of the equations with a right brace.

\begin{frame} \frametitle{An ILP Approach}
A 0-1 model:
  \mathrm{maximize} \quad & \sum_{e \in E} w_e y_e  \\
  \text{subject to} & \\
  x_{il} + x_{jl} + y_e &\leq 2 \\
  x_{il} - x_{jl} &\leq  y_e  \\
  x_{jl} - x_{il} &\leq  y_e  \\
\end{aligned}\right\} \text{for} e \in E, l \in [k]\\
  \sum_{l \in [k]} x_{il} & = 1 & i \in V \\
  x_{ul}&\in \{0,1\} &\quad \forall u \in V, l \in [k] \\
  y_e &\in \{0,1\} &e \in E

  • 3
    Could you post a small compilable example of what you've tried?
    – Bernard
    Jun 15, 2020 at 20:57
  • You wrote, "I do not wish to wrap the brace around the entire aligned environment yet I would like to maintain the same alignment throughout." This isn't easy to parse. Please provide more information about what it is you do want to achieve.
    – Mico
    Jun 15, 2020 at 21:29
  • Hope my MWE does a better job of explaining my problem :-).
    – healyp
    Jun 15, 2020 at 21:40
  • How the part with the right brace should be aligned is still not clear to me. Could you post a sketch of what you'd like to have?
    – Bernard
    Jun 15, 2020 at 21:57
  • Imagine the \left.\begin{aligned} and \end{aligned}\right\} \text{for} e \in E, l \in [k] lines were commented out. I then wanted to plant a \rbrace that spanned the three \leq inequalities. Thanks for your patience.
    – healyp
    Jun 16, 2020 at 6:54

1 Answer 1


Edit: It seems that you looking for the following (showed is only last slide):

enter image description here

B/.style = {decorate,
            decoration={calligraphic brace, amplitude=4pt,
            pen colour=black}

\frametitle{An ILP Approach}
A 0-1 model:
  \mathrm{maximize} \quad & \sum\limits_{e \in E} w_e y_e\\[2ex] 
  \text{subject to} \quad &         \\
  x_{il} + x_{jl} + y_e &\leq \tikzmarknode{A}{2}     \\
  x_{il} - x_{jl}       &\leq  y_e  \\
  x_{jl} - x_{il}       &\leq  \tikzmarknode{B}{y_e}  \\[2ex] 
\sum\limits_{l \in [k]} x_{il} & = 1  \text{ for } i \in V  \\
                x_{ul}  & \in \{0,1\}, \quad \forall u \in V, l \in [k] \\
                y_e     & \in \{0,1\}, \quad  e \in E
\begin{tikzpicture}[overlay, remember picture]
\draw[B]   (A.north -| B.east) --
    node[right=3mm] {$e \in E, l \in [k]$}
           (B.south east);

Note: in comparison to your MWE observe that now the aligned environment is removed, right curly braces is drawn by help of tikz package and its library tikzmark and in MWE is only one ampersand per row. Hopeful they are now correct positioning (before math symbols to which you like to have aligned your equations). Also instead of onslide is used \uncover macro.

Showed result appear after two compilation.

  • This was what I wanted to avoid: the alignment of the relational symbols \leq, = and \in is lost once the inner aligned environment is introduced.
    – healyp
    Jun 16, 2020 at 10:04
  • @healyp, this is not clear from your question. See edited answer, if now it is as you like to have.
    – Zarko
    Jun 16, 2020 at 10:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .