答案1
以下是使用\mathmakebox
该mathtools
包的解决方案:
\documentclass{article}
\usepackage{mathtools}% loads `amsmath'
\DeclareMathOperator*{\Max}{Max}
\begin{document}
A solution with \verb|\mathmakebox|:
\begin{alignat}{2}
\Max_t & \quad & F(t) = at, \\
\text{subject to} & & \mathmakebox[\widthof{$F(t) = at,$}][c]{t \le b,} \\
& & \mathmakebox[\widthof{$F(t) = at,$}][c]{t \ge 0.}
\end{alignat}
\end{document}
答案2
以下是 和alignat
的 两种可能性eqparbox
:
\documentclass{article}
\usepackage{mathtools}
\usepackage{eqparbox}
\newcommand{\eqmathbox}[2][M]{\eqmakebox[#1]{$\displaystyle#2$}}
\begin{document}
\begin{alignat}{2}
\max_t & &\quad & \eqmathbox{F(t) = at}\\
\text{subject to}& &
& \eqmathbox{\begin{gathered}[t]
t\le b, \\t\ge 0.
\end{gathered}}
\end{alignat}
\begin{alignat}{2}
\max_t & &\quad & \eqmathbox{F(t) = at}\\
\text{subject to}& &
& \eqmathbox{t \le b,} \\
& & & \eqmathbox{t \ge 0.}
\end{alignat}
\end{document}