当新段落的第一行或第二行仅适合上一页时清除页面

当新段落的第一行或第二行仅适合上一页时清除页面

我想让新段落的第一行自动触发,\clearpage这样新段落的第一行就不会单独出现在上一页。这可行吗,还是我必须\clearpage在校对时手动添加?

梅威瑟:

\documentclass[a4paper,11pt,twoside,openright,hidelinks]{memoir}
\usepackage[danish]{babel}
\usepackage[%
    bindingoffset=0.5in,%
    left=1in,right=1in,top=1in,bottom=1.5in,%
    footskip=.5in,%
    marginparwidth=2.2cm,
    ]{geometry}
\usepackage{lipsum}
\setlength{\parindent}{0mm}
\setlength{\parskip}{2mm}
\linespread{1,2}


\begin{document}
\chapter{Chapter}

\lipsum[1-3]

this line is the line that i want to begin on the next page automatically. its contents are unknown, maybe its to conclude on the written blindtext? Could be something else like the start of a recipe, anyway, its a really really really really really really really really really really really really really really really really long sentence
\end{document}

答案1

一行之后断线的惩罚被\clubpenalty设置为 10000,以防止在那里断线。

\documentclass[a4paper,11pt,twoside,openright,hidelinks]{memoir}
\usepackage[danish]{babel}
\usepackage[%
    bindingoffset=0.5in,%
    left=1in,right=1in,top=1in,bottom=1.5in,%
    footskip=.5in,%
    marginparwidth=2.2cm,
    ]{geometry}
\usepackage{lipsum}
\setlength{\parindent}{0mm}
\setlength{\parskip}{2mm}
\linespread{1,2}


\begin{document}
\chapter{Chapter}

\lipsum[1-3]

\clubpenalty=10000

this line is the line that i want to begin on the next page automatically. its contents are unknown, maybe its to conclude on the written blindtext? Could be something else like the start of a recipe, anyway, its a really really really really really really really really really really really really really really really really long sentence
\end{document}

相关内容