如何将双箭头水平移动到右侧?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{p{5cm}p{5cm}}
{\begin{align}
\underset{u(t), \eta(t), r}{\text{min}}&\quad\int_{0}^{t_f}y^Ty dt\nonumber\\
\text{s.t:}&\quad \int_{0}^{t_f} u^Tu\leq f_{1,k}\nonumber\\
&\quad\eta(0)=(-1,-1,0,0,0,0)\nonumber\\
&\quad\frac{d\eta}{dt}=A\eta+Bu\nonumber\\
&\quad t_f = 10\nonumber\\
\raisebox{29ex}[10pt][10ex]{$\boldsymbol{\Longrightarrow}$}\nonumber
\end{align}}
&
{\begin{align}
\underset{u(t), \eta(t), r}{\text{min}}&\quad z_2(t_f)\nonumber\\
\text{s.t:}&\quad z_1(t_f)-\phi\leq0\nonumber\\
&\quad z(0)=0\nonumber\\
&\quad\frac{d\eta}{dt}=A\eta+Bu\nonumber\\
&\quad t_f = 10\nonumber
\end{align}}
\end{tabular}
\end{document}
答案1
您的原始显示位于顶部,而我建议的更改位于底部:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{p{5cm}p{5cm}}
{\begin{align}
\underset{u(t), \eta(t), r}{\text{min}}&\quad\int_{0}^{t_f}y^Ty dt\nonumber\\
\text{s.t:}&\quad \int_{0}^{t_f} u^Tu\leq f_{1,k}\nonumber\\
&\quad\eta(0)=(-1,-1,0,0,0,0)\nonumber\\
&\quad\frac{d\eta}{dt}=A\eta+Bu\nonumber\\
&\quad t_f = 10\nonumber\\
\raisebox{29ex}[10pt][10ex]{$\boldsymbol{\Longrightarrow}$}\nonumber
\end{align}}
&
{\begin{align}
\underset{u(t), \eta(t), r}{\text{min}}&\quad z_2(t_f)\nonumber\\
\text{s.t:}&\quad z_1(t_f)-\phi\leq0\nonumber\\
&\quad z(0)=0\nonumber\\
&\quad\frac{d\eta}{dt}=A\eta+Bu\nonumber\\
&\quad t_f = 10\nonumber
\end{align}}
\end{tabular}
\[
\begin{aligned}
\min_{u(t), \eta(t), r} \quad & \int_{0}^{t_f}y^Ty \mathrm{d}t \\
\text{s.t:} \quad & \int_{0}^{t_f} u^Tu \leq f_{1,k} \\
& \eta(0) = (-1,-1,0,0,0,0) \\
& \frac{\mathrm{d}\eta}{\mathrm{d}t} = A\eta + Bu \\
& t_f = 10
\end{aligned} \qquad \Longrightarrow \qquad
\begin{aligned}
\min_{u(t), \eta(t), r} \quad & z_2(t_f) \\
\text{s.t:} \quad & z_1(t_f)-\phi \leq 0 \\
& z(0) = 0\\
& \frac{\mathrm{d}\eta}{\mathrm{d}t} = A\eta + Bu \\
& t_f = 10
\end{aligned}
\]
\end{document}
注意运算符的使用\min
(不需要\underset
)。
aligned
自动垂直居中其内容。如果你想让它们t
与 vertically-centered 对齐\Longrightarrow
,那么你可以使用类似
\begin{aligned}[t]
...
\end{aligned}
\qquad \raisebox{-3\baslelineskip}{$\Longrightarrow$} \qquad
\begin{aligned}[t]
...
\end{aligned}
答案2
这是一个使用两个minipage
环境来容纳环境的解决方案。请注意右侧align*
使用s来确保方程的行在两组方程中对齐。\vphantom
minipage
\documentclass{article}
\usepackage{amsmath}
\newcommand\tran{{}^T\!} % well-spaced transpose op.
\begin{document}
\begin{minipage}{5cm}
\begin{align*}
\min_{u(t), \eta(t), r} \quad
&\int_{0}^{t_f}y\tran y\, dt\\
\text{s.t: }\quad
&\int_{0}^{t_f} u\tran u\leq f_{1,k}\\
&\eta(0)=(-1,-1,0,0,0,0)\\
&\frac{d\eta}{dt}=A\eta+Bu\\
& t_f = 10
\end{align*}
\end{minipage}
\qquad$\Longrightarrow$
\begin{minipage}{5cm}
\begin{align*}
\min_{u(t), \eta(t), r}\quad
&z_2(t_f) \vphantom{\int_{0}^{t_f}}\\
\text{s.t: }\quad
&z_1(t_f)-\phi\leq0 \vphantom{\int_{0}^{t_f}}\\
&z(0)=0\\
&\frac{d\eta}{dt}=A\eta+Bu\\
&t_f = 10
\end{align*}
\end{minipage}
\end{document}
答案3
也许这就是你的意思,使用更简单的代码:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools, nccmath}
\begin{document}
\begin{align*}
& \begin{aligned}[t]
&\!\min_{\mathclap {u(t), \eta(t), r}}\quad\int_{0}^{t_f}y^Ty dt\\
& \text{\footnotesize s. t. \enspace}\mathrlap{\medmath{\begin{array}[t]{|l}
\int_{0}^{t_f} u^Tu\leq f_{1,k}\\
\eta(0)=(-1,-1,0,0,0,0)\\
\frac{d\eta}{dt}=A\eta+Bu\\
t_f = 10
\end{array}}}
\end{aligned}
& & \boldsymbol{\Longrightarrow}%
& &
\begin{aligned}[t]
&\!\min_{\mathclap {u(t), \eta(t), r}} \quad z_2(t_f)\\
&\text{\footnotesize s. t.\enspace}\medmath{\begin{array}[t]{|l}
z_1(t_f)-\phi\leq0\\
z(0)=0\\
\frac{d\eta}{dt}=A\eta+Bu\\
t_f = 10
\end{array}}
\end{aligned}
\end{align*}
\end{document}
答案4
好吧,还有一个可能的解决方案:
\documentclass[border=3mm,
preview]{standalone}%preview enable showing math
\usepackage{mathtools} % loads amsmath too
\begin{document}
\begin{align*}
\min_{u(t),\eta(t),r}
&\quad \int_{0}^{t_f} y^Ty dt
&\Longrightarrow &&
\min_{u(t),\eta(t),r}
&\quad z_2(t_f) \\
%
\text{s.t:}
&\quad \int_{0}^{t_f} u^Tu \leq f_{1,k}
&&&
\text{s.t:}
&\quad z_1(t_f)-\phi\leq \\
%
&\quad \eta(0) = (-1,-1,0,0,0,0)
&&&
&\quad z(0)=0 \\
%
&\quad \frac{d\eta}{dt}=A\eta+Bu
&&&
&\quad \frac{d\eta}{dt}=A\eta+Bu \\
%
&\quad t_f = 10
&&&
&\quad t_f = 10
\end{align*}
\end{document}
它给:
我假设,Longarrow
属于第一条方程线...使用一个对齐环境,方程线垂直对齐。