My document has several \href that I would like to be shown on the footnote. How can I do it?
Asked
Active
Viewed 8,834 times
27
Stefan Kottwitz
- 231,401
Bernardo Kyotoku
- 445
-
See also Getting those %#!^& signs in the footnote!. – Martin Scharrer Apr 12 '11 at 11:02
1 Answers
33
I usually write something like this, so the entry is hyperlinked for onscreen reading but there's also a footnote to the URL for paper output.
\documentclass{article}
\usepackage{hyperref}
\newcommand\fnurl[2]{%
\href{#2}{#1}\footnote{\url{#2}}%
}
\begin{document}
hello \fnurl{Google}{www.google.com}
\end{document}
Will Robertson
- 73,872
-
2Very useful! ... for people like me who want to replace the
\hrefwith the suggested\fnurl: The syntax ofhrefis inversed, i.e.\href{#1}{#2}\footnote{\url{#1}}can be used with the typical\href{www.google.com}{Google}syntax – chris-sc Sep 13 '16 at 12:50 -
That href replacement didn't quite work, but this one from the duplicate question did:
– partofthething Dec 24 '18 at 17:42\let\oldhref\href\renewcommand{\href}[2]{\oldhref{#1}{#2}\footnote{\url{#1}}}