# Changing the appearance of list of figures

I want to change the appearance of the list of figures to roughly what I have under "New List of Figures" in the example below: Between the header for the lof and the entries I want a line with two subheadings in small caps, "figure" and "caption". Then, after some vertical space, the figure number, horizontal space, the caption, then no dotted line but only a small space, and then the page number. I understand that latex doesn't handle lof, toc etc. as tables but as lists, I formatted it as a table only for the example.

\documentclass{memoir}
\usepackage{float}
% \usepackage{tocloft} % Actually I haven't used it yet.
\usepackage{ltablex}

\renewcommand\printloftitle[1]{\section*{#1}}
\renewcommand\afterloftitle{}

\begin{document}

\listoffigures

\section*{New List of Figures}
\vspace{-\baselineskip}
\begin{tabularx}{\linewidth}{@{}lX}
\textsc{figure} & \textsc{caption}\\
\\
0.3 & myfigureC has a longer caption, longer than a line. Still a little bit longer. \quad 1\\
\end{tabularx}

\begin{figure}[H]
\centering
AAA\\
AAA\\
AAA\\
\caption{myfigureA}
\end{figure}
\begin{figure}[H]
\centering
BBB\\
BBB\\
BBB\\
\caption{myfigureB}
\end{figure}
\begin{figure}[H]
\centering
CCC\\
CCC\\
CCC\\
\caption{myfigureC has a longer caption, longer than a line. Still a little bit longer.}
\end{figure}

\end{document}


EDIT: Mike Renfro's answer almost works for me, but there's one problem with the long caption, namely its last word and the number get printed at the end of the line:

\documentclass{memoir}
\usepackage{calc}

\renewcommand\printloftitle[1]{\section*{#1}}

\begin{document}

\listoffigures

\begin{figure}
\caption{myfigureA}
\end{figure}
\begin{figure}
\caption{myfigureB}
\end{figure}
\begin{figure}
\caption{myfigureC has a longer caption, longer than a line. Still a little bit longer.}
\end{figure}

\end{document}

• Memoir includes most of all of tocloft's functionality. Start reading chapter 9 of the memoir manual (Contents Lists), especially section 9.2 (The Class ToC Methods) while I see if there's a simple answer. – Mike Renfro Jul 11 '15 at 13:21
• Adding \textsc or \quad appears to be the root cause of your current problem. Don't have a good fix for it yet. – Mike Renfro Jul 11 '15 at 15:19
• @MikeRenfro As far as I can see your answer works when an entry in the lof is only one line, or the last line of the caption contains only one word. Try adding a few more words to figure 3 and you'll see. – muk.li Jul 11 '15 at 15:52
• Ragged right entries ensure now. – Mike Renfro Jul 11 '15 at 16:09

This answer doesn't include the float or ltablex packages, since they don't appear to affect things one way or the other. If you want a small caps heading above the LoF, just adjust the \afterloftitle and \widthof commands accordingly.

\documentclass{memoir}
\usepackage{calc} % for calculating width of LoF headings

\renewcommand\printloftitle[1]{\section*{#1}}
\renewcommand\afterloftitle{Figure Caption}
% adds a line of text after the LoF title
\setlength{\cftfigurenumwidth}{\widthof{Figure }}
% instead of "Figure " including the space, you can use whatever precedes the
% removes the dot leader between the figure title and the page number
\renewcommand{\cftfigureafterpnum}{\cftparfillskip}
% Ensure ragged right overall (http://tex.stackexchange.com/questions/53057/)

\begin{document}
{\raggedright
\listoffigures
}
\begin{figure}
\caption{myfigureA}
\end{figure}
\begin{figure}
\caption{myfigureB}
\end{figure}
\begin{figure}
\caption{myfigureC has a longer caption, longer than a line. Maybe a good bit longer. Or even longer still.}
\end{figure}

\end{document}


• Almost there, but one problem remains, see my edit above. – muk.li Jul 11 '15 at 14:57
• If in your example I want to change the Heading to be formatted like a chapter heading via \renewcommand\printloftitle[1]{\chapter*{#1}} I get two blank pages inserted at the beginning of the file. Any idea why that is so and how I can turn it off? Or, assuming that I could just comment out that line because per default the LoF title is printed like a chapter title, "Figure Caption" surprisingly appears in the same line, so that that's also not so easily possible. – muk.li Jul 23 '15 at 9:08
• – muk.li Jul 23 '15 at 10:39