我偶然发现了 lineno.sty 与 \widowpenalty 和 \clubpenalty 之间的交互作用。最好将其放入可在此处搜索的记录中:
\documentclass[12pt]{article}
\widowpenalty=200000 %/*150*/ No Widows at top of page
\clubpenalty=100000 % this is really orphanpenalty. No orphans at bottom of page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{lineno}
\linenumbers
\begin{document}
\title{The IPCC Shared Socioeconomic Pathways (SSPs):
Explained, Evaluated, Replaced?}
\author{anonymous}
\date{\today}
\maketitle
\begin{abstract}
Shared socioeconomic pathways are perhaps the most influential \emph{economic policy} analyses today. Yet, their design is problematic. Moreover, all five SSP baseline scenarios are based on empirically exceedingly improbable scenarios. An alternative --- econometric time-series analysis based on worldwide IPAT components --- suggests alternative \emph{emission} scenarios, mapping into expected radiative forcing of about RCP~6.5, with a reasonable high-plausibility range from RCP~4.5 to RCP~7.0.
\end{abstract}
\end{document}
让你
删除两条惩罚线即可获得正确的输出
建议:如果 lineno.sty 检测到有问题的惩罚,它最好发出警告或出错。我只是花了一段时间才将其隔离开来。
答案1
TeXbook 说在垂直模式下 −10000 的惩罚会强制分页,但是你会发现plain.tex
\def\supereject{\par\penalty-20000 }
(实际上-\@MM
,但它是相同的)并\supereject
在定义中使用\bye
\outer\def\bye{\par\vfill\supereject\end}
如果我们分析一下输出例程,我们看到这个大惩罚被用作信号。在特定情况下,它会触发刷新插入队列。−10000 惩罚足以强制进行最后的分页,但 TeX 会记录所使用的确切值,因此它可以分支案例。
非常相似的机制用于lineno.sty
在输出行之前分解行,以便添加行号。例如,在某个时候,它会设置\interlinepenalty
为 -100000,以便发送信号。但是当存在\widowpenalty
200000 时,它的计算就完全被破坏了。顺便说一句,非常有趣的代码。
如果您想禁止寡妇和俱乐部线路,只需使用 10000(但无论如何这不是一个好的值)。