[Tex/LaTex] Line spacing inside quote environment in amsart (removing extra white space)

amsartline-spacingquotingsetspace

This is a follow-up to Line spacing inside quote environment. I'm using the amsart document class, with a specifically defined line-spacing for the whole document. When I adjust the line-spacing within the quote environment, I get extra white space above the quoted material, as in the example below. Any idea how I can keep that from happening? Thanks.

Edit: On closer inspection it looks like the quote environment standardly inserts a little extra space between the main text and the quote, in order to set off the quote a bit. I'm OK with that extra space, but I want it to be added to the spacing of the main text rather than to that of the quote. If the extra margin is e, the main text is spaced at m, and the quote is spaced at q, I want the spacing between the main text and the quote to be m + e, not q + e.

\documentclass{amsart}
\usepackage{setspace}
\usepackage{lipsum}

\setstretch{1.5}

\begin{document}

\lipsum[2]
\begin{quote}
\singlespacing
\lipsum[1]
\end{quote}
\lipsum[2]

\end{document}

Best Answer

You can surround the quote environment with a spacing environment with a 1 factor; additionally, to meet the new criterion in the edit to the question, you need to correct the spacing before and after the environment:

\documentclass{amsart}
\usepackage{setspace}
\usepackage{lipsum}

\doublespacing

\let\oldquote\quote
\let\oldendquote\endquote
\renewenvironment{quote}
  {\vspace{\dimexpr-12pt-\topsep+\baselineskip\relax}\begin{spacing}{1}\oldquote}
  {\oldendquote\end{spacing}\vspace{\dimexpr-12pt-\topsep+\baselineskip\relax}}

\begin{document}

\lipsum[2]
\begin{quote}
\lipsum[1]
\end{quote}
\lipsum[2]

\end{document}

enter image description here

In the example I used \doublespacing instead of the original \setstretch{1.15} just to make the results more visible, but the original settings will also produce the requested result.