1

The following code

\documentclass{report}
\usepackage{manyfoot}
\DeclareNewFootnote{R}[alph]
\usepackage{hyperref}
\begin{document}
The default\footnote{Default} footnote works fine, but
manyfoot\footnoteR{Many foot} with pdflatex throws a warning. xelatex
run on the same code also does not throw a warning!
\end{document}

compiled using pdflatex throws the warning

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

A similar question is addressed here. However, the solution of loading hyperref as the last package still throws the error in the presence of manyfoot. A suggestion of including hyperfootnote=false, identifies the origin, but is not a solution when the hyperlinks are needed.

Strangely, if the code is run with xelatex, there is no warning and the PDF is generated with the links working fine.

How do we suppress the warning while keeping the hyperlinks active using pdflatex compiler?

Here are the output images for a quick reference:

Many footnote mark Footnote text

2
  • I get no warning with XeLaTeX, but the link doesn't work.
    – egreg
    Jul 7, 2019 at 13:03
  • I am sorry, you are correct. I had checked only the plain footnote link (which works), but manyfoot link does not.
    – Sunthar
    Jul 13, 2019 at 17:21

1 Answer 1

1

you can try to add a target destination like this:

\documentclass{report}
\usepackage{manyfoot}
\usepackage{etoolbox}
\makeatletter
\newcommand\manyfoottarget{\makebox[0pt][r]{\hypertarget{Hfootnote.\theHfootnote}\quad}}
\patchcmd\MFL@fnoteplain{\rule}{\manyfoottarget\rule}{}{\fail}
\makeatother

\usepackage{hyperref}
\DeclareNewFootnote{R}[alph]
\begin{document}
The default\footnote{Default}works fine, but
manyfoot\footnoteR{Many Foot} with pdflatex throws a warning. xelatex
run on the same code also does not throw a warning!
\end{document}
1
  • Thanks Ulrike. it works. Can you please explain why such a definition of destination is required?
    – Sunthar
    Jul 13, 2019 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .