我正在使用 Memoir 和\abnormalparskip{<length>}
。
每当我开始写新文章时\begin{quote}
,段落之间的间距就会越来越小,直到基本上消失。
这是一个最小的测试用例:
\documentclass{memoir}
\setlength{\parindent}{0em}
\abnormalparskip{1em}
\begin{document}
This is a a normal paragraph. It will space correctly from the next.
This is the second paragraph to show how it is spaced correctly.
\begin{quote}
This is the first paragraph in a quote. It is not spaced right.
This paragraph is spaced smaller than the one before it.
\begin{quote}
This is yet another paragraph.
Now you can see the spacing is gone.
\end{quote}
\end{quote}
\end{document}
结果是:
如何才能使段落跳过始终保持相同的大小?
答案1
作为乌尔丽克·菲舍尔提及她的评论\parskip
,一种选择是在 内部使用的列表内进行更改quote
;为了保持一致性,引用环境也需要进行相同的修改。以下示例代码显示了必要的重新定义:
\documentclass{memoir}
\setlength{\parindent}{0em}
\newlength\myparskip
\setlength\myparskip{1em}
\abnormalparskip{\myparskip}
\makeatletter
\renewenvironment{quote}%
{\list{}{\rightmargin\leftmargin}%
\parskip=\myparskip\item[]}%
{\endlist}
\renewenvironment{quotation}%
{\list{}{\listparindent 1.5em%
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\parskip=\myparskip\item[]}%
{\endlist}
\makeatother
\begin{document}
This is a a normal paragraph. It will space correctly from the next.
This is the second paragraph to show how it is spaced correctly.
\begin{quote}
This is the first paragraph in a quote. It will space correctly from the next.
This is the second paragraph to show how it is spaced correctly.
\begin{quote}
This is another paragraph in a quote. It will space correctly from the next.
This is the second paragraph to show how it is spaced correctly.
\begin{quote}
This is yet another paragraph in a quote. It will space correctly from the next.
This is the second paragraph to show how it is spaced correctly.
\end{quote}
\end{quote}
\end{quote}
\end{document}
结果:
答案2
从 的名称可以看出\abnormalparskip
,该类的作者memoir
不喜欢包含非零 的文档\parskip
。我完全同意他的观点。
如果您希望您的文档尽可能丑陋(甚至可能更丑陋),您可以这样做。
\documentclass{memoir}
\setlength{\parindent}{0em}
\abnormalparskip{1em}
\makeatletter
\renewcommand*{\list}[2]{%
\ifnum \@listdepth >5\relax
\@toodeep
\else
\global\advance\@listdepth\@ne
\fi
\rightmargin\z@
\listparindent\everylistparindent
\itemindent\z@
\csname @list\romannumeral\the\@listdepth\endcsname
\def\@itemlabel{#1}%
\let\makelabel\@mklab
\@nmbrlistfalse
#2\relax
\@trivlist
\ifm@mnzpskip
\parsep=\parskip
\else
\parskip\parsep
\fi
\parindent\listparindent
\advance\linewidth -\rightmargin
\advance\linewidth -\leftmargin
\advance\@totalleftmargin \leftmargin
\parshape \@ne \@totalleftmargin \linewidth
\ignorespaces}
\makeatother
\begin{document}
This is a a normal paragraph. It will space correctly from the next.
This is the second paragraph to show how it is spaced correctly.
\begin{quote}
This is the first paragraph in a quote. It is not spaced right.
This paragraph is spaced smaller than the one before it.
\begin{quote}
This is yet another paragraph.
Now you can see the spacing is gone.
\end{quote}
\end{quote}
\end{document}
无需完全复制并修改其定义\list
,就可以更快地进行修补。
\documentclass{memoir}
\usepackage{etoolbox}
\setlength{\parindent}{0em}
\abnormalparskip{1em}
\makeatletter
\patchcmd{\list}
{\parskip\parsep}
{\ifm@mnzpskip\parsep\parskip\else\parskip\parsep\fi}
{}{}
\makeatother
\begin{document}
This is a a normal paragraph. It will space correctly from the next.
This is the second paragraph to show how it is spaced correctly.
\begin{quote}
This is the first paragraph in a quote. It is not spaced right.
This paragraph is spaced smaller than the one before it.
\begin{quote}
This is yet another paragraph.
Now you can see the spacing is gone.
\end{quote}
\end{quote}
\end{document}