1. 插入不可拆卸的料斗

1. 插入不可拆卸的料斗

在我的文本中,块引用与上下文本有明显的垂直间距。当有脚注时,此属性被破坏;我想恢复它。(我认为从美学角度来看,这种格式选项是有意义的。)

换句话说:如果一个块引用结束了一页(并且没有继续到下一页)但是脚注跟在同一页上,我希望该脚注的间距比其他情况下更大,以保留块引用下方始终有一定空间的属性。

以下是说明该问题的示例代码:

\documentclass[12pt]{memoir} % the issue is clearly visible for a font size of 12pt
\usepackage{lipsum}

% quotes with twice the standard \parindent as indentation from both sides
% (the example works the same if you prefer the "quote" environment instead)
\newenvironment{myquote}%
  {\par\setSpacing{1}\list{}{\leftmargin=2\parindent \rightmargin\leftmargin}%
   \item[]%
   \small%
   \fontfamily{ppl}\selectfont}%
  {\endlist}


\begin{document}

\begin{myquote}
This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote.\footnote{A footnote. The vertical spacing is as it should be, as the block quote continues onto the next page.}

\vspace*{10\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.\footnote{A footnote. It should have more vertical distance from the block quote, as that block quote terminates here.}

\vspace*{6\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.

\end{document}
  • 第一页显示块引用下方(和上方)所需的间距。
  • 第 1 页底部的脚注与前面的正文有很近的垂直间距,因为第 1 页底部的块引用延续到第 2 页。
  • 第 2 页底部的脚注应该(按照我的偏好)具有更宽的垂直间距(理想情况下与文本跟随的间距相同),以表明块引用在第 2 页的底部结束。

关于解决方案的通用性的注释:

  • \begin{myquote}如果将和的三次出现\end{myquote}替换为\begin{quote}和,该示例同样有效\end{quote}。我认为,既然环境无论如何都有可能需要修改,我不妨公开自定义环境的内部结构。尽管如此,我现在想到,告诉用户如何对标准环境进行此类修改的解决方案quote可能对其他人更有用。但我还假设修复本质上是相同的。
  • 我通常\raggedbottom在序言中使用它;如果解决方案与之兼容,那就太好了。
  • 页面顶部块引用的垂直间距是可以的,不需要修改,因为它们与标题(如果有的话)的距离已经很大(并且大于块引用与其上方文本之间的距离)。

答案1

这里有两种方法。

1. 插入不可拆卸的料斗

添加\showout到您的文件中后,您会发现块引用后面跟着

....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\penalty -51
...\glue 12.56712 plus 6.2829 minus 4.35004
...\glue(\parskip) 0.0 plus 1.0

问题在于 的主垂直粘连之前有一个负惩罚12.56712pt。可以通过\par\vspace*{...}在 之前添加一个适当的\endlist\unskip在其后放置一个 来调整,结果如下:

....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\rule(0.0+0.0)x*
...\penalty 10000
...\glue 12.56712 plus 6.2829 minus 4.35004
...\glue 0.0
...\penalty -51
...\glue(\parskip) 0.0 plus 1.0

在第 1 页上,我们在第 2 页的底部看到以下内容:

第 2 页底部

事实证明,这个粘合表达式是列表中\topsep加号的值,所以这就是我在代码中使用的:\partopsep

\documentclass[12pt]{memoir}

\usepackage{lipsum}

\newenvironment{myquote}%
  {\par\setSpacing{1}\list{}{\leftmargin=2\parindent \rightmargin\leftmargin}%
   \item[]%
   \small%
   \fontfamily{ppl}\selectfont}%
   {\par\vspace*{\topsep}\vspace*{\partopsep}%
   \endlist\unskip}

\begin{document}

\begin{myquote}
  This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote.\footnote{A footnote. The vertical spacing is as it should be, as the block quote continues onto the next page.}

\vspace*{10\baselineskip}

\lipsum[1]

\begin{myquote}
  This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.\footnote{A footnote. It should have more vertical distance from the block quote, as that block quote terminates here.}

\vspace*{5\baselineskip}

\lipsum[1]

\begin{myquote}
  This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.

\end{document}

2. 调整处罚

另一种方法是借鉴 的定义\samepage,您可以尝试在关闭列表之前设置一些适当的惩罚。如果您只是将环境用于文本材料,那么这\@endparpenalty似乎是一个很好的调整旋钮。将此设置得高将阻止在以下文本之前分页。

这是以下文档第 2 页的底部。

示例输出

将该页面上的空间调整到例如5.5\baselineskip会导致分页符被放置在引用的材料内。

\documentclass[12pt]{memoir}

\usepackage{lipsum}

\makeatletter
\newenvironment{myquote}%
  {\par\setSpacing{1}\list{}{\leftmargin=2\parindent \rightmargin\leftmargin}%
   \item[]%
   \small%
   \fontfamily{ppl}\selectfont}%
  {\@endparpenalty\@M\endlist}
\makeatother

\begin{document}

\begin{myquote}
  This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote.\footnote{A footnote. The vertical spacing is as it should be, as the block quote continues onto the next page.}

\vspace*{10\baselineskip}

\lipsum[1]

\begin{myquote}
  This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.\footnote{A footnote. It should have more vertical distance from the block quote, as that block quote terminates here.}

\vspace*{5\baselineskip}

\lipsum[1]

\begin{myquote}
  This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote. This is a block quote. This is a block
  quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.

\end{document}

相关内容