2

I would like to know how do I make the MWE below work. How do I get know that

\widowpenalty

has been set to -infinite ?

Also, I would like to ask what is the orphan penalty starting with \g called in LaTeX.

\documentclass{article}
\widowpenalty=-10000

\begin{document}
\widowpenalty=-10000
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

222222222222222222222222222222222

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


\end{document}
6

A penalty \widowpenalty is added to the main vertical list only when TeX is contributing a multiline paragraph, between the last two lines.

If a paragraph has only one line, it can generate neither a widow nor an orphan line.

The following document will end up with two pages, because it consists of a three-line paragraph.

\documentclass{article}
\widowpenalty=-10000

\begin{document}

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
222222222222222222222222222222222\\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

\end{document}
  • What is the difference between \clubpenalty and \widowpenalty ? Thank you. – user2925716 Nov 15 at 13:07
  • @user2925716 \clubpenalty is inserted between the first two lines of a multiline paragraph. A two-line paragraph gets both. – egreg Nov 15 at 14:24
  • (Complement to @egreg’s comment.) More precisely, in a two-line paragraph a single penalty, equal to the sum of \clubpenalty and \widowpenalty, is inserted between the lines. For example, try {\widowpenalty = -10000 \clubpenalty 5000 \par}. – GuM Nov 15 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.