Hyperref Warnings – Avoiding ‘Ignoring Empty Anchor’ Warning in Hyperref

footnoteshyperref

I use something like the following to get a footnote without an anchor.

\documentclass{article}
\usepackage{hyperref}
\begin{document}
{\let\thefootnote\relax\footnotetext{2010 Mathematics Subject Classification: 05A05, 05A16.}}
\end{document}

The hyperref package doesn't like this and produces a warning. Is there something simple I can do to prevent the warning? (I prefer to have no warnings.) I do want hyperref to create links for normal footnotes.

A more general question (which should answer the specific one): Is there a command that locally disables hyperref from creating a link?

Best Answer

To get unnumbered footnotes, I would suggest defining a custom command as shown in the following MWE:

\documentclass{article}
\usepackage{hyperref}

\newcommand\nnfootnote[1]{%
  \begin{NoHyper}
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \end{NoHyper}
}
\begin{document}
\nnfootnote{2010 Mathematics Subject Classification: 05A05, 05A16.}
\end{document}

The NoHyper environment additionally ensures that there is no hyperlink from the text to the footnote.