6

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}

2 Answers 2

5

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.

4
  • Thanks, but that applies the single-spacing both above and below the quote. What I want is for the spacing between the quote and the main text to match the spacing of the main text. The difference may not be visible with the document spacing set to 1.15, but it becomes visible when it's set to say, 2.
    – twofeet
    Sep 14, 2013 at 0:57
  • 1
    @twofeet perhaps ypu should mention that in your question, so it's clear to everyone. Sep 14, 2013 at 0:59
  • 1
    @twofeet please see my updated answer. Sep 15, 2013 at 3:24
  • Thanks, that makes the spacing between the main text and the quote match that of the main text. Do you happen to know the unit of extra space that the quote environment standardly inserts in order to set off the quote, so that I can add that manually if I want?
    – twofeet
    Sep 15, 2013 at 5:04
3

\singlespacing will by design insert additional space when switching to it. Replace it with \setstretch{1}.

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

\setstretch{1.15}

\begin{document}

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

\end{document}

Here's how to apply this change in the preamble instead of adding \setstretch{1} to every quote environment in your document:

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

\setstretch{1.15}

\usepackage{etoolbox}
\AtBeginEnvironment{quote}{\setstretch{1}}

\begin{document}

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

\end{document}

Output for both examples:

enter image description here

1
  • Thanks, but I notice that this leaves too little space between the main text and the first line of the block quote. That is, it applies the single-spacing to the space above the quote. This shows up more clearly if you set the document spacing to 2 and the quote-environment spacing to 1. Also, I could not get the preamble version to compile. \AtBeginEnvironment is showing up as an undefined control sequence (I'm using the standard TeXShop installation).
    – twofeet
    Sep 13, 2013 at 22:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .