所以我有这个代码
\begin{align}
{P_1} = {p_0}
\end{align}
\begin{align}
{P_2} = {p_0} + {\frac{rKT}{2}}{e^{ - {\frac{rT}{2}{rT}}}}N( - {d_-}({S_0},{B_{{\frac{T}{2}}}},T/2)) - \frac{\delta S_0 T}{2}e^{-\frac{\delta T}{2}}N( - {d_+}({S_0},{B_{{\frac{T}{2}}}},T/2))
\end{align}
\begin{align}
{P_3} = &{p_0} + {\frac{rKT}{3}}\left[ { e^{ - {\frac{rT}{3}}}N( - {d_-}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2rT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))}\right] \nonumber\\
&- {\frac{{S_0}T}{3}}\left[ { e^{ - {\frac{\delta T}{3}}}N( - {d_+}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2aT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))} \right]
\end{align}
遗憾的是,我希望 p1 也能被刷新到左侧
答案1
使用multlined
来自mathtools
(并清理方程中的杂乱之后):
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{mathtools}
\begin{document}
\begin{align}
P_{1} & = p_{0} \\
P_{2} & = p_{0} + \frac{rKT}{2}\mathrm{e}^{- \frac{rT}{2}{rT}}
N\bigl(- d_{-}(S_{0},B_{\frac{T}{2}},T/2)\bigr)
- \frac{\delta S_{0}T}{2}\mathrm{e}^{-\frac{\delta T}{2}}
N\bigl(- d_{+}(S_{0},B_{\frac{T}{2}}T/2)\bigr) \\
P_{3} & = \begin{multlined}[t]
p_{0} + \frac{rKT}{3}\Bigl[\mathrm{e}^{-\frac{rT}{3}}
N\bigl(-d_{-}(S_{0},B_{\frac{T}{3}},T/3)\bigr)
+ \mathrm{e}^{-\frac{2rT}{3}}
N(-d_{+}(S_{0},B_{\frac{2T}{3}},2T/3))\Bigr] \\[1ex]
- \frac{{S_0}T}{3}\Bigl[\mathrm{e}^{-\frac{\delta T}{3}}
N\bigl(-d_{+}(S_{0},B_{\frac{ T}{3}},T/3)\bigr)
+ \mathrm{e}^{- \frac{2aT}{3}}
N\bigl(- d_{+}(S_{0},B_{\frac{2T}{3}},2T/3)\bigr) \Bigr]
\end{multlined}
\end{align}
\end{document}
或使用split
:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\begin{document}
\begin{align}
P_{1} & = p_{0} \\
P_{2} & = p_{0} + \frac{rKT}{2}\mathrm{e}^{- \frac{rT}{2}{rT}}
N\bigl(- d_{-}(S_{0},B_{\frac{T}{2}},T/2)\bigr)
- \frac{\delta S_{0}T}{2}\mathrm{e}^{-\frac{\delta T}{2}}
N\bigl(- d_{+}(S_{0},B_{\frac{T}{2}}T/2)\bigr) \\
\begin{split}
P_{3} & = p_{0} + \frac{rKT}{3}\Bigl[\mathrm{e}^{-\frac{rT}{3}}
N\bigl(-d_{-}(S_{0},B_{\frac{T}{3}},T/3)\bigr)
+ \mathrm{e}^{-\frac{2rT}{3}}
N(-d_{+}(S_{0},B_{\frac{2T}{3}},2T/3))\Bigr] \\[1ex]
&\qquad
- \frac{{S_0}T}{3}\Bigl[\mathrm{e}^{-\frac{\delta T}{3}}
N\bigl(-d_{+}(S_{0},B_{\frac{ T}{3}},T/3)\bigr)
+ \mathrm{e}^{- \frac{2aT}{3}}
N\bigl(- d_{+}(S_{0},B_{\frac{2T}{3}},2T/3)\bigr) \Bigr]
\end{split}
\end{align}
\end{document}
如果您希望所有方程式都左对齐(缩进一些),那么请使用以下fleqn
选项amsmath
:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage[fleqn]{amsmath}
...
答案2
您可以使用flalign
as in,但应避免使用如此长的(不间断的)公式。也许您还应该考虑仅使用一个flalign
具有换行符和正确对齐的环境。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign}
{P_1} &= {p_0}\\
{P_2} &= {p_0} + {\frac{rKT}{2}}{e^{ - {\frac{rT}{2}{rT}}}}N( - {d_-}({S_0},{B_{{\frac{T}{2}}}},T/2)) - \frac{\delta S_0 T}{2}e^{-\frac{\delta T}{2}}N( - {d_+}({S_0},{B_{{\frac{T}{2}}}},T/2))\\
{P_3} &= {p_0} + {\frac{rKT}{3}}\left[ { e^{ - {\frac{rT}{3}}}N( - {d_-}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2rT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))}\right] \nonumber\\
&- {\frac{{S_0}T}{3}}\left[ { e^{ - {\frac{\delta T}{3}}}N( - {d_+}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2aT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))} \right]
\end{flalign}
\end{document}
答案3
我将使用flalign
提供的环境amsmath
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign}
P_{1}&=p_{0}\\
P_{2}&=p_{0} + {\frac{rKT}{2}}{e^{ - {\frac{rT}{2}{rT}}}}N( - {d_-}({S_0},{B_{{\frac{T}{2}}}},T/2))- \frac{\delta S_0 T}{2}e^{-\frac{\delta T}{2}}N( - {d_+}({S_0},{B_{{\frac{T}{2}}}},T/2))\\
P_{3}&={p_0} + {\frac{rKT}{3}}\left[ { e^{ - {\frac{rT}{3}}}N( - {d_-}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2rT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))}\right] \nonumber\\
&- {\frac{{S_0}T}{3}}\left[ { e^{ - {\frac{\delta T}{3}}}N( - {d_+}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2aT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))} \right]
\end{flalign}
\end{document}
答案4
我将使用alignat
并在符号处拆分第一个等式-
:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat}{2}
{P_1} &= {p_0} && \\
{P_2} &= {p_0} &&+ {\frac{rKT}{2}}{e^{-{\frac{rT}{2}{rT}}}}N(-{d_-}({S_0},{B_{{\frac{T}{2}}}},T/2))\notag\\
& &&- \frac{\delta S_0 T}{2}e^{-\frac{\delta T}{2}}N( - {d_+}({S_0},{B_{{\frac{T}{2}}}},T/2))\\
{P_3} &= {p_0} &&+ {\frac{rKT}{3}}\left[ { e^{ - {\frac{rT}{3}}}N( - {d_-}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2rT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))}\right] \nonumber\\
& &&- {\frac{{S_0}T}{3}}\left[ { e^{ - {\frac{\delta T}{3}}}N( - {d_+}({S_0},B_{\frac{T}{3}},T/3)) + e^{ - {\frac{2aT}{3}}}N( - {d_+}({S_0},B_{\frac{2T}{3}},2T/3))} \right]
\end{alignat}
\end{document}