Page Layout ⇒ Vertical White Space above TOC Heading
Vertical White Space above TOC Heading
Any help would be greatly appreciated.
Thanks
Here is the code I am using:
%Thesis main file
%paper and font size
\documentclass[a4paper,11pt]{report}
%set margins
\usepackage[a4paper]{geometry}
\geometry{top=2cm, bottom=2cm, left=2cm, right=2cm}
%line spacing
\linespread{1.6}
%page number
\pagestyle{plain}
\usepackage[compact]{titlesec}
\newcommand{\bigrule}{\titlerule[0.1mm]}
\titleformat{\chapter}[display]
{\bfseries\Huge}
{%
\vskip-2cm
\titlerule
\filright
\Large\chaptertitlename\
\Large\thechapter}
{0mm}
{\filright}
[\vspace{0.1mm} \bigrule]
\titlespacing{\section}{1pt}{*1}{*1}
\titlespacing{\subsection}{0pt}{*0}{*0}
\titlespacing{\subsubsection}{0pt}{*0}{*0}
%titles
\title{x}
\author{x}
\date{2010-2011}
%document sections
\begin{document}
\maketitle
%table of contents
\tableofcontents{1}
%Chapters
\include{Introduction}
%Bibliography
\bibliographystyle{plain}
\bibliography{Bibliography}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: Vertical White Space above TOC Heading
\tableofcontents
\end{spacing}
Greetings
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Vertical White Space above TOC Heading
You can do this by the titlesec package that you are already using (see code below).Lucinda wrote:[…] I have to adhere to strict margin, font size and double line spacing guidelines so would like to remove the large amount of white space above the title in the table of contents and Bibliography. […]
The setspace package offers mechanism for increased line spacing that work much better than your method (see code below).Lucinda wrote:[…] Also is there a way of reducing the spacing between items in the TOC? […]
Code: Select all
\documentclass[11pt,a4paper,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage{setspace}
\usepackage[compact]{titlesec}
\usepackage{blindtext}
\titleformat{\chapter}[display]
{\singlespacing\bfseries\Huge}
{\titlerule\filright\Large\chaptertitlename\ \Large\thechapter}
{0pt}
{\filright}
[\titlerule]
\titlespacing*{\chapter}{0pt}{0pt}{*2}
\pagestyle{plain}
\title{The Title}
\author{The Author}
\begin{document}
\maketitle
\tableofcontents
\doublespacing
\Blinddocument
\begin{thebibliography}{9}
\item Bibliography Item
\end{thebibliography}
\end{document}
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10