Follow-up question of Why are \listof{}{}
and \listoffigures
styled differently?...
With the issue mentioned above I finally managed to design my \listof{}{}
and \listoffigures
as desired but one issue remains unsolved: How to avoid global settings for my document like \setlength{\parskip}{3mm}
being applied to list of figures, list of tables, etc.?
MWE: Uncommenting \setlength{\parskip}{3mm}
affects the \listoffigures
but not the \listof{algo}{List of Algorithms}
.
\documentclass[12pt,a4paper,twoside,openright]{report}
\usepackage[english]{babel}
\usepackage{float}
\newfloat{algo}{tbp}{loa}[chapter]
% \setlength{\parskip}{3mm}
% \setlength{\parindent}{3mm}
\frenchspacing
\sloppy
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@chapter}%
{\addtocontents{lof}}%
{\addtocontents{loa}{\protect\addvspace{10pt}}%
\addtocontents{lof}}%
{\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}}
\makeatother
\begin{document}
\listoffigures
\listof{algo}{List of Algorithms}
\chapter{foo}
\begin{figure}
\centering
\rule{1cm}{1cm}
\caption{A figure}
\end{figure}
\begin{algo}
(algo)
\caption{An algorithm}
\end{algo}
\begin{figure}
\centering
\rule{1cm}{1cm}
\caption{Another figure}
\end{figure}
\begin{algo}
(algo)
\caption{Another algorithm}
\end{algo}
\chapter{bar}
\begin{figure}
\centering
\rule{1cm}{1cm}
\caption{Yet another figure}
\end{figure}
\begin{algo}
(algo)
\caption{Yet another algorithm}
\end{algo}
\end{document}