0

I tried to play with \clubpenalty and \windowpenalty to avoid orphans like this:

enter image description here

Unfortunately, I cannot make the Payments section jump to the next page.

\section{Payments}

\begin{itemize}
  \item 50 \% with order.
  \item 40 \% when 50 \% of the project is done.
  \item 10 \% on final receipt.
\end{itemize}

How should I fix this?

2
  • Does \usepackage[avoid-all]{widows-and-orphans} work for you? May 9, 2022 at 20:45
  • 2
    widows and orphan penalties are only relevant inside a paragraph. You have here a break between paragraphs (list items). May 9, 2022 at 22:25

1 Answer 1

1

You haven't produced a MWE that demonstrates what you want solving so I have not tested it or produced MWEs.

a) If all you want is to shift the header you could add \usepackage{needspace} and then put \needspace{5cm} before your section header

Best to hard boil this into your heading settings for example

\usepackage{needspace}

\usepackage[explicit,pagestyles]{titlesec}

\titleformat{\section}{\needspace{10\baselineskip}\color{headcol}\large\sffamily\bfseries}{\thesection}{1em}{#1}[]
\titleformat{\subsection}{\needspace{7\baselineskip}\color{headcol}\large\sffamily\bfseries}{\thesubsection}{1em}{#1}[]
\titleformat{\subsubsection}{\needspace{4\baselineskip}\normalsize\sffamily\bfseries}{\thesubsubsection}{1em}{#1}[]

b) If you are trying to control orphans and widows within the list You could do something like this. Pick your penalties at each level.

\documentclass{book}
\usepackage{enumitem}

\newlist{myfinelist}{itemize}{7}
\setlist[myfinelist,1]{}
\setlist[myfinelist,2]{beginpenalty=5000}
\setlist[myfinelist,3]{beginpenalty=5000}
\setlist[myfinelist,4]{beginpenalty=5000}
\setlist[myfinelist,5]{beginpenalty=5000}
\setlist[myfinelist,6]{beginpenalty=5000}
\setlist[myfinelist,7]{beginpenalty=5000}

\begin{document}

\begin{myfinelist}
\item[•] Hello Hello
\item[•] Hello Hello
    \begin{myfinelist}
    \item[•] Hello Hello
    \item[•] Hello Hello
        \begin{myfinelist}
        \item[•] Hello Hello
        \item[•] Hello Hello
        \item[•] Hello Hello
        \item[•] Hello Hello
        \item[•] Hello Hello
    \end{myfinelist}
    \item[•] Hello Hello
    \item[•] Hello Hello
    \item[•] Hello Hello
\end{myfinelist}
\item[•] Hello Hello
\item[•] Hello Hello
\item[•] Hello Hello
\end{myfinelist}

\end{document}
2
  • Please add a screen shot of your result to the answer.
    – Unknown
    May 10, 2022 at 17:03
  • Pointless to add a screenshot as original poster's question cannot be reproduced without MWE, and consequently the answer is a general solution May 10, 2022 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .