Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using LaTeX to write my dissertation, and I have realised that on the table of contents and on every chapter page, LaTeX leaves a lot of empty space.

What I mean is that lets say in the page where chapter 1 begins, from the top of the page until the chapter title there is much more vertical space than on any other page. The same goes with chapter 2 etc... and for contents page as well.

Can anybody help me to remove that space? Is there any mistake in my code or something like that? Is this a default of LaTeX?

the preamble is

\documentclass[12pt,twoside]{report}
\pagestyle{plain}
\usepackage{a4paper}
\usepackage{setspace}
\doublespacing 
\usepackage{amssymb}
\usepackage{amsmath} 

I've tried the methods below, but none of them work properly.

share|improve this question
    
Please provide a minimal example. The spacing really depends on the document class and mabye related packages. –  Marco Daniel Jan 4 '12 at 6:41
    
I want to add that this default behaviour of scrreprt is really strange. Usually you don't want so much whitespace before a chapter, at least if you have a limit of totally available space. –  TomM Dec 26 '13 at 13:33
add comment

migrated from stackoverflow.com Jan 4 '12 at 6:26

This question came from our site for professional and enthusiast programmers.

4 Answers

Werner answered the questions for the standard classes. If you use scrbook or scrreprt (KOMA-script) the space before and after the chapter title is given by \chapterheadstartvskip and \chapterheadendvskip. This "length" are not defined as length instead as a command. To change the settings you must use renewcommand:

\renewcommand*{\chapterheadstartvskip}{\vspace*{1cm}}
\renewcommand*{\chapterheadendvskip}{\vspace{2cm}}
share|improve this answer
1  
Thank you for answering. Incidentally, I also found a reply by Markus Kohm himself which leads to \renewcommand*{\chapterheadstartvskip}{\vspace*{-\topskip}}. –  henry Jun 8 '13 at 7:55
    
@henry: Of course this is another possibility. \topskip has a length of 11pt. –  Marco Daniel Jun 8 '13 at 10:21
add comment

The default style for LaTeX's book class is quite generous with the whitespace on the page -- there's probably nothing wrong with your code.

One way to change the behavior of headings is to use the titlesec package, which allows you finegrained control over how all the levels of headings are displayed. For example, the following code in the preamble of the document would remove the whitespace above the chapter heading:

\usepackage{titlesec}

\titleformat{\chapter}[display]
    {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{40pt}

In the last line, the four measurements are the left, upper and lower spacing around the heading, respectively. The second one is normally 50pt; it was changed here to 0pt to remove the white space above the chapter heading completely.

share|improve this answer
add comment

This is the default behaviour of for \chapter (and \chapter*) in both book and report document class, so you're doing nothing wrong. This default length is 50pt.

You could use the etoolbox package to remove (or modify) the spacing above the chapter headings. Here's a minimal example that will work with either book or report document class:

enter image description here

\documentclass{book}
\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{}{}{}% Removes space above \chapter head
\patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{}{}{}% Removes space above \chapter* head
\makeatother
\begin{document}
\chapter{A chapter}
\chapter*{Another chapter}
\end{document}

\patchcmd searches for \vspace*{50\p@} in both \@makechapterhead and \@makeschapterhead and replaces it with nothing, thereby removing the space. If you want to add a little space, you can insert something different as the replacement text. For example

\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{\vspace*{20pt}}{}{}%
\patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{\vspace*{20pt}}{}{}%

will insert 20pt instead of the default 50pt.

showframe was added to show the frame of the text block and was merely used for illustrative purposes - you can remove this.


An alternative to this would be to use the titlesec package. However, in order to modify the \chapter spacing (via \titlespacing{\chapter}...), you are also required to modify the \chapter format (via \titleformat{\chapter}...). See the titlesec documentation for more information.

share|improve this answer
add comment

With the report class the space before a chapter title is 50pt. The easiest method for changing it is to patch the two relevant commands:

\documentclass[a4paper,12pt,twoside]{report}
\usepackage{amssymb}
\usepackage{amsmath}

\usepackage{setspace}
\doublespacing 

%\pagestyle{plain} % default for report

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makechapterhead}{50\p@}{0pt}{}{}
\patchcmd{\@makeschapterhead}{50\p@}{0pt}{}{}
\makeatother

<rest of the preamble>

\begin{document}

<the document>

\end{document}

You can play with the figures: instead of 0pt you can put any dimension you want.

Note that there's no a4paper package; to get page parameters suitable for ISO A4 paper you need to specify a4paper as an option to \documentclass.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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