5

I want to have a little note (just a paragraph of text) appearing at the beginning of my \listoffigures, right after the heading, but before the actual list.

As I am using biblatex for handling my references, I am used to the prenote option to \printbibliography, which does exactly what I mean.

Unfortunately, there is no prenote option for \listoffigures. How can I achieve something like this with my \listoffigures?

I am mainly using KOMA script, so any solution that works nicely with its classes is preferred.

  • Welcome to TeX - LaTeX! Do you mean some descriptive text after the heading before the list starts? – clemens Sep 11 '15 at 13:13
  • Yes, I do. How should I improve my question? – Johannes Maibaum Sep 11 '15 at 15:07
5

Class memoir

There is a hook \cftlofbeforelist in class memoir:

\documentclass{memoir}
\usepackage{lipsum}

\addtodef\cftlofbeforelisthook{%
  \noindent
  \lipsum[2]%
  \bigskip
}

\begin{document}
\listoffigures
\newpage
\chapter{Test}
\lipsum[2]
\begin{figure}\caption{My figure caption}\end{figure}
\end{document}

Result memoir

KOMA-Script

KOMA-Script now uses package tocbasic for the lists. There \AfterTOCHead can be found:

\documentclass{scrbook}
\usepackage{lipsum}

\AfterTOCHead[lof]{%
  \noindent
  \lipsum[2]%
  \bigskip
}

\begin{document}
\listoffigures
\newpage
\chapter{Test}
\lipsum[2]
\begin{figure}\caption{My figure caption}\end{figure}
\end{document}

Result KOMA-Script

  • I accepted this answer, because I am mainly using KOMA script classes, so \AfterTOCHead works best for me. – Johannes Maibaum Sep 11 '15 at 15:06
3

You can use \addtocontents, placing it as soon as possible, so its annotation will be at the beginning of the list. I've provided a way to add prenotes to every list, using the related extension as the first argument, but you need not specify them: just use the ones you want.

\documentclass{book}

\newcommand{\addprenote}[2]{%
  \addtocontents{#1}{%
    \protect\begin{quotation}
    \small\noindent\ignorespaces #2
    \protect\end{quotation}%
  }%
}

\begin{document}

\frontmatter

\listoffigures
\addprenote{lof}{This is the introductory text for the list of figures;
  remember to protect fragile commands inside this text, like you would
  do in captions or section titles.}

\listoftables
\addprenote{lot}{This is the introductory text for the list of tables}

\mainmatter

\chapter{First}

Text

\begin{figure}[htp]
X\caption{Y}
\end{figure}

\begin{table}[htp]
X\caption{Z}
\end{table}

\end{document}

enter image description here

  • I tested this method, and it works great. It's probably the best solution for people who do not want to use extra packages. However, as I am mainly using KOMA script classes, I accepted @HeikoOberdiek's answer. – Johannes Maibaum Sep 11 '15 at 15:05

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.