- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38
Open
Description
Consider this document:
\documentclass{article}
\usepackage{float}
\usepackage{booktabs}
\usepackage{hyperref}
\begin{document}
\section{minipage}
\begin{table}[H]
    \begin{minipage}{\linewidth}
    \centering
    \begin{tabular}{ccc}
        \toprule
        X\footnote{\label{minipage}minipage} & \footnote{other} & X\footref{minipage} \\
        \bottomrule
    \end{tabular}
    \end{minipage}
\end{table}
\end{document}Here the \footref has the correct textual reference to footnote a, but the hyperlink is incorrect.
This seems to because the redefinition of \@mpfootnotetext does not set \@currentHref, while \@footnotetext does.
This workaround seems to work at least in this case:
\long\def\@mpfootnotetext#1{%
    \H@@mpfootnotetext{%
      \ifHy@nesting
        \expandafter\@firstoftwo
      \else
        \expandafter\@secondoftwo
      \fi
      {%
        \expandafter\hyper@@anchor\expandafter{%
          \Hy@footnote@currentHref
        }{\ignorespaces #1}%
      }{%
        \Hy@raisedlink{%
          \expandafter\hyper@@anchor\expandafter{%
            \Hy@footnote@currentHref
          }{\relax}%
        }%
        \let\@currentHref\Hy@footnote@currentHref % fix
        \let\@currentlabelname\@empty % fix
        \ignorespaces #1%
      }%
    }%
  }%Although maybe there's a reason the two are different.
Metadata
Metadata
Assignees
Labels
No labels