# Change spacing between elements in \newfloat listof

I have created a new float type with the following in my preamble:

\floatstyle{plain}
\newfloat{myfloat}{thpb}{myfloat}[chapter]
\floatname{myfloat}{\bf My Float}


Then I use the following to create a list at the beginning of my document of all of these new floats:

\listof{myfloat}{My Floats}


I'd like to change the spacing between the elements in the list of myfloat's such that it matches the spacing in my listoffigures and listoftables.

I'm using a class based on the book class (more specifically: http://www.eg.bucknell.edu/physics/thesis/buthesis.cls).

-
Do not use \bf ... but \textbf{My Float}. See Does it matter if I use \textit or \it or l2tabu for an explanation. –  Martin Scharrer Apr 3 '11 at 21:45

To achieve the same format for the new list of floats, it's necessary to redefine two commands: \listof from float.sty (I assumed that you are using this package to build your new float type) and \@chapter from book.cls (the standard class on top of which buthesis.cls is build). The first redefinition only changes \parskip from 0pt (default value used for the new lists created with float) to 0.2in (which is the value used for buthesis.cls). The second redefinition simply adds a vertical space of 10pt at the beginning of each chapter in the new list.

The relevant code that has to be added to the preamble (after the float package has been loaded) is the following:

\makeatletter
\renewcommand*{\listof}[2]{%
\@ifundefined{ext@#1}{\float@error{#1}}{%
\@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
\begingroup\setlength{\parskip}{0.2in}% default: 0pt
\@starttoc{\@nameuse{ext@#1}}%
\endgroup}}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
{\protect\numberline{\thechapter}#1}%
\else
\fi
\else
\fi
\chaptermark{#1}%