0

EDIT: I originally thought it was tocloft that creates the space between different chapters in the LoT. I was wrong. I edited the title, but left the original question.

I'm currently facing the following problem: I'm using the tocloft package for my ToC, LoT and LoF. By default (?) it adds a vspace of 10pt between tables and figures of different chapters. However, this does not seem to work with starred chapters. Here's a MWE:

\documentclass[a4paper, oneside, 11pt]{report}
\usepackage{tocloft}

\begin{document}

    \listoftables

    \newpage

    \tableofcontents

    \newpage

    \chapter{This is chapter one}

    \begin{table}
        \caption[Table 1]{This is table 1}
    \end{table}


    \chapter{This is chapter two}

    \begin{table}
        \caption[Table 2]{This is table 2}
    \end{table}

    \chapter*{Appendix\markright{Appendix}}
    \addcontentsline{toc}{chapter}{Appendix} 
    \renewcommand{\thetable}{A\arabic{table}}
    \setcounter{table}{0}

    \begin{table}
        \caption[Appendix Table]{This is a table in the appendix.}
    \end{table}


\end{document}

And here's a screenshot showing the problem:

Missing vspace in LoT

As can be seen in the screenshot, the vspace between Table 2.1 and Table A1 is missing. Does anyone have a solution?

1

It is the \chapter command that adds the space to the LoF and LoT but \chapter* does not do that. You could define a new macro to add the space and call it whenever you use \chapter*.

\documentclass{report}
\newcommand{\addloflotspace}{%
  \addtocontents{lof}{\protect\addvspace{10pt}}%
  \addtocontents{lot}{\protect\addvspace{10pt}}%
}
% ...
\chapter*{No number}
\addloflotspace
This chapter ...
| improve this answer | |
  • Thank you very much, Peter Wilson, this works like a charm. And sorry for "blaming" your tocloft package! :-) Apparently I was wrong in assuming that tocloft is responsible for the space in the LoT and the LoF! I edited the question! – neacal Jan 21 at 18:57
  • @neacal No problem --- LaTeX internals can be confusing at (most of) times. – Peter Wilson Jan 21 at 19:28
  • Yes, indeed. I've been writing theses, reports, etc. with LaTeX for several years now and feel like I've only slightly scratched the surface of this powerful system. Before posting here I googled for quite a long time and could not find this seemingly basic source of my "problem". Where could I get such information (i.e. LaTeX internals)? – neacal Jan 21 at 19:33
  • @neacal If you are a masochist start with ctan.org/tex-archive/macros/latex/base. Others may give you a more direct link to what you are after. – Peter Wilson Jan 24 at 19:27

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.