我希望底部方程的开头与顶部方程的开头对齐。同样,我希望所有“for”都对齐,这样底部的也与顶部的对齐。最好的方法是什么?
提前致谢!
\documentclass[a4paper,12pt,default,numbered,print,index]{article}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{graphicx} % Required for the inclusion of images
\usepackage{setspace} % for use of \singlespacing and \doublespacing
\usepackage{pdfpages}
\usepackage{cite}
\usepackage[section]{placeins}
\usepackage{comment}
\usepackage{siunitx}
\usepackage{color}
\usepackage{ragged2e}
\usepackage{esvect}
\usepackage{mathtools}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{array}
\usepackage{soul}
\usepackage{bm}
\usepackage{url}
\usepackage{xparse}
\usepackage{hyperref}
\begin{document}
\begin{equation}
\frac{p'}{\gamma \bar{p}}\Bigg|_d(x,t) \approx
\begin{cases}
(P_d^+ + P_d^-R_1e^{-2\alpha(L_1 + x)})(1 + R_2e^{-2\alpha(L_2 - x)})\\ \times \dfrac{1- (R_1R_2e^{-2\alpha L})^{\lfloor (t + T)/T\rfloor}}{1-R_1R_2e^{-2\alpha L}}
& \text{for}\enspace t \in [0,t_p]
\\
2P_D(R_1R_2e^{-2\alpha L})^{\lfloor (t - t_p + T)/T\rfloor}
& \text{for}\enspace t \in ] t_p, +\infty[.
\end{cases}
\end{equation}
\begin{equation}
\frac{p'}{\gamma \bar{p}}\Bigg|_i(x,t) \approx
\begin{cases}
P_i^+(1 + ^-R_1e^{-2\alpha(L_1 + x)}) \\ \times \dfrac{1- (R_1R_2e^{-2\alpha L})^{\lfloor (t - \tau_c + T)/T\rfloor}}{1-R_1R_2e^{-2\alpha L}}
& \text{for}\enspace t \in [0,t_p]
\\
2P_I(R_1R_2e^{-2\alpha L})^{\lfloor (t - t_p - \tau_c + T)/T\rfloor}
& \text{for}\enspace t \in ] t_p, +\infty[.
\end{cases}
\end{equation}
\end{document}
答案1
由于第一行太长,因此将两个equation
环境组合成一个align
并使用。\mathrlap
array
请注意,如果您加载了,则无需加载tabularx
。
\documentclass[a4paper,12pt,default,numbered,print,index]{article}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{graphicx} % Required for the inclusion of images
\usepackage{setspace} % for use of \singlespacing and \doublespacing
\usepackage{pdfpages}
\usepackage{cite}
\usepackage[section]{placeins}
\usepackage{comment}
\usepackage{siunitx}
\usepackage{xcolor}
\usepackage{ragged2e}
\usepackage{esvect}
\usepackage{mathtools, bm}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{soul}
\usepackage{url}
\usepackage{xparse}
\usepackage{hyperref}
\begin{document}
\setcounter{section}{2}
\renewcommand\theequation{\thesection.\arabic{equation}}
\setcounter{equation}{39}
\begin{align}
\frac{p'}{\gamma \bar{p}}\Bigg|_d(x,t) & \approx
\begin{cases}
(P_d^+ + P_d^-R_1e^{-2\alpha(L_1 + x)})(1 + R_2\mathrlap{e^{-2\alpha(L_2 - x)})}\\ \times \dfrac{1- (R_1R_2e^{-2\alpha L})^{\lfloor (t + T)/T\rfloor}}{1-R_1R_2e^{-2\alpha L}}
& \text{for}\enspace t \in [0,t_p]
\\
2P_D(R_1R_2e^{-2\alpha L})^{\lfloor (t - t_p + T)/T\rfloor}
& \text{for}\enspace t \in {] t_p, +\infty[}.
\end{cases} \\[1.5ex]
\frac{p'}{\gamma \bar{p}}\Bigg|_i(x,t) & \approx
\begin{cases}
P_i^+(1 + ^-R_1e^{-2\alpha(L_1 + x)}) \\ \times \dfrac{1- (R_1R_2e^{-2\alpha L})^{\lfloor (t - \tau_c + T)/T\rfloor}}{1-R_1R_2e^{-2\alpha L}}
& \text{for}\enspace t \in [0,t_p]
\\
2P_I(R_1R_2e^{-2\alpha L})^{\lfloor (t - t_p - \tau_c + T)/T\rfloor}
& \text{for}\enspace t \in {] t_p, +\infty[}.
\end{cases}
\end{align}
\end{document}