1

I have a section with columns near the end of a page, and when compiling it breaks page. I'd like to keep my columns on the first page. How to do it ? Thanks

\section{Section}
\begin{multicols}{4}
    \begin{itemize}
        \item a
        \item b
        \item c
        \item d
    \end{itemize}
\end{multicols}

compiled code

diiaeac
  • 11

2 Answers2

1

An extension to my comment. \enlargethispage can be helpful but unfortunately is not a universal panacea.

% enlargeprob.tex  SE 637686

\documentclass{article}

\usepackage{lipsum}

\begin{document}

\enlargethispage{1\baselineskip} %% extends text by one line %\enlargethispage{2\baselineskip} %% extends text by two lines, bumping into the footer %\enlargethispage{3\baselineskip} %% extends text by three lines, overprinting the footer

\lipsum[1-6]

\end{document}

Peter Wilson
  • 28,066
1

While you are definitely not using a standard \section, with no MWE I had to make do (your mileage may vary). Without special treatment, anything over 38\baselineskip will force a page break.

The main problem is that multicols adds extra space before and after. One way to remove these spaces it to put it into a minipage, which absorbs spaces at the top and bottom.

\documentclass[letterpaper]{article}
\usepackage{multicol}
\usepackage{showframe}
\begin{document}
\noindent\rule{\textwidth}{39\baselineskip}

\section{Section}\everypar{}% disable @afterheading \hrule \noindent\begin{minipage}{\textwidth} \begin{multicols}{4} \begin{itemize} \item a \item b \item c \item d \end{itemize} \end{multicols}\end{minipage} \hrule

\end{document}

John Kormylo
  • 79,712
  • 3
  • 50
  • 120