I am using sectsty to format my chapter titles, but I want the vertical space between Chapter # and Chapter Title gone, and I can't find a way to do it without losing the styles applied by sectsty.
Here is a MWE
\documentclass[fontsize=12pt, paper=a4]{book}
\usepackage{lipsum}
\usepackage{sectsty}
\chapternumberfont{\LARGE\uppercase}
\chapterfont{\thispagestyle{empty}\LARGE\centering\uppercase}
\sectionfont{\large\uppercase}
\subsectionfont{\normalsize}
\begin{document}
\chapter{Cap name one}
\lipsum[1]
\section{Section 1.1}
\lipsum[2-4]
\chapter{Cap name two}
\lipsum[5]
\section{Section 2.1}
\lipsum[6]
\end{document}
Now if I add this following piece of code before \begin{document}
the space is gone, but so is the style from secsty
\makeatletter
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space {\thechapter}
\par\nobreak
\vskip 0\p@
\fi
\fi
\interlinepenalty\@M
{\parbox{\textwidth}{\Huge \bfseries \linespread{1.2}\selectfont #1\par\nobreak}}
\vskip 40\p@
}}
\makeatother
Best Answer
You could use
titlesec
insteadsectsty
:Note that I have changed
fontsize=12pt
andpaper=a4
because they are unknown by classbook
.Result: