Work with widows in a multi-core environment

I have problems connecting to widows in a multi-instance environment, i.e. I was unable to instruct LaTeX to remove them.

This PDF document shows an example of a problem. At the top of the second page, I get the widow from the last paragraph of the first page. I tried a couple of approaches, no luck:

  • for parameter \widowpenaltyand \clubpenaltyvalue
  • switching between \raggedcolumnsand\flushcolumns
  • counter settings collectmoreandunbalance

I also read the documentation for multipoint copying , but did not find anything useful.

Is there anything else to try?

( Full LaTeX document for the above example )

+4
source share
2 answers
{\obeyspaces\gdef\nomorebreak{\beginnomorebreak\let \nobreakspace}}
\def\beginnomorebreak{\begingroup
   \def\par{\endgraf\endgroup\par\penalty 9999 }\obeyspaces
   \brokenpenalty 10000 \widowpenalty 10000 \clubpenalty 10000 }
\def\nobreakspace{\vadjust{\nobreak} \removespaces}
\def\removespaces{\futurelet\next\checkspace}
\def\checkspace{\ifx\next\nobreakspace\expandafter\removesinglespace\fi}
\def\removesinglespace#1{\removespaces}

Paste \nomorebreakanywhere in your paragraph. Page breaks will be prohibited after this macro until the end of the paragraph.

+1
source

It appears that there are options in the TeX FAQ for Managing Widows and Orphans that you have not tried yet.

Getting rid of a widow can be harder. Options

  • If the previous page contains a long paragraph with a short last line, you can probably set it to "tight": write \looseness=-1immediately after the last word in the paragraph.
  • If this does not work, adjust the page size \enlargethispage{\baselineskip}to use the "add line" to the page, which may result in an entire paragraph on one page.
  • \enlargethispage{-\baselineskip} ( ) " ".
+1

Source: https://habr.com/ru/post/1735594/


All Articles