I would like to combine a method of customising footnote symbols which allows for commands like:
\footnote[*]{foo}
with a method of putting footnotes into section titles so that they don't show up in the Table of Contents.
If have tried simply putting the two methods together:
\makeatletter
\def\@xfootnote[#1]{\protected@xdef\@thefnmark{#1}\@footnotemark\@footnotetext}
\makeatother
\makeatletter
\def\titlefootnote{\ifx\protect\@typeset@protect\expandafter\footnote\else\expandafter\@gobble\fi}
\makeatother
and this allows me to do, for example:
\section{My new section\titlefootnote[*]{This section has footnotes}}
but the table of contents then reads:
1 My new section*]This section has footnotes
How can I adjust the code to allow for the \footnote[*]-type command and the \titlefootnote tweak?
Here's a MWE:
\documentclass{article}
% Allow footnotes to chapter (and other heading) titles without them
% appearing in the table of contents and running titles at the top of the page
\makeatletter
\def\@xfootnote[#1]{\protected@xdef\@thefnmark{#1}\@footnotemark\@footnotetext}
\makeatother
\makeatletter
\def\titlefootnote{\ifx\protect\@typeset@protect\expandafter\footnote\else\expandafter\@gobble\fi}
\makeatother
\begin{document}
\tableofcontents
\section{My new section\titlefootnote[*]{This section has footnotes}}
\end{document}
(by the way, I know some people say you shouldn't use footnotes in a section title.)


\section, as in\section[My new section]{My new section\titlefootnote{...}}– Steven B. Segletes Apr 12 '16 at 13:18