Created
December 10, 2023 20:01
-
-
Save matthewfl/52067140a158721df40599f92fd15929 to your computer and use it in GitHub Desktop.
Fix hyperref linking footnotes to the first page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\NewCommandCopy\originalfootnotetext\footnotetext | |
\NewCommandCopy\originalfootnotemark\footnotemark | |
\renewcommand{\footnotemark}{% | |
\stepcounter{footnote}% | |
\textsuperscript{\hyperref[footnotebody:\thefootnote]{\thefootnote}}} | |
\renewcommand{\footnotetext}[1]{% | |
\originalfootnotetext{\phantomsection\label{footnotebody:\thefootnote}#1}} | |
\renewcommand{\footnote}[1]{\footnotemark\footnotetext{#1}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment