4

When inserting a URL in a footnote

\footnote{http://www.bmu-klimaschutzinitiative.de/de/projekte_nki?p=1\&d=450, gesichtet am 21.10.2012}

there are two errors that missing $ signs have been inserted. How can I mark the URL as plain text?

Qrrbrbirlbel
  • 119,821
PVitt
  • 297

1 Answers1

8

The dedicated url package or the hyperref package will help you here.

url

\documentclass{article}
\usepackage{url}
\begin{document}
\footnote{\url{http://www.bmu-klimaschutzinitiative.de/de/projekte_nki?p=1&d=450}, gesichtet am 21.10.2012}
\end{document}

The font can be changed with \urlstyle (url manual section 3 “Style”, works with hyperref, too):

  • \urlstyle{tt}: mono-spaced typewriter font (default)
  • \urlstyle{rm}: roman (serif) font
  • \urlstyle{sf}: sans-serif font
  • \urlstyle{same}: same font as the sourrounding text

hyperref

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\footnote{\url{http://www.bmu-klimaschutzinitiative.de/de/projekte_nki?p=1&d=450}, gesichtet am 21.10.2012}
\end{document}

The hyperref package defines a few other macros that handle URLs:

  • \href{<URL>}{<text>}: “The <text> is made a hyperlink to the <URL>.” (not recommended in printed documents)
  • \nolinkurl{<URL>}: similar to the output of the url package, no link will be created.

If you need to use more references in your footnotes, you also might be interested in more automatic solutions.

Qrrbrbirlbel
  • 119,821