I am doing my Bachelor report. I can't get the chapter name to an higher location, so there is more space for text.
Asked
Active
Viewed 3,182 times
5
-
6Which document class do you use? Please provide a MWE. – Marco Daniel May 25 '12 at 19:07
-
See: http://tex.stackexchange.com/questions/43087/remove-space-before-chapter-title-with-koma-script-scrbook – Marco Daniel May 25 '12 at 19:09
-
Or: http://tex.stackexchange.com/questions/17299/removing-vertical-space-before-chapter-headings – Marco Daniel May 25 '12 at 19:09
-
Or: http://tex.stackexchange.com/questions/25650/vertical-space-between-chapter-title-and-top-in-book-document-class – Marco Daniel May 25 '12 at 19:09
1 Answers
3
If you use either the report or book document class (or a document class that's directly based on them), you could utilize the macro \patchcmd from the etoolbox package to modify the commands \@makechapterhead and @makeschapterhead, as these are the macros that govern the whitespace above and below the chapter headers.
The following MWE uses the book document class, but it works just as well with the report class. It sets the vertical whitespace above the chapter header to 0 and cuts the vertical whitespace below the chapter header in half. Feel free to modify these choices to suit your document's needs.
\documentclass{book}
\usepackage{etoolbox,lipsum} % "lipsum" for filler text
\makeatletter
% "\@makechapterhead" applies to ordinary or numbered chapters
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{}{}{}
\patchcmd{\@makechapterhead}{\vskip 40\p@}{\vskip 20\p@}{}{}
% "\@makeschapterhead" applies to "starred" or un-numbered chapters
\patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{}{}{}
\patchcmd{\@makeschapterhead}{\vskip 40\p@}{\vskip 20\p@}{}{}
\makeatother
\begin{document}
\chapter*{An unnumbered header}
\lipsum[1]
\chapter{A numbered chapter header}
\section{A numbered section header}
\lipsum[2]
\end{document}
Of course, if you use an entirely different document class, the code above almost certainly doesn't apply.
Mico
- 506,678