\begin{align}
E\left(y_{i}^{T}|u_{1i}\succ-x_{1i}'\beta_{1},u_{2i}\succ-x_{2i}'\beta_{2}\right)&=\frac{\sigma}{\Psi\left(x_{1i}'\beta_{1},\tfrac{x_{2i}'\beta_{2}}{\sigma},\rho\right)}\left[\phi\left(\tfrac{x_{2i}'\beta_{2}}{\sigma}\right)\Phi\left(\tfrac{x_{1i}'\beta_{1}-\rho\tfrac{x_{2i}'\beta_{2}}{\sigma}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right.\\
&\qquad + \left. \rho\phi(x_{1i}'\beta_{1})\Phi\left(\tfrac{\tfrac{x_{2i}'\beta_{2}}{\sigma}-\rho x_{1i}'\beta_{1}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right]
\end{align}
上面的代码给出了两个方程编号,但我只想要一个,因为它们只属于一个方程。我该怎么做?
答案1
选项1
\documentclass[preview,border=12pt,12pt]{standalone}% change it to your own document class
\usepackage[a4paper,margin=2cm,landscape]{geometry}% edit it to meet your preference
\usepackage{amsmath}
\begin{document}
\abovedisplayskip=0pt\relax% don't use this line in your production
\begin{equation}
\begin{split}
E\left(y_{i}^{T}|u_{1i}\succ-x_{1i}'\beta_{1},u_{2i}\succ-x_{2i}'\beta_{2}\right)
&=\frac{\sigma}{\Psi\left(x_{1i}'\beta_{1},\tfrac{x_{2i}'\beta_{2}}{\sigma},\rho\right)}\left[\phi\left(\tfrac{x_{2i}'\beta_{2}}{\sigma}\right)\Phi\left(\tfrac{x_{1i}'\beta_{1}-\rho\tfrac{x_{2i}'\beta_{2}}{\sigma}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right.\\
&\qquad + \left. \rho\phi(x_{1i}'\beta_{1})\Phi\left(\tfrac{\tfrac{x_{2i}'\beta_{2}}{\sigma}-\rho x_{1i}'\beta_{1}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right]
\end{split}
\end{equation}
\end{document}
建议
为了使代码更具可读性(让您更容易找到要修改的内容),请删除不必要的部分{}
(例如X_{a}^{b}
用替换X_a^b
)并将方程代码与更好的模式对齐,如下所示。
\documentclass[preview,border=12pt,12pt]{standalone}% change it to your own document class
\usepackage[a5paper,margin=2cm,landscape]{geometry}% edit it to meet your preference
\usepackage{amsmath}
\begin{document}
\abovedisplayskip=0pt\relax% don't use this line in your production
\begin{equation}
\begin{split}
E\left(y_i^T|u_{1i}\succ-x_{1i}'\beta_1,u_{2i}\succ-x_{2i}'\beta_2\right)
&=
\frac{\sigma}{\Psi\left(x_{1i}'\beta_1,\tfrac{x_{2i}'\beta_2}{\sigma},\rho\right)}
\left[
\phi\left(\tfrac{x_{2i}'\beta_2}{\sigma}\right)
\Phi\left(\tfrac{x_{1i}'\beta_1-\rho\tfrac{x_{2i}'\beta_2}{\sigma}}{\left(1-\rho^2\right)^{1/2}}\right)
\right.\\
&
\qquad +
\left.
\rho\phi(x_{1i}'\beta_1)\Phi\left(\tfrac{\tfrac{x_{2i}'\beta_2}{\sigma}-\rho x_{1i}'\beta_1}{\left(1-\rho^2\right)^{1/2}}\right)
\right]
\end{split}
\end{equation}
\end{document}
答案2
选项 2
使用multline
代替align
(选项 1 已经在 DonutE.Knot 的答案中......)
平均能量损失
\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
\begin{multline}
E\left(y_{i}^{T}|u_{1i}\succ-x_{1i}'\beta_{1},u_{2i}\succ-x_{2i}'\beta_{2}\right)=\frac{\sigma}{\Psi\left(x_{1i}'\beta_{1},\tfrac{x_{2i}'\beta_{2}}{\sigma},\rho\right)}\left[\phi\left(\tfrac{x_{2i}'\beta_{2}}{\sigma}\right)\Phi\left(\tfrac{x_{1i}'\beta_{1}-\rho\tfrac{x_{2i}'\beta_{2}}{\sigma}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right.\\
\qquad + \left. \rho\phi(x_{1i}'\beta_{1})\Phi\left(\tfrac{\tfrac{x_{2i}'\beta_{2}}{\sigma}-\rho x_{1i}'\beta_{1}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right]
\end{multline}
\end{document}
编辑
正如 Barbara Beeton 在她的评论中所说,这个等式不适合这个页面,所以最好再添加一个分隔符,例如
\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
\begin{multline}
E\left(y_{i}^{T}|u_{1i}\succ-x_{1i}'\beta_{1},u_{2i}\succ-x_{2i}'\beta_{2}\right)\\
=\frac{\sigma}{\Psi\left(x_{1i}'\beta_{1},\tfrac{x_{2i}'\beta_{2}}{\sigma},\rho\right)}\left[\phi\left(\tfrac{x_{2i}'\beta_{2}}{\sigma}\right)\Phi\left(\tfrac{x_{1i}'\beta_{1}-\rho\tfrac{x_{2i}'\beta_{2}}{\sigma}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right.\\
+ \left. \rho\phi(x_{1i}'\beta_{1})\Phi\left(\tfrac{\tfrac{x_{2i}'\beta_{2}}{\sigma}-\rho x_{1i}'\beta_{1}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right]
\end{multline}
\end{document}
答案3
\nonumber
那么在等式中不应该有数字的部分之后(在之前\\
)简单地使用怎么样呢?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
E\left(y_{i}^{T}|u_{1i}\succ-x_{1i}'\beta_{1},u_{2i}\succ-x_{2i}'\beta_{2}\right)&=\frac{\sigma}{\Psi\left(x_{1i}'\beta_{1},\tfrac{x_{2i}'\beta_{2}}{\sigma},\rho\right)}\left[\phi\left(\tfrac{x_{2i}'\beta_{2}}{\sigma}\right)\Phi\left(\tfrac{x_{1i}'\beta_{1}-\rho\tfrac{x_{2i}'\beta_{2}}{\sigma}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right.\nonumber\\
&\qquad + \left. \rho\phi(x_{1i}'\beta_{1})\Phi\left(\tfrac{\tfrac{x_{2i}'\beta_{2}}{\sigma}-\rho x_{1i}'\beta_{1}}{\left(1-\rho^{2}\right)^{1/2}}\right)\right]
\end{align}
\end{document}