1

Since yesterday I have learned that doing a hard reset on a git branch also throws away stashed changes. So, I need to recreate some steps that I have inadvertently thrown away. Unfortunately I cannot remember how I decreased the spacing between lines of contents table. I have tried

\renewcommand{\cftsubsecafterpnum}{\vspace{-8pt}}
\renewcommand{\cftsubsubsecafterpnum}{\vspace{-8pt}}

which works, but unfortunately I also have the custom defined subsubsubsection which I am unable to modify using the above logic using tocloft package.

I have also tried

\renewcommand{\baselinestretch}{0.8}\normalsize
\tableofcontents
\renewcommand{\baselinestretch}{1.0}\normalsize

but this controls only the space of multilines in TOC.

Below are images of what I have now and what it used to look like. Any hints on how to decrease spacing between the lines would be much appreciated.

This is "before" look of how I managed to decrease the spacing. enter image description here

This is what it looks now. enter image description here

  • 1
    subsubsubsection is no level by default for most document classes, so tocloft can not get grip of this level with its \cftX.... macros. You have must either change \l@subsubsubsection or provide \newlistentry, which will lead to a problem, most likely, since you might have defined a counter named subsubsubsection, which \newlistentry tries to define again. Since you have not posted working code, it is hard to tell which solution works best and 99% is guessing only – user31729 Dec 25 '18 at 10:16
  • 1
    Perhaps \subsubsubsection is nothing different than \paragraph and you should change \cftparaafterpnum instead – user31729 Dec 25 '18 at 10:21
  • @ChristianHupfer sorry for the lack of MWE, I was hoping there is something obvious I've missed. However, due to my inability to get this working for hours I sense that it's not as trivial as I remember. In any case, if you'd like to get the thing running, I can offer you this repo for now. If you're on Windows, you can just run runlatex.bat. – Roman Luštrik Dec 25 '18 at 16:20
  • @ChristianHupfer the \cftparaafterpnum worked. Good guess. :) Please post this as an answer so I can accept it. – Roman Luštrik Dec 25 '18 at 16:25
  • 1
    I am not working on Windows, but looking into your runlatex.bat I noticed that you remove any auxiliary file before and then recompile three times, which might be unnecessary when not removing the additional files... – user31729 Dec 25 '18 at 16:27
2

There are not really many classes/packages that provide support for \subsubsubsection and as such, tocloft and its \cftX... macros cannot configure contentline entries regarding the sectioning level subsubsubsection.

Either subsubsubsection has to be enabled with something like \newlistentry or \subsubsubsection is most likely nothing different than \paragraph, so changing the relevant \cftpara... values helps (as it apparently does in the case of this O.P.)

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.