63

I want to decrease the vertical space between the top of the page and the chapter heading. I have tried to follow the instructions for titlesec but I am not successful. I have tried the following two setups without any changes occuring.

First:

\documentclass[12pt]{report}  
\usepackage[compact]{titlesec}  
\begin{document}  
\chapter{Characters}

The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them. 

\end{document}

Second:

\documentclass[12pt]{report}  
\usepackage{titlesec}  
\titleformat{\chapter}[display]  
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}  
\titlespacing{\chapter}{0pt}{0pt}{0pt}  
\begin{document}  
\chapter{Characters}  

The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them. 

\end{document}
0

2 Answers 2

73

For many reasons, titlesec continues to use the default \@makechapterhead macro for typesetting the chapter title when the chapter style is display. So

\documentclass[12pt]{report}
\usepackage{titlesec}
\titleformat{\chapter}[display]   
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}   
\titlespacing*{\chapter}{0pt}{-50pt}{40pt}
\begin{document}
\chapter{Characters}

The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea
after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but
was only able to prove some of them.

\end{document}

will do, since \@makechapterhead adds a 50pt space above the title and 40pt after it.

A different strategy might be to redefine \@makechapterhead yourself:

\documentclass[12pt]{report}

\makeatletter
\def\@makechapterhead#1{%
  %%%%\vspace*{50\p@}% %%% removed!
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\def\@makeschapterhead#1{%
  %%%%%\vspace*{50\p@}% %%% removed!
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \Huge \bfseries  #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother

\begin{document}
\chapter{Characters}

The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea
after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but
was only able to prove some of them.

\end{document}
4
  • 4
    The first solution has a bit problem if before the first chapter there's a paragraph. The second solution works, but, is it possible to make the Chapter number and title in the same line?
    – athos
    Mar 10, 2015 at 10:19
  • @athos A new question is needed.
    – egreg
    Mar 10, 2015 at 11:32
  • @egreg As for the second solution — inserting (again) the \def commands inside a makeatletter,makeatlatter in the preamble — is it recommended? What is the difference between this approach and using titlesec's commands, if the two results look just the same?
    – tush
    Apr 30, 2022 at 21:00
  • @tush I'd prefer titlesec, if compatible with your class.
    – egreg
    Apr 30, 2022 at 21:28
4

little update for the memoir (which is based on book, so it should work in both):

the simple line \setlength{\beforechapskip}{20pt} works like a charm with no need for extra packages. \beforechapskip is used by \chapterheadstart which in turn is used by \makechapterhead as the \vspace{...} above the heading.

1
  • 12
    \beforechapskip does not exist in the report or book classes (memoir adds it) May 27, 2021 at 23:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .