I am trying to achieve what is written in here: Equations and Double Spacing
However, my "larger" displayed equations and aligned environments still seem to have added space above.
\documentclass{article}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{etoolbox}
\usepackage{lipsum}% just to generate text for the example
\newcommand{\beq}{\begin{equation}}
\newcommand{\eeq}{\end{equation}}
\BeforeBeginEnvironment{equation}{\begin{singlespace}}
\AfterEndEnvironment{equation}{\end{singlespace}\noindent\ignorespaces}
\BeforeBeginEnvironment{align}{\begin{singlespace}}
\AfterEndEnvironment{align}{\end{singlespace}\noindent\ignorespaces}
\doublespacing
\begin{document}
\lipsum[2]
\begin{equation}
Q_k(x)=\sum_{j=0}^{[k/2]} \frac{(-1)^j}{j!(k-2j)!2^{k-j}}.
\end{equation}
\lipsum[2]
\begin{equation}
6x+7=5.
\end{equation}
\lipsum[2]
\newpage
\lipsum[2]
\begin{align}
5x
&=9x+8 \\
&=4x+3 \\
&=2x
\end{align}
\lipsum[2]
\begin{align}
Q_{k+2n}^{(k)}(0)
&=\sum_{j=0}^{[(k+2n)/2]} \\
&=\sum_{j=0}^{n} \frac{(-1)^j}{j!(k+2(n-j))!2^{k+n+(n-j)}} \\
&=\sum_{j=0}^{n} \frac{(-1)^{n-j}}{(n-j)!(k+2j)!2^{k+n+j}} \\
&=\sum_{j=0}^{n} \frac{(-1)^{n-j}}{(n-j)!(k+2j)!2^{k+n+j}}
\end{align}
\lipsum[2]
\end{document}
Help. Thanks in advance.
Another example to demonstrate the spacing issue.
\documentclass{article}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{etoolbox}
\usepackage{lipsum}% just to generate text for the example
\doublespacing
\makeatletter
\preto{\spread@equation}{\linespread{1}\selectfont}
\makeatother
\begin{document}
MMMMMMMMMMMMMMMMMMMMMM.
\begin{equation}
6x+7=5.
\end{equation}
MMMMMMMMMMMMMMMMMMMMMM.
\begin{align}
5x
&=9x+8 \\
&\nonumber\\
&=4x+3 \\
&\nonumber\\
&=2x
\end{align}
MMMMMMMMMMMMMMMMMMMMMM.
\end{document}


setspacepackage with the optionnodisplayskipstretch? – Mico Sep 07 '14 at 21:56\lipsum*[2]instead of\lipsum[2]-- the latter (which is what you're using now) inserts a paragraph break at the end, which is typically not good practice when typesetting equations. If you go with\lipsum*[2], you'll see that some of the serious problem in the MWE disappear on the their own. – Mico Sep 07 '14 at 22:24