# How to change vertical spacing on frontmatter chapters

I'm new to latex, and I'm writing a document (book), since vertical space above \chapter is to big I want to reduce it, for chapters in the mainmatter I have no problem, because I use

\documentclass [12pt,oneside]{book}
\usepackage{titlesec}

\titleformat{\chapter}{\Huge\bfseries}{\chaptername\ \thechapter}{0pt}{\vskip40pt\raggedright}
\titlespacing{\chapter}{0pt}{-50pt}{40pt}
\begin{document}
\frontmatter

\tableofcontents
\chapter{Abstract}
this...
\mainmatter
\chapter{Introduction}
work...
\chapter{Results}
good ones...
\end{document}


where the "-50pt" is my desired vertical space above chapter. The problem arises when I try to do the same on the frontmatter chapters (abstract, toc, dedication, etc), since the code above does not affect them. Is there a way to achieve this?

• Welcome to TeX.SX! Please make your example compilable by adding the documentclass, the required packages and the document environment to your code, so that it reproduces your issue. That will help us help you. Jan 20 '18 at 6:01
• Chapters in front matter is numberless. Take a look at this one may help! tex.stackexchange.com/questions/102116/… Jan 20 '18 at 7:09

This is the definition of \tableofcontents in standard class book

\newcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi
}


The table of contents' caption is printed by the stared version of chapter which has no label and counter. The titlesec package has numberless key for stared version titles.

\documentclass [12pt,oneside]{book}
\usepackage[showframe]{geometry}
\usepackage{titlesec}
\titleformat{\chapter}{\Huge\bfseries}{\chaptername\ \thechapter}{0pt}{\vskip40pt\raggedright}
\titleformat{name=\chapter,numberless}[hang]{\Huge\bfseries}{}{0pt}{\raggedright}
\titlespacing{\chapter}{0pt}{-50pt}{40pt}
\begin{document}
\frontmatter
\tableofcontents
\chapter{Abstract}
this...
\mainmatter
\chapter{Introduction}
work...
\chapter{Results}
good ones...
\end{document}