How can I adjust a widow/orphan entry in the ToC in the memoir class? I have two orphan-like lines in the ToC. How to fix? Sample pages from ToC.The entries in question are from \chapter divisions in the document.
Thank you, David and John for helping. I should have posted something like the minimal example below (my apologies) since it always helps for problem solving. I was able to make this produce the problem. I have commented out David's solution to see the problem. I didn't know you could add a \clearpage to \addtocontents. Brilliant!
I've included the code for the peculiar formatting of divisions in the ToC.
When using the solution, just be sure to run it twice.
Thanks again!
fr. mgc
\documentclass[14pt,extrafontsizes]{memoir}
\settypeblocksize{8in}{5in}{*}
\setlrmargins{*}{*}{1}
\setulmargins{1.5in}{*}{.5}
\checkandfixthelayout
\usepackage{lipsum}
\renewcommand{\thesection}{\arabic{section}}%
\cftsetindents{chapter}{0em}{3.0em}
\setlength{\cftbeforechapterskip}{0pt plus 0pt}% make ToC line spacing for chapters like sections
\renewcommand*{\cftchapterfont}{\cftsectionfont}% make ToC fontsize for chapters like sections
\cftpagenumbersoff{chapter}% no page numbers for chapters in toc
\renewcommand{\chapternumberline}[1]{}% no chapter numbers in toc
\begin{document}
\tableofcontents*
\chapter{Fred and Friends}
\lipsum[1-2]
\section{One Fine Day}
\lipsum[3-4]
\section{Another Fine Day}
\lipsum[5-6]
\section{Same Old Same Old}
\lipsum[7-8]
\section{Something Different}
\lipsum[9-10]
\section{Something Even More Different}
\lipsum[1-10]
\section{Something Stupendously Different}
\lipsum[1-10]
\section{Something Amazing}
\lipsum[1-10]
\chapter{Blah}
\lipsum[1-10]
\section{More of the Same}
\lipsum[1-10]
\chapter{Fred and Friends}
\lipsum[1-10]
\section{One Fine Day}
\lipsum[1-10]
\section{Another Fine Day}
\lipsum[1-10]
\section{Same Old Same Old}
\lipsum[1-10]
\section{Something Different}
\lipsum[1-10]
\chapter{Blah}
\lipsum[1-10]
\section{More of the Same}
\lipsum[1-10]
\chapter{Fred and Friends}
\lipsum[1-10]
\section{One Fine Day}
\lipsum[1-10]
\section{Another Fine Day}
\lipsum[1-10]
\section{Same Old Same Old}
\lipsum[1-10]
\section{Something Different}
\lipsum[1-10]
\chapter{Blah}
\lipsum[1-10]
\section{More of the Same}
\lipsum[1-10]
%\addtocontents{toc}{\clearpage}
\chapter{Fred and Friends}
\lipsum[1-10]
\section{One Fine Day}
\lipsum[1-10]
\section{Another Fine Day}
\lipsum[1-10]
\end{document}

\needspace(needspace package} using\addtocontentsat the start of each section, A rather complicated example is given by https://tex.stackexchange.com/questions/375439/interference-between-titlesec-and-parttitle-in-a-book-with-automatic-page-breaki – John Kormylo Oct 22 '23 at 21:36\addtocontents{toc}{\clearpage}before\chapter{Commemoration of the Saints}but that is guessing what you want to do here. – David Carlisle Oct 22 '23 at 21:59\cftbeforechapterskipmore strechable. That often helps. – daleif Oct 24 '23 at 07:38