2

I have a list of equations in the array or align environment. My goal is to wrap a number of them with a right bracket and have an expression to the right of the bracket, and preserve the equation number on the right side of the page. Yow can see an example below. My current issues are:

  1. I cannot control the alignment of the equations with the bracket. I would like these equations to begin at the same point.

  2. The numbering of the equations with the bracket is lost.

Here is how I want my equations to look:

enter image description here

\begin{alignat}{3}
\text{min}  \quad z   & & \text{[Optimization Problem]}\nonumber \\ 
&\text{s.t. }  \\
& f_a(x)=1 & \forall a \in A\\
&\left .
\begin{array}{cc}
&f_b(x)=1+2+3\\
&g_b(x)=1\\
\end{array}
\right \}&\forall b\in B
\end{alignat}
  • Welcome to TeX.SE! Can you show with some hand written equation, how you like to have aligned your equations? – Zarko Nov 24 '16 at 21:10
  • Your code shows a right bracket. – Bernard Nov 24 '16 at 21:29
  • Thank you, I have been reading for a while but have not had the need to ask or the knowledge to answer until now. I updated a picture of how I would like my equations to look like. – Septimus G Nov 24 '16 at 21:33
  • You might see if any of the solutions to this question can be adapted to a right bracket (the cases environment is similar to yours but with a left bracket). – Emma Nov 24 '16 at 22:17
3

I made a solution where the brace is done with the bigdelim package. Therefore I need to put the top equation of the braced set to be in an array.

\usepackage{bigdelim}

\begin{alignat}{2}
\text{min}  \quad z   & & & \text{[Optimization Problem]}\nonumber \\ 
&\text{s.t. }  \nonumber \\
& f_a(x)=1 & & \forall a \in A \\
& 
\begin{array}{@{}lc}
f_b(x)=1+2+3 & \rdelim\}{2}{2mm}\\
\end{array} & \\
& g_b(x)=1
 & & \raisebox{.5\baselineskip}[0pt]{$\forall b\in B$}  
\end{alignat}

enter image description here

  • I am having trouble running this solutions. It returns the error undefined control sequence. I made sure I added \usepackage{bigdelim}, but it does not work. – Septimus G Nov 25 '16 at 18:33
2

You can move the bracket and domain for the lower two equations into position:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{alignat}{3}
  \text{min $z$} & \qquad\rlap{[Optimization Problem]} \nonumber \\ 
  \text{s.t.} \quad
  f_a(x) &= 1 & \forall a \in A \\
  f_b(x) &= 1 + 2 + 3
    \raisebox{-.5\baselineskip}[0pt][0pt]{$
    \left.\kern-\nulldelimiterspace
    \begin{array}{ @{} c } \mathstrut \\ \mathstrut \end{array}
    \right\}
    $} \\
  g_b(x) &= 1 &
    \hspace{4em} % To move content left/right
    \raisebox{.5\baselineskip}[0pt][0pt]{$
       \forall b \in B
    $}
\end{alignat}

\end{document}
  • Thank you! I have a couple of questions: How can I extend the bracket so that it covers more equations? Also, if one of the equations is longer, e.g. f_b(x)=1+2+3+4+5, it overlaps with the brackets. How can I prevent this from happening? – Septimus G Nov 24 '16 at 21:56
  • @SeptimusG: I keep the brace and domain around the middle of the construction and move it just up/down in the same manner as I did above. You'll use more \mathstruts if there are more equations to cover. I use two because you're bracing two equations. – Werner Nov 24 '16 at 22:22
0

I propose this, based on alignat and rcases from  `mathtools:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}%

 \begin{document}

\begin{alignat}{2}
  \min z & & & \tag*{\small[Optimization Problem]} \\
  \text{s.t. }\raisebox{0pt}[0pt][0pt]{\rule[-2.5\baselineskip]{0.5pt}{3\baselineskip}}\; & f_a(x)=1 & & ∀ a ∈ A \\
  & \negmedspace \begin{rcases}f_b(x)=1+2+3\\[2.5pt]%
  g_b(x)=1
  \end{rcases}
  &\quad & ∀ b ∈ B
\end{alignat}

\end{document} 

enter image description here

  • This is quite nice but it does not number the equations in the bracket separately. – Septimus G Nov 24 '16 at 22:43
  • Oh! I didn't notice this point. Do you want them to be numbered (2) (3) or (2a) (2b)? – Bernard Nov 24 '16 at 22:49
  • Either way is fine :) – Septimus G Nov 24 '16 at 22:53

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.