0

Why there is no space between the text ("Min/Max", "Subject to") and fm(x) and hk(x). What's wrong?

\begin{equation}
\left.
\begin{aligned}
\text{Min/Max}          & f_m (x),                              & m=1,2,...,M; \\
\text{Subject to}       & h_k (x) \geq 0,                       & k=1,2,...,K; \\
                        & g_j (x)=0,                            & j=1,2,...,J; \\
                        & x_i^{(L)} \leq x_i \leq x_i^{(U)},    & i=1,2,...,n.
\end{aligned}
 \right\}
 \qquad 
\end{equation}

enter image description here

Ed.:

Thanks for recommendations. How it should be:

\begin{equation}
\left.
\begin{aligned}
&\text{Min/Max}             && f_m (x),                             & m=1,2,...,M; \\
&\text{Subject to}      && h_k (x) \geq 0,                      & k=1,2,...,K; \\
                        &&& g_j (x)=0,                          & j=1,2,...,J; \\
                        &&& x_i^{(L)} \leq x_i \leq x_i^{(U)},  & i=1,2,...,n.
\end{aligned}
 \right\}
 \qquad 
\end{equation}

enter image description here

  • Because TeX adds no space between ordinary symbols in math mode. – egreg Jul 22 at 12:03
  • So why "&" doesn't work? – vladpopovcev Jul 22 at 12:29
  • It works as expected. Use \text{Subject to } and \text{Min/Max }. – egreg Jul 22 at 12:30
  • Because you should have 3 & for two alignment points. – Bernard Jul 22 at 12:30
  • There are three alignment points, so 3x2 - 1 & per line. You're missing the extra on on the right – daleif Jul 22 at 12:45
2

I propose this simple code, and a slightly different alignment, with empheq and alignedat:

\documentclass{article}

\usepackage{empheq}
\DeclareMathOperator{\MinMax}{Min/Max}

    \begin{document}
\begin{empheq}[right=\enspace\empheqrbrace]{equation}
\begin{alignedat}{2}
\MinMax f_m (x)&, &\enspace & m=1,2,...,M; \\[1ex]
\text{Subject to}& & & h_k (x) \geq 0, \enspace k=1,2,...,K; \\
                         & & & g_j (x)=0, \enspace j=1,2,...,J; \\
                         & & & x_i^{(L)} \leq x_i \leq x_i^{(U)}, \enspace i=1,2,...,n.
\end{alignedat}
\end{empheq}

\end{document} 

enter image description here

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.