[Tex/LaTex] Changing space before chapter without titlesec package

chapterssectioningspacingtitlesec

I am sorry if this is a repeated question, I could not find anything similar on the forum search.

How to adjust the space before the chapter heading without using titlesec package.

I tried this code but no luck:

\renewcommand*{\chapterheadstartvskip}{\vspace*{-\topskip}}

It says that \chapterheadstartvskip is not defined.

Best Answer

You didn't give the documentclass you are using. So I will let loose my guess that it is book. Here the default space above is defined by \vspace*{50\p@}. This can be patched as in this code:

\documentclass{book}
\usepackage{blindtext,showframe}   %% just for demo
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\@makechapterhead}{\vspace*{50\p@}}{\vspace*{20\p@}}{}{}
\xpatchcmd{\@makeschapterhead}{\vspace*{50\p@}}{\vspace*{20\p@}}{}{}
\makeatother
\begin{document}
  \tableofcontents
  \Blinddocument
\end{document}

Adjust 20 in \vspace*{20\p@} as you wish.