5

I am using code from this answer https://tex.stackexchange.com/a/93792/19817 to make horizontal lines above and under chapter title.

\documentclass{book} 
\usepackage{titlesec}

\titleformat{\chapter}[display]
  {\bfseries\huge}
  {\filleft\Large\chaptertitlename~\thechapter}
  {3ex}
  {\titlerule\vspace{1.5ex}\filright}
  [\vspace{1ex}\titlerule]

\begin{document}

\chapter{Test Numbered Chapter}

\end{document}

However, I wanted to remove space above content title and used code from this answer https://tex.stackexchange.com/a/46863/19817.

\usepackage{tocloft} 
\setlength{\cftbeforetoctitleskip}{-3em}

tocloft does what I want, but it also removes horizontal lines above "content". My question is: how to use tocloft and keep chapter title formating?

0

1 Answer 1

8

To instruct tocloft not to affect the look of the titles of the Table of Contents, the List of Figures, and the List of Tables, load the package with the option titles.

A side effect of using the titles option is that instructions such as

\setlength{\cftbeforetoctitleskip}{-3em} 

will have no effect: after all, you're asking the package not to interfere with the look of the headers. Just use the macros of the titlesec package to fine-tune the look of the headers.

You must log in to answer this question.

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