I am facing a strange problem. In the main text of my document I have set the linespacing to 1.5 using the \usepackage[onehalfspacing]setspace
. The main text has consistent linespacing, except around block quotes.
Randomly before and after the block quotes, the linespacing of the main text is changing to something smaller. And even stranger is that in multiple compilation passes, this spacing seems to change. The picture below will perhaps help you understand what I mean.
I have only modified the quote environment to set a smaller and sf font. I have not modified linespacing anywhere else. With linespacing set to double using \usepackage[doublespacing]{setspace} this issue seems to go away and I am getting consistent double line spacing all across the document.
Any ideas on what is causing this?
I am not sure if I can post a MWE, as this is a large document ~600 pages with several packages included. I am using XeLaTeX for compilation.
Edit: this is the code that I have used for modifying the blockquote:
AtBeginEnvironment{quote}{\smaller}
\renewcommand{\sfdefault}{lmss}
\newfontfamily{\quotefont}{Linux Biolinum}
\let\quoteOld\quote
\let\endquoteOld\endquote
\renewenvironment{quote}{\quotefont\quoteOld}{\endquoteOld}
Now, commenting the first line, does create consistent line spacing. But how can I use a smaller font size in the quote environment, and not affecting the linespacing?
quote
environment with\par
to ensure the proper line spacing in the preceding text.