1

I'm trying to set my main document to one-and-a-half spacing, and have single spacing for indented quotations.

I noticed a good way of doing it was suggested in How to style blockquote?, however when I try to apply that for an indented quote within a paragraph, the single spacing is applied to the preceding text:

screenshot

What is the mechanism applying the spurious single space before and how to correct that?

A workaround is to do a line break between the first \lipsum[66] and \begin{quote}, but that is semantically 'incorrect' since they are supposed to belong to the same paragraph.

MWE:

\documentclass[UKenglish]{article}

\usepackage{babel}
\usepackage[autostyle]{csquotes}
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{etoolbox}

\onehalfspacing

\AtBeginEnvironment{quote}{\singlespacing}

\begin{document}

\lipsum[66]
\begin{quote}
  \lipsum[75]
\end{quote}
\lipsum[66]

\end{document}
1

Some settings in TeX and LaTeX apply to the complete paragraph, the line spacing set with \onehalfspacing and \singlespacing is one such setting. Usually the paragraph is typeset with the settings active at the end of the paragraph.

Internally quote is implemented as a \list, which at some point calls \par to start a new paragraph for the list.

With the patch the code in the question then essentially ends up executing

\lipsum[66]
{\singlespace\list...\endlist}

where \list includes a \par call. That means LaTeX sees something similar to the following situation

\lipsum[66]{\singlespace\par}

Here the paragraph is ended and the entire paragraph is typeset with the line spacing setting active at that point. So the entire paragraph is typeset with single spacing.

Clearly this is not what we want. One solution would be to manually end the paragraph before you go into quote (this is what you found in the question already). If this feels semantically wrong, you could force the \par (which quote will execute anyway) a little bit earlier by including it in the patch

\documentclass[UKenglish]{article}

\usepackage{babel}
\usepackage[autostyle]{csquotes}
\usepackage{lipsum}
\usepackage{setspace}

\onehalfspacing

\AtBeginEnvironment{quote}{\par\singlespacing}

\begin{document}

\lipsum[66]
\begin{quote}
  \lipsum[75]
\end{quote}
\lipsum[66]

\lipsum[66]

\end{document}

Single-spaced quote and one-half-spaced surrounding text.

Since you are loading csquotes I recommend you actually use one of its environments instead of the standard quote. We can then modify its behaviour as suggested in csquotes.cfg and shown in my answer to How to change the fontsize of a csquotes' quotation?

For the semantically nicer solution we have to use the internal implementation of \singlespacing as setting \setstretch {\setspace@singlespace} to avoid the space correction introduced by \singlespacing.

\documentclass[UKenglish]{article}

\usepackage{babel}
\usepackage[autostyle]{csquotes}
\usepackage{setspace}

\onehalfspacing

\makeatletter
\newenvironment{singlequote}
  {\quote\setstretch{\setspace@singlespace}}
  {\endquote}
\makeatother

\SetBlockEnvironment{singlequote}

\usepackage{lipsum}

\begin{document}
\lipsum[66]
\begin{displayquote}
  \lipsum[75]
\end{displayquote}
\lipsum[66]
\end{document}
0

Trying your code without any changes to the spacing the quote in the output has a blank line before and after it. It thus looks intermediate between the two \lipsum[66].

If you want the output to show no extra space before the quoute then put some negative space before it. For instance:

% spacingpob.tex SE 569716
\documentclass[UKenglish]{article}

\usepackage{babel}
\usepackage[autostyle]{csquotes}
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{etoolbox}

%\onehalfspacing

%\AtBeginEnvironment{quote}{\singlespacing}
%\AtBeginEnvironment{quote}{\onehalfspacing\singlespacing}

\begin{document}

\lipsum[66]
\vspace{-0.6\baselineskip}
\begin{quote}
  \lipsum[75]
\end{quote}
\lipsum[66]

\end{document}

I think that you might need to distinguish between thinking about the semantics in the LaTeX versus that in the output.

1
  • I'm not interested in the vertical space between the preceding paragaph and the quote, but the line spacing affecting the preceding paragraph. Unless there's something I'm missing. Nov 6 '20 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.