# How to number two equations as one

\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.\\
\end{align}


The code above gives two equation numbers but I want only one since they belong to only one equation. How do I do that?

• equation with split inside helps here. – kiss my armpit Dec 1 '13 at 20:55

## Option 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{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{document}


## Suggestion

To make the code more readable (to make you easier to locate what you want to modify), remove the unnecessary {} (such as replacing X_{a}^{b} with X_a^b) and align the equation code with a better pattern as follows.

\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{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{document}

• You should use article for the example code, without irrelevant tokens that can be disorienting. – egreg Dec 1 '13 at 21:04
• @egreg: I have considered this negative effect many times so I started giving some comments to warn users that some additional tokens should not be used for their own purposes. I think I need to have a package derived from standalone class that does my common settings out of the box via key-value options, e.g., \documentclass[<key-values>]{derivedstandalone}. My settings are used to generate the tight output to mimic the screenshot output. – kiss my armpit Dec 1 '13 at 21:08

## Option 2

Use multline instead of align (option 1 already in DonutE.Knot's answer...)

MWE

\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.\\
\end{multline}

\end{document}


## EDIT

As Barbara Beeton states in her comment, the equation doesn't fit in the page, so it would be better to add another break, for example

\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}


• the position of the equation number says that something is wrong here; the problem is that the equation is wider than the page allows. breaking it into three parts can still be done with multline. (i still think that using [final] mode as default is a latex mis-feature.) – barbara beeton Dec 2 '13 at 15:05
• @barbarabeeton I know. Added a possible alternative. Feel free to edit my answer if you think there is a better alternative. – karlkoeller Dec 2 '13 at 15:17
• except that i'd prefer to see the equals sign at the beginning of the second line, that's just fine. – barbara beeton Dec 2 '13 at 15:23
• @barbarabeeton Corrected. Thanks for your hints. – karlkoeller Dec 2 '13 at 15:26
• I'd rather not recommend multiline especially when there is more than one line break, then proper use of align is a lot better. Especially when margins are changed. – daleif Dec 2 '13 at 15:37

What about a simple use of \nonumber after the part of the equation which should not have a number (before the \\)

\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\\