When I have a footnote with an \url
in the section-header, the table of contents shows nothing with it. Why and how can I fix the issue?
2 Answers
It's in general a bad idea to footnote section titles. The footnote can go, if really necessary, to the first paragraph.
In case you can't get without it, you have to use the optional argument:
\section[Section title]{Section title\footnote{A footnote}}
otherwise you'll footnote also the table of contents and the headers, which is wrong (and with a \url
command you'll get many errors).
If the URL contains special characters, LaTeX would have a very hard job, so you should consider the \urldef
command.
Use like this:
\section{Section title\protect\footnote{A footnote}}
-
-
1It does work for me, but egreg's solution seems to be better. See this similar question: tex.stackexchange.com/questions/153329/… Commented Nov 11, 2015 at 13:35
-
@hhh It works for me (+1) in a quite large document with lots of packages, bibliography, complicated tikz drawings, and extra commands. May be you should revise the spelling; in the beginning I had a spelling error in
\protect
, and because of that I got more errors. Commented Nov 15, 2015 at 11:59