Z(p) = \begin{mini}|l|
{x}{c^T x}{}{}
\addConstraint{Ax}{\geq b}
\addConstraint{Dx}{\geq d}
\addConstraint{x}{\in \mathbb{Z}}
\end{mini}
我如何才能使 Z(p) 正确对齐?
答案1
通过使用mini!
和奥替卡夫包示例看起来这是正在寻求的结果:
\documentclass[12pt]{article}
\usepackage{optidef}
\begin{document}
\begin{mini!}|s|[2]<b>
{x}{c^T \, x}
{\label{eq:Example1}}
{Z(p) =}
\addConstraint{Ax}{\geq b}
\addConstraint{Dx}{\geq d}
\addConstraint{x}{\in \mathbb{Z}}
\end{mini!}
\end{document}
这使:
答案2
如果您想使用与 AMS 相关的结构(带或不带方程编号):
\documentclass{article}
\usepackage{amsmath,amsfonts}
\begin{document}
\[
Z(p) = \begin{aligned}[t]
\min_x~ & c^T x \\
\text{s.t.}~ & \begin{aligned}[t]
Ax &\geq b, \\
Dx &\geq d, \\
x &\in \mathbb{Z}
\end{aligned}
\end{aligned}
\]
\begin{subequations}
\begin{alignat}{2}
Z(p) ={}& \min_x \rlap{~$c^T x$} \\
& \text{s.t.} & Ax &\leq b, \\
& & Dx &\leq d, \\
& & x &\in \mathbb{Z}
\end{alignat}
\end{subequations}
\end{document}