1

I have a ToC with only a few lines too many to be in one page. I wish to get everything into one page and still looking good. With

\addtocontents{toc}{\protect\enlargethispage{\baselineskip}} 

that I found here, I managed to get everything into one page. The problem is that this only expands on the bottom of the page, and now the last line in the ToC is basically touching the page number, and that does not look good. My idea is to also expand the top margin (\voffset) for only this page, so I could lift the text a little upwards on the page. There is so much white space over the header anyway. But how do I do this?

Edit: So my Latex document look something like this:

\documentclass{article}
\begin{document}
\tableofcontents 
\addtocontents{toc}{\protect\enlargethispage{5\baselineskip}}
\section{S1}
\subsection{SS1}
\section{S2}
% Etc, just enough sections, subsections and subsubsections to be too many for one page
\end{document}

Edit 2: Thanks to the comment from Steven B. Segletes, I found a solution that works in my case from this thread. The trick was to squeeze the text togetter using \enlargethispage*{size}. So now my code looks like

\documentclass{article}
\begin{document}
\tableofcontents 
\enlargethispage*{2cm}
\newpage
\section{S1}
\subsection{SS1}
\section{S2}
% Etc, just enough sections, subsections and subsubsections to be too many for one page
\end{document}

However, as far as I understand, \enlargethispage*{size} does not expand the top margin. (Correct me if I'm wrong there). So in a future case, if I wanted to keep the ToC without squeezing it together. Is there a way to move it further up on the page?

Your Answer

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

Browse other questions tagged or ask your own question.