Bug#533602: [texlive-latex-extra] Footmisc and hyperref incompatibility
On Fri, Jun 19, 2009 at 11:51 AM, Frank Küster<frank@debian.org> wrote:
> Bastien ROUCARIES <roucaries.bastien@gmail.com> wrote:
>
>> Package: texlive-latex-extra
>> Version: 2007.dfsg.17-2
>> Severity: normal
>> Tags: patch
>>
>> Footmisc and hyperref does not wortk well together.
>
> Thank you for the patch. Could you send us a file that doesn't work
> without, but works with the patch? Chances are good that the problem is
> already solved upstream, and I'd rather check before digging into the
> newest upstream code.
sure in this file hyperlink does not work without the patch (included
comment for non working exemple).
\documentclass{book}
\usepackage{hyperref}
\usepackage{footmisc}
%%%%% comment after
\makeatletter
\long\def\@footnotetext#1{%
\H@@footnotetext{%
\ifHy@nesting
\hyper@@anchor{\@currentHref}{#1}%
\else
\Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#1%
\fi
}}
\def\@footnotemark{%
\leavevmode
\ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
\H@refstepcounter{Hfootnote}%
\hyper@makecurrent{Hfootnote}%
\hyper@linkstart{link}{\@currentHref}%
\@makefnmark
\hyper@linkend
\ifhmode\spacefactor\@x@sf\fi
\relax
}%
\ifFN@multiplefootnote%
\renewcommand*\@footnotemark{%
\leavevmode
\ifhmode
\edef\@x@sf{\the\spacefactor}%
\FN@mf@check
\nobreak
\fi
\H@refstepcounter{Hfootnote}%
\hyper@makecurrent{Hfootnote}%
\hyper@linkstart{link}{\@currentHref}%
\@makefnmark
\hyper@linkend
\ifFN@pp@towrite
\FN@pp@writetemp
\FN@pp@towritefalse
\fi
\FN@mf@prepare
\ifhmode\spacefactor\@x@sf\fi
\relax%
}%
\fi
\makeatother
%%% comment before
\begin{document}
aaaa\footnote{foo}
\end{document}
Reply to: