1

I have found similar questions to mine, but still could not figure out what to do yet.

I am using the book class, and in my list of figures, I have the default layout:

List of Figures

1.1 Very long caption that breaks over many lines ..... 1

2.1 Very long caption that breaks over many lines ..... 2 2.2 Very long caption that breaks over many lines that now hugs the first entry from the same chapter like this (no space in same chapter's entries).......... 3

What I want is the exact same space it has between entries from different chapters (e.g. 1.1 and 2.1) to be applied throughout.

I really really don't want to deviate from the book class as everything else is perfect exactly like I want it.

Any suggestions about what one can do? Can I edit the macro in the book.cls file itself somehow?

I still want to do a list of tables too, and I assume it will have the same issue.

Edit: here is a bare-bones MWE of what I mean:

\documentclass[12pt,a4paper]{book}

\begin{document}

\listoffigures

\chapter{One}
\begin{figure}
\caption{Very long caption that continues over many lines. Very long
caption that continues over many lines. Very long caption that continues
over many lines. Very long caption that continues over many lines. Very
long caption that continues over many lines. Very long caption that 
continues over many lines.}
\end{figure}
\chapter{Two}
\begin{figure}
\caption{Very long caption that continues over many lines. Very long
caption that continues over many lines. Very long caption that continues
over many lines. Very long caption that continues over many lines. Very
long caption that continues over many lines. Very long caption that 
continues over many lines.}
\end{figure}
\begin{figure}
\caption{Very long caption that continues over many lines. Very long
caption that continues over many lines. Very long caption that continues 
over many lines. Very long caption that continues over many lines. Very
long caption that continues over many lines. Very long caption that 
continues over many lines.}
\end{figure}

\end{document}

Which produces, at the LOF:

Adrian
  • 425
  • 1
  • 4
  • 12
  • 2
    May be the 'tocloft" package could help with command \cftbeforesecskip. But without a sample code, it is very difficult to provide an accurate answer. Please consider to edit your post to provide an MWE, that is to say a minimal fully compilable code, starting with \documentclass and ending with \end{document}. – Jhor Sep 24 '19 at 13:19

2 Answers2

1

The lof automatically adds an \addvspace{} after each chapter. You can suppress it by redefining -- locally -- this command do do-nothing. And then use tocloft package to define the new skip. The MWE writes:

\documentclass{book}
\usepackage{tocloft}
\begin{document}

\begingroup
\setlength{\cftbeforefigskip}{1em}
\renewcommand*{\addvspace}[1]{}
\listoffigures
\endgroup

\chapter{One}
etc..
\end{document}
Jhor
  • 4,179
  • Thanks @Jhor! it works exactly how I want. – Adrian Sep 24 '19 at 17:15
  • Update: OK, have to add, I tried it on the MWE I gave and it worked there, but when doing it in the main document I am working on, all the spaces are removed between all the entries now. I can only assume something is clashing? The packages I have loaded (in order) are: inputenc, graphicx, amsmath, amssymb, mathrsfs, textcomp, scrextend, siunitx, footmisc, mathtools, enumitem, caption, minitoc, layout, floatpag, array, usnomencl, chemfig, and then followed by tocloft when I add it. – Adrian Sep 25 '19 at 05:20
1

OK everyone, with some leads from @Danie Els, and combining some of the ideas of similar questions asked in the past, I got it to do what I wanted as follows:

First, you have to disable/remove the space that book class automatically inserts for LOF entries that are from different chapters, by using the code in the preamble that @Stefan Kottwitz suggested (https://tex.stackexchange.com/a/793/54526):

% Remove the initial space between LOF entries of different chapters
\newcommand*{\noaddvspace}{\renewcommand*{\addvspace}[1]{}}
\addtocontents{lof}{\protect\noaddvspace}

Then you add a parskip with setlength as @user36296 suggested (https://tex.stackexchange.com/a/330877/54526) and you simply limit it to the LOF with curly braces:

{\setlength{\parskip}{10pt}% adds the new space between LOF entries
\listoffigures}

I found that one especially has to perhaps avoid something like tocloft package as I think it starts to affect things like your minitoc if you have one, as my minitoc's had altered formatting (that I didn't do myself) whenever I used tocloft.

Adrian
  • 425
  • 1
  • 4
  • 12