For your use case, no out-of-the-box solution will work quite right. Instead, we'll have to build it up from array
manually. Getting equation numbers would be a little tricky, but fortunately you don't want those. I'll also set things up so that this looks like eqnarray
for input (but with improved spacing)
\NewDocumentEnvironment{eqnarray3*}{}
{
\displaymath % ❶
\begin{array}
{
@{} % ❷
r % Left hand column
@{\;} % ❸
c % first equals sign
@{\;} % ❸
c % middle column
@{\;} % ❸
c % second equals sign
@{\;} % ❸
l % last column
@{} % ❷
}
}
{
\end{array}
\enddisplaymath % ❶
}
We use \displaymath
…\enddisplaymath
❶ to get into and out of display math mode. This has the advantage of also automatically getting us the ignore spaces effect of \end{displaymath}
(if we had used \[
…\]
or \begin{displaymath}
…\end{displaymath}
,¹ we would get a spurious space at the beginning of the first line of a paragraph that continues after the displayed math.
We put at the beginning and ending columns @{}
❷ to avoid the normal inter-column spacing showing up at the beginning/end of the row. It shouldn't make a difference although there's a possibility that it can save you from overfull \hbox
warnings on edge-case displays.
And finally, for the columns with the equals signs, we surround those with @{\;}
which gives us the normal spacing around a relation rather than the huge gaps of eqnarray
. It's worth noting that because of how you want to do alignments, it makes sense to keep relations in their own columns since there's no guarantee that the middle column will be of consistent width.
With the above definition, you can write:
\begin{eqnarray3*}
\operatorname{Cov}\left(u^{\prime} X, v^{\prime} Y\right) &=& u^{\prime} \Sigma_{xy} v &=& \alpha^{\prime} M \beta \\
\operatorname{Cov}\left(u^{\prime} X, u_{j}^{\prime} X\right)&=& u^{\prime} \Sigma_{xx} u_{j}^{\prime} &=& \alpha^\prime \alpha_j \\
\operatorname{Cov}\left(v^{\prime} Y, v_{j}^{\prime} Y\right)&=& v^{\prime} \Sigma_{yy} v_{j}^{\prime} &=& \beta^\prime \beta_j
\end{eqnarray3*}
and you should get the desired output.²
- Maybe the latter would work, I haven't bothered to check.
- But as is typical with my answers, I typed this off the top of my head and didn't bother to test.
u^{\prime}
you can simply useu'
which gives identical output.eqnarray
the posts that your found were correct.