How to add some negative vertical space before a chapter title?
If you want to re-define the whole layout of chapter headings, you can use titlesec
and its \titlespacing
command. If you just want to change the vertical spacing, it's easy with xpatch
:
\documentclass{report}
\usepackage[showframe]{geometry}
\usepackage{xpatch}%
\begin{document}
{ %
\makeatletter
\xpatchcmd{\@makechapterhead}{%
\vspace*{50\p@}}{%
\vspace*{50\p@}
\vspace*{-3cm}}
{}{}
\chapter{A higher chapter}
}%
\noindent
\chapter{A lower chapter}
\end{document}
\chapter
issues a \clearpage
to start on a new page, and the insertion of a \vspace*
, while necessary, inserts content that is sufficient for the \clearpage
to be realised. We can avoid this by issuing the \clearpage
manually and removing this capability from the regular \chapter
command temporarily:
\documentclass{report}
\begin{document}
\chapter{First chapter}
\begingroup
\clearpage% Manually insert \clearpage
\let\clearpage\relax% Remove \clearpage functionality
\vspace*{-2cm}% Insert needed vertical retraction
\chapter{Second chapter}% Regular \chapter
\endgroup
\chapter{Third chapter}
\end{document}
The definition of \clearpage
is restored after \endgroup
as it adheres to the scoping rules of a redefinition within a group.