2

ToC heading is pushed down when using tocloft package – even without any commands written. Leaving it out puts things back in place. Also I noticed the smaller the \document[font-size], the bigger disposition of ToC heading. Is there an elegant way to bring the heading where it should be?

\documentclass[oneside, 10pt]{scrbook}

\usepackage{tocloft}
\renewcommand\cftchapfont{\scshape}
\renewcommand\cftchappagefont{\scshape}

\begin{document}

\frontmatter
\tableofcontents

\mainmatter
\chapter{Thank you}
This is just great :)

\end{document}

Pages of ToC and 1st Chapter

  • 1
    Welcome to TeX.SX! Did you try \usepackage[titles]{tocloft}? – egreg May 27 '15 at 21:36
  • @egreg Thank you for fast and warm welcome :) – omtamal May 27 '15 at 21:40
2

If you try https://tex.stackexchange.com/search?q=%2Btitles+%2Btocloft+is%3Aanswer you'll be presented with 172 results: the tocloft package, by default, redesigns the format of the chapter headers for the table of contents, list of tables and list of figures. However, I couldn't find a precise duplicate.

Fortunately, it provides the titles option that avoids this customization.

\documentclass[oneside, 10pt]{scrbook}

\usepackage[titles]{tocloft}
\renewcommand\cftchapfont{\scshape}
\renewcommand\cftchappagefont{\scshape}

\begin{document}

\frontmatter
\tableofcontents

\mainmatter
\chapter{Thank you}
This is just great :)

\end{document}

enter image description here

2

If you only want to change the font of the chapter entries in TOC with a KOMA-Script class you could use

\setkomafont{chapterentry}{\scshape}

So there is no need to use tocloft together with scrbook.

enter image description here

Code:

\documentclass[oneside, 10pt]{scrbook}

\setkomafont{chapterentry}{\scshape}

\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{Thank you}
This is just great :)
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.