2

Possible Duplicate:
Getting those %#!^& signs in the footnote!

Here's my first version of a clever command for URL-footnotes. It combines pdftex's hyperlink behaviour with a \footnote displaying the URL.

\usepackage[pdftex]{hyperref}
\newcommand{\hrefn}[2]{\href{#1}{#2}\footnote{See {\tt #1}}} %HyperRef and Footnote in one

However it doesn't treat the input as verbatim as \href does. How do I prevent my command \hrefn from treating characters such as # and ~ as special control characters? I already \usepackage{underscore} so _ are not a problem.

/Nordlöw

Nordlöw
  • 373

1 Answers1

2

The url package has a command \urldef which allows you to define robust verbatim URLs that can be used in footnotes.

Also, since you’re using LaTeX, you shouldn’t be using \tt – use \ttfamily or \texttt instead.

Konrad Rudolph
  • 39,394
  • 22
  • 107
  • 160