next up previous
Next: qed-square Up: examples Previous: inputenc-package: using other source

url-package: adding URLs

With the url package (\usepackage{url}) you can enter URLs like this: \url{}. It will result in :
With the hyperref package (\usepackage{hyperref}) you can make these urls clickable in a pdf-file (which you can create with pdflatex). You can also make links which show a description of the text and not the url (\href{URL}{text}). Unfortunately this does not work together with LaTeX2HTML. More information on the hyperref package can be found in the file ``/usr/local/share/texmf-dist/doc/latex/hyperref/manual.pdf''.

This also works in dvifiles. Note that it necessary to use \usepackage[hypertex]{hyperref} for newer teTeX versions or otherwise local links won't work in dvi files. Note that hyperref messes up documents that also use the a4wide package. The solution to this is to also put a4paper before the documentclass with ``\documentclass[a4paper]{article}'' or before hyperref with ``\usepackage[a4paper=true]{hyperref}''. It is possible to combine options with commas as in ``\usepackage[a4paper=true,hypertex]{hyperref}''.

See also the TeX FAQ on ``Typesetting URLs'' ( or ``Link text doesn't break at end line'' (

Jan Willem Knopper 2007-12-18