General ⇒ Reducing space above chapter headings
Reducing space above chapter headings
Also, how do I reduce the size of the font in the chapter headings?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Reducing space above chapter headings
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Reducing space above chapter headings
----
I've looked again at the titlesec docs and they are very poorly written. It seems to be a simple thing I want to do, and I am having a lot of trouble figuring it out. There are a lot of options and it is very confusing on how to use them, and there are very few examples given.
Can someone please post an example of simply reducing the font size and the space above a chapter heading using titlesec? I would much appreciate the example.
Reducing space above chapter headings
Code: Select all
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\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@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
P.S: Of course, this is not a titlesec example, but a direct approach.
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Reducing space above chapter headings
you could just follow Juanjo's approach.
Even if the titlesec documentation seems to be complicated, reading 9.2. Standard Classes would really help. If you just include
Code: Select all
\usepackage{titlesec}
Code: Select all
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
The same could be done with \section, \subsection etc. if you want. I believe those examples in 9.2. are an easy start.
Stefan