TeX - LaTeX Asked by circuitbreaker on January 17, 2021
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:
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}
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}{onehalfspacingsinglespacing}
begin{document}
lipsum[66]
vspace{-0.6baselineskip}
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.
Answered by Peter Wilson on January 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP