I have a TOC which will be multiple pages long. On the 2nd and proceeding pages the TOC is filling into the top margins. How can I prevent this? I am using the tocloft package.

\documentclass[oneside, 12pt]{book}
\usepackage{tabularx} %for tables
\usepackage{graphicx} %for pictures
\usepackage{setspace} %for double spacing
\usepackage[titles]{tocloft}  %for formatting toc
\usepackage{titlesec} %for formatting headings
\geometry{letterpaper, left=1in, top=0in, right=1in}

\renewcommand*\contentsname{Table of Contents}







Much thanks, Ben enter image description here

  • Welcome! You need to change something in your code which is responsible for the undesirable effect. I hope this helps because it is about all it is possible to say based on the information you've provided. – cfr Aug 3 '16 at 1:04
  • @cfr Hmm I felt like the solution was a line of code to make the TOC follow the margins. But I have updated with my code. – Ben Aug 3 '16 at 1:26
  • You surely don't think the ToC goes in the margins by default and everybody has to do something to get it out, do you? That would be very inefficient and inconvenient all round :-). – cfr Aug 3 '16 at 2:09
  • We need code for a minimal document which we can copy-paste and compile to reproduce the issue. This means it needs a document environment, a \tableofcontents and enough stuff to go in the contents for the unwanted effect to appear. – cfr Aug 3 '16 at 2:11
  • 1
    However, in this case, remove top=0in. That sets your top margin to nothing. Hence, the ToC is not in your margin - you just don't have a margin. – cfr Aug 3 '16 at 2:12

The line

\geometry{letterpaper, left=1in, top=0in, right=1in}

sets the layout for the page. top=0in sets the top margin to zero. This means that stuff starts right at the top of the paper, with no margin at all. (Or rather, there is a margin, technically, but it is zero so invisible.)

To avoid this, simply remove top=0in.

\geometry{letterpaper, left=1in, right=1in}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.