我想删除最后两行之间不必要的空格。等号应该对齐,但都稍微靠右一点。提前致谢。
我的代码:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign*}
&\quad\rightarrow u(x_1,x_2,T)
&&= \left(\alpha_1 e^{\sigma_1 x_1} + \alpha_2 e^{\sigma_2 x_2} - 1\right)_+ &\\
%
&\quad\rightarrow \lim_{x_1 \rightarrow -\infty} u(x_1,x_2,t)
&&= \alpha_2 e^{\sigma_2 x_2} P(d_1) - e^{-r(T-t)} P(d_2) &\\
%
&\quad\rightarrow \lim_{x_2 \rightarrow -\infty} u(x_1,x_2,t)
&&= \alpha_1 e^{\sigma_1 x_1} P(\hat{d}_1) - e^{-r(T-t)} P(\hat{d}_2) &\\
%
&\quad\rightarrow \lim_{x_1 \rightarrow \infty} \left(u(x_1,x_2,t) - \alpha_1 e^{\sigma_1 x_1}\right)
&&= e^{-r(T-t)} \left(\alpha_2 e^{\sigma_2 x_2} - 1\right) &\\
%
&\quad\rightarrow \lim_{x_2 \rightarrow \infty} \left(u(x_1,x_2,t) - \alpha_2 e^{\sigma_2 x_2}\right)
&&= e^{-r(T-t)} \left(\alpha_1 e^{\sigma_1 x_1} - 1\right) &
\end{flalign*}
\end{document}
为什么首先会有间距?
再次提前感谢!
答案1
flalign
,就像是align
为在一行上显示多个方程式而设计的,所以 a=b c=d
。因此,它会在每“对”之间添加空间。由于这是“全长对齐”,因此空间显示更多,flalign
因此设计会尽可能地将组拉开,以覆盖页面的宽度。
使用alignat
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{-1}
&\rightarrow u(x_1,x_2,T)
&&= \left(\alpha_1 e^{\sigma_1 x_1} + \alpha_2 e^{\sigma_2 x_2} - 1\right)_+ \\
%
&\rightarrow \lim_{x_1 \rightarrow -\infty} u(x_1,x_2,t)
&&= \alpha_2 e^{\sigma_2 x_2} P(d_1) - e^{-r(T-t)} P(d_2)\\
%
&\rightarrow \lim_{x_2 \rightarrow -\infty} u(x_1,x_2,t)
&&= \alpha_1 e^{\sigma_1 x_1} P(\hat{d}_1) - e^{-r(T-t)} P(\hat{d}_2)\\
%
&\rightarrow \lim_{x_1 \rightarrow \infty} \left(u(x_1,x_2,t) - \alpha_1 e^{\sigma_1 x_1}\right)
&&= e^{-r(T-t)} \left(\alpha_2 e^{\sigma_2 x_2} - 1\right)\\
%
&\rightarrow \lim_{x_2 \rightarrow \infty} \left(u(x_1,x_2,t) - \alpha_2 e^{\sigma_2 x_2}\right)
&&= e^{-r(T-t)} \left(\alpha_1 e^{\sigma_1 x_1} - 1\right)
\end{alignat*}
\end{document}
答案2
具有环境的解决方案fleqn
,来自nccmath
和alignat*
:
\documentclass{article}
\usepackage{amsmath}
\usepackage{nccmath}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.3pt}
\begin{document}
\begin{fleqn}[1em]
\begin{alignat*}{2}
&\rightarrow u(x_1,x_2,T)
&&= \left(\alpha_1 e^{\sigma_1 x_1} + \alpha_2 e^{\sigma_2 x_2} - 1\right)_+ \\
%
&\rightarrow \lim_{x_1 \rightarrow -\infty} u(x_1,x_2,t)
&&= \alpha_2 e^{\sigma_2 x_2} P(d_1) - e^{-r(T-t)} P(d_2) \\
%
&\rightarrow \lim_{x_2 \rightarrow -\infty} u(x_1,x_2,t)
&&= \alpha_1 e^{\sigma_1 x_1} P(\hat{d}_1) - e^{-r(T-t)} P(\hat{d}_2) b\\
%
&\rightarrow \lim_{x_1 \rightarrow \infty} \left(u(x_1,x_2,t) - \alpha_1 e^{\sigma_1 x_1}\right)
&&= e^{-r(T-t)} \left(\alpha_2 e^{\sigma_2 x_2} - 1\right) \\
%
&\rightarrow \lim_{x_2 \rightarrow \infty} \left(u(x_1,x_2,t) - \alpha_2 e^{\sigma_2 x_2}\right)
& &= e^{-r(T-t)} \left(\alpha_1 e^{\sigma_1 x_1} - 1\right)
\end{alignat*}
\end{fleqn}
\end{document}