I am doing my Bachelor report. I can't get the chapter name to an higher location, so there is more space for text.
-
6Which document class do you use? Please provide a MWE.– Marco DanielMay 25, 2012 at 19:07
-
See: tex.stackexchange.com/questions/43087/…– Marco DanielMay 25, 2012 at 19:09
-
Or: tex.stackexchange.com/questions/17299/…– Marco DanielMay 25, 2012 at 19:09
-
Or: tex.stackexchange.com/questions/25650/…– Marco DanielMay 25, 2012 at 19:09
1 Answer
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.