\documentclass{article}
\usepackage{lipsum}
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\scshape}
{\thesection}
{1em}
{}
\titlespacing*{\section}
{0pt}
{2ex plus 1ex minus .2ex}
{1ex plus .2ex}
\makeatletter
\newenvironment{myquote}[1]{%
\small\par\addvspace{3ex}
\if@nobreak
% we're at the start of a section
% add the indent
\if@afterindent\else\hspace*{\parindent}\fi
% and instruct LaTeX to reset \@afterheading at the end
\def\reset@nobreakatend{\@afterheading}%
\else
\def\reset@nobreakatend{}%
\fi
\begin{minipage}{\dimexpr\linewidth -2\parindent\relax}%
\def\myquoteauthorname{#1}%
}{%
\par\vspace{1ex}
\noindent
\hspace*{0.25\linewidth}%
\rule{0.5\linewidth }{.4pt}
\par\addvspace{1ex}
\centering
\textsc{\myquoteauthorname}\par\vspace{3ex}
\end{minipage}
\par\nobreak\reset@nobreakatend}
\makeatother
\begin{document}
\begin{myquote}{---test}
\lipsum[1-4]
\end{myquote}
\begin{myquote}{---test-2}
\lipsum[3-4]
\end{myquote}
\end{document}
在上面的 MWE 中(慷慨提供的代码@egreg) 第二个myquote
环境继续在同一页中溢出,而不是跳转到下一页。如何编辑环境,myquote
以便它很好地跳转到下一页并继续。(是否可以选择如果要跳转,则从下一页开始。)