[Tex/LaTex] Fitting multiline equation into margins

amsmathequations

I have this equation. It is quite wide, and I've had to split things over two lines. However, the part to the left of the = is quite long, and it's causing me some issues.

I've posted a MWE here. This produces the following that I could just about live with (it is 7.6 pt too wide apparently):

This is OK

The problem is that when I have the same equation in my full document, it adds extra space after the = and is now definitely not OK:

This is not OK

I presume this is a consequence of the longer equation number. Can anyone suggest a way to get my equation fitted into the margins? I have thought of breaking the line after the = sign, but I'd like the = sign on the lower line to line up and that's the one that is spilling off to the right. I have also thought of breaking before the =, and aligning the = signs at the left hand end, which would be the best solution, but I honestly can't work out how to do it. I suspect I need some combination of gather/split or something, but it's doing my head in!

\documentclass[12pt, a4paper, oneside, fleqn]{report}

% Page geometry etc
%----------------------------
\usepackage{setspace}                % allow different line spacing
\renewcommand{\topfraction}{0.85}
\renewcommand{\textfraction}{0.1}
\usepackage[top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm, includehead]{geometry}
\geometry{headheight=28pt, headsep=18pt}

% Maths stuff
%------------
\usepackage{amsmath}

\begin{document}

\onehalfspacing
\mathindent=\parindent

The equation below is too wide for the page margins. The question is how best to format it so that it looks sensible but doesn't spill off the right hand margin?
\begin{alignat}{2}
{\textstyle \frac{1}{2}} \textrm{Cov}(\Delta_{i,p1}-\Delta_{i,p2},\Delta_{j,p1}-\Delta_{j,p2})
& = && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p1})
+ {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p2})  - \notag \\
&   && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})
- {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p1}) \\
& = && \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1=p2}
- \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1 \ne p2}
\end{alignat}


\end{document}

UPDATE:
I've just had a go with gather, but now my equation numbers are way off to the right, even in my test document:

\begin{gather}
{\textstyle \frac{1}{2}} \textrm{Cov}(\Delta_{i,p1}-\Delta_{i,p2},\Delta_{j,p1}-\Delta_{j,p2}) \notag \\
\begin{alignat}{2}
& = {} && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p1})
+ {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p2})  - \notag \\
&   && {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})
- {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p1}) \\
& = {} && \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1=p2}
- \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1 \ne p2}
\end{alignat}
\end{gather}

gather

Best Answer

The answer by @JF Meier can be edited easily to correct the alignment of the '=' signs by using

\begin{align}
{\textstyle \frac{1}{2}} \textrm{Cov}(\Delta_{i,p1}-\Delta_{i,p2},&\Delta_{j,p1}-\Delta_{j,p2}) \notag \\
 = & {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p1})
+ {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p2})  - \notag \\
&    {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})
- {\textstyle \frac{1}{2}}\textrm{Cov}(\Delta_{i,p2},\Delta_{j,p1}) \\
= & \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1=p2}
- \textrm{Cov}(\Delta_{i,p1},\Delta_{j,p2})|_{p1 \ne p2}
\end{align}