答案1
这里有一种方法,通过将两个半部分设置为array
。选择 15pt 堆叠间隙是为了将“Subject to”文本垂直匹配到“ c_1(x)
”等式。
\documentclass{article}
\usepackage{amsmath,amssymb,stackengine}
\setstackEOL{?}
\setstackgap{L}{15pt}
\begin{document}
The optimization problem is\bigskip
\[\begin{array}{cc}
\Longunderstack{Minimize? $x\in\mathbb{R}^5$? Subject to} &
\begin{aligned}[t]
f(x) &= -0.043x_1 ...\\
& \\
c_1(x) &= x_1...\\
c_2(x) &= -x_2...\\
c_3(x) &= 0.6 x_1...\\
c_4(x) &= 4 x_1...
\end{aligned}
\end{array}
\]
More text goes here
\end{document}
或者,人们可以抛弃array
环境,而是手动粘贴两列之间的间隙(此处使用 完成\quad
):
\documentclass{article}
\usepackage{amsmath,amssymb,stackengine}
\setstackEOL{?}
\setstackgap{L}{15pt}
\begin{document}
The optimization problem is\bigskip
\[
\Longunderstack{Minimize? $x\in\mathbb{R}^5$? Subject to} \quad
\begin{aligned}[t]
f(x) &= -0.043x_1 ...\\
& \\
c_1(x) &= x_1...\\
c_2(x) &= -x_2...\\
c_3(x) &= 0.6 x_1...\\
c_4(x) &= 4 x_1...
\end{aligned}
\]
More text goes here
\end{document}
答案2
使用 justalign
和\underset
:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\begin{document}
\noindent
The optimization problem is
\begin{align*}
\underset{\textstyle x \in \mathbb{R}^5}{\text{Minimize\strut}} \quad
& f(x) = -0.043x_1 - 0.027x_2 - 0.025x_3 - 0.022x_4 - 0.045x_5 \\
\text{Subject to} \quad
& \begin{aligned}[t]
c_1(x) &= x_1 + x_2 + x_3 + x_4 + x_5 - 10 \le 0 \,, \\
c_2(x) &= -x_2 - x_3 - x_4 + 0.4 \le 0 \,, \\
c_3(x) &= 0.6 x_1 + 0.6x_2 - 0.4x_3 - 0.4x_4 + 3.6x_5 \le 0 \,, \\
c_4(x) &= 4 x_1 + 10x_2 -x_3 -2x_4 -3x_5 \le 0 \,.
\end{aligned}
\end{align*}
\end{document}
由于该词没有下降部分,因此\strut
使用the来提供深度。\text{Minimize\strut}
答案3
另一种可能性是使用alignat*
表格环境:
\documentclass{article}
\usepackage{mathtools,amssymb}
\usepackage{eqparbox}
\begin{document}
The optimization problem is\bigskip
\begin{alignat*}{2}
& \eqmakebox[S][l]{Minimise} & \qquad & f(\mathbf{x})= -0.043x₁ ... \\[-1ex]
& \eqmakebox[S]{$ \mathbf x ∈ \mathbb{R}⁵ $} \\[0.5ex]
& \eqmakebox[S][l]{Subject to} &\MoveEqLeft[0.6]
\mathrlap{ \begin{array}[t]{|@{\,}l}
\begin{aligned}[t]
c₁(x) &= x₁...\\
c₂(x) &= -x₂...\\
c₃(x) &= 0.6 x₁...\\
c₄(x) &= 4 x₁...
\end{aligned}
\end{array}}
\end{alignat*}
\end{document}