I have a question concerning how to add a curly brace at the right side of three lines in an align-environment. The following is an example of what I'm speaking about:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amsthm, amsfonts,amssymb, enumerate}
\begin{document}
\begin{align}
&\rlap{\textbf{Optimization model}}
\nonumber \\
& && z=\sum_{i\in I} x_i\cdot y_i \cdot z_i \rightarrow \max
\nonumber \\
&\text{s.t.} && x_i \le b_i,
& i\in I, \\
& && x_i \le y_i,
& i \in I, \\
& && y_i \le z_i,
& i\in I, \\
& && z_i \le x_i,
& i\in I, \\
& && x_i, y_i, z_i \in \mathbb{R}_{+},
& i\in I.
\end{align}
\end{document}
There are five lines of constraints (after the "s.t."). I would like to make a curly brace over the first parts of the second, third and fourth line (i.e. over x_i \le y_i, y_i \le z_i and z_i \le x_i) and write a single "i \in I" in the right of this brace. I hope it was possible to understand it.
Can you please tell my how to achieve this? (The general style of this align-environment should not be changed.)
PS: Here is a picture of how it should look like:
Best Answer
With help of
mathtools
package you can usercases
environment.:Hope that this is what you like to achieve.
Edit: Better alignment is achieved if you instead of
\!\
! you use\negthickspace
. It is approximately\mkern-5mu
as suggest Bernard in his answer. The picture is replaced with new, where this\negthickspace
is used. Use ofalignat
instead of align is probably more correct selection, but final result is the same.