1

I have an error that I cannot seem to fix. Here is the minimal working example:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
See \footnote{\footnote{text}}. 
\end{document}

This produces:

pdfTeX warning (dest): name{Hfootnote.2} has been referenced but does not exist, replaced by a fixed one

and I cannot see where the bug actually is. I saw the messages here and there but that does not seem to match my problem.

Michael Baudin
  • 214
  • 2
  • 9

1 Answers1

1

Actually, there are two bugs in the code. First, the footnote is not properly defined. The code should be:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
See \footnote{text}.  % OK
\end{document}

But this was hidden in a bunch of text and I could not locate the bug because LaTeX does not produce any error message for this particular line. Second, the message does not appear if hyperref is not used:

\documentclass{article}
\begin{document}
See \footnote{\footnote{text}}.  % Not OK, but does not produce a warning
\end{document}

The previous code does not produce any warning or error message. The footnote is not properly displayed, however. We see that the footnote is empty.

Empty footnote

Michael Baudin
  • 214
  • 2
  • 9
  • To nit pick, I don't think I would say "using hyperref is a bug". I'd say that using hyperref hides that OP was misusing \footnote, which gets back to the first (and only bug). But +1. – Teepeemm Aug 11 '23 at 15:45