[Tex/LaTex] Footnote on “Contents” at head of table of contents

footnotestable of contents

Is it possible to place a footnote on the Contents heading that is generated at the head of a table of contents? (Not on an individual item in the table of contents, as discussed here.)

I thought perhaps titletoc would permit this, but I see nothing about footnotes in the docs for that package.


Edit: I am using document class scrbook (needed for \multiplefootmarker, since the author's notes use numbers, while the editor's notes use * and other symbols). It is the editor who needs to annotate the Contents title.

Best Answer

1. book class

Method 1 — Define a new command

The \ftableofcontents command wants as argument the text of the footnote.

\documentclass{book}
\usepackage{xpatch}

\newcommand\ftableofcontents{\renewcommand\ftableofcontents[1]}
\expandafter\ftableofcontents\expandafter{\tableofcontents}
\xpatchcmd\ftableofcontents
  {\contentsname}
  {\contentsname\footnote{#1}\fi}{}{}
% Omit the following lines if you want the footnote with an arabic number
\xpretocmd\ftableofcontents{\begingroup\renewcommand\thefootnote{\fnsymbol{footnote}}}{}{}
\xapptocmd\ftableofcontents{\endgroup}{}{}

\begin{document}
\frontmatter
\ftableofcontents{This is the footnote}

\mainmatter
\chapter{A chapter}
\section{A section}
Here is a footnote\footnote{A}
\end{document}

Method 2 — Overload \tableofcontents

In this case we redefine \tableofcontents to accept as optional argument the text of the footnote; nothing happens if no optional argument is specified.

\documentclass{book}
\usepackage{xpatch}

\newcommand\temp{\renewcommand\tableofcontents[1][]}
\expandafter\temp\expandafter{\tableofcontents}
\xpatchcmd\tableofcontents
  {\contentsname}
  {\contentsname\if\relax\detokenize{#1}\relax\else\footnote{#1}\fi}{}{}
% Omit the following lines if you want the footnote with an arabic number
\xpretocmd\tableofcontents{\begingroup\renewcommand\thefootnote{\fnsymbol{footnote}}}{}{}
\xapptocmd\tableofcontents{\endgroup}{}{}

\begin{document}
\frontmatter
\tableofcontents[This is the footnote]

\mainmatter
\chapter{A chapter}
\section{A section}
Here is a footnote\footnote{A}
\end{document}

enter image description here

2. scrbook class

The previous methods don't work with the scrbook class and it would be very difficult to patch the commands that produce the table of contents, so a hack seems the best thing to try (apart avoiding putting a footnote to a chapter title to begin with).

\documentclass{scrbook}

\begin{document}

\frontmatter

\begingroup
\makeatletter
\protected@edef\contentsname{\contentsname\unexpanded{\footnote{%
  %%%% ADD HERE THE FOOTNOTE TEXT
  This is a footnote%
  %%%% DON'T FORGET THE FINAL %
  }}%
  \gdef\noexpand\contentsname{\contentsname}}

% Omit the following line if you want a number
\renewcommand\thefootnote{\fnsymbol{footnote}}

\tableofcontents
\endgroup

\mainmatter

3. Alternative method (all classes)

Instead of a footnote you can add some text just after the header.

\documentclass{scrbook}

\begin{document}
\frontmatter

\addtocontents{toc}{\unexpanded{\unexpanded{{%
  \itshape\footnotesize
  This is a note for the table of contents
  \par\bigskip
}}}}

\tableofcontents

\mainmatter
\chapter{A chapter}
\section{A section}

\end{document}

enter image description here