My problem is that page breaks and horizontal lines are inserted after sections, some chapters and the TOC. I have included all the code since I have no clue about which part of it is causing the problem or why.

\usepackage[letterpaper, top=4cm, bottom=2.5cm, left=4cm, right=2.5cm]{geometry}
\addto\captionsspanish{\renewcommand*\contentsname{TABLA DE CONTENIDOS}}

Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  
elit.   Etiam  lobortisfacilisis sem.  Nullam nec mi et 
neque pharetra sollicitudin.  Praesent imperdietmi nec ante. 
Donec ullamcorper, felis non sodales
\chapter{Reproducible Research}

Here is a live document.


The lines are to separate the headers of your pages and the text. You can disable them by setting its width to 0:


It gets set by the fancyhdr package. They are by default disabled on "special" pages, like the first page of the TOC or of chapters, which use a different format.

The empty pages are inserted because every chapter should start as a right page. If you want to disable this (which you really shouldn't), use the openany option:


You shouldn't put section without a chapter, because that doesn't make sense (your first section*).

| improve this answer | |
  • Thanks! This solves the problem with horizontal lines, but the page breaks are still there. – Federico Feb 17 '15 at 22:05
  • I've already added that, but please consider if you really want to remove them. – Juri Robl Feb 17 '15 at 22:06

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.