我对块引用上方和下方的垂直间距有些问题。与往常一样,首先是 MWE:
\documentclass{scrreprt}
\usepackage[onehalfspacing]{setspace}
\setlength{\parindent}{0pt}
\usepackage[%
threshold = 39,
thresholdtype = words]
{csquotes}
\usepackage[%
font = small]
{quoting}
\SetBlockEnvironment{quoting}
\usepackage{etoolbox}
\AtBeginEnvironment{quoting}{\singlespacing}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\blockquote{This is a test that will show that the vertical spacing above and below this block quote is not even. Does anyone have an idea how to fix this behaviour? \LaTeX can sometimes be really frustrating. I hope that this quote has a length of 40 words.}
\lipsum[1]
\end{document}
块引用上方的间距似乎小于其下方的间距(如果从基线到基线测量,则为 0.71 英寸对 0.75 英寸)。这是什么原因造成的?我希望有完全相同的垂直间距。
答案1
我认为不同的间距是由于\singlespacing
。如果你添加
\AtEndEnvironment{quoting}{\onehalfspacing},
我觉得间距更对称。当然,有一个问题是:哪个距离是相关的?从基线到基线的测量忽略了两种字体大小不同的事实。但应该从哪条线开始测量?大写字母的顶部还是小写字母的顶部?重要的是空白似乎是对称的。
如果这对你来说不太好,也可以直接修复:
\AtEndEnvironment{quoting}{\vspace{-0.06in}}
其中 0.06in 应该替换为您喜欢的值。
答案2
您可以使用键设置前后跳过的明确长度vskip
。
\documentclass{scrreprt}
\usepackage[onehalfspacing]{setspace}
\setlength{\parindent}{0pt}
\usepackage[%
threshold = 39,
thresholdtype = words]
{csquotes}
\usepackage[%
font = small,
vskip = 20pt]
{quoting}
\SetBlockEnvironment{quoting}
\usepackage{etoolbox}
\AtBeginEnvironment{quoting}{\singlespacing}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\blockquote{This is a test that will show that the vertical spacing above and below this block quote is not even. Does anyone have an idea how to fix this behaviour? \LaTeX can sometimes be really frustrating. I hope that this quote has a length of 40 words.}
\lipsum[1]
\end{document}