First a variant of Werner's solution that allows empty lines after \changebreak
:
\documentclass{scrreprt}
\usepackage{lipsum}
\makeatletter
\newcommand*{\changebreak}{%
\par
\vspace{\baselineskip}%
\changebreak@skippar
}
\def\changebreak@skippar{%
\@ifnextchar\par{%
\expandafter\changebreak@skippar\@gobble
}{%
\noindent
\ignorespaces
}%
}
\makeatother
\begin{document}
\lipsum[1-3]
\changebreak
\lipsum[4-6]
\changebreak
\lipsum[7-9]
\end{document}
The detection of the empty line quickly fails if there is something
inbetween, a macro definition, an assignment (but comments do not
disturb).
LaTeX has the same problem for its section headers. There it uses macro \@afterheading
that uses \everypar
to
get at the start of the next paragraph and undoes the paragraph indent with a \lastbox
trick, because the paragraph indent is set as box. \@afterindentfalse
tells the
macro \@afterheading
that the indent at the next paragraph is not wanted.
The other task of \@afterheading
to keep the first two lines of the starting paragraph together is here
also welcome.
\documentclass{scrreprt}
\usepackage{lipsum}
\makeatletter
\newcommand*{\changebreak}{%
\par
\vspace{\baselineskip}%
\@afterindentfalse
\@afterheading
}
\makeatother
\begin{document}
\lipsum[1-2]
\changebreak
\lipsum[3-4]
\changebreak
\lipsum[5-6]
\changebreak
\typeout{Last changebreak}
\lipsum[7-8]
\end{document}
For the case (probably not likely) that it should be avoided that the break hits a page break,
then the following prevents a page break at the break. And if the
previous paragraph is not yet finished, a last lonely line could also be forbidden.
LaTeX's \@afterheading
tries the same with the next two lines.
\documentclass{scrreprt}
\usepackage[nopar]{lipsum}
% Option `nopar' suppresses the
% paragraph ends in lipsum paragraphs
\makeatletter
\newcount\chgbrk@widowpenalty
\newcommand*{\changebreak}{%
% If we are happy and the previous paragraph
% is not yet finished, we can change
% the widowpenalty to prevent a previous
% lonely line.
\chgbrk@widowpenalty\widowpenalty
\widowpenalty\@M
\par
\widowpenalty\chgbrk@widowpenalty
\nobreak
\vspace{\baselineskip}%
\@afterindentfalse
\@afterheading
}
\makeatother
%\setlength{\textheight}{\baselineskip}% stress test
\begin{document}
\lipsum[1]
\lipsum[2]
\changebreak
\lipsum[3]
\lipsum[4]
\changebreak
\lipsum[5]
\lipsum[6]
\end{document}