2

I'm kind of new to this world of LaTeX and I'm trying to change the way TOC looks (in book style), but I'm facing a problem: while I remove bold face and add a dot line for chapters, the standard space above them disappears.

enter image description here

I used this code to remove bold and add dot lines:

\makeatletter
\renewcommand*\l@chapter{\@dottedtocline{1}{1em}{1em}}
\makeatother

I don't want to use tocloft or other package because I edit the space in chapter titles and other things that those packages override, so I'd like to avoid them and just add a little space above every chapter entry in TOC.

I tried using %\renewcommand*\l@chapter{\vspace*{14pt}} along with my code but TOC goes crazy. Clearly I'm doing something wrong.

enter image description here

What can i do? Thank you.

1 Answer 1

2

Try this:

% tocspace.tex SE 545734
\documentclass{book}
\makeatletter
%\renewcommand*{\l@chapter}{\@dottedtocline{1}{1em}{1em}}
\renewcommand*{\l@chapter}{\addvspace{10pt}\@dottedtocline{1}{1em}{1em}}
\makeatother
\begin{document}
\tableofcontents
\chapter{Introduction}
\section{Notions}
\chapter{Another}
\section{More}
\end{document}

Sorry to hear that you don't like tocloft.

1
  • So wonderful and so simple! That's what I like about LaTeX. This solved my problem, and just so you know, I don't dislike tocloft, is just that I didn't wrote this book in the first place and I'm learning and editing in a kind of "reverse engineering" for better or for worse. Thank you.
    – babel
    May 22, 2020 at 19:49

You must log in to answer this question.

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