I am customizing the list of tables and list of figures in a report class document. I am trying to produce lists that start this way: "Table 1: Some info" and so on, instead of the default beginning with section numbers ("1.2 Some info"). There are two things I am unable to do: 1. add the ":" after Table/Figure, and 2.Suppress the extra vertical space between tables/figures from different chapters, i.e. I want equal distances between the items in the lists regardless of which chapter they belong to.
Here is the code for list of tables only:
\documentclass{report}
\usepackage{chngcntr}
\usepackage{tocloft}
\usepackage{hyperref}
\renewcommand{\cfttabpresnum}{Table }
\newlength{\mylen}
\settowidth{\mylen}{\cfttabpresnum\cfttabaftersnum}
\addtolength{\cfttabnumwidth}{\mylen}
\begin{document}
\listoftables
\chapter{Test one}
\section{Test one one}
\begin{table}
\caption{Test table one}
\end{table}
\begin{table}
\caption{Test table one}
\end{table}
\begin{table}
\caption{Test table one}
\end{table}
\begin{table}
\caption{Test table one}
\end{table}
\begin{figure}
\caption{Test figure one}
\end{figure}
\chapter{Test two}
\section{Test two two}
\begin{table}
\caption{Test table two}
\end{table}
\begin{figure}
\caption{Test figure two}
\end{figure}
\end{document}
Best Answer
For customization of any
tableofcontents
-like command (ToC
,LoT
, orLoF
) I like thetitletoc
package, as it offers the same friendly user interface of thetitlesec
package.The important part in the code below is
I have used more spacing commands than you requested, but you can tweak them to suit your tastes. In particular, you can change
\enspace
to any\hspace{}
command that you like.